mirror of
https://github.com/amazingfate/rtl8723ds.git
synced 2026-06-18 18:29:01 +01:00
rtl8723ds: Fix another context imbalance and some big-endian errors
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
+4
-8
@@ -21,14 +21,14 @@
|
|||||||
|
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
|
|
||||||
bool test_st_match_rule(_adapter *adapter, u8 *local_naddr, u8 *local_port, u8 *remote_naddr, u8 *remote_port)
|
static 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(*((__be16 *)local_port)) == 5001 || ntohs(*((__be16 *)remote_port)) == 5001)
|
||||||
return _TRUE;
|
return _TRUE;
|
||||||
return _FALSE;
|
return _FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct st_register test_st_reg = {
|
static struct st_register test_st_reg = {
|
||||||
.s_proto = 0x06,
|
.s_proto = 0x06,
|
||||||
.rule = test_st_match_rule,
|
.rule = test_st_match_rule,
|
||||||
};
|
};
|
||||||
@@ -448,19 +448,15 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||||||
|
|
||||||
pfree_sta_queue = &pstapriv->free_sta_queue;
|
pfree_sta_queue = &pstapriv->free_sta_queue;
|
||||||
|
|
||||||
/* _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 (_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;
|
return 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);
|
||||||
|
|
||||||
rtw_list_delete(&(psta->list));
|
rtw_list_delete(&(psta->list));
|
||||||
|
|
||||||
/* _exit_critical_bh(&(pfree_sta_queue->lock), &irqL); */
|
|
||||||
|
|
||||||
tmp_aid = psta->aid;
|
tmp_aid = psta->aid;
|
||||||
|
|
||||||
_rtw_init_stainfo(psta);
|
_rtw_init_stainfo(psta);
|
||||||
|
|||||||
Reference in New Issue
Block a user