WLAN Gain Table#

Follow the steps below to program the region-based maximum power for the WLAN device.

See the Region-based Maximum Power section for more details.

  1. Compile and insert the driver, as described in the Compilation Steps and Installing the Driver sections.

  2. Navigate to the rsi/release folder.

  3. Copy the contents of appropriate gain tables based on the antenna from the different gain tables shared (say wlan_gain_table_1_3.txt ) to wlan_gain_table.txt to the release folder.

  4. Run the following commands:

    #./onebox_util rpine0 update_wlan_gain_table

    With the above commands, gain tables programming will start and a successful programming should show below output in dmesg logs.

      ******************Successfully completed programming n gain tables***************** 

    In this case, 'n' is the number of structures given in wlan_gain_table.txt file.

  5. The following is the reference Gain table structure format while updating the file.

    //!************************************************************
    //! INSTRUCTIONS SHOULD BE FOLLOWED TO EDIT BELOW GAIN TABLES:
    
    //!************************************************************
    
    //! 1. Each value should be seperated by ',' and space characters.
    
    //! 2. Multi-line comments not supported. (e.g. /*comment*/)
    
    //! 3. A space before comment is needed, for in-line comments. (e.g. < Data > // < Comment >)
    
    //! 4. Hexa-decimal numbers not supported.
    
    //! 5. No space between value and ',' character.
    
    //! 6. Table with size more than 128 bytes is not supported.
    
    //! 7. Supported table names and their maximum supported size are
    
    //!     For 2 GHz and 20 MHz ---
    _RS9116_HP_MODE_REGION_BASED_RATE_VS_MAXPOWER_SINGLE_BAND_NONHPM  MAX_LENGTH = 128
    
    //!    NOTE: No support for other table names.
    
    //! 8. Gain table Format:
    
    //!
    
           //!    <TABLE NAME>[] = { //<COMMENTS if any>
           //!    <NO.of Regions>,
           //!        <REGION NAME 1>, <NO.OF CHANNELS IN THIS REGION>,
           //!            <CHANNEL NUMBER 1>, <MAX POWER FOR b RATE>, <MAX POWER FOR g RATE>, <MAX POWER FOR n RATE>, <MAX POWER FOR 11ax RATE>, 
           //!            <CHANNEL NUMBER 2>, <MAX POWER FOR b RATE>, <MAX POWER FOR g RATE>, <MAX POWER FOR n RATE>,  <MAX POWER FOR 11ax RATE>,
           //!            .
           //!            .
           //!            <CHANNEL NUMBER m-1>, <MAX POWER FOR b RATE>, <MAX POWER FOR g RATE>, <MAX POWER FOR n RATE>, <MAX POWER FOR 11ax RATE>,
           //!            <CHANNEL NUMBER m>, <MAX POWER FOR b RATE>, <MAX POWER FOR g RATE>, <MAX POWER FOR n RATE>, <MAX POWER FOR 11ax RATE>,
           //!        <REGION NAME 2>, <NO.OF CHANNELS IN THIS REGION>,
           //!            <CHANNEL NUMBER 1>, <MAX POWER FOR b RATE>, <MAX POWER FOR g RATE>, <MAX POWER FOR n RATE>, <MAX POWER FOR 11ax RATE>,
           //!            <CHANNEL NUMBER 2>, <MAX POWER FOR b RATE>, <MAX POWER FOR g RATE>, <MAX POWER FOR n RATE>, <MAX POWER FOR 11ax RATE>,
           //!            .
           //!            .
           //!            <CHANNEL NUMBER m-1>, <MAX POWER FOR b RATE>, <MAX POWER FOR g RATE>, <MAX POWER FOR n RATE>, <MAX POWER FOR 11ax RATE>, 
           //!            <CHANNEL NUMBER m>, <MAX POWER FOR b RATE>, <MAX POWER FOR g RATE>, <MAX POWER FOR n RATE>, <MAX POWER FOR 11ax RATE>, 
           //!        <REGION NAME 3>, <NO.OF CHANNELS IN THIS REGION>,
           //!        .
           //!        .
           //!        <REGION NAME y>, <NO.OF CHANNELS IN THIS REGION>,
           //!    }; //<COMMENTS if any>
           //! 9. Supported Region names:
           //!     FCC, ETSI, TELEC, KCC
           //!
    
    // "*********Silicon SiWx91x Sample Gain Table Structure*********"
    
    
           _RS9116_HP_MODE_REGION_BASED_RATE_VS_MAXPOWER_SINGLE_BAND_NONHPM[128] = {
           4,//NUM_OF_REGIONS
           FCC, 0xB,//NUM_OF_CHANNELS
           //   rate,  11b, 11g, 11n, 11ax
           1,  34,  26,  21,  20,
           2,  34,  28,  28,  26,
           3,  40,  34,  34,  32,
           4,  40,  36,  36,  34,
           5,  40,  36,  36,  36,
           6,  40,  36,  36,  36,
           7,  40,  36,  36,  36,
           8,  38,  34,  36,  34,
           9,  38,  34,  36,  30,
           10,  34,  30,  30,  22,
           11,  34,  24,  22,  20,
           ETSI,0x11,
           255, 36,  36,  36,  24,
           TELEC,0x24,
           2,  34,  28,  32,  32,
           10,  34,  34,  34,  34,
           13,  34,  26,  24,  24,
           14,  36,   0,   0,   0,
           KCC, 0x11,
           255, 36,  36,  36,  36,
           };