Staging: rtl8723bs: Fix code style issue in rtl8723bs driver
authorHardik Singh Rathore <hardiksingh.k@gmail.com>
Wed, 12 Dec 2018 13:54:55 +0000 (19:24 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Dec 2018 13:26:10 +0000 (14:26 +0100)
Add space between 'else' and '{' to solve code style issue
in all the files for rtl8723bs driver.

Signed-off-by: Hardik Singh Rathore <hardiksingh.k@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15 files changed:
drivers/staging/rtl8723bs/core/rtw_ap.c
drivers/staging/rtl8723bs/core/rtw_cmd.c
drivers/staging/rtl8723bs/core/rtw_debug.c
drivers/staging/rtl8723bs/core/rtw_efuse.c
drivers/staging/rtl8723bs/core/rtw_ieee80211.c
drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
drivers/staging/rtl8723bs/core/rtw_mlme.c
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
drivers/staging/rtl8723bs/core/rtw_recv.c
drivers/staging/rtl8723bs/core/rtw_security.c
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
drivers/staging/rtl8723bs/core/rtw_wlan_util.c
drivers/staging/rtl8723bs/core/rtw_xmit.c
drivers/staging/rtl8723bs/hal/hal_btcoex.c

index 330cd21c21bdab3432b995b4bd16670fe771f4be..cbbfef389874ce9c4a7f2a145ba3069b966dd350 100644 (file)
@@ -91,7 +91,7 @@ static void update_BCNTIM(struct adapter *padapter)
 
                        /* append TIM IE from dst_ie offset */
                        dst_ie = p;
-               } else{
+               } else {
                        tim_ielen = 0;
 
                        /* calucate head_len */
@@ -323,7 +323,7 @@ void expire_timeout_chk(struct adapter *padapter)
                                psta->state
                        );
                        updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
-               } else{
+               } else {
                        /* TODO: Aging mechanism to digest frames in sleep_q to avoid running out of xmitframe */
                        if (psta->sleepq_len > (NR_XMITFRAME/pstapriv->asoc_list_cnt)
                                && padapter->xmitpriv.free_xmitframe_cnt < ((
@@ -457,7 +457,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
                        __func__, psta->mac_id, psta->raid, shortGIrate, tx_ra_bitmap);
 
                rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, rssi_level);
-       } else{
+       } else {
                DBG_871X("station aid %d exceed the max number\n", psta->aid);
        }
 }
@@ -538,7 +538,7 @@ void update_bmc_sta(struct adapter *padapter)
                psta->state = _FW_LINKED;
                spin_unlock_bh(&psta->lock);
 
-       } else{
+       } else {
                DBG_871X("add_RATid_bmc_sta error!\n");
        }
 }
@@ -633,7 +633,7 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
                        SET_FLAG(cur_stbc_cap, (STBC_HT_ENABLE_TX | STBC_HT_CAP_TX));
                        DBG_871X("Enable HT Tx STBC for STA(%d)\n", psta->aid);
                }
-       } else{
+       } else {
                phtpriv_sta->ampdu_enable = false;
 
                phtpriv_sta->sgi_20m = false;
@@ -695,7 +695,7 @@ static void update_ap_info(struct adapter *padapter, struct sta_info *psta)
                        phtpriv_ap->sgi_40m = true;
 
                psta->qos_option = true;
-       } else{
+       } else {
                phtpriv_ap->ampdu_enable = false;
 
                phtpriv_ap->sgi_20m = false;
@@ -1215,7 +1215,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf,  int len)
                if ((psecuritypriv->wpa_pairwise_cipher & WPA_CIPHER_CCMP) ||
                        (psecuritypriv->wpa2_pairwise_cipher & WPA_CIPHER_CCMP)) {
                        pht_cap->ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&(0x07<<2));
-               } else{
+               } else {
                        pht_cap->ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&0x00);
                }
 
@@ -1961,7 +1961,7 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
                                update_beacon(padapter, 0xFF, NULL, true);
                        }
                }
-       } else{
+       } else {
                if (psta->no_short_preamble_set) {
                        psta->no_short_preamble_set = 0;
 
@@ -1986,7 +1986,7 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
                                update_beacon(padapter, _ERPINFO_IE_, NULL, true);
                        }
                }
-       } else{
+       } else {
                if (psta->nonerp_set) {
                        psta->nonerp_set = 0;
 
@@ -2011,7 +2011,7 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
                                update_beacon(padapter, 0xFF, NULL, true);
                        }
                }
-       } else{
+       } else {
                if (psta->no_short_slot_time_set) {
                        psta->no_short_slot_time_set = 0;
 
@@ -2058,7 +2058,7 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
                                   pmlmepriv->num_sta_ht_20mhz);
                }
 
-       } else{
+       } else {
                if (!psta->no_ht_set) {
                        psta->no_ht_set = 1;
                        pmlmepriv->num_sta_no_ht++;
@@ -2253,7 +2253,7 @@ void sta_info_update(struct adapter *padapter, struct sta_info *psta)
        if (WLAN_STA_HT&flags) {
                psta->htpriv.ht_option = true;
                psta->qos_option = 1;
-       } else{
+       } else {
                psta->htpriv.ht_option = false;
        }
 
index 984db6f2217cdc85c344536e90c9da7cdf7d4678..ea2c187e56bdcff00fd20db5657430799331167f 100644 (file)
@@ -284,7 +284,7 @@ struct      cmd_obj *_rtw_dequeue_cmd(struct __queue *queue)
        spin_lock_irqsave(&queue->lock, irqL);
        if (list_empty(&(queue->queue)))
                obj = NULL;
-       else{
+       else {
                obj = LIST_CONTAINOR(get_next(&(queue->queue)), struct cmd_obj, list);
                list_del_init(&obj->list);
        }
@@ -500,7 +500,7 @@ _next:
                        }
 
                        pcmdpriv->cmd_seq++;
-               } else{
+               } else {
                        pcmd->res = H2C_PARAMETERS_ERROR;
                }
 
@@ -544,11 +544,11 @@ post_process:
                        if (pcmd_callback == NULL) {
                                RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("mlme_cmd_hdl(): pcmd_callback = 0x%p, cmdcode = 0x%x\n", pcmd_callback, pcmd->cmdcode));
                                rtw_free_cmd_obj(pcmd);
-                       } else{
+                       } else {
                                /* todo: !!! fill rsp_buf to pcmd->rsp if (pcmd->rsp!= NULL) */
                                pcmd_callback(pcmd->padapter, pcmd);/* need conider that free cmd_obj in rtw_cmd_callback */
                        }
-               } else{
+               } else {
                        RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("%s: cmdcode = 0x%x callback not defined!\n", __func__, pcmd->cmdcode));
                        rtw_free_cmd_obj(pcmd);
                }
@@ -878,7 +878,7 @@ u8 rtw_joinbss_cmd(struct adapter  *padapter, struct wlan_network *pnetwork)
                if (psecnetwork->IELength != tmp_len) {
                        psecnetwork->IELength = tmp_len;
                        pqospriv->qos_option = 1; /* There is WMM IE in this corresp. beacon */
-               } else{
+               } else {
                        pqospriv->qos_option = 0;/* There is no WMM IE in this corresp. beacon */
                }
        }
@@ -985,7 +985,7 @@ u8 rtw_setopmode_cmd(struct adapter  *padapter, enum NDIS_802_11_NETWORK_INFRAST
 
                init_h2fwcmd_w_parm_no_rsp(ph2c, psetop, _SetOpMode_CMD_);
                res = rtw_enqueue_cmd(pcmdpriv, ph2c);
-       } else{
+       } else {
                setopmode_hdl(padapter, (u8 *)psetop);
                kfree(psetop);
        }
