N PHY Workarounds
As usual, there are a bunch, but they didn't split them up by functionality.
- Initialize a 4-element u16 array named aux_adc_vmid_rev7_core0 to 0x8e, 0x96, 0x96, 0x96
- Initialize a 4-element u16 array named aux_adc_vmid_rev7_core1 to 0x8f, 0x9f, 0x9f, 0x96
- Initialize a 7-element u8 array named rfseq_rx2tx_dlys to 8, 6, 6, 2, 4, 60, 1
- Initialize u8 chan_range to 0
- If the current Band is 2.4 GHz
Call N PHY Classifier with 1, 1 as arguments
- Otherwise (5 GHz band)
Call N PHY Classifier with 1, 0 as arguments
if phyhang_avoid is not zero
Call N PHY Stay In Carrier Search with argument 1 (enable)
- Set bits 0x11 in PHY Register 0xB1
If PHY Revision >= 7
- If PHY Revision is 7
Set bit 1<<4 to PHY Register 0x221
MaskSet PHY Register 0x160 with mask 0xFF80 and set with 0x20
MaskSet PHY Register 0x160 with mask 0x80FF and set with 0x2700
MaskSet PHY Register 0x161 with mask 0xFF80 and set with 0x2E
MaskSet PHY Register 0x161 with mask 0x80FF and set with 0x3300
MaskSet PHY Register 0x162 with mask 0xFF80 and set with 0x37
MaskSet PHY Register 0x162 with mask 0x80FF and set with 0x3A00
MaskSet PHY Register 0x163 with mask 0xFF80 and set with 0x3C
MaskSet PHY Register 0x163 with mask 0x80FF and set with 0x3E00
MaskSet PHY Register 0x164 with mask 0xFF80 and set with 0x3E
MaskSet PHY Register 0x164 with mask 0x80FF and set with 0x3F00
MaskSet PHY Register 0x165 with mask 0xFF80 and set with 0x40
MaskSet PHY Register 0x165 with mask 0x80FF and set with 0x4000
MaskSet PHY Register 0x166 with mask 0xFF80 and set with 0x40
MaskSet PHY Register 0x166 with mask 0x80FF and set with 0x4000
MaskSet PHY Register 0x167 with mask 0xFF80 and set with 0x40
MaskSet PHY Register 0x167 with mask 0x80FF and set with 0x4000
If PHY Revision <= 8
- Write 0x1B0 to PHY Register 0x23F
- Write 0x1B0 to PHY Register 0x240
If PHY Revision >= 8
MaskSet PHY Register 0xBD with mask 0xFF00 and set with 0x72
- Write N PHY table with ID 8, length 1, offset 0, width 16, and data 2
- Write N PHY table with ID 8, length 1, offset 0x10, width 16, and data 2
- Read N PHY table with ID 30, length 1, offset 0, width 32, and data tmp
- Mask tmp with 0xFFFFFF
- Write N PHY table with ID 30, length 1, offset 0, width 32, and data tmp
- Write N PHY table with ID 7, length 2, offset 0x15e, width 16, and data {0x10f, 0x10f}
- Write N PHY table with ID 7, length 2, offset 0x16e, width 16, and data {0x10f, 0x10f}
If (nphy_ipa2g_on and band is 2 GHz) or (nphy_ipa5g_on and band is 5 GHz)
Call N PHY Set RF Seq with 0, the rx2tx rev3 ipa events array, the rx2tx rev3 ipa delays array, and 9 as arguments
MaskSet PHY Register 0x299 with mask 0x3FFF and set with 0x4000
MaskSet PHY Register 0x29D with mask 0x3FFF and set with 0x4000
Call Nphy_read_lpf_ctl with argument 0x154 and save result as lpf_20
Call Nphy_read_lpf_ctl with argument 0x159 and save result as lpf_40
Call Nphy_read_lpf_ctl with argument 0x152 and save result as lpf_11b
If (nphy_ipa2g_on and band is 2 GHz) or (nphy_ipa5g_on and band is 5 GHz)
- If (Radio Revision is 5 AND the BW is 40) OR Radio Revision is 7 or 8
- Read Radio Register 0x16B and save in bcap_val
- Read Radio Register 0x16A and save in scap_val
- Copy scap_val to scap_val_11b
- Copy bcap_val to bcap_val_11b
- If Radio Revision is 5 AND the BW is 40
- Copy scap_val to scap_val_11n_20
- Copy bcap_val to bcap_val_11n_20
- Set scap_val_11n_40 and bcap_val_11n_40 to 0xC
- Set rccal_ovrd to true
- Else if Radio Revision is 7 or 8
- Set lpf_20 to 4
- Set lpf_11b to 1
- If this is a 2G channel
- Set scap_val_11n_20 and scap_val_11n_20 to 0xC
- Set scap_val_11n_40 and scap_val_11n_40 to 0xA
- Otherwise
- Set scap_val_11n_20 and scap_val_11n_20 to 0x14
- Set scap_val_11n_40 and scap_val_11n_40 to 0xF
- Set rccal_ovrd to true
- If (Radio Revision is 5 AND the BW is 40) OR Radio Revision is 7 or 8
- Otherwise
- If Radio Revision is 5
- Set lpf_20 to 1
- Set lpf_40 to 3
- Read Radio Register 0x16B and save in bcap_val
- Read Radio Register 0x16A and save in scap_val
- Copy scap_val to scap_val_11b
- Copy bcap_val to bcap_val_11b
- Set scap_val_11n_20 and scap_val_11n_40 to 0x11
- Set bcap_val_11n_20 and bcap_val_11n_40 to 0x13
- Set rccal_ovrd to true
- If Radio Revision is 5
- If rccal_ovrd is true
Set rx2tx_lut_20_11b to (bcap_val_11b << 8) | (scap_val_11b << 3) | lpf_11b
Set rx2tx_lut_20_11n to (bcap_val_11n_20 << 8) | (scap_val_11n_20 << 3) | lpf_20
Set rx2tx_lut_40_11n to (bcap_val_11n_40 << 8) | (scap_val_11n_40 << 3) | lpf_40
- Loop 2 times with index core, start with 0, and increment by 1
- Write N PHY table with ID 7, length 1, offset 0x152 + core * 16, width 16, and data rx2tx_lut_20_11b
- Write N PHY table with ID 7, length 1, offset 0x153 + core * 16, width 16, and data rx2tx_lut_20_11n
- Write N PHY table with ID 7, length 1, offset 0x154 + core * 16, width 16, and data rx2tx_lut_20_11n
- Write N PHY table with ID 7, length 1, offset 0x155 + core * 16, width 16, and data rx2tx_lut_40_11n
- Write N PHY table with ID 7, length 1, offset 0x156 + core * 16, width 16, and data rx2tx_lut_40_11n
- Write N PHY table with ID 7, length 1, offset 0x157 + core * 16, width 16, and data rx2tx_lut_40_11n
- Write N PHY table with ID 7, length 1, offset 0x158 + core * 16, width 16, and data rx2tx_lut_40_11n
- Write N PHY table with ID 7, length 1, offset 0x159 + core * 16, width 16, and data rx2tx_lut_40_11n
Call N PHY RF Ctrl Override Rev7 with arguments 16, 1, 3, 0, 2
- Write 0x3 to PHY Register 0x32F
- If Radio Revision is 4 or 6
Call NPHY_Rf_Ctl_Override_Rev7 with arguments 4, 1, 3, 0, 0
- If Radio Revision is 3, 4, or 6
- Set lvlshift to 0
If SROM Revision >= 8 && Boardflags2 & 0x00020000
- Set lvlshift to 1
- If lvlshift
- Write 0x05 to Radio Register 0x5
- Write 0x30 to Radio Register 0x6
- Write 0x0 to Radio Register 0x7
- Set bit 1 in Radio Register 0x4F
- Set bit 1 in Radio Register 0xD4
- Set bias to 0x1F
- Set conv to 0x6F
- Set filt to 0xAA
- Otherwise
- Set bias to 0x2B
- Set conv to 0x7F
- Set filt to 0xEE
- If in 2G mode
- Loop for values of core equal to 0 and 1
- If core == 0
- Write bias to Radio Register 0x5F
- Write conv to Radio Register 0x64
- Write filt to Radio Register 0x66
- Otherwise
- Write bias to Radio Register 0xE8
- Write conv to Radio Register 0xE9
- Write filt to Radio Register 0xEB
- If core == 0
- Loop for values of core equal to 0 and 1
If (nphy_ipa2g_on and band is 2 GHz) or (nphy_ipa5g_on and band is 5 GHz)
- If in 2G mode
- Set bleed to 0
- If Radio Revision is 3, 4, or 6
- Set bleed to 0x7F
- Loop 2 times with index core, start with 0, and increment with 1
- If bleed != 0
- If core == 0
- Write bleed to Radio Register 0x51
- Otherwise
- Write bleed to Radio Register 0xD6
- If core == 0
- If bleed != 0
- If Radio Revision is 3
- Loop 2 times with index core, start with 0, and increment with 1
- If core is 0
- Write 0x13 to Radio Register 0x64
- Write 0x1F to Radio Register 0x5F
- Write 0xEE to Radio Register 0x66
- Write 0x8A to Radio Register 0x59
- Write 0x3E to Radio Register 0x80
- Otherwise
- Write 0x13 to Radio Register 0x69
- Write 0x1F to Radio Register 0xE8
- Write 0xEE to Radio Register 0xEB
- Write 0x8A to Radio Register 0xDE
- Write 0x3E to Radio Register 0x105
- If core is 0
- Loop 2 times with index core, start with 0, and increment with 1
- Else if Radio Revision is 7 or 8
- If bw is not 40 MHz
- Write 0x14 to Radio Register 0x5F
- Write 0x12 to Radio Register 0xE8
- Otherwise
- Write 0x16 to Radio Register 0x5F
- Write 0x16 to Radio Register 0xE8
- If bw is not 40 MHz
- Otherwise
- Set freq to channel frequency in MHz
If ((freq >= 5180) && (freq <= 5230)) OR ((freq >= 5745) && (freq <= 5805)
- Write 0xFF to Radio Register 0x7D
- Write 0xFF to Radio Register 0xFE
- If in 2G mode
- Otherwise
- If Radio Revision not 5
- Loop 2 times with index core, start with 0, and increment with 1
- If core is 0
- Write 0x61 to Radio Register 0x5C
- Write 0x70 to Radio Register 0x51
- Otherwise
- Write 0x61 to Radio Register 0xE1
- Write 0x70 to Radio Register 0xD6
- If core is 0
- Loop 2 times with index core, start with 0, and increment with 1
- If Radio Revision not 5
- If Radio Revision is 4
- Write N PHY table with ID 8, length 1, offset 0x05, width 16, and data 0x20
- Write N PHY table with ID 8, length 1, offset 0x15, width 16, and data 0x20
- Loop 2 times with index core, start with 0, and increment with 1
- If core is 0
- Write 0x00 to Radio Register 0x1A1
- Write 0x3F to Radio Register 0x1A2
- Write 0x3F to Radio Register 0x1A6
- Otherwise
- Write 0x00 to Radio Register 0x1A7
- Write 0x3F to Radio Register 0x1AB
- Write 0x3F to Radio Register 0x1AC
- If core is 0
- Otherwise
- Set bit 0x4 in PHY Register 0xA6
- Set bit 0x4 in PHY Register 0x8F
- Set bit 0x4 in PHY Register 0xA7
- Set bit 0x4 in PHY Register 0xA5
- Clear bit 0x01 in PHY Register 0xA6
- Set bit 0x1 in PHY Register 0x8F
- Clear bit 0x01 in PHY Register 0xA7
- Set bit 0x1 in PHY Register 0xA5
- Write N PHY table with ID 8, length 1, offset 0x05, width 16, and data 0x0
- Write N PHY table with ID 8, length 1, offset 0x15, width 16, and data 0x0
- Clear bit 0x4 in PHY Register 0xA6
- Clear bit 0x4 in PHY Register 0x8F
- Clear bit 0x4 in PHY Register 0xA7
- Clear bit 0x4 in PHY Register 0xA5
- Write 0x2 to PHY Register 0x6A
- Write N PHY table with ID 16, length 1, offset 0x100, width 32, and data 20
- Write N PHY table with ID 7, length 2, offset 0x138, width 16, and data {0x11,0x11}
- Write N PHY table with ID 7, length 1, offset 0x141, width 16, and data 0x77
- Write N PHY table with ID 7, length 3, offset 0x133, width 16, and data {0x77,0x11,0x11}
- Write N PHY table with ID 7, length 2, offset 0x146, width 16, and data {0x11,0x11}
- Write N PHY table with ID 7, length 1, offset 0x123, width 16, and data 0x77
- Write N PHY table with ID 7, length 1, offset 0x12A, width 16, and data 0x77
- If BW is not 40 MHz
- Write N PHY table with ID 16, length 1, offset 3, width 32, and data 0x18D
- Write N PHY table with ID 16, length 1, offset 0x7F, width 32, and data 0x18D
- Otherwise
- Write N PHY table with ID 16, length 1, offset 3, width 32, and data 0x14D
- Write N PHY table with ID 16, length 1, offset 0x7F, width 32, and data 0x14D
- If using 5G
- Set tmp to SPROM PDET_RANGE for 5G
- Otherwise
- Set tmp to SPROM PDET_RANGE for 2G
- If tmp is 0
Call N PHY Get Channel Freq Range with argument 0 and save as chan_range
- If chan_range not equal to 0
- Set aux_adc_vmid_rev7_core0[3] to 0x70
- Set aux_adc_vmid_rev7_core1[3] to 0x70
- Set aux_adc_gain_rev7[3] to 2
- Otherwise
- Set aux_adc_vmid_rev7_core0[3] to 0x80
- Set aux_adc_vmid_rev7_core1[3] to 0x80
- Set aux_adc_gain_rev7[3] to 3
- Else if tmp is 1
- If chan_range not equal to 0
- Set aux_adc_vmid_rev7_core0[3] to 0x7C
- Set aux_adc_vmid_rev7_core1[3] to 0x7C
- Set aux_adc_gain_rev7[3] to 2
- Otherwise
- Set aux_adc_vmid_rev7_core0[3] to 0x8C
- Set aux_adc_vmid_rev7_core1[3] to 0x8C
- Set aux_adc_gain_rev7[3] to 1
- If chan_range not equal to 0
- Else if tmp is 2
- If this is a 2057 radio
- If the Radio Revision is 5, 7, or 8
- If chan_range is 0
- Set aux_adc_vmid_rev7_core0[3] to 0x8C
- Set aux_adc_vmid_rev7_core1[3] to 0x8C
- Set aux_adc_gain_rev7[3] to 0
- Otherwise
- Set aux_adc_vmid_rev7_core0[3] to 0x96
- Set aux_adc_vmid_rev7_core1[3] to 0x96
- Set aux_adc_gain_rev7[3] to 0
- If chan_range is 0
- If the Radio Revision is 5, 7, or 8
- If this is a 2057 radio
- Else if tmp is 3
- If chan_range is 0
- Set aux_adc_vmid_rev7_core0[3] to 0x89
- Set aux_adc_vmid_rev7_core1[3] to 0x89
- Set aux_adc_gain_rev7[3] to 0
- If chan_range is 0
- Else if tmp is 5
- If chan_range is not 0
- Set aux_adc_vmid_rev7_core0[3] to 0x80
- Set aux_adc_vmid_rev7_core1[3] to 0x80
- Set aux_adc_gain_rev7[3] to 3
- Otherwise
- Set aux_adc_vmid_rev7_core0[3] to 0x70
- Set aux_adc_vmid_rev7_core1[3] to 0x70
- Set aux_adc_gain_rev7[3] to 2
- If chan_range is not 0
- Write N PHY table with ID 8, length 4, offset 0x08, width 16, and data aux_adc_vmid_rev7_core0
- Write N PHY table with ID 8, length 4, offset 0x18, width 16, and data aux_adc_vmid_rev7_core1
- Write N PHY table with ID 8, length 4, offset 0x0C, width 16, and data aux_adc_gain_rev7_core1
- Write N PHY table with ID 8, length 4, offset 0x1C, width 16, and data aux_adc_gain_rev7_core1
- If PHY Revision is 7
Else if PHY revision >= 3
- Write 0x1F8 to PHY Register 0x23F
- Write 0x1F8 to PHY Register 0x240
- Read N PHY table with ID 30, length 1, offset 0, width 32, and data tmp32
- Mask tmp with 0xFFFFFF
- Write N PHY table with ID 30, length 1, offset 0, width 32, and data tmp32
- Write 0x0125 to PHY Register 0x145
- Write 0x01B3 to PHY Register 0x146
- Write 0x0105 to PHY register 0x147
- Write 0x016E to PHY Register 0x148
- Write 0x00CD to PHY Register 0x149
- Write 0x0020 to PHY Register 0x14A
- Write 0x000C to PHY Register 0x38
- Write 0x000C to PHY Register 0x2AE
Call N PHY Set RF Seq with 1, the tx2rx rev3 events array, the tx2rx rev3 delays array, and 8 as arguments
If (nphy_ipa2g_on and band is 2 GHz) or (nphy_ipa5g_on and band is 5 GHz)
Call N PHY Set RF Seq with 0, the rx2tx rev3 ipa events array, the rx2tx rev3 ipa delays array, and 9 as arguments
If (hw_phyrxchain != 3) and (hw_phyrxchain != hw_phytxchain)
If (nphy_ipa2g_on and band is 2 GHz) or (nphy_ipa5g_on and band is 5 GHz)
- Set element 5 of rx2tx rev3 delays to 59
- Set element 6 of rx2tx rev3 delays to 1
- Set element 7 of rx2tx rev3 events to 0x1F
Call N PHY Set RF Seq with 0, the rx2tx rev3 events array, the rx2tx rev3 delays array, and 9 as arguments
- If the band type is 2 GHz
- Write 0x2 to PHY Register 0x6A
- Otherwise
- Write 0x9C40 to PHY Register 0x6A
- Maskset PHY Register 0x294 with mask 0xF0FF and set with 0x0700
- If BW is not 40 MHz
- Write an N PHY Table with ID 16, length 1, offset 3, width 32, and 0x18D as data
- Write an N PHY Table with ID 16, length 1, offset 127, width 32, and 0x18D as data
- Otherwise
- Write an N PHY Table with ID 16, length 1, offset 3, width 32, and 0x14D as data
- Write an N PHY Table with ID 16, length 1, offset 127, width 32, and 0x14D as data
- Write N PHY Table with ID 8, length 1, offset 0, width 16, and data 2
- Write N PHY Table with ID 8, length 1, offset 16, width 16, and data 2
- If the band type is 5 GHz
Set range to srom_fem5g.pdetrange
- Otherwise
Set range to srom_fem2g.pdetrange
- If range is zero
- Set vmid to 0xa2, 0xb4, 0xb4, 0x89
- Set gain to 0x02, 0x02, 0x02, 0x00
Call N PHY Get Channel Frequency Range with argument 0 and save result in chan_range
- Write an N PHY Table with ID 8, length 4, 0ffset 0x08, width 16, and data from vmid
- Write an N PHY Table with ID 8, length 4, 0ffset 0x18, width 16, and data from vmid
- Write an N PHY Table with ID 8, length 4, 0ffset 0x0C, width 16, and data from gain
- Write an N PHY Table with ID 8, length 4, 0ffset 0x1C, width 16, and data from gain
- Else if range is 1
- Set vmid to 0xb4, 0xb4, 0xb4, 0x24
- Set gain to 0x02, 0x02, 0x02, 0x02
- Write an N PHY Table with ID 8, length 4, 0ffset 0x08, width 16, and data from vmid
- Write an N PHY Table with ID 8, length 4, 0ffset 0x18, width 16, and data from vmid
- Write an N PHY Table with ID 8, length 4, 0ffset 0x0C, width 16, and data from gain
- Write an N PHY Table with ID 8, length 4, 0ffset 0x1C, width 16, and data from gain
- Else if range is 2
- Set vmid to 0xa2, 0xb4, 0xb4, 0x74
- Set gain to 0x02, 0x02, 0x02, 0x04
If PHY Revision >= 6
Call N PHY Get Channel Freq Range with argument 0 and save as chan_range
- If chan_range != 0
- Set vmid[3] to 0x8E
- Otherwise
- Set vmid[3] to 0x94
- Set gain[3] to 3
- Else if PHY Revision is 5
- Set vmid[3] to 0x84
- Set gain[3] to 2
- Write an N PHY Table with ID 8, length 4, 0ffset 0x08, width 16, and data from vmid
- Write an N PHY Table with ID 8, length 4, 0ffset 0x18, width 16, and data from vmid
- Write an N PHY Table with ID 8, length 4, 0ffset 0x0C, width 16, and data from gain
- Write an N PHY Table with ID 8, length 4, 0ffset 0x1C, width 16, and data from gain
- Else if range is 3
Call N PHY Get Channel Freq Range with argument 0 and save as chan_range
If (PHY Revision >= 4) and (chan_range is 0)
- Set vmid to 0xa2, 0xb4, 0xb4, 0x270
- Set gain to 0x02, 0x02, 0x02, 0x00
- Write an N PHY Table with ID 8, length 4, 0ffset 0x08, width 16, and data from vmid
- Write an N PHY Table with ID 8, length 4, 0ffset 0x18, width 16, and data from vmid
- Write an N PHY Table with ID 8, length 4, 0ffset 0x0C, width 16, and data from gain
- Write an N PHY Table with ID 8, length 4, 0ffset 0x1C, width 16, and data from gain
- Else if range is 4 or 5
- Set vmid to 0xa2, 0xb4, 0xb4, 0x0
- Set gain to 0x02, 0x02, 0x02, 0x0
Call N PHY Get Channel Freq Range with argument 0 and save as chan_range
- If chan_range is not zero
- If range is 4
- Set vmid[3] to 0x8e
- Set tmp1 to 0x96
- Set gain[3] to 0x2
- Otherwise
- Set vmid[3] to 0x89
- Set tmp1 to 0x89
- Set gain[3] to 0
- If range is 4
- Otherwise
- If range is 4
- Set vmid[3] to 0x89
- Set tmp1 to 0x8b
- Set gain[3] to 0x2
- Otherwise
- Set vmid[3] to 0x74
- Set tmp1 to 0x70
- Set gain[3] to 0
- If range is 4
- Write an N PHY Table with ID 8, length 4, 0ffset 0x08, width 16, and data from vmid
- Write an N PHY Table with ID 8, length 4, 0ffset 0x0C, width 16, and data from gain
- Set vmid[3] to tmp1
- Write an N PHY Table with ID 8, length 4, 0ffset 0x18, width 16, and data from vmid
- Write an N PHY Table with ID 8, length 4, 0ffset 0x1C, width 16, and data from gain
- Write 0x00 to Radio Register 0x6043
- Write 0x00 to Radio Register 0x7043
- Write 0x06 to Radio Register 0x6041
- Write 0x06 to Radio Register 0x7041
- Write 0x07 to Radio Register 0x6040
- Write 0x07 to Radio Register 0x7040
- Write 0x88 to Radio Register 0x603D
- Write 0x88 to Radio Register 0x703D
- Write 0x00 to Radio Register 0x603F
- Write 0x00 to Radio Register 0x703F
- Write 0x00 to Radio Register 0x6049
- Write 0x00 to Radio Register 0x7049
- If 5G active
- Set triso to SPROM FEM 5G tr_iso
- Otherwise
- Set triso to SPROM FEM 2G tr_iso
- If triso is 7
Call N PHY War Force Trsw Cliplo with argument 0
Call N PHY War Force Trsw Cliplo with argument 1
Call N PHY WAR TX Chain Update with hw_phytxchain as argument
If (boardflags2 & 0x2) and (band type is 5G) or (boardflags2 & 0x400) and (band type is 2G)
- Set weight to 0x00088888
- Otherwise
- Set weight to 0x88888888
- Write an N PHY Table with ID 30, length 1, offset 1, width 32, and data weight
- Write an N PHY Table with ID 30, length 1, offset 2, width 32, and data weight
- Write an N PHY Table with ID 30, length 1, offset 3, width 32, and data weight
- If PHY Revision equal 4 and band type is 5G
- Write 0x70 to Radio Register 0x2067
- Write 0x70 to Radio Register 0x3067
If edcrs_threshold_lock is zero
- Write 0x3EB to PHY Register 0x224
- Write 0x3EB to PHY Register 0x225
- Write 0x341 to PHY Register 0x226
- Write 0x341 to PHY Register 0x227
- Write 0x42B to PHY Register 0x228
- Write 0x42B to PHY Register 0x229
- Write 0x381 to PHY Register 0x22A
- Write 0x381 to PHY Register 0x22B
- Write 0x42B to PHY Register 0x22C
- Write 0x43B to PHY Register 0x22D
- Write 0x381 to PHY Register 0x22E
- Write 0x381 to PHY Register 0x22F
If PHY Revision >= 6
If boardflags2 & 0x1000
Call Mhf with arguments 3, 0x80, 0x80, 3 as arguments
- Otherwise
If (boardflags2 & 0x100) OR (boardtype is 0x8B)
- Set the 7 element u8 array rfseq_rx2tx_dlys to 1, 6, 6, 2, 4, 20, 1
If this is a 5G channel AND phy_5g_pwrgain is true
- Clear bit 8 in Radio register 0x86
- Clear bit 8 in Radio register 0xB5
- Otherwise
- Set bit 0x8 in Radio register 0x86
- Set bit 0x8 in Radio register 0xB5
- Write an N PHY Table with ID 8, length 1, offset 0, width 16, and data 0x000A
- Write an N PHY Table with ID 8, length 1, offset 0x10, width 16, and data 0x000A
If PHY Revision < 3
- Write an N PHY Table with ID 8, length 1, offset 0x02, width 16, and data 0xCDAA
- Write an N PHY Table with ID 8, length 1, offset 0x12, width 16, and data 0xCDAA
If PHY Revision < 2
- Write an N PHY Table with ID 8, length 1, offset 0x08, width 16, and data 0x0000
- Write an N PHY Table with ID 8, length 1, offset 0x18, width 16, and data 0x0000
- Write an N PHY Table with ID 8, length 1, offset 0x07, width 16, and data 0x7AAB
- Write an N PHY Table with ID 8, length 1, offset 0x17, width 16, and data 0x7AAB
- Write an N PHY Table with ID 8, length 1, offset 0x06, width 16, and data 0x0800
- Write an N PHY Table with ID 8, length 1, offset 0x16, width 16, and data 0x0800
- Write 0x02D8 to PHY Register 0xF8
- Write 0x0301 to PHY Register 0xF9
- Write 0x02D8 to PHY Register 0xFA
- Write 0x0301 to PHY Register 0xFB
Call N PHY Set RF Sequence with 0, events, delays, and 7 as arguments
- Set events to 0x0, 0x3, 0x5, 0x4, 0x2, 0x1, 0x8
- Set delays to 8, 6, 2, 4, 4, 6, 1
Call N PHY Set RF Sequence with 1, events, delays, and 7 as arguments
If PHY Revision < 2
If PHY Register 0xA0 & 0x02
Call Mhf with arguments 2, 0x10, 0x10, 3 as arguments
- Else if the PHY Revision is 2
- Write 0 to PHY Registers 0x1E3 and 0x1E4
If PHY Revision < 2
- Clear bit 0x0080 in PHY Register 0x90
- Write 293 to PHY Register 0x145
- Write 435 to PHY Register 0x146
- Write 261 to PHY Register 0x147
- Write 366 to PHY Register 0x148
- Write 205 to PHY Register 0x149
- Write 32 to PHY Register 0x14A
If PHY Revision < 3
- Maskset PHY Register 0x142 with mask 0x0FFF and set with 0
- Write 0xB5 to PHY Register 0x192
- Write 0xA4 to PHY Register 0x193
- Write 0x00 to PHY Register 0x194
- if PHY Revision is 2
- Set bit 0x8 in PHY Register 0x221
If phyhang_avoid is not zero
Call N PHY Stay in Carrier Search with argument 0 (disable)