diff options
author | Hardik Singh Rathore <hardiksingh.k@gmail.com> | 2018-12-12 19:24:55 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-17 14:26:10 +0100 |
commit | cb9a242c33cab509bd09dadeb3bc83a57f0d5abd (patch) | |
tree | 10c7c3d2ed426f5ba5cfdfda570e055a43ab7335 /drivers/staging/rtl8723bs | |
parent | 0022290f1e12e87512d37dec702cab2090a91dc4 (diff) |
Staging: rtl8723bs: Fix code style issue in rtl8723bs driver
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>
Diffstat (limited to 'drivers/staging/rtl8723bs')
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_ap.c | 24 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_cmd.c | 36 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_debug.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_efuse.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 26 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 16 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_mlme.c | 38 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 94 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_recv.c | 34 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_security.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 26 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_xmit.c | 22 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 |
15 files changed, 171 insertions, 171 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index 330cd21c21bd..cbbfef389874 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -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; } diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c index 984db6f2217c..ea2c187e56bd 100644 --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c @@ -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); } diff --git a/drivers/staging/rtl8723bs/core/rtw_debug.c b/drivers/staging/rtl8723bs/core/rtw_debug.c index a2a2cefd1786..a3c8a712bdc2 100644 --- a/drivers/staging/rtl8723bs/core/rtw_debug.c +++ b/drivers/staging/rtl8723bs/core/rtw_debug.c @@ -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)); } diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c b/drivers/staging/rtl8723bs/core/rtw_efuse.c index b3247c9642ea..eea3bece59a1 100644 --- a/drivers/staging/rtl8723bs/core/rtw_efuse.c +++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c @@ -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); diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c index 33f2649ba2ec..ac203c01c098 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c @@ -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)) diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c index 35ca825a7e5a..0c8a050b2a81 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c +++ b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c @@ -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) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c index 81505f3bce8b..406e313477aa 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c @@ -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; } diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c index 35003d8d9ba4..ebb45acb4446 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c @@ -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->pktl |