@@ -1020,7 +1020,7 @@ u8 rtw_setstakey_cmd(struct adapter *padapter, struct sta_info *sta, u8 unicast_
 
        if (unicast_key == true) {
                memcpy(&psetstakey_para->key, &sta->dot118021x_UncstKey, 16);
-       } else{
+       } else {
                memcpy(&psetstakey_para->key, &psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey, 16);
        }
 
@@ -1047,7 +1047,7 @@ u8 rtw_setstakey_cmd(struct adapter *padapter, struct sta_info *sta, u8 unicast_
                ph2c->rsp = (u8 *) psetstakey_rsp;
                ph2c->rspsz = sizeof(struct set_stakey_rsp);
                res = rtw_enqueue_cmd(pcmdpriv, ph2c);
-       } else{
+       } else {
                set_stakey_hdl(padapter, (u8 *)psetstakey_para);
                kfree(psetstakey_para);
        }
@@ -1070,7 +1070,7 @@ u8 rtw_clearstakey_cmd(struct adapter *padapter, struct sta_info *sta, u8 enqueu
                        clear_cam_entry(padapter, cam_id);
                        rtw_camid_free(padapter, cam_id);
                }
-       } else{
+       } else {
                ph2c = rtw_zmalloc(sizeof(struct cmd_obj));
                if (ph2c == NULL) {
                        res = _FAIL;
@@ -1289,7 +1289,7 @@ u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan, u8 enqueue, u8 swconf
 
                init_h2fwcmd_w_parm_no_rsp(pcmdobj, setChannelPlan_param, GEN_CMD_CODE(_SetChannelPlan));
                res = rtw_enqueue_cmd(pcmdpriv, pcmdobj);
-       } else{
+       } else {
                /* no need to enqueue, do the cmd hdl directly and free cmd parameter */
                if (H2C_SUCCESS != set_chplan_hdl(padapter, (unsigned char *)setChannelPlan_param))
                        res = _FAIL;
@@ -1390,7 +1390,7 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
                                        pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 30;
                                }
                        }
-               } else{
+               } else {
                        /* DBG_871X("(+)Tx = %d, Rx = %d\n", pmlmepriv->LinkDetectInfo.NumTxOkInPeriod, pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod); */
 
                        if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount >= 2)
@@ -1412,7 +1412,7 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
                        else
                                rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_TRAFFIC_BUSY, 1);
                }
-       } else{
+       } else {
                struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
                int n_assoc_iface = 0;
 
@@ -1562,7 +1562,7 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter *padapter, u8 lps_ctrl_type, u8 enqueue)
                init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
 
                res = rtw_enqueue_cmd(pcmdpriv, ph2c);
-       } else{
+       } else {
                lps_ctrl_wk_hdl(padapter, lps_ctrl_type);
        }
 
@@ -1764,7 +1764,7 @@ static void rtw_chk_hi_queue_hdl(struct adapter *padapter)
 
                        if (update_tim == true)
                                update_beacon(padapter, _TIM_IE_, NULL, true);
-               } else{/* re check again */
+               } else {/* re check again */
                        rtw_chk_hi_queue_cmd(padapter);
                }
 
@@ -1954,7 +1954,7 @@ static void c2h_wk_callback(_workitem *work)
                if (c2h_evt != NULL) {
                        /* This C2H event is read, clear it */
                        c2h_evt_clear(adapter);
-               } else{
+               } else {
                        c2h_evt = rtw_malloc(16);
                        if (c2h_evt != NULL) {
                                /* This C2H event is not read, read & clear now */
@@ -1978,7 +1978,7 @@ static void c2h_wk_callback(_workitem *work)
                        /* Handle CCX report here */
                        rtw_hal_c2h_handler(adapter, c2h_evt);
                        kfree(c2h_evt);
-               } else{
+               } else {
                        /* Enqueue into cmd_thread for others */
                        rtw_c2h_wk_cmd(adapter, c2h_evt);
                }
@@ -2128,7 +2128,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
                }
 
                rtw_indicate_connect(padapter);
-       } else{
+       } else {
                pwlan = _rtw_alloc_network(pmlmepriv);
                spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
                if (pwlan == NULL) {
@@ -2139,7 +2139,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
                                goto createbss_cmd_fail;
                        }
                        pwlan->last_scanned = jiffies;
-               } else{
+               } else {
                        list_add_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);
                }
 
index a2a2cefd178696f9962e24fb008a38cb66649517..a3c8a712bdc22f5cea6b829d5fa5a06b3578c85a 100644 (file)
@@ -519,7 +519,7 @@ int proc_get_ap_info(struct seq_file *m, void *v)
                        }
                }
 
-       } else{
+       } else {
                DBG_871X_SEL_NL(m, "can't get sta's macaddr, cur_network's macaddr:" MAC_FMT "\n", MAC_ARG(cur_network->network.MacAddress));
        }
 
index b3247c9642ea4505463273b372ccf7e03c304e96..eea3bece59a1a9ba7681f092ce2d1ed2272c4f37 100644 (file)
@@ -70,7 +70,7 @@ Efuse_Write1ByteToFakeContent(
        }
        if (fakeEfuseBank == 0)
                fakeEfuseContent[Offset] = Value;
-       else{
+       else {
                fakeBTEfuseContent[fakeEfuseBank-1][Offset] = Value;
        }
        return true;
@@ -303,7 +303,7 @@ bool                bPseudoTest)
        if (tmpidx < 100) {
                *data = rtw_read8(padapter, EFUSE_CTRL);
                bResult = true;
-       } else{
+       } else {
                *data = 0xff;
                bResult = false;
                DBG_871X("%s: [ERROR] addr = 0x%x bResult =%d time out 1s !!!\n", __func__, addr, bResult);
@@ -359,7 +359,7 @@ bool                bPseudoTest)
 
        if (tmpidx < 100) {
                bResult = true;
-       } else{
+       } else {
                bResult = false;
                DBG_871X("%s: [ERROR] addr = 0x%x , efuseValue = 0x%x , bResult =%d time out 1s !!!\n",
                                        __func__, addr, efuseValue, bResult);
index 33f2649ba2eca46b4fab693200314b738a2c2a6e..ac203c01c0985d6ec68279b1d1b9e33813e6be4e 100644 (file)
@@ -99,7 +99,7 @@ int rtw_check_network_type(unsigned char *rate, int ratelen, int channel)
                        return WIRELESS_INVALID;
                else
                        return WIRELESS_11A;
-       } else{ /*  could be pure B, pure G, or B/G */
+       } else { /*  could be pure B, pure G, or B/G */
                if (rtw_is_cckratesonly_included(rate))
                        return WIRELESS_11B;
                else if (rtw_is_cckrates_included(rate))
@@ -157,7 +157,7 @@ u8 *rtw_get_ie(u8 *pbuf, sint index, sint *len, sint limit)
                if (*p == index) {
                        *len = *(p + 1);
                        return p;
-               } else{
+               } else {
                        tmp = *(p + 1);
                        p += (tmp + 2);
                        i += (tmp + 2);
@@ -205,7 +205,7 @@ u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, u
                                *ielen = in_ie[cnt+1]+2;
 
                        break;
-               } else{
+               } else {
                        cnt += in_ie[cnt+1]+2; /* goto next */
                }
        }
@@ -336,7 +336,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
                        wireless_mode = WIRELESS_11A_5N;
                else
                        wireless_mode = WIRELESS_11BG_24N;
-       } else{
+       } else {
                wireless_mode = pregistrypriv->wireless_mode;
        }
 
@@ -347,7 +347,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
        if (rateLen > 8) {
                ie = rtw_set_ie(ie, _SUPPORTEDRATES_IE_, 8, pdev_network->SupportedRates, &sz);
                /* ie = rtw_set_ie(ie, _EXT_SUPPORTEDRATES_IE_, (rateLen - 8), (pdev_network->SupportedRates + 8), &sz); */
-       } else{
+       } else {
                ie = rtw_set_ie(ie, _SUPPORTEDRATES_IE_, rateLen, pdev_network->SupportedRates, &sz);
        }
 
@@ -404,7 +404,7 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
 
                        return pbuf;
 
-               } else{
+               } else {
                        *wpa_ie_len = 0;
                        return NULL;
                }
@@ -642,7 +642,7 @@ int rtw_get_wapi_ie(u8 *in_ie, uint in_len, u8 *wapi_ie, u16 *wapi_len)
                                *wapi_len = in_ie[cnt+1]+2;
 
                        cnt += in_ie[cnt+1]+2;  /* get next */
-               } else{
+               } else {
                        cnt += in_ie[cnt+1]+2;   /* get next */
                }
        }
@@ -684,7 +684,7 @@ int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie,
 
                                *wpa_len = in_ie[cnt+1]+2;
                                cnt += in_ie[cnt+1]+2;  /* get next */
