staging: rtl8723bs: Fix boolinit.cocci warnings
This patch removes unnecessary comparisons to bool. Issue found by coccinelle: drivers/staging/rtl8723bs/core/rtw_ap.c:2159:5-11: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_cmd.c:1741:7-17: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_ioctl_set.c:360:5-15: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_ioctl_set.c:360:28-39: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_mlme.c:1675:6-10: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:6766:8-21: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:181:5-40: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_wlan_util.c:748:14-42: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_xmit.c:2429:15-47: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_xmit.c:2458:7-17: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_xmit.c:2524:8-18: WARNING: Comparison to bool drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1653:13-36: WARNING: Comparison to bool Signed-off-by: Jeeeun Evans <jeeeunevans@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
37d13c28eb
commit
63a9c3edcb
@ -2156,7 +2156,7 @@ u8 ap_free_sta(
|
|||||||
if (!psta)
|
if (!psta)
|
||||||
return beacon_updated;
|
return beacon_updated;
|
||||||
|
|
||||||
if (active == true) {
|
if (active) {
|
||||||
/* tear down Rx AMPDU */
|
/* tear down Rx AMPDU */
|
||||||
send_delba(padapter, 0, psta->hwaddr);/* recipient */
|
send_delba(padapter, 0, psta->hwaddr);/* recipient */
|
||||||
|
|
||||||
|
@ -1738,7 +1738,7 @@ static void rtw_chk_hi_queue_hdl(struct adapter *padapter)
|
|||||||
pstapriv->tim_bitmap &= ~BIT(0);
|
pstapriv->tim_bitmap &= ~BIT(0);
|
||||||
pstapriv->sta_dz_bitmap &= ~BIT(0);
|
pstapriv->sta_dz_bitmap &= ~BIT(0);
|
||||||
|
|
||||||
if (update_tim == true)
|
if (update_tim)
|
||||||
update_beacon(padapter, _TIM_IE_, NULL, true);
|
update_beacon(padapter, _TIM_IE_, NULL, true);
|
||||||
} else {/* re check again */
|
} else {/* re check again */
|
||||||
rtw_chk_hi_queue_cmd(padapter);
|
rtw_chk_hi_queue_cmd(padapter);
|
||||||
|
@ -357,7 +357,7 @@ u8 rtw_set_802_11_connect(struct adapter *padapter, u8 *bssid, struct ndis_802_1
|
|||||||
if (!bssid || rtw_validate_bssid(bssid) == false)
|
if (!bssid || rtw_validate_bssid(bssid) == false)
|
||||||
bssid_valid = false;
|
bssid_valid = false;
|
||||||
|
|
||||||
if (ssid_valid == false && bssid_valid == false) {
|
if (!ssid_valid && !bssid_valid) {
|
||||||
DBG_871X(FUNC_ADPT_FMT" ssid:%p, ssid_valid:%d, bssid:%p, bssid_valid:%d\n",
|
DBG_871X(FUNC_ADPT_FMT" ssid:%p, ssid_valid:%d, bssid:%p, bssid_valid:%d\n",
|
||||||
FUNC_ADPT_ARG(padapter), ssid, ssid_valid, bssid, bssid_valid);
|
FUNC_ADPT_ARG(padapter), ssid, ssid_valid, bssid, bssid_valid);
|
||||||
status = _FAIL;
|
status = _FAIL;
|
||||||
|
@ -1672,7 +1672,7 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||||||
roam_target = pmlmepriv->roam_network;
|
roam_target = pmlmepriv->roam_network;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (roam == true) {
|
if (roam) {
|
||||||
if (rtw_to_roam(adapter) > 0)
|
if (rtw_to_roam(adapter) > 0)
|
||||||
rtw_dec_to_roam(adapter); /* this stadel_event is caused by roaming, decrease to_roam */
|
rtw_dec_to_roam(adapter); /* this stadel_event is caused by roaming, decrease to_roam */
|
||||||
else if (rtw_to_roam(adapter) == 0)
|
else if (rtw_to_roam(adapter) == 0)
|
||||||
|
@ -6763,7 +6763,7 @@ int rtw_chk_start_clnt_join(struct adapter *padapter, u8 *ch, u8 *bw, u8 *offset
|
|||||||
*offset = cur_ch_offset;
|
*offset = cur_ch_offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
return connect_allow == true ? _SUCCESS : _FAIL;
|
return connect_allow ? _SUCCESS : _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find union about ch, bw, ch_offset of all linked/linking interfaces */
|
/* Find union about ch, bw, ch_offset of all linked/linking interfaces */
|
||||||
|
@ -178,7 +178,7 @@ void rtw_ps_processor(struct adapter *padapter)
|
|||||||
if (pwrpriv->ips_mode_req == IPS_NONE)
|
if (pwrpriv->ips_mode_req == IPS_NONE)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
if (rtw_pwr_unassociated_idle(padapter) == false)
|
if (!rtw_pwr_unassociated_idle(padapter))
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
if ((pwrpriv->rf_pwrstate == rf_on) && ((pwrpriv->pwr_state_check_cnts%4) == 0)) {
|
if ((pwrpriv->rf_pwrstate == rf_on) && ((pwrpriv->pwr_state_check_cnts%4) == 0)) {
|
||||||
|
@ -745,7 +745,7 @@ s16 rtw_camid_alloc(struct adapter *adapter, struct sta_info *sta, u8 kid)
|
|||||||
i = _rtw_camid_search(adapter, addr, kid);
|
i = _rtw_camid_search(adapter, addr, kid);
|
||||||
if (i >= 0) {
|
if (i >= 0) {
|
||||||
/* Fix issue that pairwise and group key have same key id. Pairwise key first, group key can overwirte group only(ex: rekey) */
|
/* Fix issue that pairwise and group key have same key id. Pairwise key first, group key can overwirte group only(ex: rekey) */
|
||||||
if (sta || _rtw_camid_is_gk(adapter, i) == true)
|
if (sta || _rtw_camid_is_gk(adapter, i))
|
||||||
cam_id = i;
|
cam_id = i;
|
||||||
else
|
else
|
||||||
DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" group key id:%u the same key id as pairwise key\n"
|
DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" group key id:%u the same key id as pairwise key\n"
|
||||||
|
@ -2426,7 +2426,7 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
|||||||
/* DBG_871X("directly xmit pspoll_triggered packet\n"); */
|
/* DBG_871X("directly xmit pspoll_triggered packet\n"); */
|
||||||
|
|
||||||
/* pattrib->triggered = 0; */
|
/* pattrib->triggered = 0; */
|
||||||
if (bmcst && xmitframe_hiq_filter(pxmitframe) == true)
|
if (bmcst && xmitframe_hiq_filter(pxmitframe))
|
||||||
pattrib->qsel = 0x11;/* HIQ */
|
pattrib->qsel = 0x11;/* HIQ */
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -2455,7 +2455,7 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
|||||||
|
|
||||||
/* DBG_871X("enqueue, sq_len =%d, tim =%x\n", psta->sleepq_len, pstapriv->tim_bitmap); */
|
/* DBG_871X("enqueue, sq_len =%d, tim =%x\n", psta->sleepq_len, pstapriv->tim_bitmap); */
|
||||||
|
|
||||||
if (update_tim == true) {
|
if (update_tim) {
|
||||||
update_beacon(padapter, _TIM_IE_, NULL, true);
|
update_beacon(padapter, _TIM_IE_, NULL, true);
|
||||||
} else {
|
} else {
|
||||||
chk_bmc_sleepq_cmd(padapter);
|
chk_bmc_sleepq_cmd(padapter);
|
||||||
@ -2521,7 +2521,7 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
|||||||
|
|
||||||
/* DBG_871X("enqueue, sq_len =%d, tim =%x\n", psta->sleepq_len, pstapriv->tim_bitmap); */
|
/* DBG_871X("enqueue, sq_len =%d, tim =%x\n", psta->sleepq_len, pstapriv->tim_bitmap); */
|
||||||
|
|
||||||
if (update_tim == true)
|
if (update_tim)
|
||||||
/* DBG_871X("sleepq_len == 1, update BCNTIM\n"); */
|
/* DBG_871X("sleepq_len == 1, update BCNTIM\n"); */
|
||||||
/* upate BCN for TIM IE */
|
/* upate BCN for TIM IE */
|
||||||
update_beacon(padapter, _TIM_IE_, NULL, true);
|
update_beacon(padapter, _TIM_IE_, NULL, true);
|
||||||
|
@ -1650,7 +1650,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_need_indicate_scan_done:
|
check_need_indicate_scan_done:
|
||||||
if (true == need_indicate_scan_done)
|
if (need_indicate_scan_done)
|
||||||
{
|
{
|
||||||
rtw_cfg80211_surveydone_event_callback(padapter);
|
rtw_cfg80211_surveydone_event_callback(padapter);
|
||||||
rtw_cfg80211_indicate_scan_done(padapter, false);
|
rtw_cfg80211_indicate_scan_done(padapter, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user