1
0
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:
kimocoder 2019-02-16 02:29:58 +01:00
parent 4848f29d19
commit a3ed1ef28a
2 changed files with 10 additions and 0 deletions

View File

@ -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); */

View File

@ -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);