summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu
diff options
context:
space:
mode:
authorVatika Harlalka <vatikaharlalka@gmail.com>2015-02-26 23:47:39 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-02-26 12:56:58 -0800
commit4ceb7f723372336f4d9e1ccfe7697a08eff2860f (patch)
treecc9fdeb8f952df25afdc881b3098946ebcd23ba8 /drivers/staging/rtl8188eu
parent1d6871f8dc2351f8fdb9cc47a6ef2b3b189ed640 (diff)
downloadop-kernel-dev-4ceb7f723372336f4d9e1ccfe7697a08eff2860f.zip
op-kernel-dev-4ceb7f723372336f4d9e1ccfe7697a08eff2860f.tar.gz
Staging: rtl8188eu: Combine two loops to increase readability
The first loop assigns values to ofdm_index array and the second checks for boundary conditions. They are combined and a comment is added to increase clarity. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r--drivers/staging/rtl8188eu/hal/phy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c
index 9eaf230..d94ce61 100644
--- a/drivers/staging/rtl8188eu/hal/phy.c
+++ b/drivers/staging/rtl8188eu/hal/phy.c
@@ -584,17 +584,17 @@ void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt)
}
if (offset >= index_mapping_NUM_88E)
offset = index_mapping_NUM_88E-1;
- for (i = 0; i < rf; i++)
- ofdm_index[i] = dm_odm->RFCalibrateInfo.OFDM_index[i] + ofdm_index_mapping[j][offset];
- cck_index = dm_odm->RFCalibrateInfo.CCK_index + ofdm_index_mapping[j][offset];
+ /* Updating ofdm_index values with new OFDM / CCK offset */
for (i = 0; i < rf; i++) {
+ ofdm_index[i] = dm_odm->RFCalibrateInfo.OFDM_index[i] + ofdm_index_mapping[j][offset];
if (ofdm_index[i] > OFDM_TABLE_SIZE_92D-1)
ofdm_index[i] = OFDM_TABLE_SIZE_92D-1;
else if (ofdm_index[i] < ofdm_min_index)
ofdm_index[i] = ofdm_min_index;
}
+ cck_index = dm_odm->RFCalibrateInfo.CCK_index + ofdm_index_mapping[j][offset];
if (cck_index > CCK_TABLE_SIZE-1)
cck_index = CCK_TABLE_SIZE-1;
else if (cck_index < 0)
OpenPOWER on IntegriCloud