Staging: rtl8188eu: Refactor conditional code to increase readability

Remove the nested conditionals. The if and else-if have the same
code so they are combined to make the code more compact.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Vatika Harlalka 2015-02-26 23:05:11 +05:30 committed by Greg Kroah-Hartman
parent 4ceb7f7233
commit 294a7fcc85
1 changed files with 3 additions and 9 deletions

View File

@ -506,19 +506,13 @@ void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt)
temp_cck = dm_odm->RFCalibrateInfo.RegA24;
for (i = 0; i < CCK_TABLE_SIZE; i++) {
if (dm_odm->RFCalibrateInfo.bCCKinCH14) {
if (memcmp(&temp_cck, &CCKSwingTable_Ch14[i][2], 4)) {
if ((dm_odm->RFCalibrateInfo.bCCKinCH14 &&
memcmp(&temp_cck, &CCKSwingTable_Ch14[i][2], 4)) ||
memcmp(&temp_cck, &CCKSwingTable_Ch1_Ch13[i][2], 4)) {
cck_index_old = (u8)i;
dm_odm->BbSwingIdxCckBase = (u8)i;
break;
}
} else {
if (memcmp(&temp_cck, &CCKSwingTable_Ch1_Ch13[i][2], 4)) {
cck_index_old = (u8)i;
dm_odm->BbSwingIdxCckBase = (u8)i;
break;
}
}
}
if (!dm_odm->RFCalibrateInfo.ThermalValue) {