-               } else{
+               } else {
                        if (authmode == _WPA2_IE_ID_) {
                                RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\n get_rsn_ie: sec_idx =%d in_ie[cnt+1]+2 =%d\n", sec_idx, in_ie[cnt+1]+2));
 
@@ -700,7 +700,7 @@ int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie,
 
                                *rsn_len = in_ie[cnt+1]+2;
                                cnt += in_ie[cnt+1]+2;  /* get next */
-                       } else{
+                       } else {
                                cnt += in_ie[cnt+1]+2;   /* get next */
                        }
                }
@@ -765,7 +765,7 @@ u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
                        cnt += in_ie[cnt+1]+2;
 
                        break;
-               } else{
+               } else {
                        cnt += in_ie[cnt+1]+2; /* goto next */
                }
        }
@@ -817,7 +817,7 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id, u8 *buf_att
                                *len_attr = attr_len;
 
                        break;
-               } else{
+               } else {
                        attr_ptr += attr_len; /* goto next */
                }
        }
@@ -1252,7 +1252,7 @@ u16 rtw_mcs_rate(u8 rf_type, u8 bw_40MHz, u8 short_GI, unsigned char *MCS_rate)
                        max_rate = (bw_40MHz) ? ((short_GI)?300:270):((short_GI)?144:130);
                else if (MCS_rate[0] & BIT(0))
                        max_rate = (bw_40MHz) ? ((short_GI)?150:135):((short_GI)?72:65);
-       } else{
+       } else {
                if (MCS_rate[1]) {
                        if (MCS_rate[1] & BIT(7))
                                max_rate = (bw_40MHz) ? ((short_GI)?3000:2700):((short_GI)?1444:1300);
@@ -1270,7 +1270,7 @@ u16 rtw_mcs_rate(u8 rf_type, u8 bw_40MHz, u8 short_GI, unsigned char *MCS_rate)
                                max_rate = (bw_40MHz) ? ((short_GI)?600:540):((short_GI)?289:260);
                        else if (MCS_rate[1] & BIT(0))
                                max_rate = (bw_40MHz) ? ((short_GI)?300:270):((short_GI)?144:130);
-               } else{
+               } else {
                        if (MCS_rate[0] & BIT(7))
                                max_rate = (bw_40MHz) ? ((short_GI)?1500:1350):((short_GI)?722:650);
                        else if (MCS_rate[0] & BIT(6))
index 35ca825a7e5a4e1fda21b6cf9dd18e85bc622e45..0c8a050b2a812dcb29b31f5caee17ee32dd91f43 100644 (file)
@@ -95,20 +95,20 @@ u8 rtw_do_join(struct adapter *padapter)
                                pmlmepriv->to_join = false;
                                RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_do_join(): site survey return error\n."));
                        }
-               } else{
+               } else {
                        pmlmepriv->to_join = false;
                        ret = _FAIL;
                }
 
                goto exit;
-       } else{
+       } else {
                int select_ret;
                spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
                select_ret = rtw_select_and_join_from_scanned_queue(pmlmepriv);
                if (select_ret == _SUCCESS) {
                        pmlmepriv->to_join = false;
                        _set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT);
-               } else{
+               } else {
                        if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) {
                                /*  submit createbss_cmd to change to a ADHOC_MASTER */
 
@@ -135,7 +135,7 @@ u8 rtw_do_join(struct adapter *padapter)
 
                                RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("***Error => rtw_select_and_join_from_scanned_queue FAIL under STA_Mode***\n "));
 
-                       } else{
+                       } else {
                                /*  can't associate ; reset under-linking */
                                _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
 
@@ -150,7 +150,7 @@ u8 rtw_do_join(struct adapter *padapter)
                                                pmlmepriv->to_join = false;
                                                RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("do_join(): site survey return error\n."));
                                        }
-                               } else{
+                               } else {
                                        ret = _FAIL;
                                        pmlmepriv->to_join = false;
                                }
@@ -289,13 +289,13 @@ u8 rtw_set_802_11_ssid(struct adapter *padapter, struct ndis_802_11_ssid *ssid)
                                                _clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
                                                set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
                                        }
-                               } else{
+                               } else {
                                        goto release_mlme_lock;/* it means driver is in WIFI_ADHOC_MASTER_STATE, we needn't create bss again. */
                                }
                        } else {
                                rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_JOINBSS, 1);
                        }
-               } else{
+               } else {
                        RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("Set SSID not the same ssid\n"));
                        RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("set_ssid =[%s] len = 0x%x\n", ssid->Ssid, (unsigned int)ssid->SsidLength));
                        RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("assoc_ssid =[%s] len = 0x%x\n", pmlmepriv->assoc_ssid.Ssid, (unsigned int)pmlmepriv->assoc_ssid.SsidLength));
@@ -670,7 +670,7 @@ u16 rtw_get_cur_max_rate(struct adapter *adapter)
                        short_GI,
                        psta->htpriv.ht_cap.supp_mcs_set
                );
-       } else{
+       } else {
                while ((pcur_bss->SupportedRates[i] != 0) && (pcur_bss->SupportedRates[i] != 0xFF)) {
                        rate = pcur_bss->SupportedRates[i]&0x7F;
                        if (rate > max_rate)
index 81505f3bce8b8b12f8c88f629308253fea531740..406e313477aa91b4455deec63c6c90456238c532 100644 (file)
@@ -902,7 +902,7 @@ void rtw_surveydone_event_callback(struct adapter   *adapter, u8 *pbuf)
 
                                if (rtw_select_and_join_from_scanned_queue(pmlmepriv) == _SUCCESS) {
                                        _set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT);
-                               } else{
+                               } else {
                                        struct wlan_bssid_ex    *pdev_network = &(adapter->registrypriv.dev_network);
                                        u8 *pibss = adapter->registrypriv.dev_network.MacAddress;
 
@@ -925,7 +925,7 @@ void rtw_surveydone_event_callback(struct adapter   *adapter, u8 *pbuf)
                                        pmlmepriv->to_join = false;
                                }
                        }
-               } else{
+               } else {
                        int s_ret;
                        set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
                        pmlmepriv->to_join = false;
@@ -935,7 +935,7 @@ void rtw_surveydone_event_callback(struct adapter   *adapter, u8 *pbuf)
                        } else if (s_ret == 2) {/* there is no need to wait for join */
                                _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
                                rtw_indicate_connect(adapter);
-                       } else{
+                       } else {
                                DBG_871X("try_to_join, but select scanning queue fail, to_roam:%d\n", rtw_to_roam(adapter));
 
                                if (rtw_to_roam(adapter) != 0) {
@@ -1389,7 +1389,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
 
        if (pmlmepriv->assoc_ssid.SsidLength == 0) {
                RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("@@@@@   joinbss event call back  for Any SSid\n"));
-       } else{
+       } else {
                RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("@@@@@   rtw_joinbss_event_callback for SSid:%s\n", pmlmepriv->assoc_ssid.Ssid));
        }
 
@@ -1416,7 +1416,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
                        if (check_fwstate(pmlmepriv, _FW_LINKED)) {
                                if (the_same_macaddr == true) {
                                        ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
-                               } else{
+                               } else {
                                        pcur_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
                                        if (pcur_wlan)
                                                pcur_wlan->fixed = false;
@@ -1432,7 +1432,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
                                        }
                                }
 
-                       } else{
+                       } else {
                                ptarget_wlan = _rtw_find_same_network(&pmlmepriv->scanned_queue, pnetwork);
                                if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) {
                                        if (ptarget_wlan)
@@ -1443,7 +1443,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
                        /* s2. update cur_network */
                        if (ptarget_wlan) {
                                rtw_joinbss_update_network(adapter, ptarget_wlan, pnetwork);
-                       } else{
+                       } else {
                                DBG_871X_LEVEL(_drv_always_, "Can't find ptarget_wlan when joinbss_event callback\n");
                                spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
                                goto ignore_joinbss_callback;
@@ -1464,7 +1464,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
                        if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) {
                                pmlmepriv->cur_network_scanned = ptarget_wlan;
                                rtw_indicate_connect(adapter);
-                       } else{
+                       } else {
                                /* adhoc mode will rtw_indicate_connect when rtw_stassoc_event_callback */
                                RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("adhoc mode, fw_state:%x", get_fwstate(pmlmepriv)));
                        }
@@ -1475,7 +1475,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
 
                        RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("Cancel assoc_timer\n"));
 
