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 to wlan_gain_table.txt in 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
           //!

Note:

  • The maximum size for the Wi-Fi Gain table is 128 bytes.

  • In each entry, list 2× the max power value desired (for example, for 17.5 dB Tx power, input 35). Consider the desired power value in steps of 0.5 dB.

  • If the max. TX power is the same for all the channels, then use 17 (0x11) as the number of channels and specify a single channel entry with 255 as channel ID.

  • If the max TX power is NOT the same for all channels, then indicate the number of channels and specify the TX power values for all the channels one by one.

  • For TELEC, there is also a third gain table format: When 0x2n is used as the number of channels, then specify n channel entries, where each entry sets the TX power limit for all channels that are higher than the channel ID specified in the previous entry (or from channel 1 for the first entry) and lower or equal to the specified channel ID. For example, if 4 channel entries are defined with channel IDs 2, 10, 13 and 14 then, the first entry sets the limits for Wi-Fi channel 1-2. The second entry sets the limits for Wi-Fi channel 3-10, and the third entry sets the limits for Wi-Fi channel 13 and the fourth entry sets the limits for Wi-Fi channel 14.

Example Wi-Fi Gain Table Structure:

   // "*********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,      33,  24,  21,  20,
            2,      34,  28,  28,  24,
            3,      40,  30,  32,  30,
            4,      40,  33,  36,  31,
            5,      40,  35,  36,  32,
            6,      40,  35,  36,  31,
            7,      40,  34,  36,  30,
            8,      38,  32,  36,  32,
            9,      38,  34,  34,  28,
            10,     34,  30,  30,  22,
            11,     34,  24,  22,  20,
          ETSI,0x11,
            255,    36,  36,  36,  24,
          TELEC,0x24,
            2,      34,  28,  32,  24,
            10,     34,  36,  36,  24,
            13,     34,  26,  24,  24,
            14,     36,   0,   0,   0,
          KCC, 0x11,
            255,    36,  36,  36,  36,
          };

The above Wi-Fi Gain Table applies the following max TX power limitations:

  • FCC:

    • 802.11b: +16.5…+20 dBm depending on channel

    • 802.11g/n/ax: +10…+18 dBm depending on channel

  • ETSI:

    • 802.11b/g/n: +18 dBm

    • 802.11ax: +12 dBm

  • MIC:

    • Channel 1-2: +12...+17 dBm (depending on Wi-Fi standard)

    • Channel 3-10: +12...+18 dBm

    • Channel 11-13: +12...+17 dBm (depending on Wi-Fi standard)

    • Channel 14: Only 802.11b supported with +18 dBm max TX power

  • KCC:

    • +18 dBm (for 802.11b/g/n/ax and all channels)