a little sta_alloc fix

This commit is contained in:
kimocoder 2019-08-17 00:07:45 +02:00
parent 1e62d66f89
commit 3a75759ecf
3 changed files with 7 additions and 14 deletions

View File

@ -1035,7 +1035,7 @@ u8 rtw_efuse_bt_access(PADAPTER adapter, u8 write, u16 addr, u16 cnts, u8 *data)
if (efuse) {
err = rtw_halmac_read_bt_physical_efuse_map(d, efuse, size);
if (err == -1) {
RTW_ERR("%s: rtw_halmac_read_bt_physical_efuse_map fail!\n", __FUNCTION__);
rtw_mfree(efuse, size);

View File

@ -512,9 +512,13 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, const u8 *hwaddr)
/* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL); */
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
if (_rtw_queue_empty(pfree_sta_queue) == _TRUE) {
if (!pstapriv->padapter->pnetdev)
{
psta = NULL;
}
else if (_rtw_queue_empty(pfree_sta_queue) == _TRUE)
/* _exit_critical_bh(&(pfree_sta_queue->lock), &irqL); */
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
/* _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2); */
psta = NULL;
} else {
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);

View File

@ -1,11 +0,0 @@
--- a/core/rtw_mlme_ext.c
+++ b/core/rtw_mlme_ext.c
@@ -11636,7 +11636,7 @@ static void rtw_mlmeext_disconnect(_adap
//set_opmode_cmd(padapter, infra_client_with_mlme);
-#if 1
+#if 0 // this check always causes a failure with an invalid macid error message in the logs
/*
* For safety, prevent from keeping macid sleep.
* If we can sure all power mode enter/leave are paired,