mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-09-19 20:50:41 +00:00
Added some error checking feature
This commit is contained in:
parent
4848f29d19
commit
a3ed1ef28a
@ -519,6 +519,8 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, const u8 *hwaddr)
|
||||
} else {
|
||||
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);
|
||||
|
||||
if (!psta)
|
||||
goto exit;
|
||||
rtw_list_delete(&(psta->list));
|
||||
|
||||
/* _exit_critical_bh(&(pfree_sta_queue->lock), &irqL); */
|
||||
|
@ -2542,10 +2542,18 @@ void rtw_cfg80211_unlink_bss(_adapter *padapter, struct wlan_network *pnetwork)
|
||||
select_network.InfrastructureMode == Ndis802_11Infrastructure?WLAN_CAPABILITY_ESS:WLAN_CAPABILITY_IBSS);
|
||||
#endif
|
||||
|
||||
if (!wiphy) {
|
||||
pr_info("rtl8723bu: rtw_cfg80211_unlink_bss: wiphy is NULL\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (bss) {
|
||||
cfg80211_unlink_bss(wiphy, bss);
|
||||
RTW_INFO("%s(): cfg80211_unlink %s!!\n", __func__, select_network.Ssid.Ssid);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
|
||||
if (!padapter->rtw_wdev->wiphy)
|
||||
return;
|
||||
cfg80211_put_bss(padapter->rtw_wdev->wiphy, bss);
|
||||
#else
|
||||
cfg80211_put_bss(bss);
|
||||
|
Loading…
Reference in New Issue
Block a user