staging: rtl8188eu: remove extra indentations
authorMichael Straube <straube.linux@gmail.com>
Tue, 15 Sep 2020 09:50:09 +0000 (11:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Sep 2020 11:12:05 +0000 (13:12 +0200)
Remove extra indentations to follow kernel coding style and clear
checkpatch warnings.

WARNING: suspect code indent for conditional statements

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200915095009.9679-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
drivers/staging/rtl8188eu/core/rtw_wlan_util.c
drivers/staging/rtl8188eu/hal/phy.c
drivers/staging/rtl8188eu/hal/rf_cfg.c

index 0eaf81e..dad007f 100644 (file)
@@ -2599,9 +2599,9 @@ static unsigned int OnBeacon(struct adapter *padapter,
                        if (psta) {
                                ret = rtw_check_bcn_info(padapter, pframe, len);
                                if (!ret) {
-                                               DBG_88E_LEVEL(_drv_info_, "ap has changed, disconnect now\n ");
-                                               receive_disconnect(padapter, pmlmeinfo->network.MacAddress, 65535);
-                                               return _SUCCESS;
+                                       DBG_88E_LEVEL(_drv_info_, "ap has changed, disconnect now\n ");
+                                       receive_disconnect(padapter, pmlmeinfo->network.MacAddress, 65535);
+                                       return _SUCCESS;
                                }
                                /* update WMM, ERP in the beacon */
                                /* todo: the timer is used instead of the number of the beacon received */
index be843fd..efe1f1b 100644 (file)
@@ -869,42 +869,42 @@ int rtw_check_bcn_info(struct adapter  *Adapter, u8 *pframe, u32 packet_len)
        /* parsing HT_INFO_IE */
        p = rtw_get_ie(bssid->ies + _FIXED_IE_LENGTH_, _HT_ADD_INFO_IE_, &len, bssid->ie_length - _FIXED_IE_LENGTH_);
        if (p && len > 0) {
-                       pht_info = (struct HT_info_element *)(p + 2);
-                       ht_info_infos_0 = pht_info->infos[0];
+               pht_info = (struct HT_info_element *)(p + 2);
+               ht_info_infos_0 = pht_info->infos[0];
        } else {
-                       ht_info_infos_0 = 0;
+               ht_info_infos_0 = 0;
        }
        if (ht_cap_info != cur_network->BcnInfo.ht_cap_info ||
            ((ht_info_infos_0 & 0x03) != (cur_network->BcnInfo.ht_info_infos_0 & 0x03))) {
-                       DBG_88E("%s bcn now: ht_cap_info:%x ht_info_infos_0:%x\n", __func__,
-                               ht_cap_info, ht_info_infos_0);
-                       DBG_88E("%s bcn link: ht_cap_info:%x ht_info_infos_0:%x\n", __func__,
-                               cur_network->BcnInfo.ht_cap_info, cur_network->BcnInfo.ht_info_infos_0);
-                       DBG_88E("%s bw mode change, disconnect\n", __func__);
-                       /* bcn_info_update */
-                       cur_network->BcnInfo.ht_cap_info = ht_cap_info;
-                       cur_network->BcnInfo.ht_info_infos_0 = ht_info_infos_0;
-                       /* to do : need to check that whether modify related register of BB or not */
-                       /* goto _mismatch; */
+               DBG_88E("%s bcn now: ht_cap_info:%x ht_info_infos_0:%x\n", __func__,
+                       ht_cap_info, ht_info_infos_0);
+               DBG_88E("%s bcn link: ht_cap_info:%x ht_info_infos_0:%x\n", __func__,
+                       cur_network->BcnInfo.ht_cap_info, cur_network->BcnInfo.ht_info_infos_0);
+               DBG_88E("%s bw mode change, disconnect\n", __func__);
+               /* bcn_info_update */
+               cur_network->BcnInfo.ht_cap_info = ht_cap_info;
+               cur_network->BcnInfo.ht_info_infos_0 = ht_info_infos_0;
+               /* to do : need to check that whether modify related register of BB or not */
+               /* goto _mismatch; */
        }
 
        /* Checking for channel */
        p = rtw_get_ie(bssid->ies + _FIXED_IE_LENGTH_, _DSSET_IE_, &len, bssid->ie_length - _FIXED_IE_LENGTH_);
        if (p) {
-                       bcn_channel = *(p + 2);
+               bcn_channel = *(p + 2);
        } else {/* In 5G, some ap do not have DSSET IE checking HT info for channel */
-                       p = rtw_get_ie(bssid->ies + _FIXED_IE_LENGTH_, _HT_ADD_INFO_IE_, &len, bssid->ie_length - _FIXED_IE_LENGTH_);
-                       if (pht_info) {
-                                       bcn_channel = pht_info->primary_channel;
-                       } else { /* we don't find channel IE, so don't check it */
-                                       DBG_88E("Oops: %s we don't find channel IE, so don't check it\n", __func__);
-                                       bcn_channel = Adapter->mlmeextpriv.cur_channel;
-                       }
+               p = rtw_get_ie(bssid->ies + _FIXED_IE_LENGTH_, _HT_ADD_INFO_IE_, &len, bssid->ie_length - _FIXED_IE_LENGTH_);
+               if (pht_info) {
+                       bcn_channel = pht_info->primary_channel;
+               } else { /* we don't find channel IE, so don't check it */
+                       DBG_88E("Oops: %s we don't find channel IE, so don't check it\n", __func__);
+                       bcn_channel = Adapter->mlmeextpriv.cur_channel;
+               }
        }
        if (bcn_channel != Adapter->mlmeextpriv.cur_channel) {
-                       DBG_88E("%s beacon channel:%d cur channel:%d disconnect\n", __func__,
-                               bcn_channel, Adapter->mlmeextpriv.cur_channel);
-                       goto _mismatch;
+               DBG_88E("%s beacon channel:%d cur channel:%d disconnect\n", __func__,
+                       bcn_channel, Adapter->mlmeextpriv.cur_channel);
+               goto _mismatch;
        }
 
        /* checking SSID */
index 920688f..db6f05b 100644 (file)
@@ -403,11 +403,11 @@ void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt)
 
                for (i = 0; i < CCK_TABLE_SIZE; i++) {
                        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;
+                            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;
                        }
                }
 
@@ -1039,10 +1039,10 @@ static void phy_iq_calibrate(struct adapter *adapt, s32 result[][8],
        for (i = 0; i < retry_count; i++) {
                path_a_ok = phy_path_a_iqk(adapt, is2t);
                if (path_a_ok == 0x01) {
-                               result[t][0] = (phy_query_bb_reg(adapt, rTx_Power_Before_IQK_A,
-                                                                bMaskDWord) & 0x3FF0000) >> 16;
-                               result[t][1] = (phy_query_bb_reg(adapt, rTx_Power_After_IQK_A,
-                                                                bMaskDWord) & 0x3FF0000) >> 16;
+                       result[t][0] = (phy_query_bb_reg(adapt, rTx_Power_Before_IQK_A,
+                                                        bMaskDWord) & 0x3FF0000) >> 16;
+                       result[t][1] = (phy_query_bb_reg(adapt, rTx_Power_After_IQK_A,
+                                                        bMaskDWord) & 0x3FF0000) >> 16;
                        break;
                }
        }
@@ -1050,10 +1050,10 @@ static void phy_iq_calibrate(struct adapter *adapt, s32 result[][8],
        for (i = 0; i < retry_count; i++) {
                path_a_ok = phy_path_a_rx_iqk(adapt, is2t);
                if (path_a_ok == 0x03) {
-                               result[t][2] = (phy_query_bb_reg(adapt, rRx_Power_Before_IQK_A_2,
-                                                                bMaskDWord) & 0x3FF0000) >> 16;
-                               result[t][3] = (phy_query_bb_reg(adapt, rRx_Power_After_IQK_A_2,
-                                                                bMaskDWord) & 0x3FF0000) >> 16;
+                       result[t][2] = (phy_query_bb_reg(adapt, rRx_Power_Before_IQK_A_2,
+                                                        bMaskDWord) & 0x3FF0000) >> 16;
+                       result[t][3] = (phy_query_bb_reg(adapt, rRx_Power_After_IQK_A_2,
+                                                        bMaskDWord) & 0x3FF0000) >> 16;
                        break;
                }
                ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD,
index 0b20e62..4554207 100644 (file)
@@ -206,8 +206,8 @@ static bool rtl88e_phy_config_rf_with_headerfile(struct adapter *adapt)
                                READ_NEXT_PAIR(v1, v2, i);
                                while (v2 != 0xDEAD && v2 != 0xCDEF &&
                                       v2 != 0xCDCD && i < array_len - 2) {
-                                               rtl8188e_config_rf_reg(adapt, v1, v2);
-                                               READ_NEXT_PAIR(v1, v2, i);
+                                       rtl8188e_config_rf_reg(adapt, v1, v2);
+                                       READ_NEXT_PAIR(v1, v2, i);
                                }
 
                                while (v2 != 0xDEAD && i < array_len - 2)