N PHY RF Control Intc Override (u8 field, u16 value, u8 core)
(PHY Rev 7+ added)
If PHY Revision >= 3
- Loop 2 times with i as index
- If core is 1 and i is 1
- Continue
- Else if core is 2 and i is 0
- Continue
If PHY Revision < 7
- If i is 0
- Set bit 0x400 in PHY Register 0x91
- Otherwise
- Set bit 0x400 in PHY Register 0x92
- If i is 0
- If field is zero
- If i is zero
- Write 0 to PHY Register 0x91
- Otherwise
- Write 0 to PHY Register 0x92
Call N PHY Force RF Sequence with 2 as argument
- If i is zero
- Else if field is 1
If PHY Revision >= 7
- If i is 0
MaskSet PHY Register 0x91 with mask 0xFF3F and set with value << 6
- Set bit 0x0400 in PHY Register 0x91
- Otherwise
MaskSet PHY Register 0x92 with mask 0xFF3F and set with value << 6
- Set bit 0x0400 in PHY Register 0x92
- Mask PHY Register 0x2FF with mask 0x3FFF
- Set bit 0x2000 in PHY Register 0x2FF
- Set bit 0x0001 in PHY Register 0x2FF
- If i is 0
- Otherwise
- If i is zero
MaskSet PHY Register 0x91 with mask 0xFC3F and set with value << 6
MaskSet PHY Register 0xE7 with mask 0xFFFE and set with 1
MaskSet PHY Register 0x78 with mask 0xFFFE and set with 1
- Spin Wait for bit 1 set in PHY Register 0x78, wait a maximum of 10,000 usec with a test every 100 usec
MaskSet PHY Register 0xE7 with mask 0xFFFE and set with 0
- Otherwise
MaskSet PHY Register 0x92 with mask 0xFC3F and set with value << 6
MaskSet PHY Register 0xEC with mask 0xFFFE and set with 1
MaskSet PHY Register 0x78 with mask 0xFFFD and set with 2
- Spin Wait for bit 2 set in PHY Register 0x78, wait a maximum of 10,000 usec with a test every 100 usec
MaskSet PHY Register 0xEC with mask 0xFFFE and set with 0
- If i is zero
- Else if field is 2
If PHY Revision >= 7
- Set tmp to 0x30
- Otherwise
- If the band is 5G
- Set tmp to 0x0020
- Otherwise
- Set tmp to 0x0010
- If the band is 5G
- If the band is 5G
Set val to value << 5
- Otherwise
Set val to value << 4
- If i is 0
MaskSet PHY Register 0x91 with mask ~tmp and set with val
If PHY Revision >= 7
- Set bit 0x1000 in PHY Register 0x91
- Otherwise
MaskSet PHY Register 0x92 with mask ~tmp and set with val
If PHY Revision >= 7
- Set bit 0x1000 in PHY Register 0x91
- Else if field is 3
If PHY Revision >= 7
- If the band is 5G
- Set tmp to 0x0001
- Set tmp2 to 0x0004
- Set val to value
- Otherwise
- Set tmp to 0x0004
- Set tmp2 to 1
Set val to value << 2
- If i is 0
MaskSet PHY Register 0x91 with mask ~tmp and set with val
- Clear bits tmp2 in PHY Register 0x91
- Otherwise
MaskSet PHY Register 0x92 with mask ~tmp and set with val
- Clear bits tmp2 in PHY Register 0x92
- If the band is 5G
- Otherwise
- Else if field is 4
If PHY Revision >= 7
- If the band is 5G
- Set tmp to 0x0002
- Set tmp2 to 0x0008
Set val to value << 1
- Otherwise
- Set tmp to 0x0008
- Set tmp2 to 2
Set val to value << 3
- If i is 0
MaskSet PHY Register 0x91 with mask ~tmp and set with val
- Clear bits tmp2 in PHY Register 0x91
- Otherwise
MaskSet PHY Register 0x92 with mask ~tmp and set with val
- Clear bits tmp2 in PHY Register 0x92
- If the band is 5G
- Otherwise
- If core is 1 and i is 1
- Loop 2 times with i as index