mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Remove wrappers around spin_lock_bh and spin_unlock_bh
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
dc4dbd3a7c
commit
c0ef452bab
19 changed files with 389 additions and 604 deletions
|
@ -74,9 +74,9 @@ void free_mlme_ap_info(struct adapter *padapter)
|
|||
|
||||
/* free bc/mc sta_info */
|
||||
psta = rtw_get_bcmc_stainfo(padapter);
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_lock_bh(&(pstapriv->sta_hash_lock));
|
||||
rtw_free_stainfo(padapter, psta);
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
_rtw_spinlock_free(&pmlmepriv->bcn_update_lock);
|
||||
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ void expire_timeout_chk(struct adapter *padapter)
|
|||
char chk_alive_list[NUM_STA];
|
||||
int i;
|
||||
|
||||
_enter_critical_bh(&pstapriv->auth_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->auth_list_lock);
|
||||
|
||||
phead = &pstapriv->auth_list;
|
||||
plist = get_next(phead);
|
||||
|
@ -380,24 +380,24 @@ void expire_timeout_chk(struct adapter *padapter)
|
|||
DBG_871X("auth expire %02X%02X%02X%02X%02X%02X\n",
|
||||
psta->hwaddr[0],psta->hwaddr[1],psta->hwaddr[2],psta->hwaddr[3],psta->hwaddr[4],psta->hwaddr[5]);
|
||||
|
||||
_exit_critical_bh(&pstapriv->auth_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->auth_list_lock);
|
||||
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_lock_bh(&(pstapriv->sta_hash_lock));
|
||||
rtw_free_stainfo(padapter, psta);
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
|
||||
_enter_critical_bh(&pstapriv->auth_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->auth_list_lock);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pstapriv->auth_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->auth_list_lock);
|
||||
|
||||
psta = NULL;
|
||||
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
phead = &pstapriv->asoc_list;
|
||||
plist = get_next(phead);
|
||||
|
@ -478,7 +478,7 @@ void expire_timeout_chk(struct adapter *padapter)
|
|||
}
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
if (chk_alive_num) {
|
||||
u8 backup_oper_channel=0;
|
||||
|
@ -520,13 +520,13 @@ void expire_timeout_chk(struct adapter *padapter)
|
|||
psta->keep_alive_trycnt = 0;
|
||||
|
||||
DBG_871X("asoc expire "MAC_FMT", state=0x%x\n", MAC_ARG(psta->hwaddr), psta->state);
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
if (rtw_is_list_empty(&psta->asoc_list)==false) {
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
}
|
||||
|
||||
|
@ -728,9 +728,9 @@ void update_bmc_sta(struct adapter *padapter)
|
|||
|
||||
rtw_sta_media_status_rpt(padapter, psta, 1);
|
||||
|
||||
_enter_critical_bh(&psta->lock, &irqL);
|
||||
spin_lock_bh(&psta->lock);
|
||||
psta->state = _FW_LINKED;
|
||||
_exit_critical_bh(&psta->lock, &irqL);
|
||||
spin_unlock_bh(&psta->lock);
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -820,9 +820,9 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
|
|||
|
||||
memset((void*)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
|
||||
|
||||
_enter_critical_bh(&psta->lock, &irqL);
|
||||
spin_lock_bh(&psta->lock);
|
||||
psta->state |= _FW_LINKED;
|
||||
_exit_critical_bh(&psta->lock, &irqL);
|
||||
spin_unlock_bh(&psta->lock);
|
||||
}
|
||||
|
||||
static void update_hw_ht_param(struct adapter *padapter)
|
||||
|
@ -1375,7 +1375,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
|
|||
return (-1);
|
||||
|
||||
|
||||
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||
spin_lock_bh(&(pacl_node_q->lock));
|
||||
|
||||
phead = get_list_head(pacl_node_q);
|
||||
plist = get_next(phead);
|
||||
|
@ -1396,14 +1396,14 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
|
|||
}
|
||||
}
|
||||
|
||||
_exit_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||
spin_unlock_bh(&(pacl_node_q->lock));
|
||||
|
||||
|
||||
if(added == true)
|
||||
return ret;
|
||||
|
||||
|
||||
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||
spin_lock_bh(&(pacl_node_q->lock));
|
||||
|
||||
for(i=0; i< NUM_ACL; i++)
|
||||
{
|
||||
|
@ -1427,7 +1427,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
|
|||
|
||||
DBG_871X("%s, acl_num=%d\n", __func__, pacl_list->num);
|
||||
|
||||
_exit_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||
spin_unlock_bh(&(pacl_node_q->lock));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -1444,7 +1444,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
|
|||
|
||||
DBG_871X("%s(acl_num=%d)=" MAC_FMT "\n", __func__, pacl_list->num, MAC_ARG(addr));
|
||||
|
||||
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||
spin_lock_bh(&(pacl_node_q->lock));
|
||||
|
||||
phead = get_list_head(pacl_node_q);
|
||||
plist = get_next(phead);
|
||||
|
@ -1467,7 +1467,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
|
|||
}
|
||||
}
|
||||
|
||||
_exit_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||
spin_unlock_bh(&(pacl_node_q->lock));
|
||||
|
||||
DBG_871X("%s, acl_num=%d\n", __func__, pacl_list->num);
|
||||
|
||||
|
@ -1654,7 +1654,7 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
|
|||
if(false == pmlmeext->bstart_bss)
|
||||
return;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->bcn_update_lock);
|
||||
|
||||
switch(ie_id)
|
||||
{
|
||||
|
@ -1706,7 +1706,7 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
|
|||
|
||||
pmlmepriv->update_bcn = true;
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->bcn_update_lock);
|
||||
|
||||
if(tx)
|
||||
set_tx_beacon_cmd(padapter);
|
||||
|
@ -1805,7 +1805,7 @@ void associated_clients_update(struct adapter *padapter, u8 updated)
|
|||
struct sta_info *psta=NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
phead = &pstapriv->asoc_list;
|
||||
plist = get_next(phead);
|
||||
|
@ -1820,7 +1820,7 @@ void associated_clients_update(struct adapter *padapter, u8 updated)
|
|||
VCS_update(padapter, psta);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
}
|
||||
|
||||
|
@ -2081,9 +2081,9 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta, bool active, u16
|
|||
rtw_clearstakey_cmd(padapter, (u8*)psta, (u8)(psta->mac_id + 3), true);
|
||||
|
||||
|
||||
_enter_critical_bh(&psta->lock, &irqL);
|
||||
spin_lock_bh(&psta->lock);
|
||||
psta->state &= ~_FW_LINKED;
|
||||
_exit_critical_bh(&psta->lock, &irqL);
|
||||
spin_unlock_bh(&psta->lock);
|
||||
|
||||
rtw_cfg80211_indicate_sta_disassoc(padapter, psta->hwaddr, reason);
|
||||
|
||||
|
@ -2091,9 +2091,9 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta, bool active, u16
|
|||
|
||||
beacon_updated = bss_cap_update_on_sta_leave(padapter, psta);
|
||||
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_lock_bh(&(pstapriv->sta_hash_lock));
|
||||
rtw_free_stainfo(padapter, psta);
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
|
||||
return beacon_updated;
|
||||
}
|
||||
|
@ -2115,7 +2115,7 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
|
|||
DBG_871X(FUNC_NDEV_FMT" with ch:%u, offset:%u\n",
|
||||
FUNC_NDEV_ARG(padapter->pnetdev), new_ch, ch_offset);
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
phead = &pstapriv->asoc_list;
|
||||
plist = get_next(phead);
|
||||
|
||||
|
@ -2128,7 +2128,7 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
|
|||
issue_action_spct_ch_switch(padapter, psta->hwaddr, new_ch, ch_offset);
|
||||
psta->expire_to = ((pstapriv->expire_to * 2) > 5) ? 5 : (pstapriv->expire_to * 2);
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
issue_action_spct_ch_switch(padapter, bc_addr, new_ch, ch_offset);
|
||||
|
||||
|
@ -2154,7 +2154,7 @@ int rtw_sta_flush(struct adapter *padapter)
|
|||
if((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE)
|
||||
return ret;
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
phead = &pstapriv->asoc_list;
|
||||
plist = get_next(phead);
|
||||
|
||||
|
@ -2174,7 +2174,7 @@ int rtw_sta_flush(struct adapter *padapter)
|
|||
chk_alive_list[chk_alive_num++] = stainfo_offset;
|
||||
}
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
|
||||
/* For each sta in chk_alive_list, call ap_free_sta */
|
||||
|
@ -2261,7 +2261,7 @@ void rtw_ap_restore_network(struct adapter *padapter)
|
|||
rtw_set_key(padapter, psecuritypriv, psecuritypriv->dot118021XGrpKeyid, 0,false);
|
||||
}
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
phead = &pstapriv->asoc_list;
|
||||
plist = get_next(phead);
|
||||
|
@ -2278,7 +2278,7 @@ void rtw_ap_restore_network(struct adapter *padapter)
|
|||
}
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
for (i = 0; i < chk_alive_num; i++) {
|
||||
psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);
|
||||
|
@ -2375,7 +2375,7 @@ void stop_ap_mode(struct adapter *padapter)
|
|||
padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled;
|
||||
|
||||
/* for ACL */
|
||||
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||
spin_lock_bh(&(pacl_node_q->lock));
|
||||
phead = get_list_head(pacl_node_q);
|
||||
plist = get_next(phead);
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
|
@ -2392,7 +2392,7 @@ void stop_ap_mode(struct adapter *padapter)
|
|||
pacl_list->num--;
|
||||
}
|
||||
}
|
||||
_exit_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||
spin_unlock_bh(&(pacl_node_q->lock));
|
||||
|
||||
DBG_871X("%s, free acl_node_queue, num=%d\n", __func__, pacl_list->num);
|
||||
|
||||
|
@ -2402,9 +2402,9 @@ void stop_ap_mode(struct adapter *padapter)
|
|||
rtw_free_all_stainfo(padapter);
|
||||
|
||||
psta = rtw_get_bcmc_stainfo(padapter);
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_lock_bh(&(pstapriv->sta_hash_lock));
|
||||
rtw_free_stainfo(padapter, psta);
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
|
||||
rtw_init_bcmc_stainfo(padapter);
|
||||
|
||||
|
|
|
@ -379,9 +379,9 @@ static __inline__ int __nat25_network_hash(unsigned char *networkAddr)
|
|||
static __inline__ void __network_hash_link(struct adapter *priv,
|
||||
struct nat25_network_db_entry *ent, int hash)
|
||||
{
|
||||
/* Caller must _enter_critical_bh already! */
|
||||
/* Caller must spin_lock_bh already! */
|
||||
/* _irqL irqL; */
|
||||
/* _enter_critical_bh(&priv->br_ext_lock, &irqL); */
|
||||
/* spin_lock_bh(&priv->br_ext_lock); */
|
||||
|
||||
ent->next_hash = priv->nethash[hash];
|
||||
if(ent->next_hash != NULL)
|
||||
|
@ -389,15 +389,15 @@ static __inline__ void __network_hash_link(struct adapter *priv,
|
|||
priv->nethash[hash] = ent;
|
||||
ent->pprev_hash = &priv->nethash[hash];
|
||||
|
||||
/* _exit_critical_bh(&priv->br_ext_lock, &irqL); */
|
||||
/* spin_unlock_bh(&priv->br_ext_lock); */
|
||||
}
|
||||
|
||||
|
||||
static __inline__ void __network_hash_unlink(struct nat25_network_db_entry *ent)
|
||||
{
|
||||
/* Caller must _enter_critical_bh already! */
|
||||
/* Caller must spin_lock_bh already! */
|
||||
/* _irqL irqL; */
|
||||
/* _enter_critical_bh(&priv->br_ext_lock, &irqL); */
|
||||
/* spin_lock_bh(&priv->br_ext_lock); */
|
||||
|
||||
*(ent->pprev_hash) = ent->next_hash;
|
||||
if(ent->next_hash != NULL)
|
||||
|
@ -405,7 +405,7 @@ static __inline__ void __network_hash_unlink(struct nat25_network_db_entry *ent)
|
|||
ent->next_hash = NULL;
|
||||
ent->pprev_hash = NULL;
|
||||
|
||||
/* _exit_critical_bh(&priv->br_ext_lock, &irqL); */
|
||||
/* spin_unlock_bh(&priv->br_ext_lock); */
|
||||
}
|
||||
|
||||
|
||||
|
@ -414,7 +414,7 @@ static int __nat25_db_network_lookup_and_replace(struct adapter *priv,
|
|||
{
|
||||
struct nat25_network_db_entry *db;
|
||||
_irqL irqL;
|
||||
_enter_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
spin_lock_bh(&priv->br_ext_lock);
|
||||
|
||||
db = priv->nethash[__nat25_network_hash(networkAddr)];
|
||||
while (db != NULL)
|
||||
|
@ -474,14 +474,14 @@ static int __nat25_db_network_lookup_and_replace(struct adapter *priv,
|
|||
db->networkAddr[10]);
|
||||
#endif
|
||||
}
|
||||
_exit_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
return 1;
|
||||
}
|
||||
|
||||
db = db->next_hash;
|
||||
}
|
||||
|
||||
_exit_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -492,7 +492,7 @@ static void __nat25_db_network_insert(struct adapter *priv,
|
|||
struct nat25_network_db_entry *db;
|
||||
int hash;
|
||||
_irqL irqL;
|
||||
_enter_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
spin_lock_bh(&priv->br_ext_lock);
|
||||
|
||||
hash = __nat25_network_hash(networkAddr);
|
||||
db = priv->nethash[hash];
|
||||
|
@ -502,7 +502,7 @@ static void __nat25_db_network_insert(struct adapter *priv,
|
|||
{
|
||||
memcpy(db->macAddr, macAddr, ETH_ALEN);
|
||||
db->ageing_timer = jiffies;
|
||||
_exit_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -511,7 +511,7 @@ static void __nat25_db_network_insert(struct adapter *priv,
|
|||
|
||||
db = (struct nat25_network_db_entry *) rtw_malloc(sizeof(*db));
|
||||
if(db == NULL) {
|
||||
_exit_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -522,7 +522,7 @@ static void __nat25_db_network_insert(struct adapter *priv,
|
|||
|
||||
__network_hash_link(priv, db, hash);
|
||||
|
||||
_exit_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
}
|
||||
|
||||
|
||||
|
@ -538,7 +538,7 @@ void nat25_db_cleanup(struct adapter *priv)
|
|||
{
|
||||
int i;
|
||||
_irqL irqL;
|
||||
_enter_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
spin_lock_bh(&priv->br_ext_lock);
|
||||
|
||||
for(i=0; i<NAT25_HASH_SIZE; i++)
|
||||
{
|
||||
|
@ -561,7 +561,7 @@ void nat25_db_cleanup(struct adapter *priv)
|
|||
}
|
||||
}
|
||||
|
||||
_exit_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
}
|
||||
|
||||
|
||||
|
@ -569,7 +569,7 @@ void nat25_db_expire(struct adapter *priv)
|
|||
{
|
||||
int i;
|
||||
_irqL irqL;
|
||||
_enter_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
spin_lock_bh(&priv->br_ext_lock);
|
||||
|
||||
/* if(!priv->ethBrExtInfo.nat25_disable) */
|
||||
{
|
||||
|
@ -603,7 +603,7 @@ void nat25_db_expire(struct adapter *priv)
|
|||
}
|
||||
}
|
||||
|
||||
_exit_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1356,7 +1356,7 @@ int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb)
|
|||
if (!priv->ethBrExtInfo.nat25_disable)
|
||||
{
|
||||
_irqL irqL;
|
||||
_enter_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
spin_lock_bh(&priv->br_ext_lock);
|
||||
/*
|
||||
* This function look up the destination network address from
|
||||
* the NAT2.5 database. Return value = -1 means that the
|
||||
|
@ -1367,10 +1367,10 @@ int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb)
|
|||
!memcmp(priv->scdb_ip, skb->data+ETH_HLEN+16, 4)) {
|
||||
memcpy(skb->data, priv->scdb_mac, ETH_ALEN);
|
||||
|
||||
_exit_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
}
|
||||
else {
|
||||
_exit_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
|
||||
retval = nat25_db_handle(priv, skb, NAT25_LOOKUP);
|
||||
}
|
||||
|
@ -1394,7 +1394,6 @@ int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb)
|
|||
}
|
||||
|
||||
if(retval == -1) {
|
||||
/* DEBUG_ERR("NAT25: Lookup fail!\n"); */
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -1479,8 +1478,6 @@ void *scdb_findEntry(struct adapter *priv, unsigned char *macAddr,
|
|||
unsigned char networkAddr[MAX_NETWORK_ADDR_LEN];
|
||||
struct nat25_network_db_entry *db;
|
||||
int hash;
|
||||
/* _irqL irqL; */
|
||||
/* _enter_critical_bh(&priv->br_ext_lock, &irqL); */
|
||||
|
||||
__nat25_generate_ipv4_network_addr(networkAddr, (unsigned int *)ipAddr);
|
||||
hash = __nat25_network_hash(networkAddr);
|
||||
|
@ -1488,14 +1485,12 @@ void *scdb_findEntry(struct adapter *priv, unsigned char *macAddr,
|
|||
while (db != NULL)
|
||||
{
|
||||
if(!memcmp(db->networkAddr, networkAddr, MAX_NETWORK_ADDR_LEN)) {
|
||||
/* _exit_critical_bh(&priv->br_ext_lock, &irqL); */
|
||||
/* spin_unlock_bh(&priv->br_ext_lock); */
|
||||
return (void *)db;
|
||||
}
|
||||
|
||||
db = db->next_hash;
|
||||
}
|
||||
|
||||
/* _exit_critical_bh(&priv->br_ext_lock, &irqL); */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -206,18 +206,13 @@ sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj)
|
|||
if (obj == NULL)
|
||||
goto exit;
|
||||
|
||||
/* _enter_critical_bh(&queue->lock, &irqL); */
|
||||
_enter_critical(&queue->lock, &irqL);
|
||||
|
||||
rtw_list_insert_tail(&obj->list, &queue->queue);
|
||||
|
||||
/* _exit_critical_bh(&queue->lock, &irqL); */
|
||||
_exit_critical(&queue->lock, &irqL);
|
||||
|
||||
exit:
|
||||
|
||||
;
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -228,7 +223,6 @@ struct cmd_obj *_rtw_dequeue_cmd(_queue *queue)
|
|||
|
||||
;
|
||||
|
||||
/* _enter_critical_bh(&(queue->lock), &irqL); */
|
||||
_enter_critical(&queue->lock, &irqL);
|
||||
if (rtw_is_list_empty(&(queue->queue)))
|
||||
obj = NULL;
|
||||
|
@ -238,11 +232,7 @@ struct cmd_obj *_rtw_dequeue_cmd(_queue *queue)
|
|||
rtw_list_delete(&obj->list);
|
||||
}
|
||||
|
||||
/* _exit_critical_bh(&(queue->lock), &irqL); */
|
||||
_exit_critical(&queue->lock, &irqL);
|
||||
|
||||
;
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
@ -561,11 +551,11 @@ u32 rtw_enqueue_evt(struct evt_priv *pevtpriv, struct evt_obj *obj)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
spin_lock_bh(&queue->lock);
|
||||
|
||||
rtw_list_insert_tail(&obj->list, &queue->queue);
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
||||
/* rtw_evt_notify_isr(pevtpriv); */
|
||||
|
||||
|
@ -583,7 +573,7 @@ struct evt_obj *rtw_dequeue_evt(_queue *queue)
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
spin_lock_bh(&queue->lock);
|
||||
|
||||
if (rtw_is_list_empty(&(queue->queue)))
|
||||
pevtobj = NULL;
|
||||
|
@ -593,7 +583,7 @@ struct evt_obj *rtw_dequeue_evt(_queue *queue)
|
|||
rtw_list_delete(&pevtobj->list);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
||||
;
|
||||
|
||||
|
@ -2780,9 +2770,9 @@ void rtw_disassoc_cmd_callback(struct adapter* padapter, struct cmd_obj *pcmd)
|
|||
|
||||
if (pcmd->res != H2C_SUCCESS)
|
||||
{
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
set_fwstate(pmlmepriv, _FW_LINKED);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
RT_TRACE(_module_rtl871x_cmd_c_,_drv_err_,("\n ***Error: disconnect_cmd_callback Fail ***\n."));
|
||||
|
||||
|
@ -2797,11 +2787,9 @@ void rtw_disassoc_cmd_callback(struct adapter* padapter, struct cmd_obj *pcmd)
|
|||
rtw_free_cmd_obj(pcmd);
|
||||
|
||||
exit:
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
void rtw_joinbss_cmd_callback(struct adapter* padapter, struct cmd_obj *pcmd)
|
||||
{
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
@ -2819,10 +2807,7 @@ void rtw_joinbss_cmd_callback(struct adapter* padapter, struct cmd_obj *pcmd)
|
|||
RT_TRACE(_module_rtl871x_cmd_c_,_drv_err_,("********Error:rtw_select_and_join_from_scanned_queue Wait Sema Fail ************\n"));
|
||||
_set_timer(&pmlmepriv->assoc_timer, 1);
|
||||
}
|
||||
|
||||
rtw_free_cmd_obj(pcmd);
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
|
||||
|
@ -2864,7 +2849,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
|
|||
pnetwork->IELength = le32_to_cpu(pnetwork->IELength);
|
||||
#endif
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
|
||||
if(check_fwstate(pmlmepriv, WIFI_AP_STATE) )
|
||||
|
@ -2887,14 +2872,14 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
|
|||
_irqL irqL;
|
||||
|
||||
pwlan = _rtw_alloc_network(pmlmepriv);
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
if ( pwlan == NULL)
|
||||
{
|
||||
pwlan = rtw_get_oldest_wlan_network(&pmlmepriv->scanned_queue);
|
||||
if( pwlan == NULL)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_cmd_c_,_drv_err_,("\n Error: can't get pwlan in rtw_joinbss_event_callback \n"));
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
goto createbss_cmd_fail;
|
||||
}
|
||||
pwlan->last_scanned = rtw_get_current_time();
|
||||
|
@ -2918,23 +2903,18 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
|
|||
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
/* we will set _FW_LINKED when there is one more sat to join us (rtw_stassoc_event_callback) */
|
||||
|
||||
}
|
||||
|
||||
createbss_cmd_fail:
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
rtw_free_cmd_obj(pcmd);
|
||||
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void rtw_setstaKey_cmdrsp_callback(struct adapter* padapter , struct cmd_obj *pcmd)
|
||||
{
|
||||
|
||||
|
@ -2973,13 +2953,13 @@ void rtw_setassocsta_cmdrsp_callback(struct adapter* padapter, struct cmd_obj *
|
|||
|
||||
psta->aid = psta->mac_id = passocsta_rsp->cam_id;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) && (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true))
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
set_fwstate(pmlmepriv, _FW_LINKED);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
exit:
|
||||
rtw_free_cmd_obj(pcmd);
|
||||
|
@ -2987,7 +2967,6 @@ exit:
|
|||
;
|
||||
}
|
||||
|
||||
void rtw_getrttbl_cmd_cmdrsp_callback(struct adapter* padapter, struct cmd_obj *pcmd);
|
||||
void rtw_getrttbl_cmd_cmdrsp_callback(struct adapter* padapter, struct cmd_obj *pcmd)
|
||||
{
|
||||
;
|
||||
|
|
|
@ -974,7 +974,6 @@ int proc_get_all_sta_info(char *page, char **start,
|
|||
off_t offset, int count,
|
||||
int *eof, void *data)
|
||||
{
|
||||
_irqL irqL;
|
||||
struct sta_info *psta;
|
||||
struct net_device *dev = data;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
|
@ -987,7 +986,7 @@ int proc_get_all_sta_info(char *page, char **start,
|
|||
|
||||
len += snprintf(page + len, count - len, "sta_dz_bitmap=0x%x, tim_bitmap=0x%x\n", pstapriv->sta_dz_bitmap, pstapriv->tim_bitmap);
|
||||
|
||||
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||
|
||||
for(i=0; i< NUM_STA; i++)
|
||||
{
|
||||
|
@ -1033,7 +1032,7 @@ int proc_get_all_sta_info(char *page, char **start,
|
|||
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->sta_hash_lock);
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
|
|
|
@ -95,7 +95,7 @@ u8 rtw_do_join(struct adapter * padapter)
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
|
@ -111,7 +111,7 @@ u8 rtw_do_join(struct adapter * padapter)
|
|||
|
||||
if(_rtw_queue_empty(queue)== true)
|
||||
{
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
/* when set_ssid/set_bssid for rtw_do_join(), but scanning queue is empty */
|
||||
|
@ -139,7 +139,7 @@ u8 rtw_do_join(struct adapter * padapter)
|
|||
else
|
||||
{
|
||||
int select_ret;
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
if((select_ret=rtw_select_and_join_from_scanned_queue(pmlmepriv))==_SUCCESS)
|
||||
{
|
||||
pmlmepriv->to_join = false;
|
||||
|
@ -229,7 +229,7 @@ u8 rtw_set_802_11_bssid(struct adapter* padapter, u8 *bssid)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
|
||||
DBG_871X("Set BSSID under fw_state=0x%08x\n", get_fwstate(pmlmepriv));
|
||||
|
@ -283,7 +283,7 @@ handle_tkip_countermeasure:
|
|||
}
|
||||
|
||||
release_mlme_lock:
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
exit:
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
||||
|
@ -315,7 +315,7 @@ u8 rtw_set_802_11_ssid(struct adapter* padapter, NDIS_802_11_SSID *ssid)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
DBG_871X("Set SSID under fw_state=0x%08x\n", get_fwstate(pmlmepriv));
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
|
||||
|
@ -398,7 +398,7 @@ handle_tkip_countermeasure:
|
|||
}
|
||||
|
||||
release_mlme_lock:
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
exit:
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
||||
|
@ -441,7 +441,7 @@ u8 rtw_set_802_11_connect(struct adapter* padapter, u8 *bssid, NDIS_802_11_SSID
|
|||
goto exit;
|
||||
}
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" fw_state=0x%08x\n",
|
||||
FUNC_ADPT_ARG(padapter), get_fwstate(pmlmepriv));
|
||||
|
@ -474,7 +474,7 @@ handle_tkip_countermeasure:
|
|||
}
|
||||
|
||||
release_mlme_lock:
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
exit:
|
||||
|
||||
|
@ -499,7 +499,7 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter* padapter,
|
|||
|
||||
if(*pold_state != networktype)
|
||||
{
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,(" change mode!"));
|
||||
/* DBG_871X("change mode, old_mode=%d, new_mode=%d, fw_state=0x%x\n", *pold_state, networktype, get_fwstate(pmlmepriv)); */
|
||||
|
@ -552,7 +552,7 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter* padapter,
|
|||
/* RT_TRACE(COMP_OID_SET, DBG_LOUD, ("set_infrastructure: fw_state:%x after changing mode\n", */
|
||||
/* get_fwstate(pmlmepriv) )); */
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
;
|
||||
|
@ -568,7 +568,7 @@ u8 rtw_set_802_11_disassociate(struct adapter *padapter)
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
|
@ -581,7 +581,7 @@ u8 rtw_set_802_11_disassociate(struct adapter *padapter)
|
|||
rtw_pwr_wakeup(padapter);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
;
|
||||
|
||||
|
@ -627,16 +627,14 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter* padapter, NDIS_802_11_SSID *ps
|
|||
return _SUCCESS;
|
||||
}
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
res = rtw_sitesurvey_cmd(padapter, pssid, ssid_max_num, NULL, 0);
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
exit:
|
||||
|
||||
;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -646,8 +644,6 @@ u8 rtw_set_802_11_authentication_mode(struct adapter* padapter, NDIS_802_11_AUTH
|
|||
int res;
|
||||
u8 ret;
|
||||
|
||||
;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("set_802_11_auth.mode(): mode=%x\n", authmode));
|
||||
|
||||
psecuritypriv->ndisauthtype=authmode;
|
||||
|
|
147
core/rtw_mlme.c
147
core/rtw_mlme.c
|
@ -165,11 +165,11 @@ sint _rtw_enqueue_network(_queue *queue, struct wlan_network *pnetwork)
|
|||
if (pnetwork == NULL)
|
||||
goto exit;
|
||||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
spin_lock_bh(&queue->lock);
|
||||
|
||||
rtw_list_insert_tail(&pnetwork->list, &queue->queue);
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
||||
exit:
|
||||
|
||||
|
@ -186,7 +186,7 @@ struct wlan_network *_rtw_dequeue_network(_queue *queue)
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
spin_lock_bh(&queue->lock);
|
||||
|
||||
if (_rtw_queue_empty(queue) == true)
|
||||
|
||||
|
@ -199,7 +199,7 @@ struct wlan_network *_rtw_dequeue_network(_queue *queue)
|
|||
rtw_list_delete(&(pnetwork->list));
|
||||
}
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
||||
;
|
||||
|
||||
|
@ -215,7 +215,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv )/* _queue *
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&free_queue->lock, &irqL);
|
||||
spin_lock_bh(&free_queue->lock);
|
||||
|
||||
if (_rtw_queue_empty(free_queue) == true) {
|
||||
pnetwork=NULL;
|
||||
|
@ -237,7 +237,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv )/* _queue *
|
|||
pmlmepriv->num_of_scanned ++;
|
||||
|
||||
exit:
|
||||
_exit_critical_bh(&free_queue->lock, &irqL);
|
||||
spin_unlock_bh(&free_queue->lock);
|
||||
|
||||
;
|
||||
|
||||
|
@ -272,7 +272,7 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv ,struct wlan_network *pnetwor
|
|||
goto exit;
|
||||
}
|
||||
|
||||
_enter_critical_bh(&free_queue->lock, &irqL);
|
||||
spin_lock_bh(&free_queue->lock);
|
||||
|
||||
rtw_list_delete(&(pnetwork->list));
|
||||
|
||||
|
@ -283,7 +283,7 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv ,struct wlan_network *pnetwor
|
|||
|
||||
/* DBG_871X("_rtw_free_network:SSID=%s\n", pnetwork->network.Ssid.Ssid); */
|
||||
|
||||
_exit_critical_bh(&free_queue->lock, &irqL);
|
||||
spin_unlock_bh(&free_queue->lock);
|
||||
|
||||
exit:
|
||||
|
||||
|
@ -304,7 +304,7 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *
|
|||
if (pnetwork->fixed == true)
|
||||
goto exit;
|
||||
|
||||
/* _enter_critical(&free_queue->lock, &irqL); */
|
||||
/* _enter_critical(&free_queue->lock); */
|
||||
|
||||
rtw_list_delete(&(pnetwork->list));
|
||||
|
||||
|
@ -312,7 +312,7 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *
|
|||
|
||||
pmlmepriv->num_of_scanned --;
|
||||
|
||||
/* _exit_critical(&free_queue->lock, &irqL); */
|
||||
/* _exit_critical(&free_queue->lock); */
|
||||
|
||||
exit:
|
||||
|
||||
|
@ -341,7 +341,7 @@ struct wlan_network *_rtw_find_network(_queue *scanned_queue, u8 *addr)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
/* _enter_critical_bh(&scanned_queue->lock, &irqL); */
|
||||
/* spin_lock_bh(&scanned_queue->lock); */
|
||||
|
||||
phead = get_list_head(scanned_queue);
|
||||
plist = get_next(phead);
|
||||
|
@ -359,7 +359,7 @@ struct wlan_network *_rtw_find_network(_queue *scanned_queue, u8 *addr)
|
|||
if(plist == phead)
|
||||
pnetwork = NULL;
|
||||
|
||||
/* _exit_critical_bh(&scanned_queue->lock, &irqL); */
|
||||
/* spin_unlock_bh(&scanned_queue->lock); */
|
||||
|
||||
exit:
|
||||
|
||||
|
@ -381,7 +381,7 @@ void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
|
|||
;
|
||||
|
||||
|
||||
_enter_critical_bh(&scanned_queue->lock, &irqL);
|
||||
spin_lock_bh(&scanned_queue->lock);
|
||||
|
||||
phead = get_list_head(scanned_queue);
|
||||
plist = get_next(phead);
|
||||
|
@ -397,7 +397,7 @@ void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
|
|||
|
||||
}
|
||||
|
||||
_exit_critical_bh(&scanned_queue->lock, &irqL);
|
||||
spin_unlock_bh(&scanned_queue->lock);
|
||||
|
||||
;
|
||||
|
||||
|
@ -757,7 +757,7 @@ void rtw_update_scanned_network(struct adapter *adapter, WLAN_BSSID_EX *target)
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
spin_lock_bh(&queue->lock);
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
|
@ -868,7 +868,7 @@ void rtw_update_scanned_network(struct adapter *adapter, WLAN_BSSID_EX *target)
|
|||
}
|
||||
|
||||
exit:
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
||||
;
|
||||
}
|
||||
|
@ -882,7 +882,7 @@ void rtw_add_network(struct adapter *adapter, WLAN_BSSID_EX *pnetwork)
|
|||
|
||||
;
|
||||
|
||||
/* _enter_critical_bh(&queue->lock, &irqL); */
|
||||
/* spin_lock_bh(&queue->lock); */
|
||||
|
||||
#if defined(CONFIG_P2P) && defined(CONFIG_P2P)
|
||||
rtw_WLAN_BSSID_EX_remove_p2p_attr(pnetwork, P2P_ATTR_GROUP_INFO);
|
||||
|
@ -892,7 +892,7 @@ void rtw_add_network(struct adapter *adapter, WLAN_BSSID_EX *pnetwork)
|
|||
|
||||
rtw_update_scanned_network(adapter, pnetwork);
|
||||
|
||||
/* _exit_critical_bh(&queue->lock, &irqL); */
|
||||
/* spin_unlock_bh(&queue->lock); */
|
||||
|
||||
;
|
||||
}
|
||||
|
@ -996,7 +996,7 @@ void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
}
|
||||
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
/* update IBSS_network 's timestamp */
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) == true)
|
||||
|
@ -1008,15 +1008,15 @@ void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
_irqL irqL;
|
||||
|
||||
memcpy(pmlmepriv->cur_network.network.IEs, pnetwork->IEs, 8);
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
ibss_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->MacAddress);
|
||||
if(ibss_wlan)
|
||||
{
|
||||
memcpy(ibss_wlan->network.IEs , pnetwork->IEs, 8);
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
goto exit;
|
||||
}
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1032,7 +1032,7 @@ void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
exit:
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
;
|
||||
|
||||
|
@ -1055,7 +1055,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
if(pmlmepriv->wps_probe_req_ie)
|
||||
{
|
||||
u32 free_len = pmlmepriv->wps_probe_req_ie_len;
|
||||
|
@ -1079,13 +1079,13 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("nic status =%x, survey done event comes too late!\n", get_fwstate(pmlmepriv)));
|
||||
}
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
if(timer_cancelled)
|
||||
_cancel_timer(&pmlmepriv->scan_to_timer, &timer_cancelled);
|
||||
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
rtw_set_signal_stat_timer(&adapter->recvpriv);
|
||||
|
||||
|
@ -1164,7 +1164,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
indicate_wx_scan_complete_event(adapter);
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
|
||||
|
@ -1202,16 +1202,13 @@ void rtw_fwdbg_event_callback(struct adapter *adapter , u8 *pbuf)
|
|||
|
||||
static void free_scanqueue(struct mlme_priv *pmlmepriv)
|
||||
{
|
||||
_irqL irqL, irqL0;
|
||||
_queue *free_queue = &pmlmepriv->free_bss_pool;
|
||||
_queue *scan_queue = &pmlmepriv->scanned_queue;
|
||||
_list *plist, *phead, *ptemp;
|
||||
|
||||
;
|
||||
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+free_scanqueue\n"));
|
||||
_enter_critical_bh(&scan_queue->lock, &irqL0);
|
||||
_enter_critical_bh(&free_queue->lock, &irqL);
|
||||
spin_lock_bh(&scan_queue->lock);
|
||||
spin_lock_bh(&free_queue->lock);
|
||||
|
||||
phead = get_list_head(scan_queue);
|
||||
plist = get_next(phead);
|
||||
|
@ -1225,10 +1222,8 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
|
|||
pmlmepriv->num_of_scanned --;
|
||||
}
|
||||
|
||||
_exit_critical_bh(&free_queue->lock, &irqL);
|
||||
_exit_critical_bh(&scan_queue->lock, &irqL0);
|
||||
|
||||
;
|
||||
spin_unlock_bh(&free_queue->lock);
|
||||
spin_unlock_bh(&scan_queue->lock);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1251,10 +1246,10 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
|
|||
|
||||
psta = rtw_get_stainfo(&adapter->stapriv, tgt_network->network.MacAddress);
|
||||
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_lock_bh(&(pstapriv->sta_hash_lock));
|
||||
rtw_free_stainfo(adapter, psta);
|
||||
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
|
||||
}
|
||||
|
||||
|
@ -1265,15 +1260,15 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
|
|||
rtw_free_all_stainfo(adapter);
|
||||
|
||||
psta = rtw_get_bcmc_stainfo(adapter);
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_lock_bh(&(pstapriv->sta_hash_lock));
|
||||
rtw_free_stainfo(adapter, psta);
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
|
||||
rtw_init_bcmc_stainfo(adapter);
|
||||
}
|
||||
|
||||
if(lock_scanned_queue)
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
|
||||
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
||||
if(pwlan) {
|
||||
|
@ -1314,7 +1309,7 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
|
|||
}
|
||||
|
||||
if(lock_scanned_queue)
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
|
||||
adapter->securitypriv.key_mask = 0;
|
||||
}
|
||||
|
@ -1644,12 +1639,12 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
|||
goto ignore_joinbss_callback;
|
||||
}
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("\n rtw_joinbss_event_callback !! _enter_critical \n"));
|
||||
|
||||
if(pnetwork->join_res > 0) {
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
retry = 0;
|
||||
if (check_fwstate(pmlmepriv,_FW_UNDER_LINKING) ) {
|
||||
/* s1. find ptarget_wlan */
|
||||
|
@ -1663,9 +1658,9 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
pcur_sta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress);
|
||||
if(pcur_sta){
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
|
||||
spin_lock_bh(&(pstapriv->sta_hash_lock));
|
||||
rtw_free_stainfo(adapter, pcur_sta);
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
}
|
||||
|
||||
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->network.MacAddress);
|
||||
|
@ -1687,7 +1682,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
|||
rtw_joinbss_update_network(adapter, ptarget_wlan, pnetwork);
|
||||
} else {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("Can't find ptarget_wlan when joinbss_event callback\n"));
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
goto exit_unlock;
|
||||
}
|
||||
|
||||
|
@ -1697,7 +1692,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
|||
ptarget_sta = rtw_joinbss_update_stainfo(adapter, pnetwork);
|
||||
if(ptarget_sta==NULL) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("Can't update stainfo when joinbss_event callback\n"));
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
goto exit_unlock;
|
||||
}
|
||||
}
|
||||
|
@ -1717,10 +1712,10 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
|||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("Cancle assoc_timer \n"));
|
||||
} else {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("rtw_joinbss_event_callback err: fw_state:%x", get_fwstate(pmlmepriv)));
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
goto exit_unlock;
|
||||
}
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
} else if(pnetwork->join_res == -4) {
|
||||
rtw_reset_securitypriv(adapter);
|
||||
_set_timer(&pmlmepriv->assoc_timer, 1);
|
||||
|
@ -1755,7 +1750,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
|||
#endif
|
||||
}
|
||||
exit_unlock:
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
ignore_joinbss_callback:
|
||||
return;
|
||||
}
|
||||
|
@ -1859,7 +1854,7 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
/* report to upper layer */
|
||||
DBG_871X("indicate_sta_assoc_event to upper layer - hostapd\n");
|
||||
_enter_critical_bh(&psta->lock, &irqL);
|
||||
spin_lock_bh(&psta->lock);
|
||||
if(psta->passoc_req && psta->assoc_req_len>0)
|
||||
{
|
||||
passoc_req = rtw_zmalloc(psta->assoc_req_len);
|
||||
|
@ -1873,7 +1868,7 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
psta->assoc_req_len = 0;
|
||||
}
|
||||
}
|
||||
_exit_critical_bh(&psta->lock, &irqL);
|
||||
spin_unlock_bh(&psta->lock);
|
||||
|
||||
if(passoc_req && assoc_req_len>0)
|
||||
{
|
||||
|
@ -1920,24 +1915,24 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
psta->ieee8021x_blocked = false;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
if ( (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)==true ) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==true ) )
|
||||
{
|
||||
if(adapter->stapriv.asoc_sta_count== 2)
|
||||
{
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
|
||||
pmlmepriv->cur_network_scanned = ptarget_wlan;
|
||||
if(ptarget_wlan) ptarget_wlan->fixed = true;
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
/* a sta + bc/mc_stainfo (not Ibss_stainfo) */
|
||||
rtw_indicate_connect(adapter);
|
||||
}
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
|
||||
mlmeext_sta_add_event_callback(adapter, psta);
|
||||
|
@ -1986,7 +1981,7 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
mlmeext_sta_del_event_callback(adapter);
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL2);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
if(check_fwstate(pmlmepriv, WIFI_STATION_STATE) )
|
||||
{
|
||||
|
@ -2003,14 +1998,14 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
rtw_free_assoc_resources(adapter, 1);
|
||||
rtw_indicate_disconnect(adapter);
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
/* remove the network entry in scanned_queue */
|
||||
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
||||
if (pwlan) {
|
||||
pwlan->fixed = false;
|
||||
rtw_free_network_nolock(pmlmepriv, pwlan);
|
||||
}
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
|
||||
_rtw_roaming(adapter, tgt_network);
|
||||
}
|
||||
|
@ -2019,13 +2014,13 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
check_fwstate(pmlmepriv,WIFI_ADHOC_STATE))
|
||||
{
|
||||
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_lock_bh(&(pstapriv->sta_hash_lock));
|
||||
rtw_free_stainfo(adapter, psta);
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
|
||||
if(adapter->stapriv.asoc_sta_count== 1) /* a sta + bc/mc_stainfo (not Ibss_stainfo) */
|
||||
{
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
/* free old ibss network */
|
||||
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
||||
if(pwlan)
|
||||
|
@ -2033,7 +2028,7 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
pwlan->fixed = false;
|
||||
rtw_free_network_nolock(pmlmepriv, pwlan);
|
||||
}
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
/* re-create ibss */
|
||||
pdev_network = &(adapter->registrypriv.dev_network);
|
||||
pibss = adapter->registrypriv.dev_network.MacAddress;
|
||||
|
@ -2065,13 +2060,9 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL2);
|
||||
|
||||
;
|
||||
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
|
||||
void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("+rtw_cpwm_event_callback !!!\n"));
|
||||
|
@ -2094,7 +2085,7 @@ void _rtw_join_timeout_handler (struct adapter *adapter)
|
|||
return;
|
||||
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
if (rtw_to_roaming(adapter) > 0) { /* join timeout caused by roaming */
|
||||
while(1) {
|
||||
|
@ -2120,7 +2111,7 @@ void _rtw_join_timeout_handler (struct adapter *adapter)
|
|||
rtw_cfg80211_indicate_disconnect(adapter);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
|
||||
#ifdef CONFIG_DRVEXT_MODULE_WSC
|
||||
|
@ -2142,11 +2133,11 @@ void rtw_scan_timeout_handler (struct adapter *adapter)
|
|||
|
||||
DBG_871X(FUNC_ADPT_FMT" fw_state=%x\n", FUNC_ADPT_ARG(adapter), get_fwstate(pmlmepriv));
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
rtw_indicate_scan_done(adapter, true);
|
||||
|
||||
|
@ -2370,7 +2361,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv )
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
phead = get_list_head(queue);
|
||||
adapter = (struct adapter *)pmlmepriv->nic_hdl;
|
||||
|
||||
|
@ -2425,7 +2416,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv )
|
|||
ret = rtw_joinbss_cmd(adapter, candidate);
|
||||
|
||||
exit:
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
|
||||
;
|
||||
|
||||
|
@ -3133,13 +3124,13 @@ inline u8 rtw_to_roaming(struct adapter *adapter)
|
|||
|
||||
void rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
|
||||
{
|
||||
_irqL irqL;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
_rtw_roaming(padapter, tgt_network);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
|
||||
{
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
|
|
@ -1119,7 +1119,7 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
}
|
||||
else
|
||||
{
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
if(rtw_is_list_empty(&pstat->asoc_list)==false)
|
||||
{
|
||||
rtw_list_delete(&pstat->asoc_list);
|
||||
|
@ -1129,20 +1129,20 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
/* TODO: STA re_auth within expire_to */
|
||||
}
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
if (seq==1) {
|
||||
/* TODO: STA re_auth and auth timeout */
|
||||
}
|
||||
}
|
||||
|
||||
_enter_critical_bh(&pstapriv->auth_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->auth_list_lock);
|
||||
if (rtw_is_list_empty(&pstat->auth_list))
|
||||
{
|
||||
rtw_list_insert_tail(&pstat->auth_list, &pstapriv->auth_list);
|
||||
pstapriv->auth_list_cnt++;
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->auth_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->auth_list_lock);
|
||||
|
||||
if (pstat->auth_seq == 0)
|
||||
pstat->expire_to = pstapriv->auth_to;
|
||||
|
@ -1844,22 +1844,22 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
pstat->state &= (~WIFI_FW_ASSOC_STATE);
|
||||
pstat->state |= WIFI_FW_ASSOC_SUCCESS;
|
||||
|
||||
_enter_critical_bh(&pstapriv->auth_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->auth_list_lock);
|
||||
if (!rtw_is_list_empty(&pstat->auth_list))
|
||||
{
|
||||
rtw_list_delete(&pstat->auth_list);
|
||||
pstapriv->auth_list_cnt--;
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->auth_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->auth_list_lock);
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
if (rtw_is_list_empty(&pstat->asoc_list))
|
||||
{
|
||||
pstat->expire_to = pstapriv->expire_to;
|
||||
rtw_list_insert_tail(&pstat->asoc_list, &pstapriv->asoc_list);
|
||||
pstapriv->asoc_list_cnt++;
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
/* now the station is qualified to join our BSS... */
|
||||
if(pstat && (pstat->state & WIFI_FW_ASSOC_SUCCESS) && (_STATS_SUCCESSFUL_==status))
|
||||
|
@ -1874,7 +1874,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
else
|
||||
issue_asocrsp(padapter, status, pstat, WIFI_REASSOCRSP);
|
||||
|
||||
_enter_critical_bh(&pstat->lock, &irqL);
|
||||
spin_lock_bh(&pstat->lock);
|
||||
if(pstat->passoc_req)
|
||||
{
|
||||
rtw_mfree(pstat->passoc_req, pstat->assoc_req_len);
|
||||
|
@ -1888,7 +1888,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
memcpy(pstat->passoc_req, pframe, pkt_len);
|
||||
pstat->assoc_req_len = pkt_len;
|
||||
}
|
||||
_exit_critical_bh(&pstat->lock, &irqL);
|
||||
spin_unlock_bh(&pstat->lock);
|
||||
|
||||
/* 3-(1) report sta add event */
|
||||
report_add_sta_event(padapter, pstat->hwaddr, pstat->aid);
|
||||
|
@ -2055,9 +2055,9 @@ unsigned int OnDeAuth(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
struct sta_info *psta;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
||||
/* _enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL); */
|
||||
/* spin_lock_bh(&(pstapriv->sta_hash_lock)); */
|
||||
/* rtw_free_stainfo(padapter, psta); */
|
||||
/* _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL); */
|
||||
/* spin_unlock_bh(&(pstapriv->sta_hash_lock)); */
|
||||
|
||||
DBG_871X_LEVEL(_drv_always_, "ap recv deauth reason code(%d) sta:%pM\n",
|
||||
reason, GetAddr2Ptr(pframe));
|
||||
|
@ -2067,7 +2067,7 @@ unsigned int OnDeAuth(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
{
|
||||
u8 updated;
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
if(rtw_is_list_empty(&psta->asoc_list)==false)
|
||||
{
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
|
@ -2075,7 +2075,7 @@ unsigned int OnDeAuth(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
updated = ap_free_sta(padapter, psta, false, reason);
|
||||
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
associated_clients_update(padapter, updated);
|
||||
}
|
||||
|
@ -2150,9 +2150,9 @@ unsigned int OnDisassoc(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
struct sta_info *psta;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
||||
/* _enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL); */
|
||||
/* spin_lock_bh(&(pstapriv->sta_hash_lock)); */
|
||||
/* rtw_free_stainfo(padapter, psta); */
|
||||
/* _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL); */
|
||||
/* spin_unlock_bh(&(pstapriv->sta_hash_lock)); */
|
||||
|
||||
DBG_871X_LEVEL(_drv_always_, "ap recv disassoc reason code(%d) sta:%pM\n",
|
||||
reason, GetAddr2Ptr(pframe));
|
||||
|
@ -2162,7 +2162,7 @@ unsigned int OnDisassoc(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
{
|
||||
u8 updated;
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
if(rtw_is_list_empty(&psta->asoc_list)==false)
|
||||
{
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
|
@ -2170,7 +2170,7 @@ unsigned int OnDisassoc(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
updated = ap_free_sta(padapter, psta, false, reason);
|
||||
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
associated_clients_update(padapter, updated);
|
||||
}
|
||||
|
@ -5719,7 +5719,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
|
|||
return;
|
||||
}
|
||||
#if defined (CONFIG_AP_MODE)
|
||||
_enter_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->bcn_update_lock);
|
||||
#endif /* if defined (CONFIG_AP_MODE) */
|
||||
|
||||
/* update attribute */
|
||||
|
@ -5970,7 +5970,7 @@ _issue_bcn:
|
|||
#if defined (CONFIG_AP_MODE)
|
||||
pmlmepriv->update_bcn = false;
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->bcn_update_lock);
|
||||
#endif /* if defined (CONFIG_AP_MODE) */
|
||||
|
||||
if ((pattrib->pktlen + TXDESC_SIZE) > 512)
|
||||
|
@ -7873,7 +7873,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
|
|||
{
|
||||
int i;
|
||||
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
|
@ -7905,7 +7905,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
|
|||
}
|
||||
}
|
||||
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
|
||||
for(i= 0;i<8;i++)
|
||||
{
|
||||
|
@ -8631,7 +8631,7 @@ void start_clnt_join(struct adapter* padapter)
|
|||
_irqL irqL;
|
||||
bool has_p2p_ie = false;
|
||||
|
||||
_enter_critical_bh(&(padapter->mlmepriv.scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(padapter->mlmepriv.scanned_queue.lock));
|
||||
|
||||
for (pos = get_next(head);!rtw_end_of_queue_search(head, pos); pos = get_next(pos)) {
|
||||
|
||||
|
@ -8649,7 +8649,7 @@ void start_clnt_join(struct adapter* padapter)
|
|||
}
|
||||
}
|
||||
|
||||
_exit_critical_bh(&(padapter->mlmepriv.scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(padapter->mlmepriv.scanned_queue.lock));
|
||||
|
||||
if (scanned == NULL || rtw_end_of_queue_search(head, pos) || has_p2p_ie == false)
|
||||
#endif /* CONFIG_P2P */
|
||||
|
@ -9904,7 +9904,7 @@ void sa_query_timer_hdl(struct adapter *padapter)
|
|||
struct mlme_priv * pmlmepriv = &padapter->mlmepriv;
|
||||
_irqL irqL;
|
||||
/* disconnect */
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
|
@ -9913,7 +9913,7 @@ void sa_query_timer_hdl(struct adapter *padapter)
|
|||
rtw_free_assoc_resources(padapter, 1);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
DBG_871X("SA query timeout disconnect\n");
|
||||
}
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
|
@ -10673,7 +10673,7 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf)
|
|||
if((pstapriv->tim_bitmap&BIT(0)) && (psta_bmc->sleepq_len>0))
|
||||
{
|
||||
rtw_msleep_os(10);/* 10ms, ATIM(HIQ) Windows */
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
spin_lock_bh(&pxmitpriv->lock);
|
||||
|
||||
xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
@ -10699,7 +10699,7 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf)
|
|||
rtw_hal_xmitframe_enqueue(padapter, pxmitframe);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
pstart = pdata_attr;
|
||||
pcur = pdata_attr;
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
phead = &pstapriv->asoc_list;
|
||||
plist = get_next(phead);
|
||||
|
||||
|
@ -133,7 +133,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
if(attr_len>0)
|
||||
{
|
||||
|
@ -2398,7 +2398,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
|||
_irqL irqL;
|
||||
_list *phead, *plist;
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
phead = &pstapriv->asoc_list;
|
||||
plist = get_next(phead);
|
||||
|
||||
|
@ -2413,10 +2413,10 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
|||
_rtw_memcmp(psta->dev_addr, dev_addr, ETH_ALEN))
|
||||
{
|
||||
|
||||
/* _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); */
|
||||
/* spin_unlock_bh(&pstapriv->asoc_list_lock); */
|
||||
/* issue GO Discoverability Request */
|
||||
issue_group_disc_req(pwdinfo, psta->hwaddr);
|
||||
/* _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); */
|
||||
/* spin_lock_bh(&pstapriv->asoc_list_lock); */
|
||||
|
||||
status = P2P_STATUS_SUCCESS;
|
||||
|
||||
|
@ -2428,7 +2428,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
|||
}
|
||||
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -3146,9 +3146,9 @@ static void find_phase_handler( struct adapter* padapter )
|
|||
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH);
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
_status = rtw_sitesurvey_cmd(padapter, &ssid, 1, NULL, 0);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
|
||||
}
|
||||
|
@ -4132,7 +4132,7 @@ static void pre_tx_scan_timer_process (void *FunctionContext)
|
|||
if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
return;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
|
||||
if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ))
|
||||
|
@ -4163,7 +4163,7 @@ static void pre_tx_scan_timer_process (void *FunctionContext)
|
|||
DBG_8192C( "[%s] p2p_state is %d, ignore!!\n", __FUNCTION__, rtw_p2p_state(pwdinfo) );
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
static void find_phase_timer_process (void *FunctionContext)
|
||||
|
|
|
@ -205,11 +205,11 @@ union recv_frame *rtw_alloc_recvframe (_queue *pfree_recv_queue)
|
|||
_irqL irqL;
|
||||
union recv_frame *precvframe;
|
||||
|
||||
_enter_critical_bh(&pfree_recv_queue->lock, &irqL);
|
||||
spin_lock_bh(&pfree_recv_queue->lock);
|
||||
|
||||
precvframe = _rtw_alloc_recvframe(pfree_recv_queue);
|
||||
|
||||
_exit_critical_bh(&pfree_recv_queue->lock, &irqL);
|
||||
spin_unlock_bh(&pfree_recv_queue->lock);
|
||||
|
||||
return precvframe;
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ int rtw_free_recvframe(union recv_frame *precvframe, _queue *pfree_recv_queue)
|
|||
precvframe->u.hdr.pkt = NULL;
|
||||
}
|
||||
|
||||
_enter_critical_bh(&pfree_recv_queue->lock, &irqL);
|
||||
spin_lock_bh(&pfree_recv_queue->lock);
|
||||
|
||||
rtw_list_delete(&(precvframe->u.hdr.list));
|
||||
|
||||
|
@ -251,7 +251,7 @@ int rtw_free_recvframe(union recv_frame *precvframe, _queue *pfree_recv_queue)
|
|||
precvpriv->free_recvframe_cnt++;
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pfree_recv_queue->lock, &irqL);
|
||||
spin_unlock_bh(&pfree_recv_queue->lock);
|
||||
|
||||
;
|
||||
|
||||
|
@ -292,10 +292,10 @@ sint rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue)
|
|||
_irqL irqL;
|
||||
|
||||
/* _spinlock(&pfree_recv_queue->lock); */
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
spin_lock_bh(&queue->lock);
|
||||
ret = _rtw_enqueue_recvframe(precvframe, queue);
|
||||
/* _rtw_spinunlock(&pfree_recv_queue->lock); */
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -364,12 +364,12 @@ sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, _queue *queue)
|
|||
{
|
||||
_irqL irqL;
|
||||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
spin_lock_bh(&queue->lock);
|
||||
|
||||
rtw_list_delete(&precvbuf->list);
|
||||
rtw_list_insert_head(&precvbuf->list, get_list_head(queue));
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -1339,8 +1339,8 @@ sint validate_recv_ctrl_frame(struct adapter *padapter, union recv_frame *precv_
|
|||
struct xmit_frame *pxmitframe=NULL;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
|
||||
/* _enter_critical_bh(&psta->sleep_q.lock, &irqL); */
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
/* spin_lock_bh(&psta->sleep_q.lock); */
|
||||
spin_lock_bh(&pxmitpriv->lock);
|
||||
|
||||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
@ -1375,14 +1375,14 @@ sint validate_recv_ctrl_frame(struct adapter *padapter, union recv_frame *precv_
|
|||
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||
}
|
||||
|
||||
/* _exit_critical_bh(&psta->sleep_q.lock, &irqL); */
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
/* spin_unlock_bh(&psta->sleep_q.lock); */
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/* _exit_critical_bh(&psta->sleep_q.lock, &irqL); */
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
/* spin_unlock_bh(&psta->sleep_q.lock); */
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
|
||||
/* DBG_871X("no buffered packets to xmit\n"); */
|
||||
if(pstapriv->tim_bitmap&BIT(psta->aid))
|
||||
|
@ -2604,12 +2604,6 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
|
|||
union recv_frame *pnextrframe;
|
||||
struct rx_pkt_attrib *pnextattrib;
|
||||
|
||||
/* DbgPrint("+enqueue_reorder_recvframe()\n"); */
|
||||
|
||||
/* _enter_critical_ex(&ppending_recvframe_queue->lock, &irql); */
|
||||
/* _rtw_spinlock_ex(&ppending_recvframe_queue->lock); */
|
||||
|
||||
|
||||
phead = get_list_head(ppending_recvframe_queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
|
@ -2624,37 +2618,19 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
|
|||
}
|
||||
else if( SN_EQUAL(pnextattrib->seq_num, pattrib->seq_num))
|
||||
{
|
||||
/* Duplicate entry is found!! Do not insert current entry. */
|
||||
/* RT_TRACE(COMP_RX_REORDER, DBG_TRACE, ("InsertRxReorderList(): Duplicate packet is dropped!! IndicateSeq: %d, NewSeq: %d\n", pTS->RxIndicateSeq, SeqNum)); */
|
||||
|
||||
/* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
/* DbgPrint("enqueue_reorder_recvframe():while\n"); */
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* _enter_critical_ex(&ppending_recvframe_queue->lock, &irql); */
|
||||
/* _rtw_spinlock_ex(&ppending_recvframe_queue->lock); */
|
||||
|
||||
rtw_list_delete(&(prframe->u.hdr.list));
|
||||
|
||||
rtw_list_insert_tail(&(prframe->u.hdr.list), plist);
|
||||
|
||||
/* _rtw_spinunlock_ex(&ppending_recvframe_queue->lock); */
|
||||
/* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */
|
||||
|
||||
|
||||
/* RT_TRACE(COMP_RX_REORDER, DBG_TRACE, ("InsertRxReorderList(): Pkt insert into buffer!! IndicateSeq: %d, NewSeq: %d\n", pTS->RxIndicateSeq, SeqNum)); */
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctrl *preorder_ctrl, int bforced);
|
||||
|
@ -2672,7 +2648,7 @@ int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctr
|
|||
|
||||
/* DbgPrint("+recv_indicatepkts_in_order\n"); */
|
||||
|
||||
/* _enter_critical_ex(&ppending_recvframe_queue->lock, &irql); */
|
||||
/* _enter_critical_ex(&ppending_recvframe_queue->lock); */
|
||||
/* _rtw_spinlock_ex(&ppending_recvframe_queue->lock); */
|
||||
|
||||
phead = get_list_head(ppending_recvframe_queue);
|
||||
|
@ -2683,7 +2659,7 @@ int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctr
|
|||
{
|
||||
if(rtw_is_list_empty(phead))
|
||||
{
|
||||
/* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */
|
||||
/* _exit_critical_ex(&ppending_recvframe_queue->lock); */
|
||||
/* _rtw_spinunlock_ex(&ppending_recvframe_queue->lock); */
|
||||
return true;
|
||||
}
|
||||
|
@ -2843,7 +2819,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame *
|
|||
}
|
||||
}
|
||||
|
||||
_enter_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
spin_lock_bh(&ppending_recvframe_queue->lock);
|
||||
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_,
|
||||
("recv_indicatepkt_reorder: indicate=%d seq=%d\n",
|
||||
|
@ -2877,15 +2853,15 @@ static int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame *
|
|||
|
||||
if(recv_indicatepkts_in_order(padapter, preorder_ctrl, false)) {
|
||||
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
spin_unlock_bh(&ppending_recvframe_queue->lock);
|
||||
} else {
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
spin_unlock_bh(&ppending_recvframe_queue->lock);
|
||||
_cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer);
|
||||
}
|
||||
return _SUCCESS;
|
||||
|
||||
_err_exit:
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
spin_unlock_bh(&ppending_recvframe_queue->lock);
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
|
@ -2904,14 +2880,14 @@ void rtw_reordering_ctrl_timeout_handler(void *pcontext)
|
|||
|
||||
/* DBG_871X("+rtw_reordering_ctrl_timeout_handler()=>\n"); */
|
||||
|
||||
_enter_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
spin_lock_bh(&ppending_recvframe_queue->lock);
|
||||
|
||||
if(recv_indicatepkts_in_order(padapter, preorder_ctrl, true)==true)
|
||||
{
|
||||
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
spin_unlock_bh(&ppending_recvframe_queue->lock);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ void rtw_mfree_all_stainfo(struct sta_priv *pstapriv )
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||
|
||||
phead = get_list_head(&pstapriv->free_sta_queue);
|
||||
plist = get_next(phead);
|
||||
|
@ -236,7 +236,7 @@ void rtw_mfree_all_stainfo(struct sta_priv *pstapriv )
|
|||
rtw_mfree_stainfo(psta);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->sta_hash_lock);
|
||||
|
||||
;
|
||||
|
||||
|
@ -277,7 +277,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
|
|||
if(pstapriv){
|
||||
|
||||
/* delete all reordering_ctrl_timer */
|
||||
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||
for(index = 0; index < NUM_STA; index++)
|
||||
{
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
|
@ -296,7 +296,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
|
|||
}
|
||||
}
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->sta_hash_lock);
|
||||
/*===============================*/
|
||||
|
||||
rtw_mfree_sta_priv_lock(pstapriv);
|
||||
|
@ -326,10 +326,9 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
|
||||
pfree_sta_queue = &pstapriv->free_sta_queue;
|
||||
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
|
||||
spin_lock_bh(&(pstapriv->sta_hash_lock));
|
||||
|
||||
if (_rtw_queue_empty(pfree_sta_queue) == true) {
|
||||
/* _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2); */
|
||||
psta = NULL;
|
||||
} else {
|
||||
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);
|
||||
|
@ -402,7 +401,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
psta->RxMgmtFrameSeqNum = 0xffff;
|
||||
}
|
||||
exit:
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
return psta;
|
||||
}
|
||||
|
||||
|
@ -426,9 +425,9 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
|||
goto exit;
|
||||
|
||||
|
||||
_enter_critical_bh(&psta->lock, &irqL0);
|
||||
spin_lock_bh(&psta->lock);
|
||||
psta->state &= ~_FW_LINKED;
|
||||
_exit_critical_bh(&psta->lock, &irqL0);
|
||||
spin_unlock_bh(&psta->lock);
|
||||
|
||||
pfree_sta_queue = &pstapriv->free_sta_queue;
|
||||
|
||||
|
@ -439,48 +438,48 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
|||
|
||||
/* rtw_list_delete(&psta->wakeup_list); */
|
||||
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
spin_lock_bh(&pxmitpriv->lock);
|
||||
|
||||
rtw_free_xmitframe_queue(pxmitpriv, &psta->sleep_q);
|
||||
psta->sleepq_len = 0;
|
||||
|
||||
/* vo */
|
||||
/* _enter_critical_bh(&(pxmitpriv->vo_pending.lock), &irqL0); */
|
||||
/* spin_lock_bh(&(pxmitpriv->vo_pending.lock)0); */
|
||||
rtw_free_xmitframe_queue( pxmitpriv, &pstaxmitpriv->vo_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->vo_q.tx_pending));
|
||||
phwxmit = pxmitpriv->hwxmits;
|
||||
phwxmit->accnt -= pstaxmitpriv->vo_q.qcnt;
|
||||
pstaxmitpriv->vo_q.qcnt = 0;
|
||||
/* _exit_critical_bh(&(pxmitpriv->vo_pending.lock), &irqL0); */
|
||||
/* spin_unlock_bh(&(pxmitpriv->vo_pending.lock)0); */
|
||||
|
||||
/* vi */
|
||||
/* _enter_critical_bh(&(pxmitpriv->vi_pending.lock), &irqL0); */
|
||||
/* spin_lock_bh(&(pxmitpriv->vi_pending.lock)0); */
|
||||
rtw_free_xmitframe_queue( pxmitpriv, &pstaxmitpriv->vi_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->vi_q.tx_pending));
|
||||
phwxmit = pxmitpriv->hwxmits+1;
|
||||
phwxmit->accnt -= pstaxmitpriv->vi_q.qcnt;
|
||||
pstaxmitpriv->vi_q.qcnt = 0;
|
||||
/* _exit_critical_bh(&(pxmitpriv->vi_pending.lock), &irqL0); */
|
||||
/* spin_unlock_bh(&(pxmitpriv->vi_pending.lock)0); */
|
||||
|
||||
/* be */
|
||||
/* _enter_critical_bh(&(pxmitpriv->be_pending.lock), &irqL0); */
|
||||
/* spin_lock_bh(&(pxmitpriv->be_pending.lock)0); */
|
||||
rtw_free_xmitframe_queue( pxmitpriv, &pstaxmitpriv->be_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
|
||||
phwxmit = pxmitpriv->hwxmits+2;
|
||||
phwxmit->accnt -= pstaxmitpriv->be_q.qcnt;
|
||||
pstaxmitpriv->be_q.qcnt = 0;
|
||||
/* _exit_critical_bh(&(pxmitpriv->be_pending.lock), &irqL0); */
|
||||
/* spin_unlock_bh(&(pxmitpriv->be_pending.lock)0); */
|
||||
|
||||
/* bk */
|
||||
/* _enter_critical_bh(&(pxmitpriv->bk_pending.lock), &irqL0); */
|
||||
/* spin_lock_bh(&(pxmitpriv->bk_pending.lock)0); */
|
||||
rtw_free_xmitframe_queue( pxmitpriv, &pstaxmitpriv->bk_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->bk_q.tx_pending));
|
||||
phwxmit = pxmitpriv->hwxmits+3;
|
||||
phwxmit->accnt -= pstaxmitpriv->bk_q.qcnt;
|
||||
pstaxmitpriv->bk_q.qcnt = 0;
|
||||
/* _exit_critical_bh(&(pxmitpriv->bk_pending.lock), &irqL0); */
|
||||
/* spin_unlock_bh(&(pxmitpriv->bk_pending.lock)0); */
|
||||
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
|
||||
rtw_list_delete(&psta->hash_list);
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_err_,("\n free number_%d stainfo with hwaddr = 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x \n",pstapriv->asoc_sta_count , psta->hwaddr[0], psta->hwaddr[1], psta->hwaddr[2],psta->hwaddr[3],psta->hwaddr[4],psta->hwaddr[5]));
|
||||
|
@ -503,7 +502,7 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
|||
|
||||
ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
||||
|
||||
_enter_critical_bh(&ppending_recvframe_queue->lock, &irqL);
|
||||
spin_lock_bh(&ppending_recvframe_queue->lock);
|
||||
|
||||
phead = get_list_head(ppending_recvframe_queue);
|
||||
plist = get_next(phead);
|
||||
|
@ -519,7 +518,7 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
|||
rtw_free_recvframe(prframe, pfree_recv_queue);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irqL);
|
||||
spin_unlock_bh(&ppending_recvframe_queue->lock);
|
||||
|
||||
}
|
||||
|
||||
|
@ -528,17 +527,12 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
|||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
|
||||
/*
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL0);
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL0);
|
||||
*/
|
||||
_enter_critical_bh(&pstapriv->auth_list_lock, &irqL0);
|
||||
spin_lock_bh(&pstapriv->auth_list_lock);
|
||||
if (!rtw_is_list_empty(&psta->auth_list)) {
|
||||
rtw_list_delete(&psta->auth_list);
|
||||
pstapriv->auth_list_cnt--;
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->auth_list_lock, &irqL0);
|
||||
spin_unlock_bh(&pstapriv->auth_list_lock);
|
||||
|
||||
psta->expire_to = 0;
|
||||
psta->sleepq_ac_len = 0;
|
||||
|
@ -569,9 +563,9 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
|||
|
||||
_rtw_spinlock_free(&psta->lock);
|
||||
|
||||
/* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL0); */
|
||||
/* spin_lock_bh(&(pfree_sta_queue->lock)0); */
|
||||
rtw_list_insert_tail(&psta->list, get_list_head(pfree_sta_queue));
|
||||
/* _exit_critical_bh(&(pfree_sta_queue->lock), &irqL0); */
|
||||
/* spin_unlock_bh(&(pfree_sta_queue->lock)0); */
|
||||
|
||||
exit:
|
||||
|
||||
|
@ -596,7 +590,7 @@ void rtw_free_all_stainfo(struct adapter *padapter)
|
|||
if(pstapriv->asoc_sta_count==1)
|
||||
goto exit;
|
||||
|
||||
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||
|
||||
for(index=0; index< NUM_STA; index++)
|
||||
{
|
||||
|
@ -615,7 +609,7 @@ void rtw_free_all_stainfo(struct adapter *padapter)
|
|||
}
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->sta_hash_lock);
|
||||
|
||||
exit:
|
||||
|
||||
|
@ -655,7 +649,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
|
||||
index = wifi_mac_hash(addr);
|
||||
|
||||
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
|
@ -674,7 +668,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
plist = get_next(plist);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
spin_unlock_bh(&pstapriv->sta_hash_lock);
|
||||
;
|
||||
return psta;
|
||||
|
||||
|
@ -706,32 +700,16 @@ u32 rtw_init_bcmc_stainfo(struct adapter* padapter)
|
|||
|
||||
ptxservq= &(psta->sta_xmitpriv.be_q);
|
||||
|
||||
/*
|
||||
_enter_critical(&pstapending->lock, &irqL0);
|
||||
|
||||
if (rtw_is_list_empty(&ptxservq->tx_pending))
|
||||
rtw_list_insert_tail(&ptxservq->tx_pending, get_list_head(pstapending));
|
||||
|
||||
_exit_critical(&pstapending->lock, &irqL0);
|
||||
*/
|
||||
|
||||
exit:
|
||||
;
|
||||
return _SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
struct sta_info* rtw_get_bcmc_stainfo(struct adapter* padapter)
|
||||
{
|
||||
struct sta_info *psta;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
u8 bc_addr[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff};
|
||||
;
|
||||
psta = rtw_get_stainfo(pstapriv, bc_addr);
|
||||
;
|
||||
return psta;
|
||||
|
||||
return rtw_get_stainfo(pstapriv, bc_addr);
|
||||
}
|
||||
|
||||
u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
|
||||
|
@ -746,7 +724,7 @@ u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
|
|||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||
_queue *pacl_node_q =&pacl_list->acl_node_q;
|
||||
|
||||
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||
spin_lock_bh(&(pacl_node_q->lock));
|
||||
phead = get_list_head(pacl_node_q);
|
||||
plist = get_next(phead);
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
|
@ -763,7 +741,7 @@ u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
|
|||
}
|
||||
}
|
||||
}
|
||||
_exit_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||
spin_unlock_bh(&(pacl_node_q->lock));
|
||||
|
||||
|
||||
if(pacl_list->mode == 1)/* accept unless in deny list */
|
||||
|
|
195
core/rtw_xmit.c
195
core/rtw_xmit.c
|
@ -1502,7 +1502,6 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit
|
|||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
u8 MME[_MME_IE_LENGTH_];
|
||||
|
||||
_irqL irqL;
|
||||
u32 ori_len;
|
||||
mem_start = pframe = (u8 *)(pxmitframe->buf_addr) + TXDESC_OFFSET;
|
||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
||||
|
@ -1516,7 +1515,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit
|
|||
if(BIP_AAD == NULL)
|
||||
return _FAIL;
|
||||
|
||||
_enter_critical_bh(&padapter->security_key_mutex, &irqL);
|
||||
spin_lock_bh(&padapter->security_key_mutex);
|
||||
|
||||
/* only support station mode */
|
||||
if(!check_fwstate(pmlmepriv, WIFI_STATION_STATE) || !check_fwstate(pmlmepriv, _FW_LINKED))
|
||||
|
@ -1703,13 +1702,13 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit
|
|||
}
|
||||
|
||||
xmitframe_coalesce_success:
|
||||
_exit_critical_bh(&padapter->security_key_mutex, &irqL);
|
||||
spin_unlock_bh(&padapter->security_key_mutex);
|
||||
rtw_mfree(BIP_AAD, ori_len);
|
||||
;
|
||||
return _SUCCESS;
|
||||
|
||||
xmitframe_coalesce_fail:
|
||||
_exit_critical_bh(&padapter->security_key_mutex, &irqL);
|
||||
spin_unlock_bh(&padapter->security_key_mutex);
|
||||
rtw_mfree(BIP_AAD, ori_len);
|
||||
;
|
||||
|
||||
|
@ -1820,14 +1819,12 @@ void rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe,
|
|||
|
||||
struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
|
||||
{
|
||||
_irqL irqL;
|
||||
struct xmit_buf *pxmitbuf = NULL;
|
||||
_list *plist, *phead;
|
||||
_queue *pfree_queue = &pxmitpriv->free_xmit_extbuf_queue;
|
||||
unsigned long flags;
|
||||
|
||||
;
|
||||
|
||||
_enter_critical(&pfree_queue->lock, &irqL);
|
||||
spin_lock_irqsave(&pfree_queue->lock, flags);
|
||||
|
||||
if(_rtw_queue_empty(pfree_queue) == true) {
|
||||
pxmitbuf = NULL;
|
||||
|
@ -1860,26 +1857,20 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
|
|||
|
||||
}
|
||||
|
||||
_exit_critical(&pfree_queue->lock, &irqL);
|
||||
|
||||
;
|
||||
spin_unlock_irqrestore(&pfree_queue->lock, flags);
|
||||
|
||||
return pxmitbuf;
|
||||
}
|
||||
|
||||
s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
||||
{
|
||||
_irqL irqL;
|
||||
_queue *pfree_queue = &pxmitpriv->free_xmit_extbuf_queue;
|
||||
|
||||
;
|
||||
unsigned long flags;
|
||||
|
||||
if(pxmitbuf==NULL)
|
||||
{
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
_enter_critical(&pfree_queue->lock, &irqL);
|
||||
spin_lock_irqsave(&pfree_queue->lock, flags);
|
||||
|
||||
rtw_list_delete(&pxmitbuf->list);
|
||||
|
||||
|
@ -1889,25 +1880,23 @@ s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
|||
DBG_871X("DBG_XMIT_BUF_EXT FREE no=%d, free_xmit_extbuf_cnt=%d\n",pxmitbuf->no ,pxmitpriv->free_xmit_extbuf_cnt);
|
||||
#endif
|
||||
|
||||
_exit_critical(&pfree_queue->lock, &irqL);
|
||||
|
||||
;
|
||||
spin_unlock_irqrestore(&pfree_queue->lock, flags);
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
|
||||
{
|
||||
_irqL irqL;
|
||||
struct xmit_buf *pxmitbuf = NULL;
|
||||
_list *plist, *phead;
|
||||
_queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue;
|
||||
unsigned long flags;
|
||||
|
||||
;
|
||||
|
||||
/* DBG_871X("+rtw_alloc_xmitbuf\n"); */
|
||||
|
||||
_enter_critical(&pfree_xmitbuf_queue->lock, &irqL);
|
||||
spin_lock_irqsave(&pfree_xmitbuf_queue->lock, flags);
|
||||
|
||||
if(_rtw_queue_empty(pfree_xmitbuf_queue) == true) {
|
||||
pxmitbuf = NULL;
|
||||
|
@ -1944,39 +1933,28 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
|
|||
}
|
||||
#endif
|
||||
|
||||
_exit_critical(&pfree_xmitbuf_queue->lock, &irqL);
|
||||
|
||||
;
|
||||
spin_unlock_irqrestore(&pfree_xmitbuf_queue->lock, flags);
|
||||
|
||||
return pxmitbuf;
|
||||
}
|
||||
|
||||
s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
||||
{
|
||||
_irqL irqL;
|
||||
_queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue;
|
||||
|
||||
;
|
||||
|
||||
/* DBG_871X("+rtw_free_xmitbuf\n"); */
|
||||
unsigned long flags;
|
||||
|
||||
if(pxmitbuf==NULL)
|
||||
{
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
if (pxmitbuf->sctx) {
|
||||
DBG_871X("%s pxmitbuf->sctx is not NULL\n", __func__);
|
||||
rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_FREE);
|
||||
}
|
||||
|
||||
if(pxmitbuf->ext_tag)
|
||||
{
|
||||
if(pxmitbuf->ext_tag) {
|
||||
rtw_free_xmitbuf_ext(pxmitpriv, pxmitbuf);
|
||||
}
|
||||
else
|
||||
{
|
||||
_enter_critical(&pfree_xmitbuf_queue->lock, &irqL);
|
||||
} else {
|
||||
spin_lock_irqsave(&pfree_xmitbuf_queue->lock, flags);
|
||||
|
||||
rtw_list_delete(&pxmitbuf->list);
|
||||
|
||||
|
@ -1987,7 +1965,7 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
|||
#ifdef DBG_XMIT_BUF
|
||||
DBG_871X("DBG_XMIT_BUF FREE no=%d, free_xmitbuf_cnt=%d\n",pxmitbuf->no ,pxmitpriv->free_xmitbuf_cnt);
|
||||
#endif
|
||||
_exit_critical(&pfree_xmitbuf_queue->lock, &irqL);
|
||||
spin_unlock_irqrestore(&pfree_xmitbuf_queue->lock, flags);
|
||||
}
|
||||
|
||||
;
|
||||
|
@ -2034,7 +2012,6 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf
|
|||
pfree_xmit_queue
|
||||
*/
|
||||
|
||||
_irqL irqL;
|
||||
struct xmit_frame *pxframe = NULL;
|
||||
_list *plist, *phead;
|
||||
_queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue;
|
||||
|
@ -2042,7 +2019,7 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&pfree_xmit_queue->lock, &irqL);
|
||||
spin_lock_bh(&pfree_xmit_queue->lock);
|
||||
|
||||
if (_rtw_queue_empty(pfree_xmit_queue) == true) {
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_alloc_xmitframe:%d\n", pxmitpriv->free_xmitframe_cnt));
|
||||
|
@ -2059,7 +2036,7 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf
|
|||
RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_, ("rtw_alloc_xmitframe():free_xmitframe_cnt=%d\n", pxmitpriv->free_xmitframe_cnt));
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pfree_xmit_queue->lock, &irqL);
|
||||
spin_unlock_bh(&pfree_xmit_queue->lock);
|
||||
|
||||
rtw_init_xmitframe(pxframe);
|
||||
|
||||
|
@ -2070,14 +2047,13 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf
|
|||
|
||||
struct xmit_frame *rtw_alloc_xmitframe_ext(struct xmit_priv *pxmitpriv)
|
||||
{
|
||||
_irqL irqL;
|
||||
struct xmit_frame *pxframe = NULL;
|
||||
_list *plist, *phead;
|
||||
_queue *queue = &pxmitpriv->free_xframe_ext_queue;
|
||||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
spin_lock_bh(&queue->lock);
|
||||
|
||||
if (_rtw_queue_empty(queue) == true) {
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_alloc_xmitframe_ext:%d\n", pxmitpriv->free_xframe_ext_cnt));
|
||||
|
@ -2092,7 +2068,7 @@ struct xmit_frame *rtw_alloc_xmitframe_ext(struct xmit_priv *pxmitpriv)
|
|||
RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_, ("rtw_alloc_xmitframe_ext():free_xmitframe_cnt=%d\n", pxmitpriv->free_xframe_ext_cnt));
|
||||
}
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
||||
rtw_init_xmitframe(pxframe);
|
||||
|
||||
|
@ -2132,7 +2108,6 @@ exit:
|
|||
|
||||
s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframe)
|
||||
{
|
||||
_irqL irqL;
|
||||
_queue *queue;
|
||||
struct adapter *padapter = pxmitpriv->adapter;
|
||||
_pkt *pndis_pkt = NULL;
|
||||
|
@ -2162,7 +2137,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
|
|||
else
|
||||
{}
|
||||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
spin_lock_bh(&queue->lock);
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
rtw_list_insert_tail(&pxmitframe->list, get_list_head(queue));
|
||||
|
@ -2175,7 +2150,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
|
|||
} else {
|
||||
}
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
||||
check_pkt_complete:
|
||||
|
||||
|
@ -2191,13 +2166,12 @@ exit:
|
|||
|
||||
void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, _queue *pframequeue)
|
||||
{
|
||||
_irqL irqL;
|
||||
_list *plist, *phead;
|
||||
struct xmit_frame *pxmitframe;
|
||||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&(pframequeue->lock), &irqL);
|
||||
spin_lock_bh(&(pframequeue->lock));
|
||||
|
||||
phead = get_list_head(pframequeue);
|
||||
plist = get_next(phead);
|
||||
|
@ -2212,7 +2186,7 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, _queue *pframequeue)
|
|||
rtw_free_xmitframe(pxmitpriv,pxmitframe);
|
||||
|
||||
}
|
||||
_exit_critical_bh(&(pframequeue->lock), &irqL);
|
||||
spin_unlock_bh(&(pframequeue->lock));
|
||||
|
||||
;
|
||||
}
|
||||
|
@ -2259,7 +2233,6 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str
|
|||
|
||||
struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit_i, sint entry)
|
||||
{
|
||||
_irqL irqL0;
|
||||
_list *sta_plist, *sta_phead;
|
||||
struct hw_xmit *phwxmit;
|
||||
struct tx_servq *ptxservq = NULL;
|
||||
|
@ -2280,14 +2253,12 @@ struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi
|
|||
inx[j] = pxmitpriv->wmm_para_seq[j];
|
||||
}
|
||||
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
spin_lock_bh(&pxmitpriv->lock);
|
||||
|
||||
for(i = 0; i < entry; i++)
|
||||
{
|
||||
phwxmit = phwxmit_i + inx[i];
|
||||
|
||||
/* _enter_critical_ex(&phwxmit->sta_queue->lock, &irqL0); */
|
||||
|
||||
sta_phead = get_list_head(phwxmit->sta_queue);
|
||||
sta_plist = get_next(sta_phead);
|
||||
|
||||
|
@ -2300,30 +2271,23 @@ struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi
|
|||
|
||||
pxmitframe = dequeue_one_xmitframe(pxmitpriv, phwxmit, ptxservq, pframe_queue);
|
||||
|
||||
if(pxmitframe)
|
||||
{
|
||||
if(pxmitframe) {
|
||||
phwxmit->accnt--;
|
||||
|
||||
/* Remove sta node when there is no pending packets. */
|
||||
if(_rtw_queue_empty(pframe_queue)) /* must be done after get_next and before break */
|
||||
rtw_list_delete(&ptxservq->tx_pending);
|
||||
|
||||
/* _exit_critical_ex(&phwxmit->sta_queue->lock, &irqL0); */
|
||||
|
||||
goto exit;
|
||||
}
|
||||
|
||||
sta_plist = get_next(sta_plist);
|
||||
|
||||
}
|
||||
|
||||
/* _exit_critical_ex(&phwxmit->sta_queue->lock, &irqL0); */
|
||||
|
||||
}
|
||||
|
||||
exit:
|
||||
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
|
||||
;
|
||||
|
||||
|
@ -2380,7 +2344,6 @@ struct tx_servq *rtw_get_sta_pending(struct adapter *padapter, struct sta_info *
|
|||
*/
|
||||
s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe)
|
||||
{
|
||||
/* _irqL irqL0; */
|
||||
u8 ac_index;
|
||||
struct sta_info *psta;
|
||||
struct tx_servq *ptxservq;
|
||||
|
@ -2413,26 +2376,16 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
|
||||
ptxservq = rtw_get_sta_pending(padapter, psta, pattrib->priority, (u8 *)(&ac_index));
|
||||
|
||||
/* _enter_critical(&pstapending->lock, &irqL0); */
|
||||
|
||||
if (rtw_is_list_empty(&ptxservq->tx_pending)) {
|
||||
rtw_list_insert_tail(&ptxservq->tx_pending, get_list_head(phwxmits[ac_index].sta_queue));
|
||||
}
|
||||
|
||||
/* _enter_critical(&ptxservq->sta_pending.lock, &irqL1); */
|
||||
|
||||
rtw_list_insert_tail(&pxmitframe->list, get_list_head(&ptxservq->sta_pending));
|
||||
ptxservq->qcnt++;
|
||||
phwxmits[ac_index].accnt++;
|
||||
|
||||
/* _exit_critical(&ptxservq->sta_pending.lock, &irqL1); */
|
||||
|
||||
/* _exit_critical(&pstapending->lock, &irqL0); */
|
||||
|
||||
exit:
|
||||
|
||||
;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -2527,7 +2480,6 @@ static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
|
|||
{
|
||||
struct sk_buff *skb = *pskb;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
_irqL irqL;
|
||||
/* if(check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true) */
|
||||
{
|
||||
int res, is_vlan_tag=0, i, do_nat25=1;
|
||||
|
@ -2543,7 +2495,7 @@ static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
|
|||
br_port = rcu_dereference(padapter->pnetdev->rx_handler_data);
|
||||
rcu_read_unlock();
|
||||
#endif /* (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) */
|
||||
_enter_critical_bh(&padapter->br_ext_lock, &irqL);
|
||||
spin_lock_bh(&padapter->br_ext_lock);
|
||||
if ( !(skb->data[0] & 1) &&
|
||||
br_port &&
|
||||
memcmp(skb->data+MACADDRLEN, padapter->br_mac, MACADDRLEN) &&
|
||||
|
@ -2552,7 +2504,7 @@ static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
|
|||
!memcmp(padapter->scdb_mac, skb->data+MACADDRLEN, MACADDRLEN) && padapter->scdb_entry) {
|
||||
memcpy(skb->data+MACADDRLEN, GET_MY_HWADDR(padapter), MACADDRLEN);
|
||||
padapter->scdb_entry->ageing_timer = jiffies;
|
||||
_exit_critical_bh(&padapter->br_ext_lock, &irqL);
|
||||
spin_unlock_bh(&padapter->br_ext_lock);
|
||||
}
|
||||
else
|
||||
/* if (!priv->pmib->ethBrExtInfo.nat25_disable) */
|
||||
|
@ -2593,7 +2545,7 @@ static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
|
|||
}
|
||||
}
|
||||
}
|
||||
_exit_critical_bh(&padapter->br_ext_lock, &irqL);
|
||||
spin_unlock_bh(&padapter->br_ext_lock);
|
||||
#endif /* 1 */
|
||||
if (do_nat25)
|
||||
{
|
||||
|
@ -2744,9 +2696,6 @@ s32 rtw_xmit(struct adapter *padapter, _pkt **ppkt)
|
|||
{
|
||||
static u32 start = 0;
|
||||
static u32 drop_cnt = 0;
|
||||
#ifdef CONFIG_AP_MODE
|
||||
_irqL irqL0;
|
||||
#endif
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
struct xmit_frame *pxmitframe = NULL;
|
||||
#ifdef CONFIG_BR_EXT
|
||||
|
@ -2813,13 +2762,13 @@ s32 rtw_xmit(struct adapter *padapter, _pkt **ppkt)
|
|||
do_queue_select(padapter, &pxmitframe->attrib);
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
spin_lock_bh(&pxmitpriv->lock);
|
||||
if(xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe) == true)
|
||||
{
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
return 1;
|
||||
}
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
#endif
|
||||
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == false)
|
||||
|
@ -2832,7 +2781,6 @@ s32 rtw_xmit(struct adapter *padapter, _pkt **ppkt)
|
|||
|
||||
sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_frame *pxmitframe)
|
||||
{
|
||||
_irqL irqL;
|
||||
sint ret=false;
|
||||
struct sta_info *psta=NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
@ -2881,7 +2829,7 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
|||
|
||||
if(bmcst)
|
||||
{
|
||||
_enter_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
spin_lock_bh(&psta->sleep_q.lock);
|
||||
|
||||
if(pstapriv->sta_dz_bitmap)/* if anyone sta is in ps mode */
|
||||
{
|
||||
|
@ -2899,13 +2847,13 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
|||
ret = true;
|
||||
}
|
||||
|
||||
_exit_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
spin_unlock_bh(&psta->sleep_q.lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
_enter_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
spin_lock_bh(&psta->sleep_q.lock);
|
||||
|
||||
if(psta->state&WIFI_SLEEP_STATE)
|
||||
{
|
||||
|
@ -2915,7 +2863,7 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
|||
{
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
|
||||
/* _enter_critical_bh(&psta->sleep_q.lock, &irqL); */
|
||||
/* spin_lock_bh(&psta->sleep_q.lock); */
|
||||
|
||||
rtw_list_insert_tail(&pxmitframe->list, get_list_head(&psta->sleep_q));
|
||||
|
||||
|
@ -2959,7 +2907,7 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
|||
}
|
||||
}
|
||||
|
||||
/* _exit_critical_bh(&psta->sleep_q.lock, &irqL); */
|
||||
/* spin_unlock_bh(&psta->sleep_q.lock); */
|
||||
|
||||
/* if(psta->sleepq_len > (NR_XMITFRAME>>3)) */
|
||||
/* */
|
||||
|
@ -2972,7 +2920,7 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
|||
|
||||
}
|
||||
|
||||
_exit_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
spin_unlock_bh(&psta->sleep_q.lock);
|
||||
|
||||
return ret;
|
||||
|
||||
|
@ -3019,7 +2967,6 @@ static void dequeue_xmitframes_to_sleeping_queue(struct adapter *padapter, struc
|
|||
|
||||
void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta)
|
||||
{
|
||||
_irqL irqL0;
|
||||
struct sta_info *psta_bmc;
|
||||
struct sta_xmit_priv *pstaxmitpriv;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
@ -3031,7 +2978,7 @@ void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
psta_bmc = rtw_get_bcmc_stainfo(padapter);
|
||||
|
||||
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
spin_lock_bh(&pxmitpriv->lock);
|
||||
|
||||
psta->state |= WIFI_SLEEP_STATE;
|
||||
|
||||
|
@ -3058,12 +3005,11 @@ void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
|
||||
|
||||
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
}
|
||||
|
||||
void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
||||
{
|
||||
_irqL irqL;
|
||||
u8 update_mask=0, wmmps_ac=0;
|
||||
struct sta_info *psta_bmc;
|
||||
_list *xmitframe_plist, *xmitframe_phead;
|
||||
|
@ -3073,7 +3019,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
|
||||
psta_bmc = rtw_get_bcmc_stainfo(padapter);
|
||||
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
spin_lock_bh(&pxmitpriv->lock);
|
||||
|
||||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
@ -3131,12 +3077,12 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
pxmitframe->attrib.triggered = 1;
|
||||
|
||||
/*
|
||||
_exit_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
spin_unlock_bh(&psta->sleep_q.lock);
|
||||
if(rtw_hal_xmit(padapter, pxmitframe) == true)
|
||||
{
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
}
|
||||
_enter_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
spin_lock_bh(&psta->sleep_q.lock);
|
||||
*/
|
||||
rtw_hal_xmitframe_enqueue(padapter, pxmitframe);
|
||||
|
||||
|
@ -3169,12 +3115,12 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
|
||||
pxmitframe->attrib.triggered = 1;
|
||||
/*
|
||||
_exit_critical_bh(&psta_bmc->sleep_q.lock, &irqL);
|
||||
spin_unlock_bh(&psta_bmc->sleep_q.lock);
|
||||
if(rtw_hal_xmit(padapter, pxmitframe) == true)
|
||||
{
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
}
|
||||
_enter_critical_bh(&psta_bmc->sleep_q.lock, &irqL);
|
||||
spin_lock_bh(&psta_bmc->sleep_q.lock);
|
||||
|
||||
*/
|
||||
rtw_hal_xmitframe_enqueue(padapter, pxmitframe);
|
||||
|
@ -3217,8 +3163,8 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
|
||||
_exit:
|
||||
|
||||
/* _exit_critical_bh(&psta_bmc->sleep_q.lock, &irqL); */
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
/* spin_unlock_bh(&psta_bmc->sleep_q.lock); */
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
|
||||
if(update_mask)
|
||||
{
|
||||
|
@ -3231,7 +3177,6 @@ _exit:
|
|||
|
||||
void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *psta)
|
||||
{
|
||||
_irqL irqL;
|
||||
u8 wmmps_ac=0;
|
||||
_list *xmitframe_plist, *xmitframe_phead;
|
||||
struct xmit_frame *pxmitframe=NULL;
|
||||
|
@ -3239,8 +3184,8 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
|
|||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
|
||||
|
||||
/* _enter_critical_bh(&psta->sleep_q.lock, &irqL); */
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
/* spin_lock_bh(&psta->sleep_q.lock); */
|
||||
spin_lock_bh(&pxmitpriv->lock);
|
||||
|
||||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
@ -3251,8 +3196,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
|
|||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
|
||||
switch(pxmitframe->attrib.priority)
|
||||
{
|
||||
switch(pxmitframe->attrib.priority) {
|
||||
case 1:
|
||||
case 2:
|
||||
wmmps_ac = psta->uapsd_bk&BIT(1);
|
||||
|
@ -3280,43 +3224,29 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
|
|||
psta->sleepq_len--;
|
||||
psta->sleepq_ac_len--;
|
||||
|
||||
if(psta->sleepq_ac_len>0)
|
||||
{
|
||||
if(psta->sleepq_ac_len>0) {
|
||||
pxmitframe->attrib.mdata = 1;
|
||||
pxmitframe->attrib.eosp = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
pxmitframe->attrib.mdata = 0;
|
||||
pxmitframe->attrib.eosp = 1;
|
||||
}
|
||||
|
||||
pxmitframe->attrib.triggered = 1;
|
||||
|
||||
/*
|
||||
if(rtw_hal_xmit(padapter, pxmitframe) == true)
|
||||
{
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
}
|
||||
*/
|
||||
rtw_hal_xmitframe_enqueue(padapter, pxmitframe);
|
||||
|
||||
if((psta->sleepq_ac_len==0) && (!psta->has_legacy_ac) && (wmmps_ac))
|
||||
{
|
||||
pstapriv->tim_bitmap &= ~BIT(psta->aid);
|
||||
|
||||
/* DBG_871X("wakeup to xmit, qlen==0, update_BCNTIM, tim=%x\n", pstapriv->tim_bitmap); */
|
||||
/* upate BCN for TIM IE */
|
||||
/* update_BCNTIM(padapter); */
|
||||
update_beacon(padapter, _TIM_IE_, NULL, false);
|
||||
/* update_mask = BIT(0); */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* _exit_critical_bh(&psta->sleep_q.lock, &irqL); */
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -3326,16 +3256,15 @@ void enqueue_pending_xmitbuf(
|
|||
struct xmit_priv *pxmitpriv,
|
||||
struct xmit_buf *pxmitbuf)
|
||||
{
|
||||
_irqL irql;
|
||||
_queue *pqueue;
|
||||
struct adapter *pri_adapter = pxmitpriv->adapter;
|
||||
|
||||
pqueue = &pxmitpriv->pending_xmitbuf_queue;
|
||||
|
||||
_enter_critical_bh(&pqueue->lock, &irql);
|
||||
spin_lock_bh(&pqueue->lock, &irql);
|
||||
rtw_list_delete(&pxmitbuf->list);
|
||||
rtw_list_insert_tail(&pxmitbuf->list, get_list_head(pqueue));
|
||||
_exit_critical_bh(&pqueue->lock, &irql);
|
||||
spin_unlock_bh(&pqueue->lock, &irql);
|
||||
|
||||
_rtw_up_sema(&(pri_adapter->xmitpriv.xmit_sema));
|
||||
}
|
||||
|
@ -3343,7 +3272,6 @@ void enqueue_pending_xmitbuf(
|
|||
struct xmit_buf* dequeue_pending_xmitbuf(
|
||||
struct xmit_priv *pxmitpriv)
|
||||
{
|
||||
_irqL irql;
|
||||
struct xmit_buf *pxmitbuf;
|
||||
_queue *pqueue;
|
||||
|
||||
|
@ -3351,7 +3279,7 @@ struct xmit_buf* dequeue_pending_xmitbuf(
|
|||
pxmitbuf = NULL;
|
||||
pqueue = &pxmitpriv->pending_xmitbuf_queue;
|
||||
|
||||
_enter_critical_bh(&pqueue->lock, &irql);
|
||||
spin_lock_bh(&pqueue->lock, &irql);
|
||||
|
||||
if (_rtw_queue_empty(pqueue) == false)
|
||||
{
|
||||
|
@ -3363,7 +3291,7 @@ struct xmit_buf* dequeue_pending_xmitbuf(
|
|||
rtw_list_delete(&pxmitbuf->list);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pqueue->lock, &irql);
|
||||
spin_unlock_bh(&pqueue->lock, &irql);
|
||||
|
||||
return pxmitbuf;
|
||||
}
|
||||
|
@ -3371,7 +3299,6 @@ struct xmit_buf* dequeue_pending_xmitbuf(
|
|||
struct xmit_buf* dequeue_pending_xmitbuf_under_survey(
|
||||
struct xmit_priv *pxmitpriv)
|
||||
{
|
||||
_irqL irql;
|
||||
struct xmit_buf *pxmitbuf;
|
||||
struct xmit_frame *pxmitframe;
|
||||
_queue *pqueue;
|
||||
|
@ -3380,7 +3307,7 @@ struct xmit_buf* dequeue_pending_xmitbuf_under_survey(
|
|||
pxmitbuf = NULL;
|
||||
pqueue = &pxmitpriv->pending_xmitbuf_queue;
|
||||
|
||||
_enter_critical_bh(&pqueue->lock, &irql);
|
||||
spin_lock_bh(&pqueue->lock, &irql);
|
||||
|
||||
if (_rtw_queue_empty(pqueue) == false)
|
||||
{
|
||||
|
@ -3412,7 +3339,7 @@ struct xmit_buf* dequeue_pending_xmitbuf_under_survey(
|
|||
} while (1);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pqueue->lock, &irql);
|
||||
spin_unlock_bh(&pqueue->lock, &irql);
|
||||
|
||||
return pxmitbuf;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue