Commit 5629ff0f authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

staging: rtl8188eu: fix some inverted conditions

We converted these conditions from == NULL and != NULL but messed up
and inverted some.

Fixes: e31447f9 ("staging: rtl8188eu: Replace x==NULL by !x")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 702d8d0f
...@@ -524,7 +524,7 @@ static int rtw_is_desired_network(struct adapter *adapter, struct wlan_network * ...@@ -524,7 +524,7 @@ static int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *
privacy = pnetwork->network.Privacy; privacy = pnetwork->network.Privacy;
if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) { if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) {
if (!rtw_get_wps_ie(pnetwork->network.IEs+_FIXED_IE_LENGTH_, pnetwork->network.IELength-_FIXED_IE_LENGTH_, NULL, &wps_ielen)) if (rtw_get_wps_ie(pnetwork->network.IEs+_FIXED_IE_LENGTH_, pnetwork->network.IELength-_FIXED_IE_LENGTH_, NULL, &wps_ielen))
return true; return true;
else else
return false; return false;
...@@ -1136,7 +1136,7 @@ static u8 search_max_mac_id(struct adapter *padapter) ...@@ -1136,7 +1136,7 @@ static u8 search_max_mac_id(struct adapter *padapter)
#if defined(CONFIG_88EU_AP_MODE) #if defined(CONFIG_88EU_AP_MODE)
if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
for (aid = (pstapriv->max_num_sta); aid > 0; aid--) { for (aid = (pstapriv->max_num_sta); aid > 0; aid--) {
if (!pstapriv->sta_aid[aid-1]) if (pstapriv->sta_aid[aid-1])
break; break;
} }
mac_id = aid + 1; mac_id = aid + 1;
...@@ -1189,7 +1189,7 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf) ...@@ -1189,7 +1189,7 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
#endif #endif
/* for AD-HOC mode */ /* for AD-HOC mode */
psta = rtw_get_stainfo(&adapter->stapriv, pstassoc->macaddr); psta = rtw_get_stainfo(&adapter->stapriv, pstassoc->macaddr);
if (!psta) { if (psta) {
/* the sta have been in sta_info_queue => do nothing */ /* the sta have been in sta_info_queue => do nothing */
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Error: rtw_stassoc_event_callback: sta has been in sta_hash_queue\n")); RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Error: rtw_stassoc_event_callback: sta has been in sta_hash_queue\n"));
return; /* between drv has received this event before and fw have not yet to set key to CAM_ENTRY) */ return; /* between drv has received this event before and fw have not yet to set key to CAM_ENTRY) */
...@@ -2085,7 +2085,7 @@ void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network) ...@@ -2085,7 +2085,7 @@ void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
struct wlan_network *pnetwork; struct wlan_network *pnetwork;
if (!tgt_network) if (tgt_network)
pnetwork = tgt_network; pnetwork = tgt_network;
else else
pnetwork = &pmlmepriv->cur_network; pnetwork = &pmlmepriv->cur_network;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment