mirror of https://gitee.com/openkylin/linux.git
staging: rtl8723bs: remove ODM_GetRightChnlPlaceforIQK()
Function ODM_GetRightChnlPlaceforIQK() returns non-zero values only for channels > 14. According to the TODO code valid only for 5 GHz should be removed. - find and remove remaining code valid only for 5 GHz. Most of the obvious ones have been removed, but things like channel > 14 still exist. Remove ODM_GetRightChnlPlaceforIQK() and replace the uses of the return value with zero. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200110210456.13178-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d85cad420a
commit
98ab51df76
|
@ -622,33 +622,3 @@ void ODM_TXPowerTrackingCallback_ThermalMeter(struct adapter *Adapter)
|
|||
|
||||
pDM_Odm->RFCalibrateInfo.TXPowercount = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* 3 ============================================================ */
|
||||
/* 3 IQ Calibration */
|
||||
/* 3 ============================================================ */
|
||||
|
||||
u8 ODM_GetRightChnlPlaceforIQK(u8 chnl)
|
||||
{
|
||||
u8 channel_all[ODM_TARGET_CHNL_NUM_2G_5G] = {
|
||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
||||
36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
|
||||
60, 62, 64, 100, 102, 104, 106, 108, 110, 112,
|
||||
114, 116, 118, 120, 122, 124, 126, 128, 130, 132,
|
||||
134, 136, 138, 140, 149, 151, 153, 155, 157, 159,
|
||||
161, 163, 165
|
||||
};
|
||||
u8 place = chnl;
|
||||
|
||||
|
||||
if (chnl > 14) {
|
||||
for (place = 14; place < sizeof(channel_all); place++) {
|
||||
if (channel_all[place] == chnl)
|
||||
return place-13;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
|
|
@ -44,12 +44,4 @@ void ODM_ClearTxPowerTrackingState(PDM_ODM_T pDM_Odm);
|
|||
|
||||
void ODM_TXPowerTrackingCallback_ThermalMeter(struct adapter *Adapter);
|
||||
|
||||
|
||||
|
||||
#define ODM_TARGET_CHNL_NUM_2G_5G 59
|
||||
|
||||
|
||||
u8 ODM_GetRightChnlPlaceforIQK(u8 chnl);
|
||||
|
||||
|
||||
#endif /* #ifndef __HAL_PHY_RF_H__ */
|
||||
|
|
|
@ -1792,7 +1792,7 @@ void PHY_IQCalibrate_8723B(
|
|||
PDM_ODM_T pDM_Odm = &pHalData->odmpriv;
|
||||
|
||||
s32 result[4][8]; /* last is final result */
|
||||
u8 i, final_candidate, Indexforchannel;
|
||||
u8 i, final_candidate;
|
||||
bool bPathAOK, bPathBOK;
|
||||
s32 RegE94, RegE9C, RegEA4, RegEAC, RegEB4, RegEBC, RegEC4, RegECC, RegTmp = 0;
|
||||
bool is12simular, is13simular, is23simular;
|
||||
|
@ -1997,17 +1997,14 @@ void PHY_IQCalibrate_8723B(
|
|||
_PHY_PathBFillIQKMatrix8723B(padapter, bPathBOK, result, final_candidate, (RegEC4 == 0));
|
||||
}
|
||||
|
||||
Indexforchannel = ODM_GetRightChnlPlaceforIQK(pHalData->CurrentChannel);
|
||||
|
||||
/* To Fix BSOD when final_candidate is 0xff */
|
||||
/* by sherry 20120321 */
|
||||
if (final_candidate < 4) {
|
||||
for (i = 0; i < IQK_Matrix_REG_NUM; i++)
|
||||
pDM_Odm->RFCalibrateInfo.IQKMatrixRegSetting[Indexforchannel].Value[0][i] = result[final_candidate][i];
|
||||
pDM_Odm->RFCalibrateInfo.IQKMatrixRegSetting[Indexforchannel].bIQKDone = true;
|
||||
pDM_Odm->RFCalibrateInfo.IQKMatrixRegSetting[0].Value[0][i] = result[final_candidate][i];
|
||||
pDM_Odm->RFCalibrateInfo.IQKMatrixRegSetting[0].bIQKDone = true;
|
||||
}
|
||||
/* RT_DISP(FINIT, INIT_IQK, ("\nIQK OK Indexforchannel %d.\n", Indexforchannel)); */
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("\nIQK OK Indexforchannel %d.\n", Indexforchannel));
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("\nIQK OK Indexforchannel %d.\n", 0));
|
||||
|
||||
_PHY_SaveADDARegisters8723B(padapter, IQK_BB_REG_92C, pDM_Odm->RFCalibrateInfo.IQK_BB_backup_recover, 9);
|
||||
|
||||
|
|
Loading…
Reference in New Issue