-               } else{
+               } else {
                        RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("rtw_joinbss_event_callback err: fw_state:%x", get_fwstate(pmlmepriv)));
                        spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
                        goto ignore_joinbss_callback;
@@ -1494,7 +1494,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
                        _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
                }
 
-       } else{/* if join_res < 0 (join fails), then try again */
+       } else {/* if join_res < 0 (join fails), then try again */
 
                #ifdef REJOIN
                res = _FAIL;
@@ -1510,7 +1510,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
                } else if (res == 2) {/* there is no need to wait for join */
                        _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
                        rtw_indicate_connect(adapter);
-               } else{
+               } else {
                        RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Set Assoc_Timer = 1; can't find match ssid in scanned_q\n"));
                #endif
 
@@ -1846,7 +1846,7 @@ void _rtw_join_timeout_handler(struct timer_list *t)
                        }
                }
 
-       } else{
+       } else {
                rtw_indicate_disconnect(adapter);
                free_scanqueue(pmlmepriv);/*  */
 
@@ -1956,11 +1956,11 @@ void rtw_dynamic_check_timer_handler(struct adapter *adapter)
                if (bEnterPS) {
                        /* rtw_lps_ctrl_wk_cmd(adapter, LPS_CTRL_ENTER, 1); */
                        rtw_hal_dm_watchdog_in_lps(adapter);
-               } else{
+               } else {
                        /* call rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_LEAVE, 1) in traffic_status_watchdog() */
                }
 
-       } else{
+       } else {
                if (is_primary_adapter(adapter)) {
                        rtw_dynamic_chk_wk_cmd(adapter);
                }
@@ -2374,7 +2374,7 @@ sint rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, s
                INIT_LIST_HEAD(&pcmd->list);
 
                res = rtw_enqueue_cmd(pcmdpriv, pcmd);
-       } else{
+       } else {
                setkey_hdl(adapter, (u8 *)psetkeyparm);
                kfree((u8 *) psetkeyparm);
        }
@@ -2432,7 +2432,7 @@ static int SecIsInPMKIDList(struct adapter *Adapter, u8 *bssid)
                if ((psecuritypriv->PMKIDList[i].bUsed) &&
                                (!memcmp(psecuritypriv->PMKIDList[i].Bssid, bssid, ETH_ALEN))) {
                        break;
-               } else{
+               } else {
                        i++;
                        /* continue; */
                }
@@ -2519,7 +2519,7 @@ sint rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in
        iEntry = SecIsInPMKIDList(adapter, pmlmepriv->assoc_bssid);
        if (iEntry < 0) {
                return ielength;
-       } else{
+       } else {
                if (authmode == _WPA2_IE_ID_)
                        ielength = rtw_append_pmkid(adapter, iEntry, out_ie, ielength);
        }
@@ -2634,7 +2634,7 @@ void rtw_joinbss_reset(struct adapter *padapter)
                else
                        threshold = 0;
                rtw_hal_set_hwreg(padapter, HW_VAR_RXDMA_AGG_PG_TH, (u8 *)(&threshold));
-       } else{
+       } else {
                threshold = 1;
                rtw_hal_set_hwreg(padapter, HW_VAR_RXDMA_AGG_PG_TH, (u8 *)(&threshold));
        }
@@ -3130,7 +3130,7 @@ sint rtw_linked_check(struct adapter *padapter)
                        (check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE) == true)) {
                if (padapter->stapriv.asoc_sta_count > 2)
                        return true;
-       } else{ /* Station mode */
+       } else {        /* Station mode */
                if (check_fwstate(&padapter->mlmepriv, _FW_LINKED) == true)
                        return true;
        }
index 35003d8d9ba40439194ad06fae2e3d35aa9d2d07..ebb45acb4446a18c1399270cab9e3b95d6e20706 100644 (file)
@@ -865,7 +865,7 @@ unsigned int OnBeacon(struct adapter *padapter, union recv_frame *precv_frame)
                                        /* DBG_871X("update_bcn_info\n"); */
                                        update_beacon_info(padapter, pframe, len, psta);
                                }
-                       } else{
+                       } else {
                                /* allocate a new CAM entry for IBSS station */
                                cam_idx = allocate_fw_sta_entry(padapter);
                                if (cam_idx == NUM_STA)
@@ -977,7 +977,7 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
 
                /* pstat->flags = 0; */
                /* pstat->capability = 0; */
-       } else{
+       } else {
 
                spin_lock_bh(&pstapriv->asoc_list_lock);
                if (list_empty(&pstat->asoc_list) == false) {
@@ -1019,13 +1019,13 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
                        pstat->state |= WIFI_FW_AUTH_SUCCESS;
                        pstat->expire_to = pstapriv->assoc_to;
                        pstat->authalg = algorithm;
-               } else{
+               } else {
                        DBG_871X("(2)auth rejected because out of seq [rx_seq =%d, exp_seq =%d]!\n",
                                seq, pstat->auth_seq+1);
                        status = _STATS_OUT_OF_AUTH_SEQ_;
                        goto auth_fail;
                }
-       } else{ /*  shared system or auto authentication */
+       } else { /*  shared system or auto authentication */
                if (seq == 1) {
                        /* prepare for the challenging txt... */
                        memset((void *)pstat->chg_txt, 78, 128);
@@ -1052,12 +1052,12 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
                                pstat->state |= WIFI_FW_AUTH_SUCCESS;
                                /*  challenging txt is correct... */
                                pstat->expire_to =  pstapriv->assoc_to;
-                       } else{
+                       } else {
                                DBG_871X("auth rejected because challenge failure!\n");
                                status = _STATS_CHALLENGE_FAIL_;
                                goto auth_fail;
                        }
-               } else{
+               } else {
                        DBG_871X("(3)auth rejected because out of seq [rx_seq =%d, exp_seq =%d]!\n",
                                seq, pstat->auth_seq+1);
                        status = _STATS_OUT_OF_AUTH_SEQ_;
@@ -1149,17 +1149,17 @@ unsigned int OnAuthClient(struct adapter *padapter, union recv_frame *precv_fram
                        set_link_timer(pmlmeext, REAUTH_TO);
 
                        return _SUCCESS;
-               } else{
+               } else {
                        /*  open system */
                        go2asoc = 1;
                }
        } else if (seq == 4) {
                if (pmlmeinfo->auth_algo == dot11AuthAlgrthm_Shared) {
                        go2asoc = 1;
-               } else{
+               } else {
                        goto authclnt_fail;
                }
-       } else{
+       } else {
                /*  this is also illegal */
                /* DBG_871X("marc: clnt auth failed due to illegal seq =%x\n", seq); */
                goto authclnt_fail;
@@ -1207,7 +1207,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
        if (frame_type == WIFI_ASSOCREQ) {
                reassoc = 0;
                ie_offset = _ASOCREQ_IE_OFFSET_;
-       } else{ /*  WIFI_REASSOCREQ */
+       } else { /*  WIFI_REASSOCREQ */
                reassoc = 1;
                ie_offset = _REASOCREQ_IE_OFFSET_;
        }
@@ -1241,11 +1241,11 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
                if (!((pstat->state) & WIFI_FW_ASSOC_SUCCESS)) {
                        status = _RSON_CLS2_;
                        goto asoc_class2_error;
-               } else{
+               } else {
                        pstat->state &= (~WIFI_FW_ASSOC_SUCCESS);
                        pstat->state |= WIFI_FW_ASSOC_STATE;
                }
-       } else{
+       } else {
                pstat->state &= (~WIFI_FW_AUTH_SUCCESS);
                pstat->state |= WIFI_FW_ASSOC_STATE;
        }
@@ -1344,7 +1344,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
 
                        if (!pstat->wpa2_pairwise_cipher)
                                status = WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID;
-               } else{
+               } else {
                        status = WLAN_STATUS_INVALID_IE;
                }
 
@@ -1368,7 +1368,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
                        if (!pstat->wpa_pairwise_cipher)
                                status = WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID;
 
-               } else{
+               } else {
                        status = WLAN_STATUS_INVALID_IE;
                }
 
@@ -1417,7 +1417,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
                        }
                }
 
-       } else{
+       } else {
                int copy_len;
 
                if (psecuritypriv->wpa_psk == 0) {
@@ -1436,7 +1436,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
                                   "used\n");
                        pstat->flags |= WLAN_STA_WPS;
                        copy_len = 0;
-               } else{
+               } else {
                        copy_len = ((wpa_ie_len+2) > sizeof(pstat->wpa_ie)) ? (sizeof(pstat->wpa_ie)):(wpa_ie_len+2);
                }
 
