mirror of
https://github.com/chinawrj/rtl8812au
synced 2025-01-09 10:01:37 +00:00
Fix alloc STA info
This commit is contained in:
parent
146c4d9d41
commit
82b14e8092
@ -16,13 +16,6 @@
|
|||||||
|
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
|
|
||||||
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
|
||||||
|
|
||||||
#error "Shall be Linux or Windows, but not both!\n"
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
bool test_st_match_rule(_adapter *adapter, u8 *local_naddr, u8 *local_port, u8 *remote_naddr, u8 *remote_port)
|
bool test_st_match_rule(_adapter *adapter, u8 *local_naddr, u8 *local_port, u8 *remote_naddr, u8 *remote_port)
|
||||||
{
|
{
|
||||||
if (ntohs(*((u16 *)local_port)) == 5001 || ntohs(*((u16 *)remote_port)) == 5001)
|
if (ntohs(*((u16 *)local_port)) == 5001 || ntohs(*((u16 *)remote_port)) == 5001)
|
||||||
@ -512,9 +505,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, const u8 *hwaddr)
|
|||||||
|
|
||||||
/* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL); */
|
/* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL); */
|
||||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
|
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
|
||||||
if (_rtw_queue_empty(pfree_sta_queue) == _TRUE) {
|
if (!pstapriv->padapter->pnetdev || _rtw_queue_empty(pfree_sta_queue) == _TRUE) {
|
||||||
/* _exit_critical_bh(&(pfree_sta_queue->lock), &irqL); */
|
|
||||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
|
|
||||||
psta = NULL;
|
psta = NULL;
|
||||||
} else {
|
} else {
|
||||||
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);
|
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);
|
||||||
|
Loading…
Reference in New Issue
Block a user