[PATCH 03/14] staging: r8188eu: replace local OFDM_index with single variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Replace the local OFDM_index array in the
odm_TXPowerTrackingCallback_ThermalMeter_8188E function
with a single variable. Only its first component is used.

Signed-off-by: Martin Kaiser <martin@xxxxxxxxx>
---
 drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
index 8b3bc41b7e27..27cac9775a90 100644
--- a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
+++ b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
@@ -103,7 +103,7 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
 	u8 ThermalValue_AVG_count = 0;
 	u32 ThermalValue_AVG = 0;
 	s32 ele_D, TempCCk;
-	s8 OFDM_index[2], CCK_index = 0;
+	s8 OFDM_index, CCK_index = 0;
 	s8 OFDM_index_old = 0, CCK_index_old = 0;
 	u32 i = 0, j = 0;
 
@@ -234,13 +234,13 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
 			}
 			if (offset >= index_mapping_NUM_88E)
 				offset = index_mapping_NUM_88E - 1;
-			OFDM_index[0] = dm_odm->RFCalibrateInfo.OFDM_index + OFDM_index_mapping[j][offset];
+			OFDM_index = dm_odm->RFCalibrateInfo.OFDM_index + OFDM_index_mapping[j][offset];
 			CCK_index = dm_odm->RFCalibrateInfo.CCK_index + OFDM_index_mapping[j][offset];
 
-			if (OFDM_index[0] > OFDM_TABLE_SIZE_92D - 1)
-				OFDM_index[0] = OFDM_TABLE_SIZE_92D - 1;
-			else if (OFDM_index[0] < OFDM_min_index)
-				OFDM_index[0] = OFDM_min_index;
+			if (OFDM_index > OFDM_TABLE_SIZE_92D - 1)
+				OFDM_index = OFDM_TABLE_SIZE_92D - 1;
+			else if (OFDM_index < OFDM_min_index)
+				OFDM_index = OFDM_min_index;
 
 			if (CCK_index > CCK_TABLE_SIZE - 1)
 				CCK_index = CCK_TABLE_SIZE - 1;
@@ -253,7 +253,7 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
 				dm_odm->RFCalibrateInfo.bDoneTxpower = true;
 
 				/*  Revse TX power table. */
-				dm_odm->BbSwingIdxOfdm		= (u8)OFDM_index[0];
+				dm_odm->BbSwingIdxOfdm		= (u8)OFDM_index;
 				dm_odm->BbSwingIdxCck		= (u8)CCK_index;
 
 				if (dm_odm->BbSwingIdxOfdmCurrent != dm_odm->BbSwingIdxOfdm) {
-- 
2.30.2





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux