PHY Radio 2056 Setup (struct chan_info_nphy_rev3 *inp)
- Write the data from inp to Radio Registers 0x56, 0x57, 0x46, 0x51, 0x50, 0x4B, 0x4C, 0x4D, 0x4E
- Write the data from inp to Radio Registers 0x4F, 0x1B, 0x1C, 0x1D, 0x70, 0x72, 0x75, 0x76, 0x2D
- Write the data from inp to Radio Registers 0x34, 0x37, 0x41, 0x4D, 0x53, 0x58, 0x5E, 0x62, 0x64
- Write the data from inp to Radio Registers 0x2D, 0x34, 0x37, 0x41, 0x4D, 0x53, 0x58, 0x5E, 0x62, 0x64
- The above data are in sequential locations in the array inp.
- If PHY Revision is 3
Set a pointer to the SYN_2056_rev3 table
- Else if the PHY Revision is 4
Set a pointer to the SYN_2056_rev4 table
- Otherwise
- If the Radio Revision is 5
Set a pointer to the SYN_2056_rev5 table
- Else if the Radio Revision is 6
Set a pointer to the SYN_2056_rev6 table
- Else if the Radio Revision is 7 or 9
Set a pointer to the SYN_2056_rev7 table
- Else if the Radio Revision is 8
Set a pointer to the SYN_2056_rev8 table
- If the Radio Revision is 5
If bandtype is 2
- Write the init_g member of row 0x47 of the table referenced by the pointer to Radio Register 0x49
- Otherwise
- Write the init_a member of row 0x47 of the table referenced by the pointer to Radio Register 0x49
If boardflags2 anded with 0x400 is not zero
If band_type is 2
- Write 0x1F to Radio Register 0x4B
- Write 0x1F to Radio Register 0x4C
- If the chip ID is 0x4716
- Write 0x14 to Radio Register 0x4E
- Write 0 to Radio Register 0x49
- Otherwise
- Write 0x0B to Radio Register 0x4E
- Write 0x14 to Radio Register 0x49
If boardflags2 anded with 0x2 is not zero
If band_type is 1
- Write 0x1F to Radio Register 0x4B
- Write 0x1F to Radio Register 0x4C
- Write 0x05 to Radio Register 0x4E
- Write 0x0C to Radio Register 0x49
If (nphy_ipa2g_on and the band_type is 2) or ((nphy_ipa5g_on) and (the band_type is 1) and (radio_chanspec describes a 2 GHz band))
- Loop 2 times with index i
If PHY Revision > 4
- If i is 0
- Set offset to 0x2000
- Otherwise
- Set offset to 0x3000
- Write 0xCC to Radio Register (0x50 | offset)
- If the chip ID is 0x4716
- Set bias to 0x40
- Set cbias to 0x45
- Set pag_boost to 0x5
- Set pgag_boost to 0x33
- Set mixg_boost to 0x55
- Otherwise
- Set bias to 0x25
- Set cbias to 0x20
- Set pag_boost to 0x4
- Set pgag_boost to 0x03
- Set mixg_boost to 0x65
- Set padg_boost to 0x77
- Write bias to Radio Register (0x44 | offset)
- Write bias to Radio Register (0x42 | offset)
- Write cbias to Radio Register (0x46 | offset)
- Write pag_boost to Radio Register (0x41 | offset)
- Write pgag_boost to Radio Register (0x5E | offset)
- Write padg_boost to Radio Register (0x53 | offset)
- Write mixg_boost to Radio Register (0x64 | offset)
- If i is 0
- Otherwise
If bw is 40
- Set bias to 0x40
- Otherwise
- Set bias to 0x20
- Write bias to Radio Register (0x44 | offset)
- Write bias to Radio Register (0x42 | offset)
- Write 0x30 to Radio Register (0x46 | offset)
- Write 0xEE to Radio Register (0x33 | offset)
- Loop 2 times with index i
If (nphy_ipa2g_on and the band_type is 2) or ((nphy_ipa5g_on) and (the band_type 1) and (radio_chanspec describes a 5 GHz band))
Get the frequency for the channel described in radio_chanspec
If frequency < 5150
- Set paa_boost to 0xA
- Set pada_boost to 0x77
- Set pgaa_boost to 0xF
- Set mixa_boost to 0xF
Else if frequency < 5340
- Set paa_boost to 0x8
- Set pada_boost to 0x77
- Set pgaa_boost to 0xFB
- Set mixa_boost to 0xF
Else if frequency < 5650
- Set paa_boost to 0x0
- Set pada_boost to 0x77
- Set pgaa_boost to 0xB
- Set mixa_boost to 0xF
- Otherwise
- Set paa_boost to 0x0
- Set pada_boost to 0x77
- If frequency not 5825
- Set paga_boost to -(frequency - 18)/36 + 168
- Otherwise
- Set paga_boost to 6
- Set mix_boost to 0xF
- Loop 2 times with index i
- If i is zero
- Set offset to 0x2000
- Otherwise
- Set offset to 0x3000
- Write paa_boost to Radio Register (0x37 | offset)
- Write pada_boost to Radio Register (0x4D | offset)
- Write pgaa_boost to Radio Register (0x58 | offset)
- Write mixa_boost to Radio Register (0x62 | offset)
- Write 0x30 to Radio Register (0x7D | offset)
- Write 0xEE to Radio Register (0x34 | offset)
- Write 0x03 to Radio Register (0x4B | offset)
- Write 0x50 to Radio Register (0x38 | offset)
- Write 0x50 to Radio Register (0x3A | offset)
- Write 0x30 to Radio Register (0x3C | offset)
- If i is zero
- Delay 50 usec