Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8723au: Be more consistent in checking for 2 TX paths

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jes Sorensen and committed by
Greg Kroah-Hartman
f1508fe3 16290469

+8 -10
+8 -10
drivers/staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c
··· 23 23 #define DPK_DELTA_MAPPING_NUM 13 24 24 #define index_mapping_HP_NUM 15 25 25 /* 091212 chiyokolin */ 26 - static void 27 - odm_TXPowerTrackingCallback_ThermalMeter_92C( 28 - struct rtw_adapter *Adapter) 26 + static void 27 + odm_TXPowerTrackingCallback_ThermalMeter_92C(struct rtw_adapter *Adapter) 29 28 { 30 29 struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter); 31 30 struct dm_priv *pdmpriv = &pHalData->dmpriv; ··· 34 35 s8 OFDM_index[2], CCK_index = 0, OFDM_index_old[2] = {0}; 35 36 s8 CCK_index_old = 0; 36 37 int i = 0; 37 - bool is2T = IS_92C_SERIAL(pHalData->VersionID); 38 38 u8 OFDM_min_index = 6, rf; /* OFDM BB Swing should be less than +3.0dB*/ 39 39 u8 ThermalValue_HP_count = 0; 40 40 u32 ThermalValue_HP = 0; ··· 58 60 rtl8723a_phy_ap_calibrate(Adapter, (ThermalValue - 59 61 pHalData->EEPROMThermalMeter)); 60 62 61 - if (is2T) 63 + if (pHalData->rf_type == RF_2T2R) 62 64 rf = 2; 63 65 else 64 66 rf = 1; ··· 76 78 } 77 79 78 80 /* Query OFDM path B default setting */ 79 - if (is2T) { 81 + if (pHalData->rf_type == RF_2T2R) { 80 82 ele_D = PHY_QueryBBReg(Adapter, rOFDM0_XBTxIQImbalance, 81 83 bMaskDWord)&bMaskOFDM_D; 82 84 for (i = 0; i < OFDM_TABLE_SIZE_92C; i++) { /* find the index */ ··· 288 290 rtl8723au_write8(Adapter, 0xa29, CCKSwingTable_Ch1423A[CCK_index][7]); 289 291 } 290 292 291 - if (is2T) { 293 + if (pHalData->rf_type == RF_2T2R) { 292 294 ele_D = (OFDMSwingTable23A[(u8)OFDM_index[1]] & 0xFFC00000)>>22; 293 295 294 296 /* new element A = element D x X */ ··· 658 660 u32 i, j, diff, SimularityBitMap, bound = 0; 659 661 struct hal_data_8723a *pHalData = GET_HAL_DATA(pAdapter); 660 662 u8 final_candidate[2] = {0xFF, 0xFF}; /* for path A and path B */ 661 - bool bResult = true, is2T = IS_92C_SERIAL(pHalData->VersionID); 663 + bool bResult = true; 662 664 663 - if (is2T) 665 + if (pHalData->rf_type == RF_2T2R) 664 666 bound = 8; 665 667 else 666 668 bound = 4; ··· 697 699 for (i = 0; i < 4; i++) 698 700 result[3][i] = result[c1][i]; 699 701 return false; 700 - } else if (!(SimularityBitMap & 0xF0) && is2T) { 702 + } else if (!(SimularityBitMap & 0xF0) && pHalData->rf_type == RF_2T2R) { 701 703 /* path B OK */ 702 704 for (i = 4; i < 8; i++) 703 705 result[3][i] = result[c1][i];