mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
staging: r8188eu: refactor field of struct odm_rf_cal
Refactor the field IQKMatrixRegSetting of struct odm_rf_cal to be not an array. The driver is for chips that operate in the 2.4 GHz band only. So only the first element of the array is used and there is no need for an array. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829175624.5915-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3839c21e0c
commit
b2ad8ba630
@@ -279,8 +279,8 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
|
||||
|
||||
/* Adujst OFDM Ant_A according to IQK result */
|
||||
ele_D = (OFDMSwingTable[(u8)OFDM_index[0]] & 0xFFC00000) >> 22;
|
||||
X = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].Value[0][0];
|
||||
Y = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].Value[0][1];
|
||||
X = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting.Value[0][0];
|
||||
Y = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting.Value[0][1];
|
||||
|
||||
/* Revse TX power table. */
|
||||
dm_odm->BbSwingIdxOfdm = (u8)OFDM_index[0];
|
||||
@@ -314,8 +314,8 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
|
||||
ele_D = (OFDMSwingTable[(u8)OFDM_index[1]] & 0xFFC00000) >> 22;
|
||||
|
||||
/* new element A = element D x X */
|
||||
X = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].Value[0][4];
|
||||
Y = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].Value[0][5];
|
||||
X = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting.Value[0][4];
|
||||
Y = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting.Value[0][5];
|
||||
|
||||
if ((X != 0) && (*dm_odm->pBandType == ODM_BAND_2_4G)) {
|
||||
if ((X & 0x00000200) != 0) /* consider minus */
|
||||
@@ -1182,8 +1182,8 @@ void PHY_IQCalibrate_8188E(struct adapter *adapt, bool recovery)
|
||||
/* by sherry 20120321 */
|
||||
if (final_candidate < 4) {
|
||||
for (i = 0; i < IQK_Matrix_REG_NUM; i++)
|
||||
dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].Value[0][i] = result[final_candidate][i];
|
||||
dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].bIQKDone = true;
|
||||
dm_odm->RFCalibrateInfo.IQKMatrixRegSetting.Value[0][i] = result[final_candidate][i];
|
||||
dm_odm->RFCalibrateInfo.IQKMatrixRegSetting.bIQKDone = true;
|
||||
}
|
||||
|
||||
_PHY_SaveADDARegisters(adapt, IQK_BB_REG_92C, dm_odm->RFCalibrateInfo.IQK_BB_backup_recover, 9);
|
||||
|
||||
@@ -260,7 +260,6 @@ struct odm_rate_adapt {
|
||||
|
||||
#define AVG_THERMAL_NUM 8
|
||||
#define IQK_Matrix_REG_NUM 8
|
||||
#define IQK_Matrix_Settings_NUM 1+24+21
|
||||
|
||||
#define DM_Type_ByFWi 0
|
||||
#define DM_Type_ByDriver 1
|
||||
@@ -664,7 +663,7 @@ struct odm_rf_cal {
|
||||
|
||||
u8 ThermalValue_HP[HP_THERMAL_NUM];
|
||||
u8 ThermalValue_HP_index;
|
||||
struct ijk_matrix_regs_set IQKMatrixRegSetting[IQK_Matrix_Settings_NUM];
|
||||
struct ijk_matrix_regs_set IQKMatrixRegSetting;
|
||||
|
||||
u8 Delta_IQK;
|
||||
u8 Delta_LCK;
|
||||
|
||||
Reference in New Issue
Block a user