[PATCH] Staging: rtl8723bs: Fix code style issue in rtl8723bs driver

From: Hardik Singh Rathore
Date: Wed Dec 12 2018 - 08:56:40 EST


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@xxxxxxxxx>
---
drivers/staging/rtl8723bs/core/rtw_ap.c | 24 ++---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 36 +++----
drivers/staging/rtl8723bs/core/rtw_debug.c | 2 +-
drivers/staging/rtl8723bs/core/rtw_efuse.c | 6 +-
.../staging/rtl8723bs/core/rtw_ieee80211.c | 26 ++---
.../staging/rtl8723bs/core/rtw_ioctl_set.c | 16 ++--
drivers/staging/rtl8723bs/core/rtw_mlme.c | 38 ++++----
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 94 +++++++++----------
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 6 +-
drivers/staging/rtl8723bs/core/rtw_recv.c | 34 +++----
drivers/staging/rtl8723bs/core/rtw_security.c | 6 +-
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 2 +-
.../staging/rtl8723bs/core/rtw_wlan_util.c | 26 ++---
drivers/staging/rtl8723bs/core/rtw_xmit.c | 22 ++---
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 830be63391b7..aa67eff2b215 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -286,7 +286,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);
}
@@ -502,7 +502,7 @@ int rtw_cmd_thread(void *context)
}

pcmdpriv->cmd_seq++;
- } else{
+ } else {
pcmd->res = H2C_PARAMETERS_ERROR;
}

@@ -546,11 +546,11 @@ int rtw_cmd_thread(void *context)
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);
}
@@ -880,7 +880,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 */
}
}
@@ -987,7 +987,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);
}
@@ -1022,7 +1022,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);
}

@@ -1049,7 +1049,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);
}
@@ -1072,7 +1072,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;
@@ -1291,7 +1291,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;
@@ -1392,7 +1392,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)
@@ -1414,7 +1414,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;

@@ -1564,7 +1564,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);
}

@@ -1766,7 +1766,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);
}

@@ -1956,7 +1956,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 */
@@ -1980,7 +1980,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);
}
@@ -2130,7 +2130,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) {
@@ -2141,7 +2141,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 4c5d5cf9dfe0..e0b0f3c500db 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);
}
@@ -2376,7 +2376,7 @@ sint rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, s
/* sema_init(&(pcmd->cmd_sem), 0); */

res = rtw_enqueue_cmd(pcmdpriv, pcmd);
- } else{
+ } else {
setkey_hdl(adapter, (u8 *)psetkeyparm);
kfree((u8 *) psetkeyparm);
}
@@ -2434,7 +2434,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; */
}
@@ -2521,7 +2521,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);
}
@@ -2636,7 +2636,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));
}
@@ -3132,7 +3132,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 8445d516c93d..c8516a846ed5 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->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;
@@ -5378,7 +5378,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;
@@ -5565,7 +5565,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); */

@@ -5699,7 +5699,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;
}

@@ -5803,14 +5803,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);
}
@@ -6018,7 +6018,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);
}

@@ -6030,7 +6030,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);
@@ -6045,7 +6045,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;
}

@@ -6074,7 +6074,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_;
}

@@ -6592,7 +6592,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;
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 59a667753266..d4bbb98b48a5 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -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)
up(&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");
diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 02f821d42658..b543e9768e88 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -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));
diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 240818b4a2c9..979056c3d397 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -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]);
diff --git a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
index 82716fd5c6f0..b9d36db762a9 100644
--- a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
@@ -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));
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 2c65af319a60..2c172966ea60 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -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;
}
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 729fd37f440b..97b0569550a8 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -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;
}
diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
index 14284b1867f3..2b43f6d3c762 100644
--- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c
+++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
@@ -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;
}
--
2.17.1