LP PHY Load TX Gain Table ( struct gain_table_entry *gain_table)
- The struct in the call has the following layout: u8 gm; u8 pga; u8 pad; u8 dac; u8 bb_mult
- Create a table, set the table width to 32, the table length to 1, and the table data pointer to a u32 data word
If PHY revision < 2
- Set the table ID to 10
- Otherwise
- Set the table ID to 7
If PHY Revision >= 3
- If the current band is 5GHz
- Set tmp to 0x10
- Otherwise
- Set tmp to 0x70
- If the current band is 5GHz
- Otherwise
- If the current band if 5GHz
- Set tmp to 0x14
- Otherwise
- Set tmp to 0x7F
- If the current band if 5GHz
- Loop 128 times with loop index j starting at 0
If PHY revision >= 2
Set the data word to gain_table[j].pad << 16 | gain_table[j].pga << 8 | gain_table[j].gm | tmp << 24
- Set the table offset to 0xC0 + j
Set the data word to gain_table[j].bb_mult << 0x14 | gain_table[j].dac << 0x1c
- Set the table offset to 0x140 + j
- Otherwise
Set the data word to gain_table[j].pad << 0xb | gain_table[j].pga << 7 | gain_table[j].gm << 4 | gain_table[j].dac
- Set the table offset to 0xC0 + j
Set the data word to gain_table[j].bb_mult << 0x14
- Set the table offset to 0x140 + j