@@ -1793,7 +1793,7 @@ unsigned int OnDeAuth(struct adapter *padapter, union recv_frame *precv_frame)
 
 
                return _SUCCESS;
-       } else{
+       } else {
                int     ignore_received_deauth = 0;
 
                /*      Commented by Albert 20130604 */
@@ -1867,7 +1867,7 @@ unsigned int OnDisassoc(struct adapter *padapter, union recv_frame *precv_frame)
                }
 
                return _SUCCESS;
-       } else{
+       } else {
                DBG_871X_LEVEL(_drv_always_, "sta recv disassoc reason code(%d) sta:%pM\n",
                                reason, GetAddr3Ptr(pframe));
 
@@ -1969,7 +1969,7 @@ unsigned int OnAction_back(struct adapter *padapter, union recv_frame *precv_fra
 
                        if (pmlmeinfo->accept_addba_req) {
                                issue_action_BA(padapter, addr, RTW_WLAN_ACTION_ADDBA_RESP, 0);
-                       } else{
+                       } else {
                                issue_action_BA(padapter, addr, RTW_WLAN_ACTION_ADDBA_RESP, 37);/* reject ADDBA Req */
                        }
 
@@ -1984,7 +1984,7 @@ unsigned int OnAction_back(struct adapter *padapter, union recv_frame *precv_fra
                                DBG_871X("agg_enable for TID =%d\n", tid);
                                psta->htpriv.agg_enable_bitmap |= 1 << tid;
                                psta->htpriv.candidate_tid_bitmap &= ~BIT(tid);
-                       } else{
+                       } else {
                                psta->htpriv.agg_enable_bitmap &= ~BIT(tid);
                        }
 
@@ -2692,7 +2692,7 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
                                pframe += remainder_ielen;
                                pattrib->pktlen += remainder_ielen;
                        }
-               } else{
+               } else {
                        memcpy(pframe, cur_network->IEs, cur_network->IELength);
                        pframe += cur_network->IELength;
                        pattrib->pktlen += cur_network->IELength;
@@ -2731,7 +2731,7 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
                                pattrib->pktlen += ssid_ielen_diff;
                        }
                }
-       } else{
+       } else {
                /* timestamp will be inserted by hardware */
                pframe += 8;
                pattrib->pktlen += 8;
@@ -2867,7 +2867,7 @@ static int _issue_probereq(struct adapter *padapter,
                /*      unicast probe request frame */
                memcpy(pwlanhdr->addr1, da, ETH_ALEN);
                memcpy(pwlanhdr->addr3, da, ETH_ALEN);
-       } else{
+       } else {
                /*      broadcast probe request frame */
                memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN);
                memcpy(pwlanhdr->addr3, bc_addr, ETH_ALEN);
@@ -2892,7 +2892,7 @@ static int _issue_probereq(struct adapter *padapter,
        if (bssrate_len > 8) {
                pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, 8, bssrate, &(pattrib->pktlen));
                pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (bssrate_len - 8), (bssrate + 8), &(pattrib->pktlen));
-       } else{
+       } else {
                pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, bssrate_len, bssrate, &(pattrib->pktlen));
        }
 
@@ -3040,7 +3040,7 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short
                if ((psta->auth_seq == 2) && (psta->state & WIFI_FW_AUTH_STATE) && (use_shared_key == 1))
                        pframe = rtw_set_ie(pframe, _CHLGETXT_IE_, 128, psta->chg_txt, &(pattrib->pktlen));
 
-       } else{
+       } else {
                memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
                memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
                memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
@@ -3168,7 +3168,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
 
        if (pstat->bssratelen <= 8) {
                pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, pstat->bssratelen, pstat->bssrateset, &(pattrib->pktlen));
-       } else{
+       } else {
                pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, 8, pstat->bssrateset, &(pattrib->pktlen));
                pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (pstat->bssratelen-8), pstat->bssrateset+8, &(pattrib->pktlen));
        }
@@ -3487,7 +3487,7 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da,
 
        if (wait_ack) {
                ret = dump_mgntframe_and_wait_ack(padapter, pmgntframe);
-       } else{
+       } else {
                dump_mgntframe(padapter, pmgntframe);
                ret = _SUCCESS;
        }
@@ -3656,7 +3656,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da,
 
        if (wait_ack) {
                ret = dump_mgntframe_and_wait_ack(padapter, pmgntframe);
-       } else{
+       } else {
                dump_mgntframe(padapter, pmgntframe);
                ret = _SUCCESS;
        }
@@ -3765,7 +3765,7 @@ static int _issue_deauth(struct adapter *padapter, unsigned char *da,
 
        if (wait_ack) {
                ret = dump_mgntframe_and_wait_ack(padapter, pmgntframe);
-       } else{
+       } else {
                dump_mgntframe(padapter, pmgntframe);
                ret = _SUCCESS;
        }
@@ -4271,7 +4271,7 @@ unsigned int send_beacon(struct adapter *padapter)
        if (false == bxmitok) {
                DBG_871X("%s fail! %u ms\n", __func__, jiffies_to_msecs(jiffies - start));
                return _FAIL;
-       } else{
+       } else {
                unsigned long passing_time = jiffies_to_msecs(jiffies - start);
 
                if (passing_time > 100 || issue > 3)
@@ -4331,7 +4331,7 @@ void site_survey(struct adapter *padapter)
                        else
 #endif
                                set_channel_bwmode(padapter, survey_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20);
-               } else{
+               } else {
 #ifdef DBG_FIXED_CHAN
                        if (pmlmeext->fixed_chan != 0xff)
                                SelectChannel(padapter, pmlmeext->fixed_chan);
@@ -4379,7 +4379,7 @@ void site_survey(struct adapter *padapter)
                }
 #endif
 
-       } else{
+       } else {
 
                /*      channel number is 0 or this channel is not valid. */
 
@@ -4641,7 +4641,7 @@ void start_create_ibss(struct adapter *padapter)
 
                        report_join_res(padapter, -1);
                        pmlmeinfo->state = WIFI_FW_NULL_STATE;
-               } else{
+               } else {
                        rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, padapter->registrypriv.dev_network.MacAddress);
                        join_type = 0;
                        rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type));
@@ -4650,7 +4650,7 @@ void start_create_ibss(struct adapter *padapter)
                        pmlmeinfo->state |= WIFI_FW_ASSOC_SUCCESS;
                        rtw_indicate_connect(padapter);
                }
-       } else{
+       } else {
                DBG_871X("start_create_ibss, invalid cap:%x\n", caps);
                return;
        }
@@ -4711,7 +4711,7 @@ void start_clnt_join(struct adapter *padapter)
                pmlmeinfo->state = WIFI_FW_ADHOC_STATE;
 
                report_join_res(padapter, 1);
-       } else{
+       } else {
                /* DBG_871X("marc: invalid cap:%x\n", caps); */
                return;
        }
@@ -4914,7 +4914,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
                                j++;
                                k++;
                        }
