LP PHY Table Init
If PHY Revision >= 2
If PHY Revision >= 3
- Set the table ID to 0x0A
- Otherwise
- Set the table ID to 0x07
- Set the the table width to 32, the PHY width to 32, the length to 1, and the table data pointer to a u32 containing 0
- Loop from 0 to 703 (inclusive) in steps of 1
- Copy the loop index to the table offset
If the PHY revision >= 3
For each entry in the "Rev 3 Data Table List", write that table
- Otherwise
For each entry in the "Rev 2 Data Table List", write that table
If the board flags & 0x00010000 is not zero
If PHY Revision >= 3
Call LP PHY Load TX Gain Table with the "Rev 3 noPA Gain Table" as argument
- Otherwise
Call LP PHY Load TX Gain Table with the "Rev 2 noPA Gain Table" as argument
- Else if the current band is 5 GHz
If PHY Revision >= 3
Call LP PHY Load TX Gain Table with the "Rev 3 Gain Table for 5 GHz" as argument
- Otherwise
Call LP PHY Load TX Gain Table with the "Rev 2 Gain Table for 5 GHz" as argument
- Otherwise
If PHY Revision >= 3
Call LP PHY Load TX Gain Table with the "Rev 3 Gain Table for 2 GHz" as argument
- Otherwise
Call LP PHY Load TX Gain Table with the "Rev 2 Gain Table for 2 GHz" as argument
- Loop from 0 to 127 (inclusive) in steps of 1
- Set the table ID to 7
- Set the table width and PHY width to 32
- Set the table offset to 576 + the loop index
- Set the table data pointer to a u32 containing 127 - loop index
- Else if the Phy revision is 1
- For each entry in the "Rev 1 Data Table List"
If the board flags & 0x00010000 is not zero OR board flags & 0x00002000 is not zero
Call LP PHY Load TX Gain Table with the "Rev 1 noPA Gain Table" as argument
- Else if the current band is 5 GHz
Call LP PHY Load TX Gain Table with the "Rev 1 Gain Table for 5 GHz" as argument
- Otherwise
Call LP PHY Load TX Gain Table with the "Rev 1 Gain Table for 2 GHz" as argument
- Otherwise
- For each entry in the "Rev 0 Data Table List"
If the board flags & 0x00010000 is not zero
Call LP PHY Load TX Gain Table with the "Rev 0 noPA Gain Table" as argument
- Else if the current band is 5 GHz
Call LP PHY Load TX Gain Table with the "Rev 0 Gain Table for 5 GHz" as argument
- Otherwise
Call LP PHY Load TX Gain Table with the "Rev 0 Gain Table for 2 GHz" as argument
If the board flags & 0x00010000 is not zero OR board flags & 0x00002000 is not zero
If the chip ID is 0x5354 AND the chip revision >=3
- Call [PHY/LP/LoadTxGainTable|LP PHY Load TX Gain Table]] with "Rev 0 noPA Gain Table 5354" as argument
- Otherwise
- Call [PHY/LP/LoadTxGainTable|LP PHY Load TX Gain Table]] with "Rev 0 noPA Gain Table" as argument
- Otherwise
- If this is a 5GHz channel
- Call [PHY/LP/LoadTxGainTable|LP PHY Load TX Gain Table]] with "Rev 0 Gain Table for 5 GHz" as argument
- Otherwise
- Call [PHY/LP/LoadTxGainTable|LP PHY Load TX Gain Table]] with "Rev 0 Gain Table for 2 GHz" as argument
- If this is a 5GHz channel
Write the channel specific gain tables with the frequency of the current channel (in KHz) as argument