bcm-v4

[Specification

NPHY Adjust LNA Gain Table

  1. Establish a 2-element s16 named gain
  2. Establish a 2-element u16 named minmax
  3. Establish a 4-element u16 array named lna_gain and initialize to -2, 10, 19, 25
  4. If phyhang_avoid

    1. N PHY Stay in Carrier Search with argument 1

  5. If nphy_gain_boost

    1. If current band is 2 GHz
      1. Set both elements of gain to 6
    2. Otherwise
      1. Extract the current channel from radio_chanspec

      2. Set tmp to 40370 - 315 * channel
      3. Set gain[0] to ((tmp >> 13) + ((tmp >> 12) & 1))

      4. Set tmp to 23242 - 224 * channel
      5. Set gain[1] to ((tmp >> 13) + ((tmp >> 12) & 1))

  6. Otherwise
    1. Set both elements of gain to 0
  7. Loop 2 times with i as index
    1. Write ((i << 10) | 8) to PHY Register 0x72

    2. If nphy_elna_gain_config

      1. Write 19 + gain[i] to PHY Register 0x73

      2. Write 25 + gain[i] to PHY Register 0x73

      3. Write 25 + gain[i] to PHY Register 0x73

      4. Write 25 + gain[i] to PHY Register 0x73

    3. Otherwise
      1. Loop 4 times with j as index
        1. Write lna_gain[j] + gain[i] to PHY Register 0x73

    4. Set minmax[i] to 23 + gain[i]
  8. MaskSet PHY Register 0x1E with mask 0xFF00 and set with minmax[0]

  9. MaskSet PHY Register 0x34 with mask 0xFF00 and set with minmax[1]

  10. If phyhang_avoid

    1. N PHY Stay in Carrier Search with argument 0


Exported/Archived from the wiki to HTML on 2016-10-27