diff options
Diffstat (limited to 'drivers/staging/rtl8723bs/core/rtw_ap.c')
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_ap.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index 6064dd6a76b4..5478188be991 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -18,7 +18,8 @@ void init_mlme_ap_info(struct adapter *padapter) spin_lock_init(&pmlmepriv->bcn_update_lock); /* for ACL */ - _rtw_init_queue(&pacl_list->acl_node_q); + INIT_LIST_HEAD(&pacl_list->acl_node_q.queue); + spin_lock_init(&pacl_list->acl_node_q.lock); /* pmlmeext->bstart_bss = false; */ @@ -891,7 +892,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) &ie_len, (pbss_network->ie_length - _BEACON_IE_OFFSET_) ); - if (p != NULL) { + if (p) { memcpy(supportRate, p + 2, ie_len); supportRateNum = ie_len; } @@ -903,7 +904,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) &ie_len, pbss_network->ie_length - _BEACON_IE_OFFSET_ ); - if (p != NULL) { + if (p) { memcpy(supportRate + supportRateNum, p + 2, ie_len); supportRateNum += ie_len; } @@ -991,7 +992,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) break; } - if ((p == NULL) || (ie_len == 0)) + if (!p || ie_len == 0) break; } @@ -1021,7 +1022,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) break; } - if ((p == NULL) || (ie_len == 0)) + if (!p || ie_len == 0) break; } } @@ -1145,7 +1146,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) psta = rtw_get_stainfo(&padapter->stapriv, pbss_network->mac_address); if (!psta) { psta = rtw_alloc_stainfo(&padapter->stapriv, pbss_network->mac_address); - if (psta == NULL) + if (!psta) return _FAIL; } @@ -1275,7 +1276,7 @@ u8 rtw_ap_set_pairwise_key(struct adapter *padapter, struct sta_info *psta) } psetstakey_para = rtw_zmalloc(sizeof(struct set_stakey_parm)); - if (psetstakey_para == NULL) { + if (!psetstakey_para) { kfree(ph2c); res = _FAIL; goto exit; @@ -1311,12 +1312,12 @@ static int rtw_ap_set_key( int res = _SUCCESS; pcmd = rtw_zmalloc(sizeof(struct cmd_obj)); - if (pcmd == NULL) { + if (!pcmd) { res = _FAIL; goto exit; } psetkeyparm = rtw_zmalloc(sizeof(struct setkey_parm)); - if (psetkeyparm == NULL) { + if (!psetkeyparm) { kfree(pcmd); res = _FAIL; goto exit; @@ -1474,11 +1475,11 @@ static void update_bcn_wps_ie(struct adapter *padapter) &wps_ielen ); - if (pwps_ie == NULL || wps_ielen == 0) + if (!pwps_ie || wps_ielen == 0) return; pwps_ie_src = pmlmepriv->wps_beacon_ie; - if (pwps_ie_src == NULL) + if (!pwps_ie_src) return; wps_offset = (uint)(pwps_ie - ie); |