-               } else{
+               } else {
                        /*  keep original STA 2.4G channel plan */
                        while ((i < MAX_CHANNEL_NUM) &&
                                (chplan_sta[i].ChannelNum != 0) &&
@@ -4976,7 +4976,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
                                j++;
                                k++;
                        }
-               } else{
+               } else {
                        /*  keep original STA 5G channel plan */
                        while ((i < MAX_CHANNEL_NUM) && (chplan_sta[i].ChannelNum != 0)) {
                                chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum;
@@ -5371,7 +5371,7 @@ void update_sta_info(struct adapter *padapter, struct sta_info *psta)
                psta->htpriv.beamform_cap = pmlmepriv->htpriv.beamform_cap;
 
                memcpy(&psta->htpriv.ht_cap, &pmlmeinfo->HT_caps, sizeof(struct rtw_ieee80211_ht_cap));
-       } else{
+       } else {
                psta->htpriv.ht_option = false;
 
                psta->htpriv.ampdu_enable = false;
@@ -5543,7 +5543,7 @@ void mlmeext_sta_add_event_callback(struct adapter *padapter, struct sta_info *p
                if (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) { /* adhoc master or sta_count>1 */
 
                        /* nothing to do */
-               } else{ /* adhoc client */
+               } else { /* adhoc client */
                        /* update TSF Value */
                        /* update_TSF(pmlmeext, pframe, len); */
 
@@ -5677,7 +5677,7 @@ static u8 chk_ap_is_alive(struct adapter *padapter, struct sta_info *psta)
                && sta_rx_probersp_pkts(psta) == sta_last_rx_probersp_pkts(psta)
        ) {
                ret = false;
-       } else{
+       } else {
                ret = true;
        }
 
@@ -5781,14 +5781,14 @@ void linked_status_chk(struct adapter *padapter)
 
                                        if (pmlmeinfo->FW_sta_info[i].retry < 3) {
                                                pmlmeinfo->FW_sta_info[i].retry++;
-                                       } else{
+                                       } else {
                                                pmlmeinfo->FW_sta_info[i].retry = 0;
                                                pmlmeinfo->FW_sta_info[i].status = 0;
                                                report_del_sta_event(padapter, psta->hwaddr
                                                        , 65535/*  indicate disconnect caused by no rx */
                                                );
                                        }
-                               } else{
+                               } else {
                                        pmlmeinfo->FW_sta_info[i].retry = 0;
                                        pmlmeinfo->FW_sta_info[i].rx_pkt = (u32)sta_rx_pkts(psta);
                                }
@@ -5996,7 +5996,7 @@ static int rtw_auto_ap_start_beacon(struct adapter *adapter)
        rateLen = rtw_get_rateset_len(supportRate);
        if (rateLen > 8) {
                ie = rtw_set_ie(ie, _SUPPORTEDRATES_IE_, 8, supportRate, &sz);
-       } else{
+       } else {
                ie = rtw_set_ie(ie, _SUPPORTEDRATES_IE_, rateLen, supportRate, &sz);
        }
 
@@ -6008,7 +6008,7 @@ static int rtw_auto_ap_start_beacon(struct adapter *adapter)
                struct mlme_ext_priv *pbuddy_mlmeext  = &pbuddystruct adapter->mlmeextpriv;
 
                oper_channel = pbuddy_mlmeext->cur_channel;
-       } else{
+       } else {
                oper_channel = adapter_to_dvobj(adapter)->oper_channel;
        }
        ie = rtw_set_ie(ie, _DSSET_IE_, 1, &oper_channel, &sz);
@@ -6023,7 +6023,7 @@ static int rtw_auto_ap_start_beacon(struct adapter *adapter)
        /* lunch ap mode & start to issue beacon */
        if (rtw_check_beacon_data(adapter, pbuf,  sz) == _SUCCESS) {
 
-       } else{
+       } else {
                ret = -EINVAL;
        }
 
@@ -6052,7 +6052,7 @@ u8 setopmode_hdl(struct adapter *padapter, u8 *pbuf)
                type = _HW_STATE_STATION_;
        } else if (psetop->mode == Ndis802_11IBSS) {
                type = _HW_STATE_ADHOC_;
-       } else{
+       } else {
                type = _HW_STATE_NOLINK_;
        }
 
@@ -6558,7 +6558,7 @@ u8 add_ba_hdl(struct adapter *padapter, unsigned char *pbuf)
                issue_action_BA(padapter, pparm->addr, RTW_WLAN_ACTION_ADDBA_REQ, (u16)pparm->tid);
                /* _set_timer(&pmlmeext->ADDBA_timer, ADDBA_TO); */
                _set_timer(&psta->addba_retry_timer, ADDBA_TO);
-       } else{
+       } else {
                psta->htpriv.candidate_tid_bitmap &= ~BIT(pparm->tid);
        }
        return  H2C_SUCCESS;
index eb27522a5444ff0f7d40f748fe0983ddfe1e2b69..5c468c5057b15b40d20c13f8c2c16e6693b68bbf 100644 (file)
@@ -269,7 +269,7 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
 
        if (pwrpriv->brpwmtimeout == true) {
                DBG_871X("%s: RPWM timeout, force to set RPWM(0x%02X) again!\n", __func__, pslv);
-       } else{
+       } else {
                if ((pwrpriv->rpwm == pslv)
                        || ((pwrpriv->rpwm >= PS_STATE_S2) && (pslv >= PS_STATE_S2))) {
                        RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_err_,
@@ -459,7 +459,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
 
                        rtw_btcoex_LpsNotify(padapter, ps_mode);
                }
-       } else{
+       } else {
                if ((PS_RDY_CHECK(padapter) && check_fwstate(&padapter->mlmepriv, WIFI_ASOC_STATE))
                        || ((rtw_btcoex_IsBtControlLps(padapter) == true)
                                && (rtw_btcoex_IsLpsOn(padapter) == true))
@@ -635,7 +635,7 @@ void LeaveAllPowerSaveModeDirect(struct adapter *Adapter)
                mutex_unlock(&pwrpriv->lock);
 
                rtw_lps_ctrl_wk_cmd(pri_padapter, LPS_CTRL_LEAVE, 0);
-       } else{
+       } else {
                if (pwrpriv->rf_pwrstate == rf_off)
                        if (false == ips_leave(pri_padapter))
                                DBG_871X("======> ips_leave fail.............\n");
index 02f821d42658411e11425347a57f088d14b50653..b543e9768e886c47bfc421e7906daf9aee565adc 100644 (file)
@@ -113,7 +113,7 @@ union recv_frame *_rtw_alloc_recvframe(struct __queue *pfree_recv_queue)
 
        if (list_empty(&pfree_recv_queue->queue))
                precvframe = NULL;
-       else{
+       else {
                phead = get_list_head(pfree_recv_queue);
 
                plist = get_next(phead);
@@ -291,7 +291,7 @@ struct recv_buf *rtw_dequeue_recvbuf(struct __queue *queue)
 
        if (list_empty(&queue->queue))
                precvbuf = NULL;
-       else{
+       else {
                phead = get_list_head(queue);
 
                plist = get_next(phead);
@@ -411,7 +411,7 @@ sint recvframe_chkmic(struct adapter *adapter,  union recv_frame *precvframe)
                                        rtw_handle_tkip_mic_err(adapter, (u8)IS_MCAST(prxattrib->ra));
                                        RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" mic error :prxattrib->bdecrypted =%d ", prxattrib->bdecrypted));
                                        DBG_871X(" mic error :prxattrib->bdecrypted =%d\n", prxattrib->bdecrypted);
-                               } else{
+                               } else {
                                        RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" mic error :prxattrib->bdecrypted =%d ", prxattrib->bdecrypted));
                                        DBG_871X(" mic error :prxattrib->bdecrypted =%d\n", prxattrib->bdecrypted);
                                }
@@ -591,7 +591,7 @@ union recv_frame *portctrl(struct adapter *adapter, union recv_frame *precv_fram
                                rtw_free_recvframe(precv_frame, &adapter->recvpriv.free_recv_queue);
                                prtnframe = NULL;
                        }
-               } else{
+               } else {
                        /* allowed */
                        /* check decryption status, and decrypt the frame if needed */
                        RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("########portctrl:psta->ieee8021x_blocked == 0\n"));
@@ -669,7 +669,7 @@ void process_pwrbit_data(struct adapter *padapter, union recv_frame *precv_frame
 
                                /* DBG_871X("to sleep, sta_dz_bitmap =%x\n", pstapriv->sta_dz_bitmap); */
                        }
