N PHY IQ Cal Gain Params (u16 core, struct nphy_txgains target, struct nphy_iqcal_params *params)
If PHY Revision >= 3
Set params->txgm to target.txgm[core]
Set params->pga to target.pga[core]
Set params->pad to target.pad[core]
Set params->ipa to target.ipa[core]
Set params->cal_gain to (params->txgm << 12 ) | (params->pga << 8) | (params->pad << 4) | (params->ipa)
Set params-ncorr[0], params->ncorr[1], params->ncorr[2], params->ncorr[3], and params->ncorr[4] to 0x79
- Otherwise
Set gain to (target.pad[core]) | (target.pga[core] << 4) | (target.txgm[core] << 8)
- If the band is 5G
- Set indx to 1
- Otherwise
- Set indx to 0
- Loop 9 times with index i
- If tbl_iqcal_gainparams[indx][i][0] equals gain
- Break from loop
- If tbl_iqcal_gainparams[indx][i][0] equals gain
If i > 8
- Set i to 8
Set params->txgm to tbl_iqcal_gainparams[indx][i][1]
Set params->pga to tbl_iqcal_gainparams[indx][i][2]
Set params->pad to tbl_iqcal_gainparams[indx][i][3]
Set params->cal_gain to (params->txgm << 7 ) | (params->pga << 4) | (params->pad << 2)
Set params->ncorr[0] to tbl_iqcal_gainparams[indx][i][4]
Set params->ncorr[1] to tbl_iqcal_gainparams[indx][i][5]
Set params->ncorr[2] to tbl_iqcal_gainparams[indx][i][6]
Set params->ncorr[3] to tbl_iqcal_gainparams[indx][i][7]
tbl_iqcal_gainparams (a 2 x 9 x 8 u16 array)
0x000, 0, 0, 2, 0x69, 0x69, 0x69, 0x69 |
0x700, 7, 0, 0, 0x69, 0x69, 0x69, 0x69 |
0x710, 7, 1, 0, 0x68, 0x68, 0x68, 0x68 |
0x720, 7, 2, 0, 0x67, 0x67, 0x67, 0x67 |
0x730, 7, 3, 0, 0x66, 0x66, 0x66, 0x66 |
0x740, 7, 4, 0, 0x65, 0x65, 0x65, 0x65 |
0x741, 7, 4, 1, 0x65, 0x65, 0x65, 0x65 |
0x742, 7, 4, 2, 0x65, 0x65, 0x65, 0x65 |
0x743, 7, 4, 3, 0x65, 0x65, 0x65, 0x65 |
0x000, 7, 0, 0, 0x79, 0x79, 0x79, 0x79 |
0x700, 7, 0, 0, 0x79, 0x79, 0x79, 0x79 |
0x710, 7, 1, 0, 0x79, 0x79, 0x79, 0x79 |
0x720, 7, 2, 0, 0x78, 0x78, 0x78, 0x78 |
0x730, 7, 3, 0, 0x78, 0x78, 0x78, 0x78 |
0x740, 7, 4, 0, 0x78, 0x78, 0x78, 0x78 |
0x741, 7, 4, 1, 0x78, 0x78, 0x78, 0x78 |
0x742, 7, 4, 2, 0x78, 0x78, 0x78, 0x78 |
0x743, 7, 4, 3, 0x78, 0x78, 0x78, 0x78 |