do nothing for phy rev < 3
- if PHY hang avoidance is on, enable staying in carrier search
- if the G-band spur workaround is enabled (it is on rev 3 and 4)
- adjust RX analog LPF bandwidth with a reduction factor of 7
- if the channel is 40mhz channel 11, adjust minimum noise var with the two tone IDs (57, 58) and noise values (0x3ff, 0x3ff)
- otherwise adjust minimum noise var with no tones (below)
- adjust CRS minimum power to 30 (below)
- if A-band spur workaround is enabled (boardflag):
- adjust minimum noise var with no or a single tone ID/noise value depending on channels:
- channel 54: tone ID 32, noise value 0x25f
- 134: 32, 0x21f
- 151: 16, 0x23f
- 153, 161: 48, 0x23f
- others: no tone
- adjust minimum noise var with no or a single tone ID/noise value depending on channels:
- if PHY hang avoidance is on, disable staying in carrier search
adjust RX analog LPF bandwidth
do nothing on PHY rev < 3
- if channel is 40mhz channel 11:
- if RX analog LPF bandwidth was previously adjusted, do nothing
- write the RC calibration value plus reduction factor all ORed with 0x80 to phy register 0x606b
- otherwise plus reduction factor
- if RX analog LPF bandwidth was previously adjusted, do nothing
- write the RC calibration value ORed with 0x80 to phy register 0x606b
adjust minimum noise var
- set table length to 254 for 40 mhz, 128 for 20 mhz
- if noise var was previously adjusted
- write the saved noise var to the 32-bit nphy table 16 at the respective stored offsets
- clear the saved noise var
- set noise var to not previously adjusted
- if tones are given
- clear the saved noise var
- set noise var to previously adjusted
- for each tone id/noise value:
- calculate the offset as twice the tone ID plus 1
- read the 32-bit nphy table 16 at this offset and store in saved noise var array
- write the given noise value to this offset in the same table
adjust CRS minimum power
do nothing on PHY rev < 3
- if channel is 40mhz channel 11:
- if CRS minimum power was not previously adjusted
- store the lower 8 bits of registers 0x27d, 0x280, 0x283 and overwrite them with the given value
- if CRS minimum power was not previously adjusted
- otherwise
- if CRS minimum power was previously adjusted
- restore the lower 8 bits of the said registers
- if CRS minimum power was previously adjusted