-               } else{
+               } else {
                        if (psta->state & WIFI_SLEEP_STATE) {
                                /* psta->state ^= WIFI_SLEEP_STATE; */
                                /* pstapriv->sta_dz_bitmap &= ~BIT(psta->aid); */
@@ -831,7 +831,7 @@ sint sta2sta_data_frame(
                                        ret = _FAIL;
                                        goto exit;
                        }
-               } else{ /*  not mc-frame */
+               } else { /*  not mc-frame */
                        /*  For AP mode, if DA is non-MCAST, then it must be BSSID, and bssid == BSSID */
                        if (memcmp(pattrib->bssid, pattrib->dst, ETH_ALEN)) {
                                ret = _FAIL;
@@ -988,7 +988,7 @@ sint ap2sta_data_frame(
                /* Special case */
                ret = RTW_RX_HANDLED;
                goto exit;
-       } else{
+       } else {
                if (!memcmp(myhwaddr, pattrib->dst, ETH_ALEN) && (!bmcast)) {
                        *psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /*  get sta_info */
                        if (*psta == NULL) {
@@ -1187,7 +1187,7 @@ sint validate_recv_ctrl_frame(struct adapter *padapter, union recv_frame *precv_
                                /* spin_unlock_bh(&psta->sleep_q.lock); */
                                spin_unlock_bh(&pxmitpriv->lock);
 
-                       } else{
+                       } else {
                                /* spin_unlock_bh(&psta->sleep_q.lock); */
                                spin_unlock_bh(&pxmitpriv->lock);
 
@@ -1198,7 +1198,7 @@ sint validate_recv_ctrl_frame(struct adapter *padapter, union recv_frame *precv_
 
                                                /* issue nulldata with More data bit = 0 to indicate we have no buffered packets */
                                                issue_nulldata_in_interrupt(padapter, psta->hwaddr);
-                                       } else{
+                                       } else {
                                                DBG_871X("error!psta->sleepq_len =%d\n", psta->sleepq_len);
                                                psta->sleepq_len = 0;
                                        }
@@ -1355,7 +1355,7 @@ sint validate_recv_data_frame(struct adapter *adapter, union recv_frame *precv_f
                if (pattrib->priority != 0 && pattrib->priority != 3)
                        adapter->recvpriv.bIsAnyNonBEPkts = true;
 
-       } else{
+       } else {
                pattrib->priority = 0;
                pattrib->hdrlen = pattrib->to_fr_ds == 3 ? 30 : 24;
        }
@@ -1386,7 +1386,7 @@ sint validate_recv_data_frame(struct adapter *adapter, union recv_frame *precv_f
                RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("\n pattrib->encrypt =%d\n", pattrib->encrypt));
 
                SET_ICE_IV_LEN(pattrib->iv_len, pattrib->icv_len, pattrib->encrypt);
-       } else{
+       } else {
                pattrib->encrypt = 0;
                pattrib->iv_len = pattrib->icv_len = 0;
        }
@@ -1847,7 +1847,7 @@ union recv_frame *recvframe_chk_defrag(struct adapter *padapter, union recv_fram
 
                        prtnframe = NULL;
 
-               } else{
+               } else {
                        /* can't find this ta's defrag_queue, so free this recv_frame */
                        rtw_free_recvframe(precv_frame, pfree_recv_queue);
                        prtnframe = NULL;
@@ -1870,7 +1870,7 @@ union recv_frame *recvframe_chk_defrag(struct adapter *padapter, union recv_fram
                        precv_frame = recvframe_defrag(padapter, pdefrag_q);
                        prtnframe = precv_frame;
 
-               } else{
+               } else {
                        /* can't find this ta's defrag_queue, so free this recv_frame */
                        rtw_free_recvframe(precv_frame, pfree_recv_queue);
                        prtnframe = NULL;
@@ -2190,7 +2190,7 @@ int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctr
                                if (amsdu_to_msdu(padapter, prframe) != _SUCCESS)
                                        rtw_free_recvframe(prframe, &precvpriv->free_recv_queue);
 
-                       } else{
+                       } else {
                                /* error condition; */
                        }
 
@@ -2198,7 +2198,7 @@ int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctr
                        /* Update local variables. */
                        bPktInBuf = false;
 
-               } else{
+               } else {
                        bPktInBuf = true;
                        break;
                }
@@ -2333,7 +2333,7 @@ int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame *prframe
        if (recv_indicatepkts_in_order(padapter, preorder_ctrl, false) == true) {
                _set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
                spin_unlock_bh(&ppending_recvframe_queue->lock);
-       } else{
+       } else {
                spin_unlock_bh(&ppending_recvframe_queue->lock);
                del_timer_sync(&preorder_ctrl->reordering_ctrl_timer);
        }
@@ -2410,7 +2410,7 @@ int process_recv_indicatepkts(struct adapter *padapter, union recv_frame *prfram
                        rtw_recv_indicatepkt(padapter, prframe);
 
 
-               } else{
+               } else {
                        RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("@@@@ process_recv_indicatepkts- recv_func free_indicatepkt\n"));
 
                        RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("recv_func:bDriverStopped(%d) OR bSurpriseRemoved(%d)", padapter->bDriverStopped, padapter->bSurpriseRemoved));
index 240818b4a2c930460bdacb1866a1af66ec9d6371..979056c3d39776b49cc1e9d21cf1076085081806 100644 (file)
@@ -252,7 +252,7 @@ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe)
                                arcfour_encrypt(&mycontext, payload, payload, length);
                                arcfour_encrypt(&mycontext, payload+length, crc, 4);
 
-                       } else{
+                       } else {
                                length = pxmitpriv->frag_len-pattrib->hdrlen-pattrib->iv_len-pattrib->icv_len;
                                *((__le32 *)crc) = getcrc32(payload, length);
                                arcfour_init(&mycontext, wepkey, 3+keylength);
@@ -821,7 +821,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
                                /* prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; */
                                prwskey = psecuritypriv->dot118021XGrpKey[prxattrib->key_index].skey;
                                prwskeylen = 16;
-                       } else{
+                       } else {
                                prwskey = &stainfo->dot118021x_UncstKey.skey[0];
                                prwskeylen = 16;
                        }
@@ -1117,7 +1117,7 @@ static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext)
                                byte_sub(ciphertext, intermediatea);
                                shift_row(intermediatea, intermediateb);
                                xor_128(intermediateb, round_key, ciphertext);
-                       } else{   /* 1 - 9 */
+                       } else {   /* 1 - 9 */
                                byte_sub(ciphertext, intermediatea);
                                shift_row(intermediatea, intermediateb);
                                mix_column(&intermediateb[0], &intermediatea[0]);
index 82716fd5c6f0be89254ecfe7cfee403823a249f9..b9d36db762a9d32a2437779705e059d38d530698 100644 (file)
@@ -206,7 +206,7 @@ struct      sta_info *rtw_alloc_stainfo(struct      sta_priv *pstapriv, u8 *hwaddr)
                spin_unlock_bh(&(pstapriv->sta_hash_lock));
                psta = NULL;
                return psta;
-       } else{
+       } else {
                psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);
 
                list_del_init(&(psta->list));
index 2c65af319a6049da115fe06a690d5282ac3cacb0..2c172966ea607918aa30cc1fdb476b058b46e4d2 100644 (file)
@@ -889,7 +889,7 @@ void WMMOnAssocRsp(struct adapter *padapter)
                TXOP = 0x2f;
                acParm = AIFS | (ECWMin << 8) | (ECWMax << 12) | (TXOP << 16);
                rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VO, (u8 *)(&acParm));
-       } else{
+       } else {
                edca[0] = edca[1] = edca[2] = edca[3] = 0;
 
                for (i = 0; i < 4; i++) {
@@ -1028,7 +1028,7 @@ static void bwmode_update_check(struct adapter *padapter, struct ndis_80211_var_
                        new_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
                        break;
                }
-       } else{
+       } else {
                new_bwmode = CHANNEL_WIDTH_20;
                new_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
        }
@@ -1060,7 +1060,7 @@ static void bwmode_update_check(struct adapter *padapter, struct ndis_80211_var_
                                /*  bwmode */
                                psta->bw_mode = pmlmeext->cur_bwmode;
                                phtpriv_sta->ch_offset = pmlmeext->cur_ch_offset;
-                       } else{
+                       } else {
                                psta->bw_mode = CHANNEL_WIDTH_20;
                                phtpriv_sta->ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
                        }
@@ -1094,7 +1094,7 @@ void HT_caps_handler(struct adapter *padapter, struct ndis_80211_var_ie *pIE)
                        /*      Commented by Albert 2010/07/12 */
                        /*      Got the endian issue here. */
                        pmlmeinfo->HT_caps.u.HT_cap[i] &= (pIE->data[i]);
-               } else{
+               } else {
                        /* modify from  fw by Thomas 2010/11/17 */
                        if ((pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x3) > (pIE->data[i] & 0x3))
                                max_AMPDU_len = (pIE->data[i] & 0x3);
@@ -1191,7 +1191,7 @@ void HTOnAssocRsp(struct adapter *padapter)
 
        if ((pmlmeinfo->HT_info_enable) && (pmlmeinfo->HT_caps_enable)) {
                pmlmeinfo->HT_enable = 1;
-       } else{
+       } else {
                pmlmeinfo->HT_enable = 0;
                /* set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); */
                return;
@@ -1239,7 +1239,7 @@ void VCS_update(struct adapter *padapter, struct sta_info *psta)
                if (pregpriv->vcs_type == 1) { /* 1:RTS/CTS 2:CTS to self */
                        psta->rtsen = 1;
                        psta->cts2self = 0;
-               } else{
+               } else {
                        psta->rtsen = 0;
                        psta->cts2self = 1;
                }
@@ -1251,11 +1251,11 @@ void VCS_update(struct adapter *padapter, struct sta_info *psta)
                        if (pregpriv->vcs_type == 1) {
                                psta->rtsen = 1;
                                psta->cts2self = 0;
-                       } else{
+                       } else {
                                psta->rtsen = 0;
                                psta->cts2self = 1;
                        }
-               } else{
+               } else {
                        psta->rtsen = 0;
                        psta->cts2self = 0;
                }
@@ -1751,7 +1751,7 @@ void update_capinfo(struct adapter *Adapter, u16 updateCap)
                                pmlmeinfo->preamble_mode = PREAMBLE_SHORT;
                                rtw_hal_set_hwreg(Adapter, HW_VAR_ACK_PREAMBLE, (u8 *)&ShortPreamble);
                        }
-               } else{
+               } else {
                        /*  Long Preamble */
                        if (pmlmeinfo->preamble_mode != PREAMBLE_LONG) { /*  PREAMBLE_SHORT or PREAMBLE_AUTO */
                                ShortPreamble = false;
@@ -1804,7 +1804,7 @@ void update_wireless_mode(struct adapter *padapter)
                        network_type = WIRELESS_11_5N;
 
                network_type |= WIRELESS_11A;
-       } else{
+       } else {
                if (pmlmeinfo->VHT_enable)
                        network_type = WIRELESS_11AC;
                else if (pmlmeinfo->HT_enable)
@@ -1839,7 +1839,7 @@ void update_sta_basic_rate(struct sta_info *psta, u8 wireless_mode)
                /*  Only B, B/G, and B/G/N AP could use CCK rate */
                memcpy(psta->bssrateset, rtw_basic_rate_cck, 4);
                psta->bssratelen = 4;
-       } else{
+       } else {
                memcpy(psta->bssrateset, rtw_basic_rate_ofdm, 3);
                psta->bssratelen = 3;
        }
@@ -2038,7 +2038,7 @@ void rtw_alloc_macid(struct adapter *padapter, struct sta_info *psta)
        if (i > (NUM_STA-1)) {
                psta->mac_id = NUM_STA;
                DBG_871X("  no room for more MACIDs\n");
-       } else{
+       } else {
                psta->mac_id = i;
                DBG_871X("%s = %d\n", __func__, psta->mac_id);
        }
@@ -2147,7 +2147,7 @@ int  rtw_set_gpio_output_value(struct net_device *netdev, int gpio_num, bool isH
 
                DBG_871X("%s Set gpio %x[%d]=%d\n", __func__, REG_GPIO_PIN_CTRL+1, gpio_num, isHigh);
                res = 0;
-       } else{
+       } else {
                DBG_871X("%s The gpio is input, not be set!\n", __func__);
                res = -1;
        }
index fdfa4b3c4c101b798a7901a5cb767fbaf18a6712..625e67f398893ee4ee34eec1a00d0c9f3c4f1b7d 100644 (file)
@@ -385,7 +385,7 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
        if (pmlmeext->cur_wireless_mode < WIRELESS_11_24N  || padapter->registrypriv.wifi_spec) {
                if (sz > padapter->registrypriv.rts_thresh)
                        pattrib->vcs_mode = RTS_CTS;
-               else{
+               else {
                        if (pattrib->rtsen)
                                pattrib->vcs_mode = RTS_CTS;
                        else if (pattrib->cts2self)
@@ -393,7 +393,7 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
                        else
                                pattrib->vcs_mode = NONE_VCS;
                }
-       } else{
+       } else {
                while (true) {
                        /* IOT action */
                        if ((pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_ATHEROS) && (pattrib->ampdu_en == true) &&
@@ -523,7 +523,7 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *p
                        res = _FAIL;
                        goto exit;
                }
-       } else{
+       } else {
                GET_ENCRY_ALGO(psecuritypriv, psta, pattrib->encrypt, bmcast);
 
                switch (psecuritypriv->dot11AuthAlgrthm) {
@@ -833,7 +833,7 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib
        if (check_fwstate(pmlmepriv, WIFI_AP_STATE|WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE)) {
                if (pattrib->qos_en)
                        set_qos(&pktfile, pattrib);
-       } else{
+       } else {
                if (pqospriv->qos_option) {
                        set_qos(&pktfile, pattrib);
 
@@ -949,7 +949,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
                                        length = pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len-((pattrib->bswenc) ? pattrib->icv_len : 0);
                                        rtw_secmicappend(&micdata, payload, length);
                                        payload = payload+length;
-                               } else{
+                               } else {
                                        length = pxmitpriv->frag_len-pattrib->hdrlen-pattrib->iv_len-((pattrib->bswenc) ? pattrib->icv_len : 0);
                                        rtw_secmicappend(&micdata, payload, length);
                                        payload = payload+length+pattrib->icv_len;
@@ -1134,7 +1134,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
                                                psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq+1)&0xfff;
 
                                                pattrib->ampdu_en = true;/* AGG EN */
-                                       } else{
+                                       } else {
                                                /* DBG_871X("tx ampdu over run\n"); */
                                                psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum+1)&0xfff;
                                                pattrib->ampdu_en = true;/* AGG EN */
@@ -1144,7 +1144,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
                        }
                }
 
-       } else{
+       } else {
 
        }
 
@@ -1570,7 +1570,7 @@ void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len)
                perp = rtw_get_ie(ie, _ERPINFO_IE_, &erp_len, ie_len);
                if (perp == NULL)
                        pxmitpriv->vcs = NONE_VCS;
-               else{
+               else {
                        protection = (*(perp + 2)) & BIT(1);
                        if (protection) {
                                if (pregistrypriv->vcs_type == RTS_CTS)
@@ -1810,7 +1810,7 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
        if (pxmitbuf->buf_tag == XMITBUF_CMD) {
        } else if (pxmitbuf->buf_tag == XMITBUF_MGNT) {
                rtw_free_xmitbuf_ext(pxmitpriv, pxmitbuf);
-       } else{
+       } else {
                spin_lock_irqsave(&pfree_xmitbuf_queue->lock, irqL);
 
                list_del_init(&pxmitbuf->list);
@@ -2684,7 +2684,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
                        if (psta->sleepq_ac_len > 0) {
                                pxmitframe->attrib.mdata = 1;
                                pxmitframe->attrib.eosp = 0;
-                       } else{
+                       } else {
                                pxmitframe->attrib.mdata = 0;
                                pxmitframe->attrib.eosp = 1;
                        }
@@ -2839,7 +2839,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
                if (psta->sleepq_ac_len > 0) {
                        pxmitframe->attrib.mdata = 1;
                        pxmitframe->attrib.eosp = 0;
-               } else{
+               } else {
                        pxmitframe->attrib.mdata = 0;
                        pxmitframe->attrib.eosp = 1;
                }
index 14284b1867f3f4b52fddcfcff91e161270a5beb9..2b43f6d3c76244e5f4587009a8c7a9475ab90456 100644 (file)
@@ -259,7 +259,7 @@ static void halbtcoutsrc_AggregationCheck(PBTC_COEXIST pBtCoexist)
 
        if (pBtCoexist->btInfo.bRejectAggPkt)
                rtw_btcoex_RejectApAggregatedPacket(padapter, true);
-       else{
+       else {
 
                if (pBtCoexist->btInfo.bPreBtCtrlAggBufSize !=
                        pBtCoexist->btInfo.bBtCtrlAggBufSize){
@@ -1209,7 +1209,7 @@ void EXhalbtcoutsrc_SpecialPacketNotify(PBTC_COEXIST pBtCoexist, u8 pktType)
                packetType = BTC_PACKET_EAPOL;
        else if (PACKET_ARP == pktType)
                packetType = BTC_PACKET_ARP;
-       else{
+       else {
                packetType = BTC_PACKET_UNKNOWN;
                return;
        }