rtl8188eu: Fix some edit errors from replace spin lock wrappers

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2014-11-28 18:42:41 -06:00
parent 238f9a6fa1
commit 849d585656
16 changed files with 292 additions and 294 deletions

View file

@ -61,11 +61,9 @@ void free_mlme_ap_info(struct adapter *padapter)
/* free bc/mc sta_info */ /* free bc/mc sta_info */
psta = rtw_get_bcmc_stainfo(padapter); psta = rtw_get_bcmc_stainfo(padapter);
spin_lock(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
rtw_free_stainfo(padapter, psta); rtw_free_stainfo(padapter, psta);
spin_unlock(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
_rtw_spinlock_free(&pmlmepriv->bcn_update_lock);
} }
static void update_BCNTIM(struct adapter *padapter) static void update_BCNTIM(struct adapter *padapter)
@ -96,7 +94,7 @@ static void update_BCNTIM(struct adapter *padapter)
} else { } else {
tim_ielen = 0; tim_ielen = 0;
/* calucate head_len */ /* calculate head_len */
offset = _FIXED_IE_LENGTH_; offset = _FIXED_IE_LENGTH_;
offset += pnetwork_mlmeext->Ssid.SsidLength + 2; offset += pnetwork_mlmeext->Ssid.SsidLength + 2;
@ -131,7 +129,7 @@ static void update_BCNTIM(struct adapter *padapter)
*dst_ie++ = tim_ielen; *dst_ie++ = tim_ielen;
*dst_ie++ = 0;/* DTIM count */ *dst_ie++ = 0;/* DTIM count */
*dst_ie++ = 1;/* DTIM peroid */ *dst_ie++ = 1;/* DTIM period */
if (pstapriv->tim_bitmap&BIT(0))/* for bc/mc frames */ if (pstapriv->tim_bitmap&BIT(0))/* for bc/mc frames */
*dst_ie++ = BIT(0);/* bitmap ctrl */ *dst_ie++ = BIT(0);/* bitmap ctrl */
@ -284,7 +282,7 @@ void expire_timeout_chk(struct adapter *padapter)
char chk_alive_list[NUM_STA]; char chk_alive_list[NUM_STA];
int i; int i;
spin_lock(&pstapriv->auth_list_lock); spin_lock_bh(&pstapriv->auth_list_lock);
phead = &pstapriv->auth_list; phead = &pstapriv->auth_list;
plist = get_next(phead); plist = get_next(phead);
@ -303,22 +301,22 @@ void expire_timeout_chk(struct adapter *padapter)
DBG_88E("auth expire %6ph\n", DBG_88E("auth expire %6ph\n",
psta->hwaddr); psta->hwaddr);
spin_unlock(&pstapriv->auth_list_lock); spin_unlock_bh(&pstapriv->auth_list_lock);
spin_lock(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
rtw_free_stainfo(padapter, psta); rtw_free_stainfo(padapter, psta);
spin_unlock(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
spin_lock(&pstapriv->auth_list_lock); spin_lock_bh(&pstapriv->auth_list_lock);
} }
} }
} }
spin_unlock(&pstapriv->auth_list_lock); spin_unlock_bh(&pstapriv->auth_list_lock);
psta = NULL; psta = NULL;
spin_lock(&pstapriv->asoc_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list; phead = &pstapriv->asoc_list;
plist = get_next(phead); plist = get_next(phead);
@ -385,7 +383,7 @@ void expire_timeout_chk(struct adapter *padapter)
} }
} }
spin_unlock(&pstapriv->asoc_list_lock); spin_unlock_bh(&pstapriv->asoc_list_lock);
if (chk_alive_num) { if (chk_alive_num) {
u8 backup_oper_channel = 0; u8 backup_oper_channel = 0;
@ -422,11 +420,11 @@ void expire_timeout_chk(struct adapter *padapter)
psta->keep_alive_trycnt = 0; psta->keep_alive_trycnt = 0;
DBG_88E("asoc expire %pM, state = 0x%x\n", (psta->hwaddr), psta->state); DBG_88E("asoc expire %pM, state = 0x%x\n", (psta->hwaddr), psta->state);
spin_lock(&pstapriv->asoc_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock);
rtw_list_delete(&psta->asoc_list); rtw_list_delete(&psta->asoc_list);
pstapriv->asoc_list_cnt--; pstapriv->asoc_list_cnt--;
updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING); updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
spin_unlock(&pstapriv->asoc_list_lock); spin_unlock_bh(&pstapriv->asoc_list_lock);
} }
if (backup_oper_channel > 0) /* back to the original operation channel */ if (backup_oper_channel > 0) /* back to the original operation channel */
@ -601,9 +599,9 @@ void update_bmc_sta(struct adapter *padapter)
rtw_sta_media_status_rpt(padapter, psta, 1); rtw_sta_media_status_rpt(padapter, psta, 1);
spin_lock(&psta->lock); spin_lock_bh(&psta->lock);
psta->state = _FW_LINKED; psta->state = _FW_LINKED;
spin_unlock(&psta->lock); spin_unlock_bh(&psta->lock);
} else { } else {
DBG_88E("add_RATid_bmc_sta error!\n"); DBG_88E("add_RATid_bmc_sta error!\n");
@ -675,9 +673,9 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
_rtw_memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats)); _rtw_memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
spin_lock(&psta->lock); spin_lock_bh(&psta->lock);
psta->state |= _FW_LINKED; psta->state |= _FW_LINKED;
spin_unlock(&psta->lock); spin_unlock_bh(&psta->lock);
} }
static void update_hw_ht_param(struct adapter *padapter) static void update_hw_ht_param(struct adapter *padapter)
@ -1143,7 +1141,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
if ((NUM_ACL-1) < pacl_list->num) if ((NUM_ACL-1) < pacl_list->num)
return -1; return -1;
spin_lock(&pacl_node_q->lock); spin_lock_bh(&pacl_node_q->lock);
phead = get_list_head(pacl_node_q); phead = get_list_head(pacl_node_q);
plist = get_next(phead); plist = get_next(phead);
@ -1161,12 +1159,12 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
} }
} }
spin_unlock(&pacl_node_q->lock); spin_unlock_bh(&pacl_node_q->lock);
if (added) if (added)
return ret; return ret;
spin_lock(&pacl_node_q->lock); spin_lock_bh(&pacl_node_q->lock);
for (i = 0; i < NUM_ACL; i++) { for (i = 0; i < NUM_ACL; i++) {
paclnode = &pacl_list->aclnode[i]; paclnode = &pacl_list->aclnode[i];
@ -1188,7 +1186,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
DBG_88E("%s, acl_num =%d\n", __func__, pacl_list->num); DBG_88E("%s, acl_num =%d\n", __func__, pacl_list->num);
spin_unlock(&pacl_node_q->lock); spin_unlock_bh(&pacl_node_q->lock);
return ret; return ret;
} }
@ -1204,7 +1202,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
DBG_88E("%s(acl_num =%d) =%pM\n", __func__, pacl_list->num, (addr)); DBG_88E("%s(acl_num =%d) =%pM\n", __func__, pacl_list->num, (addr));
spin_lock(&pacl_node_q->lock); spin_lock_bh(&pacl_node_q->lock);
phead = get_list_head(pacl_node_q); phead = get_list_head(pacl_node_q);
plist = get_next(phead); plist = get_next(phead);
@ -1224,7 +1222,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
} }
} }
spin_unlock(&pacl_node_q->lock); spin_unlock_bh(&pacl_node_q->lock);
DBG_88E("%s, acl_num =%d\n", __func__, pacl_list->num); DBG_88E("%s, acl_num =%d\n", __func__, pacl_list->num);
return ret; return ret;
@ -1379,7 +1377,7 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
if (!pmlmeext->bstart_bss) if (!pmlmeext->bstart_bss)
return; return;
spin_lock(&pmlmepriv->bcn_update_lock); spin_lock_bh(&pmlmepriv->bcn_update_lock);
switch (ie_id) { switch (ie_id) {
case 0xFF: case 0xFF:
@ -1409,7 +1407,7 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
pmlmepriv->update_bcn = true; pmlmepriv->update_bcn = true;
spin_unlock(&pmlmepriv->bcn_update_lock); spin_unlock_bh(&pmlmepriv->bcn_update_lock);
if (tx) if (tx)
set_tx_beacon_cmd(padapter); set_tx_beacon_cmd(padapter);
@ -1502,7 +1500,7 @@ void associated_clients_update(struct adapter *padapter, u8 updated)
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
spin_lock(&pstapriv->asoc_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list; phead = &pstapriv->asoc_list;
plist = get_next(phead); plist = get_next(phead);
@ -1515,7 +1513,7 @@ void associated_clients_update(struct adapter *padapter, u8 updated)
VCS_update(padapter, psta); VCS_update(padapter, psta);
} }
spin_unlock(&pstapriv->asoc_list_lock); spin_unlock_bh(&pstapriv->asoc_list_lock);
} }
} }
@ -1744,9 +1742,9 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta,
rtw_clearstakey_cmd(padapter, (u8 *)psta, (u8)(psta->mac_id + 3), true); rtw_clearstakey_cmd(padapter, (u8 *)psta, (u8)(psta->mac_id + 3), true);
spin_lock(&psta->lock); spin_lock_bh(&psta->lock);
psta->state &= ~_FW_LINKED; psta->state &= ~_FW_LINKED;
spin_unlock(&psta->lock); spin_unlock_bh(&psta->lock);
rtw_indicate_sta_disassoc_event(padapter, psta); rtw_indicate_sta_disassoc_event(padapter, psta);
@ -1754,9 +1752,9 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta,
beacon_updated = bss_cap_update_on_sta_leave(padapter, psta); beacon_updated = bss_cap_update_on_sta_leave(padapter, psta);
spin_lock(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
rtw_free_stainfo(padapter, psta); rtw_free_stainfo(padapter, psta);
spin_unlock(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
return beacon_updated; return beacon_updated;
} }
@ -1777,7 +1775,7 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
DBG_88E(FUNC_NDEV_FMT" with ch:%u, offset:%u\n", DBG_88E(FUNC_NDEV_FMT" with ch:%u, offset:%u\n",
FUNC_NDEV_ARG(padapter->pnetdev), new_ch, ch_offset); FUNC_NDEV_ARG(padapter->pnetdev), new_ch, ch_offset);
spin_lock(&pstapriv->asoc_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list; phead = &pstapriv->asoc_list;
plist = get_next(phead); plist = get_next(phead);
@ -1789,7 +1787,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); 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); psta->expire_to = ((pstapriv->expire_to * 2) > 5) ? 5 : (pstapriv->expire_to * 2);
} }
spin_unlock(&pstapriv->asoc_list_lock); spin_unlock_bh(&pstapriv->asoc_list_lock);
issue_action_spct_ch_switch(padapter, bc_addr, new_ch, ch_offset); issue_action_spct_ch_switch(padapter, bc_addr, new_ch, ch_offset);
@ -1811,7 +1809,7 @@ int rtw_sta_flush(struct adapter *padapter)
if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE) if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE)
return ret; return ret;
spin_lock(&pstapriv->asoc_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list; phead = &pstapriv->asoc_list;
plist = get_next(phead); plist = get_next(phead);
@ -1826,7 +1824,7 @@ int rtw_sta_flush(struct adapter *padapter)
ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING); ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
} }
spin_unlock(&pstapriv->asoc_list_lock); spin_unlock_bh(&pstapriv->asoc_list_lock);
issue_deauth(padapter, bc_addr, WLAN_REASON_DEAUTH_LEAVING); issue_deauth(padapter, bc_addr, WLAN_REASON_DEAUTH_LEAVING);
@ -1942,7 +1940,7 @@ void stop_ap_mode(struct adapter *padapter)
padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled; padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled;
/* for ACL */ /* for ACL */
spin_lock(&pacl_node_q->lock); spin_lock_bh(&pacl_node_q->lock);
phead = get_list_head(pacl_node_q); phead = get_list_head(pacl_node_q);
plist = get_next(phead); plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == false) { while ((rtw_end_of_queue_search(phead, plist)) == false) {
@ -1957,7 +1955,7 @@ void stop_ap_mode(struct adapter *padapter)
pacl_list->num--; pacl_list->num--;
} }
} }
spin_unlock(&pacl_node_q->lock); spin_unlock_bh(&pacl_node_q->lock);
DBG_88E("%s, free acl_node_queue, num =%d\n", __func__, pacl_list->num); DBG_88E("%s, free acl_node_queue, num =%d\n", __func__, pacl_list->num);
@ -1967,9 +1965,9 @@ void stop_ap_mode(struct adapter *padapter)
rtw_free_all_stainfo(padapter); rtw_free_all_stainfo(padapter);
psta = rtw_get_bcmc_stainfo(padapter); psta = rtw_get_bcmc_stainfo(padapter);
spin_lock(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
rtw_free_stainfo(padapter, psta); rtw_free_stainfo(padapter, psta);
spin_unlock(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
rtw_init_bcmc_stainfo(padapter); rtw_init_bcmc_stainfo(padapter);

View file

@ -354,7 +354,7 @@ static int __nat25_db_network_lookup_and_replace(struct adapter *priv,
{ {
struct nat25_network_db_entry *db; struct nat25_network_db_entry *db;
spin_lock(&priv->br_ext_lock); spin_lock_bh(&priv->br_ext_lock);
db = priv->nethash[__nat25_network_hash(networkAddr)]; db = priv->nethash[__nat25_network_hash(networkAddr)];
while (db != NULL) { while (db != NULL) {
@ -390,12 +390,12 @@ static int __nat25_db_network_lookup_and_replace(struct adapter *priv,
db->networkAddr[15], db->networkAddr[15],
db->networkAddr[16]); db->networkAddr[16]);
} }
spin_unlock(&priv->br_ext_lock); spin_unlock_bh(&priv->br_ext_lock);
return 1; return 1;
} }
db = db->next_hash; db = db->next_hash;
} }
spin_unlock(&priv->br_ext_lock); spin_unlock_bh(&priv->br_ext_lock);
return 0; return 0;
} }
@ -405,21 +405,21 @@ static void __nat25_db_network_insert(struct adapter *priv,
struct nat25_network_db_entry *db; struct nat25_network_db_entry *db;
int hash; int hash;
spin_lock(&priv->br_ext_lock); spin_lock_bh(&priv->br_ext_lock);
hash = __nat25_network_hash(networkAddr); hash = __nat25_network_hash(networkAddr);
db = priv->nethash[hash]; db = priv->nethash[hash];
while (db != NULL) { while (db != NULL) {
if (!memcmp(db->networkAddr, networkAddr, MAX_NETWORK_ADDR_LEN)) { if (!memcmp(db->networkAddr, networkAddr, MAX_NETWORK_ADDR_LEN)) {
memcpy(db->macAddr, macAddr, ETH_ALEN); memcpy(db->macAddr, macAddr, ETH_ALEN);
db->ageing_timer = jiffies; db->ageing_timer = jiffies;
spin_unlock(&priv->br_ext_lock); spin_unlock_bh(&priv->br_ext_lock);
return; return;
} }
db = db->next_hash; db = db->next_hash;
} }
db = (struct nat25_network_db_entry *) rtw_malloc(sizeof(*db)); db = (struct nat25_network_db_entry *) rtw_malloc(sizeof(*db));
if (db == NULL) { if (db == NULL) {
spin_unlock(&priv->br_ext_lock); spin_unlock_bh(&priv->br_ext_lock);
return; return;
} }
memcpy(db->networkAddr, networkAddr, MAX_NETWORK_ADDR_LEN); memcpy(db->networkAddr, networkAddr, MAX_NETWORK_ADDR_LEN);
@ -429,7 +429,7 @@ static void __nat25_db_network_insert(struct adapter *priv,
__network_hash_link(priv, db, hash); __network_hash_link(priv, db, hash);
spin_unlock(&priv->br_ext_lock); spin_unlock_bh(&priv->br_ext_lock);
} }
static void __nat25_db_print(struct adapter *priv) static void __nat25_db_print(struct adapter *priv)
@ -444,7 +444,7 @@ void nat25_db_cleanup(struct adapter *priv)
{ {
int i; int i;
spin_lock(&priv->br_ext_lock); spin_lock_bh(&priv->br_ext_lock);
for (i = 0; i < NAT25_HASH_SIZE; i++) { for (i = 0; i < NAT25_HASH_SIZE; i++) {
struct nat25_network_db_entry *f; struct nat25_network_db_entry *f;
@ -463,14 +463,14 @@ void nat25_db_cleanup(struct adapter *priv)
f = g; f = g;
} }
} }
spin_unlock(&priv->br_ext_lock); spin_unlock_bh(&priv->br_ext_lock);
} }
void nat25_db_expire(struct adapter *priv) void nat25_db_expire(struct adapter *priv)
{ {
int i; int i;
spin_lock(&priv->br_ext_lock); spin_lock_bh(&priv->br_ext_lock);
for (i = 0; i < NAT25_HASH_SIZE; i++) { for (i = 0; i < NAT25_HASH_SIZE; i++) {
struct nat25_network_db_entry *f; struct nat25_network_db_entry *f;
@ -494,7 +494,7 @@ void nat25_db_expire(struct adapter *priv)
f = g; f = g;
} }
} }
spin_unlock(&priv->br_ext_lock); spin_unlock_bh(&priv->br_ext_lock);
} }
int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method) int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
@ -1059,7 +1059,7 @@ int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb)
} }
if (!priv->ethBrExtInfo.nat25_disable) { if (!priv->ethBrExtInfo.nat25_disable) {
spin_lock(&priv->br_ext_lock); spin_lock_bh(&priv->br_ext_lock);
/* /*
* This function look up the destination network address from * This function look up the destination network address from
* the NAT2.5 database. Return value = -1 means that the * the NAT2.5 database. Return value = -1 means that the
@ -1070,9 +1070,9 @@ int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb)
!memcmp(priv->scdb_ip, skb->data+ETH_HLEN+16, 4)) { !memcmp(priv->scdb_ip, skb->data+ETH_HLEN+16, 4)) {
memcpy(skb->data, priv->scdb_mac, ETH_ALEN); memcpy(skb->data, priv->scdb_mac, ETH_ALEN);
spin_unlock(&priv->br_ext_lock); spin_unlock_bh(&priv->br_ext_lock);
} else { } else {
spin_unlock(&priv->br_ext_lock); spin_unlock_bh(&priv->br_ext_lock);
retval = nat25_db_handle(priv, skb, NAT25_LOOKUP); retval = nat25_db_handle(priv, skb, NAT25_LOOKUP);
} }

View file

@ -2200,9 +2200,9 @@ void rtw_disassoc_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
_func_enter_; _func_enter_;
if (pcmd->res != H2C_SUCCESS) { if (pcmd->res != H2C_SUCCESS) {
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
set_fwstate(pmlmepriv, _FW_LINKED); set_fwstate(pmlmepriv, _FW_LINKED);
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\n ***Error: disconnect_cmd_callback Fail ***\n.")); RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\n ***Error: disconnect_cmd_callback Fail ***\n."));
@ -2256,7 +2256,7 @@ _func_enter_;
_cancel_timer(&pmlmepriv->assoc_timer, &timer_cancelled); _cancel_timer(&pmlmepriv->assoc_timer, &timer_cancelled);
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
psta = rtw_get_stainfo(&padapter->stapriv, pnetwork->MacAddress); psta = rtw_get_stainfo(&padapter->stapriv, pnetwork->MacAddress);
@ -2272,12 +2272,12 @@ _func_enter_;
} else { } else {
pwlan = _rtw_alloc_network(pmlmepriv); pwlan = _rtw_alloc_network(pmlmepriv);
spin_lock(&(pmlmepriv->scanned_queue.lock)); spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
if (pwlan == NULL) { if (pwlan == NULL) {
pwlan = rtw_get_oldest_wlan_network(&pmlmepriv->scanned_queue); pwlan = rtw_get_oldest_wlan_network(&pmlmepriv->scanned_queue);
if (pwlan == NULL) { if (pwlan == NULL) {
RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\n Error: can't get pwlan in rtw_joinbss_event_callback\n")); RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\n Error: can't get pwlan in rtw_joinbss_event_callback\n"));
spin_unlock(&(pmlmepriv->scanned_queue.lock)); spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
goto createbss_cmd_fail; goto createbss_cmd_fail;
} }
pwlan->last_scanned = rtw_get_current_time(); pwlan->last_scanned = rtw_get_current_time();
@ -2292,13 +2292,13 @@ _func_enter_;
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
spin_unlock(&(pmlmepriv->scanned_queue.lock)); 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) */ /* we will set _FW_LINKED when there is one more sat to join us (rtw_stassoc_event_callback) */
} }
createbss_cmd_fail: createbss_cmd_fail:
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
rtw_free_cmd_obj(pcmd); rtw_free_cmd_obj(pcmd);
@ -2340,13 +2340,13 @@ _func_enter_;
psta->aid = passocsta_rsp->cam_id; psta->aid = passocsta_rsp->cam_id;
psta->mac_id = passocsta_rsp->cam_id; psta->mac_id = passocsta_rsp->cam_id;
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) && (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)) if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) && (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true))
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
set_fwstate(pmlmepriv, _FW_LINKED); set_fwstate(pmlmepriv, _FW_LINKED);
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
exit: exit:
rtw_free_cmd_obj(pcmd); rtw_free_cmd_obj(pcmd);

View file

@ -847,7 +847,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); len += snprintf(page + len, count - len, "sta_dz_bitmap=0x%x, tim_bitmap=0x%x\n", pstapriv->sta_dz_bitmap, pstapriv->tim_bitmap);
spin_lock(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
for (i = 0; i < NUM_STA; i++) { for (i = 0; i < NUM_STA; i++) {
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
@ -881,7 +881,7 @@ int proc_get_all_sta_info(char *page, char **start,
} }
} }
} }
spin_unlock(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
*eof = 1; *eof = 1;
return len; return len;

View file

@ -76,7 +76,7 @@ u8 rtw_do_join(struct adapter *padapter)
_func_enter_; _func_enter_;
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
@ -91,7 +91,7 @@ _func_enter_;
pmlmepriv->to_join = true; pmlmepriv->to_join = true;
if (_rtw_queue_empty(queue)) { if (_rtw_queue_empty(queue)) {
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
/* when set_ssid/set_bssid for rtw_do_join(), but scanning queue is empty */ /* when set_ssid/set_bssid for rtw_do_join(), but scanning queue is empty */
@ -115,7 +115,7 @@ _func_enter_;
} else { } else {
int select_ret; int select_ret;
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
select_ret = rtw_select_and_join_from_scanned_queue(pmlmepriv); select_ret = rtw_select_and_join_from_scanned_queue(pmlmepriv);
if (select_ret == _SUCCESS) { if (select_ret == _SUCCESS) {
pmlmepriv->to_join = false; pmlmepriv->to_join = false;
@ -193,7 +193,7 @@ _func_enter_;
goto exit; goto exit;
} }
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
DBG_88E("Set BSSID under fw_state = 0x%08x\n", get_fwstate(pmlmepriv)); DBG_88E("Set BSSID under fw_state = 0x%08x\n", get_fwstate(pmlmepriv));
@ -251,7 +251,7 @@ handle_tkip_countermeasure:
status = rtw_do_join(padapter); status = rtw_do_join(padapter);
release_mlme_lock: release_mlme_lock:
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
exit: exit:
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
@ -282,7 +282,7 @@ _func_enter_;
goto exit; goto exit;
} }
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
DBG_88E("Set SSID under fw_state = 0x%08x\n", get_fwstate(pmlmepriv)); DBG_88E("Set SSID under fw_state = 0x%08x\n", get_fwstate(pmlmepriv));
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) { if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
@ -364,7 +364,7 @@ handle_tkip_countermeasure:
} }
release_mlme_lock: release_mlme_lock:
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
exit: exit:
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
@ -387,7 +387,7 @@ _func_enter_;
*pold_state, networktype, get_fwstate(pmlmepriv))); *pold_state, networktype, get_fwstate(pmlmepriv)));
if (*pold_state != networktype) { if (*pold_state != networktype) {
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, (" change mode!")); RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, (" change mode!"));
/* DBG_88E("change mode, old_mode =%d, new_mode =%d, fw_state = 0x%x\n", *pold_state, networktype, get_fwstate(pmlmepriv)); */ /* DBG_88E("change mode, old_mode =%d, new_mode =%d, fw_state = 0x%x\n", *pold_state, networktype, get_fwstate(pmlmepriv)); */
@ -435,7 +435,7 @@ _func_enter_;
case Ndis802_11InfrastructureMax: case Ndis802_11InfrastructureMax:
break; break;
} }
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
} }
_func_exit_; _func_exit_;
@ -450,7 +450,7 @@ u8 rtw_set_802_11_disassociate(struct adapter *padapter)
_func_enter_; _func_enter_;
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
if (check_fwstate(pmlmepriv, _FW_LINKED)) { if (check_fwstate(pmlmepriv, _FW_LINKED)) {
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
@ -462,7 +462,7 @@ _func_enter_;
rtw_pwr_wakeup(padapter); rtw_pwr_wakeup(padapter);
} }
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
_func_exit_; _func_exit_;
@ -506,11 +506,11 @@ _func_enter_;
return _SUCCESS; return _SUCCESS;
} }
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
res = rtw_sitesurvey_cmd(padapter, pssid, ssid_max_num, NULL, 0); res = rtw_sitesurvey_cmd(padapter, pssid, ssid_max_num, NULL, 0);
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
} }
exit: exit:

View file

@ -165,11 +165,11 @@ _func_enter_;
if (pnetwork == NULL) if (pnetwork == NULL)
goto exit; goto exit;
spin_lock(&queue->lock); spin_lock_bh(&queue->lock);
rtw_list_insert_tail(&pnetwork->list, &queue->queue); rtw_list_insert_tail(&pnetwork->list, &queue->queue);
spin_unlock(&queue->lock); spin_unlock_bh(&queue->lock);
exit: exit:
@ -184,7 +184,7 @@ struct wlan_network *_rtw_dequeue_network(struct __queue *queue)
_func_enter_; _func_enter_;
spin_lock(&queue->lock); spin_lock_bh(&queue->lock);
if (_rtw_queue_empty(queue)) { if (_rtw_queue_empty(queue)) {
pnetwork = NULL; pnetwork = NULL;
@ -194,7 +194,7 @@ _func_enter_;
rtw_list_delete(&(pnetwork->list)); rtw_list_delete(&(pnetwork->list));
} }
spin_unlock(&queue->lock); spin_unlock_bh(&queue->lock);
_func_exit_; _func_exit_;
@ -209,7 +209,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *f
_func_enter_; _func_enter_;
spin_lock(&free_queue->lock); spin_lock_bh(&free_queue->lock);
if (_rtw_queue_empty(free_queue) == true) { if (_rtw_queue_empty(free_queue) == true) {
pnetwork = NULL; pnetwork = NULL;
@ -231,7 +231,7 @@ _func_enter_;
pmlmepriv->num_of_scanned++; pmlmepriv->num_of_scanned++;
exit: exit:
spin_unlock(&free_queue->lock); spin_unlock_bh(&free_queue->lock);
_func_exit_; _func_exit_;
@ -260,11 +260,11 @@ _func_enter_;
if (delta_time < lifetime)/* unit:sec */ if (delta_time < lifetime)/* unit:sec */
goto exit; goto exit;
} }
spin_lock(&free_queue->lock); spin_lock_bh(&free_queue->lock);
rtw_list_delete(&(pnetwork->list)); rtw_list_delete(&(pnetwork->list));
rtw_list_insert_tail(&(pnetwork->list), &(free_queue->queue)); rtw_list_insert_tail(&(pnetwork->list), &(free_queue->queue));
pmlmepriv->num_of_scanned--; pmlmepriv->num_of_scanned--;
spin_unlock(&free_queue->lock); spin_unlock_bh(&free_queue->lock);
exit: exit:
_func_exit_; _func_exit_;
@ -330,7 +330,7 @@ void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
_func_enter_; _func_enter_;
spin_lock(&scanned_queue->lock); spin_lock_bh(&scanned_queue->lock);
phead = get_list_head(scanned_queue); phead = get_list_head(scanned_queue);
plist = get_next(phead); plist = get_next(phead);
@ -342,7 +342,7 @@ _func_enter_;
_rtw_free_network(pmlmepriv, pnetwork, isfreeall); _rtw_free_network(pmlmepriv, pnetwork, isfreeall);
} }
spin_unlock(&scanned_queue->lock); spin_unlock_bh(&scanned_queue->lock);
_func_exit_; _func_exit_;
} }
@ -613,7 +613,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
_func_enter_; _func_enter_;
spin_lock(&queue->lock); spin_lock_bh(&queue->lock);
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
@ -694,7 +694,7 @@ _func_enter_;
} }
exit: exit:
spin_unlock(&queue->lock); spin_unlock_bh(&queue->lock);
_func_exit_; _func_exit_;
} }
@ -798,7 +798,7 @@ _func_enter_;
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("\n****rtw_survey_event_callback: return a wrong bss ***\n")); RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("\n****rtw_survey_event_callback: return a wrong bss ***\n"));
return; return;
} }
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
/* update IBSS_network 's timestamp */ /* update IBSS_network 's timestamp */
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) == true) { if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) == true) {
@ -806,14 +806,14 @@ _func_enter_;
struct wlan_network *ibss_wlan = NULL; struct wlan_network *ibss_wlan = NULL;
memcpy(pmlmepriv->cur_network.network.IEs, pnetwork->IEs, 8); memcpy(pmlmepriv->cur_network.network.IEs, pnetwork->IEs, 8);
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
ibss_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->MacAddress); ibss_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->MacAddress);
if (ibss_wlan) { if (ibss_wlan) {
memcpy(ibss_wlan->network.IEs , pnetwork->IEs, 8); memcpy(ibss_wlan->network.IEs , pnetwork->IEs, 8);
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
goto exit; goto exit;
} }
spin_unlock(&(pmlmepriv->scanned_queue.lock)); spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
} }
} }
@ -826,7 +826,7 @@ _func_enter_;
exit: exit:
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
_func_exit_; _func_exit_;
@ -842,7 +842,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
u8 timer_cancelled = 0; u8 timer_cancelled = 0;
_func_enter_; _func_enter_;
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
if (pmlmepriv->wps_probe_req_ie) { if (pmlmepriv->wps_probe_req_ie) {
pmlmepriv->wps_probe_req_ie_len = 0; pmlmepriv->wps_probe_req_ie_len = 0;
@ -860,12 +860,12 @@ _func_enter_;
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("nic status=%x, survey done event comes too late!\n", get_fwstate(pmlmepriv))); RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("nic status=%x, survey done event comes too late!\n", get_fwstate(pmlmepriv)));
} }
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
if (timer_cancelled) if (timer_cancelled)
_cancel_timer(&pmlmepriv->scan_to_timer, &timer_cancelled); _cancel_timer(&pmlmepriv->scan_to_timer, &timer_cancelled);
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
rtw_set_signal_stat_timer(&adapter->recvpriv); rtw_set_signal_stat_timer(&adapter->recvpriv);
if (pmlmepriv->to_join) { if (pmlmepriv->to_join) {
@ -928,7 +928,7 @@ _func_enter_;
indicate_wx_scan_complete_event(adapter); indicate_wx_scan_complete_event(adapter);
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
p2p_ps_wk_cmd(adapter, P2P_PS_SCAN_DONE, 0); p2p_ps_wk_cmd(adapter, P2P_PS_SCAN_DONE, 0);
@ -956,8 +956,8 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
_func_enter_; _func_enter_;
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+free_scanqueue\n")); RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+free_scanqueue\n"));
spin_lock(&scan_queue->lock); spin_lock_bh(&scan_queue->lock);
spin_lock(&free_queue->lock); spin_lock_bh(&free_queue->lock);
phead = get_list_head(scan_queue); phead = get_list_head(scan_queue);
plist = get_next(phead); plist = get_next(phead);
@ -970,8 +970,8 @@ _func_enter_;
pmlmepriv->num_of_scanned--; pmlmepriv->num_of_scanned--;
} }
spin_unlock(&free_queue->lock); spin_unlock_bh(&free_queue->lock);
spin_unlock(&scan_queue->lock); spin_unlock_bh(&scan_queue->lock);
_func_exit_; _func_exit_;
} }
@ -998,9 +998,9 @@ _func_enter_;
psta = rtw_get_stainfo(&adapter->stapriv, tgt_network->network.MacAddress); psta = rtw_get_stainfo(&adapter->stapriv, tgt_network->network.MacAddress);
spin_lock(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
rtw_free_stainfo(adapter, psta); rtw_free_stainfo(adapter, psta);
spin_unlock(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
} }
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE | WIFI_AP_STATE)) { if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE | WIFI_AP_STATE)) {
@ -1009,15 +1009,15 @@ _func_enter_;
rtw_free_all_stainfo(adapter); rtw_free_all_stainfo(adapter);
psta = rtw_get_bcmc_stainfo(adapter); psta = rtw_get_bcmc_stainfo(adapter);
spin_lock(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
rtw_free_stainfo(adapter, psta); rtw_free_stainfo(adapter, psta);
spin_unlock(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
rtw_init_bcmc_stainfo(adapter); rtw_init_bcmc_stainfo(adapter);
} }
if (lock_scanned_queue) if (lock_scanned_queue)
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress); pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
if (pwlan) if (pwlan)
@ -1029,7 +1029,7 @@ _func_enter_;
rtw_free_network_nolock(pmlmepriv, pwlan); rtw_free_network_nolock(pmlmepriv, pwlan);
if (lock_scanned_queue) if (lock_scanned_queue)
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
pmlmepriv->key_mask = 0; pmlmepriv->key_mask = 0;
_func_exit_; _func_exit_;
} }
@ -1278,12 +1278,12 @@ _func_enter_;
goto ignore_nolock; goto ignore_nolock;
} }
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\nrtw_joinbss_event_callback!! spin_lock_init\n")); RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\nrtw_joinbss_event_callback!! spin_lock_init\n"));
if (pnetwork->join_res > 0) { if (pnetwork->join_res > 0) {
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) { if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) {
/* s1. find ptarget_wlan */ /* s1. find ptarget_wlan */
if (check_fwstate(pmlmepriv, _FW_LINKED)) { if (check_fwstate(pmlmepriv, _FW_LINKED)) {
@ -1296,9 +1296,9 @@ _func_enter_;
pcur_sta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress); pcur_sta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress);
if (pcur_sta) { if (pcur_sta) {
spin_lock(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
rtw_free_stainfo(adapter, pcur_sta); rtw_free_stainfo(adapter, pcur_sta);
spin_unlock(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
} }
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->network.MacAddress); ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->network.MacAddress);
@ -1320,7 +1320,7 @@ _func_enter_;
rtw_joinbss_update_network(adapter, ptarget_wlan, pnetwork); rtw_joinbss_update_network(adapter, ptarget_wlan, pnetwork);
} else { } else {
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Can't find ptarget_wlan when joinbss_event callback\n")); RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Can't find ptarget_wlan when joinbss_event callback\n"));
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
goto ignore_joinbss_callback; goto ignore_joinbss_callback;
} }
@ -1330,7 +1330,7 @@ _func_enter_;
ptarget_sta = rtw_joinbss_update_stainfo(adapter, pnetwork); ptarget_sta = rtw_joinbss_update_stainfo(adapter, pnetwork);
if (ptarget_sta == NULL) { if (ptarget_sta == NULL) {
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Can't update stainfo when joinbss_event callback\n")); RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Can't update stainfo when joinbss_event callback\n"));
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
goto ignore_joinbss_callback; goto ignore_joinbss_callback;
} }
} }
@ -1351,11 +1351,11 @@ _func_enter_;
} else { } else {
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("rtw_joinbss_event_callback err: fw_state:%x", get_fwstate(pmlmepriv))); RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("rtw_joinbss_event_callback err: fw_state:%x", get_fwstate(pmlmepriv)));
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
goto ignore_joinbss_callback; goto ignore_joinbss_callback;
} }
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
} else if (pnetwork->join_res == -4) { } else if (pnetwork->join_res == -4) {
rtw_reset_securitypriv(adapter); rtw_reset_securitypriv(adapter);
@ -1371,7 +1371,7 @@ _func_enter_;
} }
ignore_joinbss_callback: ignore_joinbss_callback:
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
ignore_nolock: ignore_nolock:
_func_exit_; _func_exit_;
} }
@ -1479,21 +1479,21 @@ _func_enter_;
if (adapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) if (adapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)
psta->dot118021XPrivacy = adapter->securitypriv.dot11PrivacyAlgrthm; psta->dot118021XPrivacy = adapter->securitypriv.dot11PrivacyAlgrthm;
psta->ieee8021x_blocked = false; psta->ieee8021x_blocked = false;
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) || if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE))) { (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE))) {
if (adapter->stapriv.asoc_sta_count == 2) { if (adapter->stapriv.asoc_sta_count == 2) {
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.MacAddress); ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
pmlmepriv->cur_network_scanned = ptarget_wlan; pmlmepriv->cur_network_scanned = ptarget_wlan;
if (ptarget_wlan) if (ptarget_wlan)
ptarget_wlan->fixed = true; ptarget_wlan->fixed = true;
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
/* a sta + bc/mc_stainfo (not Ibss_stainfo) */ /* a sta + bc/mc_stainfo (not Ibss_stainfo) */
rtw_indicate_connect(adapter); rtw_indicate_connect(adapter);
} }
} }
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
mlmeext_sta_add_event_callback(adapter, psta); mlmeext_sta_add_event_callback(adapter, psta);
exit: exit:
_func_exit_; _func_exit_;
@ -1533,7 +1533,7 @@ _func_enter_;
mlmeext_sta_del_event_callback(adapter); mlmeext_sta_del_event_callback(adapter);
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) { if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
if(adapter->registrypriv.wifi_spec == 1) if(adapter->registrypriv.wifi_spec == 1)
@ -1551,31 +1551,31 @@ _func_enter_;
rtw_free_assoc_resources(adapter, 1); rtw_free_assoc_resources(adapter, 1);
rtw_indicate_disconnect(adapter); rtw_indicate_disconnect(adapter);
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
/* remove the network entry in scanned_queue */ /* remove the network entry in scanned_queue */
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress); pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
if (pwlan) { if (pwlan) {
pwlan->fixed = false; pwlan->fixed = false;
rtw_free_network_nolock(pmlmepriv, pwlan); rtw_free_network_nolock(pmlmepriv, pwlan);
} }
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
_rtw_roaming(adapter, tgt_network); _rtw_roaming(adapter, tgt_network);
} }
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) || if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) ||
check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) { check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
spin_lock(&(pstapriv->sta_hash_lock)); spin_lock_bh(&(pstapriv->sta_hash_lock));
rtw_free_stainfo(adapter, psta); rtw_free_stainfo(adapter, psta);
spin_unlock(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
if (adapter->stapriv.asoc_sta_count == 1) { /* a sta + bc/mc_stainfo (not Ibss_stainfo) */ if (adapter->stapriv.asoc_sta_count == 1) { /* a sta + bc/mc_stainfo (not Ibss_stainfo) */
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
/* free old ibss network */ /* free old ibss network */
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress); pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
if (pwlan) { if (pwlan) {
pwlan->fixed = false; pwlan->fixed = false;
rtw_free_network_nolock(pmlmepriv, pwlan); rtw_free_network_nolock(pmlmepriv, pwlan);
} }
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
/* re-create ibss */ /* re-create ibss */
pdev_network = &(adapter->registrypriv.dev_network); pdev_network = &(adapter->registrypriv.dev_network);
pibss = adapter->registrypriv.dev_network.MacAddress; pibss = adapter->registrypriv.dev_network.MacAddress;
@ -1598,7 +1598,7 @@ _func_enter_;
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("***Error=>stadel_event_callback: rtw_createbss_cmd status FAIL***\n ")); RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("***Error=>stadel_event_callback: rtw_createbss_cmd status FAIL***\n "));
} }
} }
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
_func_exit_; _func_exit_;
} }
@ -1626,7 +1626,7 @@ _func_enter_;
return; return;
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
if (rtw_to_roaming(adapter) > 0) { /* join timeout caused by roaming */ if (rtw_to_roaming(adapter) > 0) { /* join timeout caused by roaming */
while (1) { while (1) {
@ -1649,7 +1649,7 @@ _func_enter_;
rtw_indicate_disconnect(adapter); rtw_indicate_disconnect(adapter);
free_scanqueue(pmlmepriv);/* */ free_scanqueue(pmlmepriv);/* */
} }
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
_func_exit_; _func_exit_;
} }
@ -1662,9 +1662,9 @@ void rtw_scan_timeout_handler (struct adapter *adapter)
struct mlme_priv *pmlmepriv = &adapter->mlmepriv; struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
DBG_88E(FUNC_ADPT_FMT" fw_state=%x\n", FUNC_ADPT_ARG(adapter), get_fwstate(pmlmepriv)); DBG_88E(FUNC_ADPT_FMT" fw_state=%x\n", FUNC_ADPT_ARG(adapter), get_fwstate(pmlmepriv));
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY); _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
rtw_indicate_scan_done(adapter, true); rtw_indicate_scan_done(adapter, true);
} }
@ -1806,7 +1806,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
_func_enter_; _func_enter_;
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
phead = get_list_head(queue); phead = get_list_head(queue);
adapter = (struct adapter *)pmlmepriv->nic_hdl; adapter = (struct adapter *)pmlmepriv->nic_hdl;
pmlmepriv->pscanned = get_next(phead); pmlmepriv->pscanned = get_next(phead);
@ -1853,7 +1853,7 @@ _func_enter_;
ret = rtw_joinbss_cmd(adapter, candidate); ret = rtw_joinbss_cmd(adapter, candidate);
exit: exit:
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
_func_exit_; _func_exit_;
@ -2430,9 +2430,9 @@ void rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
{ {
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
_rtw_roaming(padapter, tgt_network); _rtw_roaming(padapter, tgt_network);
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
} }
void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network) void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
{ {

View file

@ -814,24 +814,24 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
pstat->state = WIFI_FW_AUTH_NULL; pstat->state = WIFI_FW_AUTH_NULL;
pstat->auth_seq = 0; pstat->auth_seq = 0;
} else { } else {
spin_lock(&pstapriv->asoc_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock);
if (!rtw_is_list_empty(&pstat->asoc_list)) { if (!rtw_is_list_empty(&pstat->asoc_list)) {
rtw_list_delete(&pstat->asoc_list); rtw_list_delete(&pstat->asoc_list);
pstapriv->asoc_list_cnt--; pstapriv->asoc_list_cnt--;
} }
spin_unlock(&pstapriv->asoc_list_lock); spin_unlock_bh(&pstapriv->asoc_list_lock);
if (seq == 1) { if (seq == 1) {
/* TODO: STA re_auth and auth timeout */ /* TODO: STA re_auth and auth timeout */
} }
} }
spin_lock(&pstapriv->auth_list_lock); spin_lock_bh(&pstapriv->auth_list_lock);
if (rtw_is_list_empty(&pstat->auth_list)) { if (rtw_is_list_empty(&pstat->auth_list)) {
rtw_list_insert_tail(&pstat->auth_list, &pstapriv->auth_list); rtw_list_insert_tail(&pstat->auth_list, &pstapriv->auth_list);
pstapriv->auth_list_cnt++; pstapriv->auth_list_cnt++;
} }
spin_unlock(&pstapriv->auth_list_lock); spin_unlock_bh(&pstapriv->auth_list_lock);
if (pstat->auth_seq == 0) if (pstat->auth_seq == 0)
pstat->expire_to = pstapriv->auth_to; pstat->expire_to = pstapriv->auth_to;
@ -1404,20 +1404,20 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
pstat->state &= (~WIFI_FW_ASSOC_STATE); pstat->state &= (~WIFI_FW_ASSOC_STATE);
pstat->state |= WIFI_FW_ASSOC_SUCCESS; pstat->state |= WIFI_FW_ASSOC_SUCCESS;
spin_lock(&pstapriv->auth_list_lock); spin_lock_bh(&pstapriv->auth_list_lock);
if (!rtw_is_list_empty(&pstat->auth_list)) { if (!rtw_is_list_empty(&pstat->auth_list)) {
rtw_list_delete(&pstat->auth_list); rtw_list_delete(&pstat->auth_list);
pstapriv->auth_list_cnt--; pstapriv->auth_list_cnt--;
} }
spin_unlock(&pstapriv->auth_list_lock); spin_unlock_bh(&pstapriv->auth_list_lock);
spin_lock(&pstapriv->asoc_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock);
if (rtw_is_list_empty(&pstat->asoc_list)) { if (rtw_is_list_empty(&pstat->asoc_list)) {
pstat->expire_to = pstapriv->expire_to; pstat->expire_to = pstapriv->expire_to;
rtw_list_insert_tail(&pstat->asoc_list, &pstapriv->asoc_list); rtw_list_insert_tail(&pstat->asoc_list, &pstapriv->asoc_list);
pstapriv->asoc_list_cnt++; pstapriv->asoc_list_cnt++;
} }
spin_unlock(&pstapriv->asoc_list_lock); spin_unlock_bh(&pstapriv->asoc_list_lock);
/* now the station is qualified to join our BSS... */ /* now the station is qualified to join our BSS... */
if (pstat && (pstat->state & WIFI_FW_ASSOC_SUCCESS) && (_STATS_SUCCESSFUL_ == status)) { if (pstat && (pstat->state & WIFI_FW_ASSOC_SUCCESS) && (_STATS_SUCCESSFUL_ == status)) {
@ -1596,13 +1596,13 @@ unsigned int OnDeAuth(struct adapter *padapter, union recv_frame *precv_frame)
if (psta) { if (psta) {
u8 updated = 0; u8 updated = 0;
spin_lock(&pstapriv->asoc_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock);
if (!rtw_is_list_empty(&psta->asoc_list)) { if (!rtw_is_list_empty(&psta->asoc_list)) {
rtw_list_delete(&psta->asoc_list); rtw_list_delete(&psta->asoc_list);
pstapriv->asoc_list_cnt--; pstapriv->asoc_list_cnt--;
updated = ap_free_sta(padapter, psta, false, reason); updated = ap_free_sta(padapter, psta, false, reason);
} }
spin_unlock(&pstapriv->asoc_list_lock); spin_unlock_bh(&pstapriv->asoc_list_lock);
associated_clients_update(padapter, updated); associated_clients_update(padapter, updated);
} }
@ -1677,13 +1677,13 @@ unsigned int OnDisassoc(struct adapter *padapter, union recv_frame *precv_frame)
if (psta) { if (psta) {
u8 updated = 0; u8 updated = 0;
spin_lock(&pstapriv->asoc_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock);
if (!rtw_is_list_empty(&psta->asoc_list)) { if (!rtw_is_list_empty(&psta->asoc_list)) {
rtw_list_delete(&psta->asoc_list); rtw_list_delete(&psta->asoc_list);
pstapriv->asoc_list_cnt--; pstapriv->asoc_list_cnt--;
updated = ap_free_sta(padapter, psta, false, reason); updated = ap_free_sta(padapter, psta, false, reason);
} }
spin_unlock(&pstapriv->asoc_list_lock); spin_unlock_bh(&pstapriv->asoc_list_lock);
associated_clients_update(padapter, updated); associated_clients_update(padapter, updated);
} }
@ -4510,7 +4510,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
return; return;
} }
#if defined (CONFIG_88EU_AP_MODE) #if defined (CONFIG_88EU_AP_MODE)
spin_lock(&pmlmepriv->bcn_update_lock); spin_lock_bh(&pmlmepriv->bcn_update_lock);
#endif /* if defined (CONFIG_88EU_AP_MODE) */ #endif /* if defined (CONFIG_88EU_AP_MODE) */
/* update attribute */ /* update attribute */
@ -4695,7 +4695,7 @@ _issue_bcn:
#if defined (CONFIG_88EU_AP_MODE) #if defined (CONFIG_88EU_AP_MODE)
pmlmepriv->update_bcn = false; pmlmepriv->update_bcn = false;
spin_unlock(&pmlmepriv->bcn_update_lock); spin_unlock_bh(&pmlmepriv->bcn_update_lock);
#endif /* if defined (CONFIG_88EU_AP_MODE) */ #endif /* if defined (CONFIG_88EU_AP_MODE) */
if ((pattrib->pktlen + TXDESC_SIZE) > 512) { if ((pattrib->pktlen + TXDESC_SIZE) > 512) {
@ -6235,7 +6235,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
if (pmlmepriv->num_sta_no_ht > 0) { if (pmlmepriv->num_sta_no_ht > 0) {
int i; int i;
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
@ -6265,7 +6265,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
ICS[0][0] = 1; ICS[0][0] = 1;
} }
} }
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
if (ICS[i][0] == 1) { if (ICS[i][0] == 1) {
@ -8376,7 +8376,7 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf)
if ((pstapriv->tim_bitmap&BIT(0)) && (psta_bmc->sleepq_len > 0)) { if ((pstapriv->tim_bitmap&BIT(0)) && (psta_bmc->sleepq_len > 0)) {
rtw_msleep_os(10);/* 10ms, ATIM(HIQ) Windows */ rtw_msleep_os(10);/* 10ms, ATIM(HIQ) Windows */
spin_lock(&psta_bmc->sleep_q.lock); spin_lock_bh(&psta_bmc->sleep_q.lock);
xmitframe_phead = get_list_head(&psta_bmc->sleep_q); xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
xmitframe_plist = get_next(xmitframe_phead); xmitframe_plist = get_next(xmitframe_phead);
@ -8398,12 +8398,12 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf)
pxmitframe->attrib.qsel = 0x11;/* HIQ */ pxmitframe->attrib.qsel = 0x11;/* HIQ */
spin_unlock(&psta_bmc->sleep_q.lock); spin_unlock_bh(&psta_bmc->sleep_q.lock);
if (rtw_hal_xmit(padapter, pxmitframe)) if (rtw_hal_xmit(padapter, pxmitframe))
rtw_os_xmit_complete(padapter, pxmitframe); rtw_os_xmit_complete(padapter, pxmitframe);
spin_lock(&psta_bmc->sleep_q.lock); spin_lock_bh(&psta_bmc->sleep_q.lock);
} }
spin_unlock(&psta_bmc->sleep_q.lock); spin_unlock_bh(&psta_bmc->sleep_q.lock);
} }
} }
#endif #endif

View file

@ -376,7 +376,7 @@ s32 mp_start_test(struct adapter *padapter)
else else
bssid.Length = length; bssid.Length = length;
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
goto end_of_mp_start_test; goto end_of_mp_start_test;
@ -417,7 +417,7 @@ s32 mp_start_test(struct adapter *padapter)
end_of_mp_start_test: end_of_mp_start_test:
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
if (res == _SUCCESS) { if (res == _SUCCESS) {
/* set MSR to WIFI_FW_ADHOC_STATE */ /* set MSR to WIFI_FW_ADHOC_STATE */
@ -438,7 +438,7 @@ void mp_stop_test(struct adapter *padapter)
if (pmppriv->mode == MP_ON) { if (pmppriv->mode == MP_ON) {
pmppriv->bSetTxPower = 0; pmppriv->bSetTxPower = 0;
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == false) if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == false)
goto end_of_mp_stop_test; goto end_of_mp_stop_test;
@ -460,7 +460,7 @@ void mp_stop_test(struct adapter *padapter)
end_of_mp_stop_test: end_of_mp_stop_test:
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
} }
} }

View file

@ -55,7 +55,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
pstart = pdata_attr; pstart = pdata_attr;
pcur = pdata_attr; pcur = pdata_attr;
spin_lock(&pstapriv->asoc_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list; phead = &pstapriv->asoc_list;
plist = get_next(phead); plist = get_next(phead);
@ -119,7 +119,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
pstart = pcur; pstart = pcur;
} }
} }
spin_unlock(&pstapriv->asoc_list_lock); spin_unlock_bh(&pstapriv->asoc_list_lock);
if (attr_len > 0) if (attr_len > 0)
len = rtw_set_p2p_attr_content(pbuf, P2P_ATTR_GROUP_INFO, attr_len, pdata_attr); len = rtw_set_p2p_attr_content(pbuf, P2P_ATTR_GROUP_INFO, attr_len, pdata_attr);
@ -978,7 +978,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_ID, dev_addr, &attr_contentlen)) { if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_ID, dev_addr, &attr_contentlen)) {
struct list_head *phead, *plist; struct list_head *phead, *plist;
spin_lock(&pstapriv->asoc_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list; phead = &pstapriv->asoc_list;
plist = get_next(phead); plist = get_next(phead);
@ -998,7 +998,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
status = P2P_STATUS_FAIL_INFO_UNAVAILABLE; status = P2P_STATUS_FAIL_INFO_UNAVAILABLE;
} }
} }
spin_unlock(&pstapriv->asoc_list_lock); spin_unlock_bh(&pstapriv->asoc_list_lock);
} else { } else {
status = P2P_STATUS_FAIL_INVALID_PARAM; status = P2P_STATUS_FAIL_INVALID_PARAM;
} }
@ -1506,8 +1506,8 @@ _func_enter_;
rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH); rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH);
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
_func_exit_; _func_exit_;
@ -1835,7 +1835,7 @@ static void pre_tx_scan_timer_process(void *FunctionContext)
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
return; return;
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ)) { if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ)) {
if (pwdinfo->tx_prov_disc_info.benable) { /* the provision discovery request frame is trigger to send or not */ if (pwdinfo->tx_prov_disc_info.benable) { /* the provision discovery request frame is trigger to send or not */
@ -1853,7 +1853,7 @@ static void pre_tx_scan_timer_process(void *FunctionContext)
DBG_88E("[%s] p2p_state is %d, ignore!!\n", __func__, rtw_p2p_state(pwdinfo)); DBG_88E("[%s] p2p_state is %d, ignore!!\n", __func__, rtw_p2p_state(pwdinfo));
} }
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
} }
static void find_phase_timer_process(void *FunctionContext) static void find_phase_timer_process(void *FunctionContext)

View file

@ -183,11 +183,11 @@ union recv_frame *rtw_alloc_recvframe (struct __queue *pfree_recv_queue)
{ {
union recv_frame *precvframe; union recv_frame *precvframe;
spin_lock(&pfree_recv_queue->lock); spin_lock_bh(&pfree_recv_queue->lock);
precvframe = _rtw_alloc_recvframe(pfree_recv_queue); precvframe = _rtw_alloc_recvframe(pfree_recv_queue);
spin_unlock(&pfree_recv_queue->lock); spin_unlock_bh(&pfree_recv_queue->lock);
return precvframe; return precvframe;
} }
@ -215,7 +215,7 @@ _func_enter_;
precvframe->u.hdr.pkt = NULL; precvframe->u.hdr.pkt = NULL;
} }
spin_lock(&pfree_recv_queue->lock); spin_lock_bh(&pfree_recv_queue->lock);
rtw_list_delete(&(precvframe->u.hdr.list)); rtw_list_delete(&(precvframe->u.hdr.list));
@ -228,7 +228,7 @@ _func_enter_;
precvpriv->free_recvframe_cnt++; precvpriv->free_recvframe_cnt++;
} }
spin_unlock(&pfree_recv_queue->lock); spin_unlock_bh(&pfree_recv_queue->lock);
_func_exit_; _func_exit_;
@ -259,9 +259,9 @@ int rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue)
{ {
int ret; int ret;
spin_lock(&queue->lock); spin_lock_bh(&queue->lock);
ret = _rtw_enqueue_recvframe(precvframe, queue); ret = _rtw_enqueue_recvframe(precvframe, queue);
spin_unlock(&queue->lock); spin_unlock_bh(&queue->lock);
return ret; return ret;
} }
@ -313,12 +313,12 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter)
int rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue) int rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue)
{ {
spin_lock(&queue->lock); spin_lock_bh(&queue->lock);
rtw_list_delete(&precvbuf->list); rtw_list_delete(&precvbuf->list);
rtw_list_insert_head(&precvbuf->list, get_list_head(queue)); rtw_list_insert_head(&precvbuf->list, get_list_head(queue));
spin_unlock(&queue->lock); spin_unlock_bh(&queue->lock);
return _SUCCESS; return _SUCCESS;
} }
@ -1112,7 +1112,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
struct xmit_frame *pxmitframe = NULL; struct xmit_frame *pxmitframe = NULL;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
spin_lock(&pxmitpriv->lock); spin_lock_bh(&pxmitpriv->lock);
xmitframe_phead = get_list_head(&psta->sleep_q); xmitframe_phead = get_list_head(&psta->sleep_q);
xmitframe_plist = get_next(xmitframe_phead); xmitframe_plist = get_next(xmitframe_phead);
@ -1161,7 +1161,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
update_beacon(padapter, _TIM_IE_, NULL, false); update_beacon(padapter, _TIM_IE_, NULL, false);
} }
} }
spin_unlock(&pxmitpriv->lock); spin_unlock_bh(&pxmitpriv->lock);
} }
} }
@ -1979,7 +1979,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame *
} }
} }
spin_lock(&ppending_recvframe_queue->lock); spin_lock_bh(&ppending_recvframe_queue->lock);
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_,
("recv_indicatepkt_reorder: indicate=%d seq=%d\n", ("recv_indicatepkt_reorder: indicate=%d seq=%d\n",
@ -2006,9 +2006,9 @@ static int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame *
/* recv_indicatepkts_in_order(padapter, preorder_ctrl, true); */ /* recv_indicatepkts_in_order(padapter, preorder_ctrl, true); */
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, false)) { if (recv_indicatepkts_in_order(padapter, preorder_ctrl, false)) {
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME); _set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
spin_unlock(&ppending_recvframe_queue->lock); spin_unlock_bh(&ppending_recvframe_queue->lock);
} else { } else {
spin_unlock(&ppending_recvframe_queue->lock); spin_unlock_bh(&ppending_recvframe_queue->lock);
_cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer); _cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer);
} }
@ -2018,7 +2018,7 @@ _success_exit:
_err_exit: _err_exit:
spin_unlock(&ppending_recvframe_queue->lock); spin_unlock_bh(&ppending_recvframe_queue->lock);
return _FAIL; return _FAIL;
} }
@ -2032,12 +2032,12 @@ void rtw_reordering_ctrl_timeout_handler(void *pcontext)
if (padapter->bDriverStopped || padapter->bSurpriseRemoved) if (padapter->bDriverStopped || padapter->bSurpriseRemoved)
return; return;
spin_lock(&ppending_recvframe_queue->lock); spin_lock_bh(&ppending_recvframe_queue->lock);
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, true) == true) if (recv_indicatepkts_in_order(padapter, preorder_ctrl, true) == true)
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME); _set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
spin_unlock(&ppending_recvframe_queue->lock); spin_unlock_bh(&ppending_recvframe_queue->lock);
} }
static int process_recv_indicatepkts(struct adapter *padapter, union recv_frame *prframe) static int process_recv_indicatepkts(struct adapter *padapter, union recv_frame *prframe)

View file

@ -196,7 +196,7 @@ void rtw_mfree_all_stainfo(struct sta_priv *pstapriv)
_func_enter_; _func_enter_;
spin_lock(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
phead = get_list_head(&pstapriv->free_sta_queue); phead = get_list_head(&pstapriv->free_sta_queue);
plist = get_next(phead); plist = get_next(phead);
@ -208,7 +208,7 @@ _func_enter_;
rtw_mfree_stainfo(psta); rtw_mfree_stainfo(psta);
} }
spin_unlock(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
_func_exit_; _func_exit_;
} }
@ -244,7 +244,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
_func_enter_; _func_enter_;
if (pstapriv) { if (pstapriv) {
/* delete all reordering_ctrl_timer */ /* delete all reordering_ctrl_timer */
spin_lock(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
for (index = 0; index < NUM_STA; index++) { for (index = 0; index < NUM_STA; index++) {
phead = &(pstapriv->sta_hash[index]); phead = &(pstapriv->sta_hash[index]);
plist = get_next(phead); plist = get_next(phead);
@ -260,7 +260,7 @@ _func_enter_;
} }
} }
} }
spin_unlock(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
/*===============================*/ /*===============================*/
rtw_mfree_sta_priv_lock(pstapriv); rtw_mfree_sta_priv_lock(pstapriv);
@ -287,15 +287,15 @@ _func_enter_;
pfree_sta_queue = &pstapriv->free_sta_queue; pfree_sta_queue = &pstapriv->free_sta_queue;
spin_lock(&pfree_sta_queue->lock); spin_lock_bh(&pfree_sta_queue->lock);
if (_rtw_queue_empty(pfree_sta_queue) == true) { if (_rtw_queue_empty(pfree_sta_queue) == true) {
spin_unlock(&pfree_sta_queue->lock); spin_unlock_bh(&pfree_sta_queue->lock);
psta = NULL; psta = NULL;
} else { } else {
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list); psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);
rtw_list_delete(&(psta->list)); rtw_list_delete(&(psta->list));
spin_unlock(&pfree_sta_queue->lock); spin_unlock_bh(&pfree_sta_queue->lock);
_rtw_init_stainfo(psta); _rtw_init_stainfo(psta);
memcpy(psta->hwaddr, hwaddr, ETH_ALEN); memcpy(psta->hwaddr, hwaddr, ETH_ALEN);
index = wifi_mac_hash(hwaddr); index = wifi_mac_hash(hwaddr);
@ -307,13 +307,13 @@ _func_enter_;
} }
phash_list = &(pstapriv->sta_hash[index]); phash_list = &(pstapriv->sta_hash[index]);
spin_lock(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
rtw_list_insert_tail(&psta->hash_list, phash_list); rtw_list_insert_tail(&psta->hash_list, phash_list);
pstapriv->asoc_sta_count++ ; pstapriv->asoc_sta_count++ ;
spin_unlock(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
/* Commented by Albert 2009/08/13 */ /* Commented by Albert 2009/08/13 */
/* For the SMC router, the sequence number of first packet of WPS handshake will be 0. */ /* For the SMC router, the sequence number of first packet of WPS handshake will be 0. */
@ -380,7 +380,7 @@ _func_enter_;
pstaxmitpriv = &psta->sta_xmitpriv; pstaxmitpriv = &psta->sta_xmitpriv;
spin_lock(&pxmitpriv->lock); spin_lock_bh(&pxmitpriv->lock);
rtw_free_xmitframe_queue(pxmitpriv, &psta->sleep_q); rtw_free_xmitframe_queue(pxmitpriv, &psta->sleep_q);
psta->sleepq_len = 0; psta->sleepq_len = 0;
@ -401,7 +401,7 @@ _func_enter_;
rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending)); rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
spin_unlock(&pxmitpriv->lock); spin_unlock_bh(&pxmitpriv->lock);
rtw_list_delete(&psta->hash_list); 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])); 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]));
@ -426,7 +426,7 @@ _func_enter_;
ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue; ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
spin_lock(&ppending_recvframe_queue->lock); spin_lock_bh(&ppending_recvframe_queue->lock);
phead = get_list_head(ppending_recvframe_queue); phead = get_list_head(ppending_recvframe_queue);
plist = get_next(phead); plist = get_next(phead);
@ -441,7 +441,7 @@ _func_enter_;
rtw_free_recvframe(prframe, pfree_recv_queue); rtw_free_recvframe(prframe, pfree_recv_queue);
} }
spin_unlock(&ppending_recvframe_queue->lock); spin_unlock_bh(&ppending_recvframe_queue->lock);
} }
if (!(psta->state & WIFI_AP_STATE)) if (!(psta->state & WIFI_AP_STATE))
@ -449,12 +449,12 @@ _func_enter_;
#ifdef CONFIG_88EU_AP_MODE #ifdef CONFIG_88EU_AP_MODE
spin_lock(&pstapriv->auth_list_lock); spin_lock_bh(&pstapriv->auth_list_lock);
if (!rtw_is_list_empty(&psta->auth_list)) { if (!rtw_is_list_empty(&psta->auth_list)) {
rtw_list_delete(&psta->auth_list); rtw_list_delete(&psta->auth_list);
pstapriv->auth_list_cnt--; pstapriv->auth_list_cnt--;
} }
spin_unlock(&pstapriv->auth_list_lock); spin_unlock_bh(&pstapriv->auth_list_lock);
psta->expire_to = 0; psta->expire_to = 0;
@ -480,9 +480,9 @@ _func_enter_;
#endif /* CONFIG_88EU_AP_MODE */ #endif /* CONFIG_88EU_AP_MODE */
spin_lock(&pfree_sta_queue->lock); spin_lock_bh(&pfree_sta_queue->lock);
rtw_list_insert_tail(&psta->list, get_list_head(pfree_sta_queue)); rtw_list_insert_tail(&psta->list, get_list_head(pfree_sta_queue));
spin_unlock(&pfree_sta_queue->lock); spin_unlock_bh(&pfree_sta_queue->lock);
exit: exit:
@ -505,7 +505,7 @@ _func_enter_;
if (pstapriv->asoc_sta_count == 1) if (pstapriv->asoc_sta_count == 1)
goto exit; goto exit;
spin_lock(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
for (index = 0; index < NUM_STA; index++) { for (index = 0; index < NUM_STA; index++) {
phead = &(pstapriv->sta_hash[index]); phead = &(pstapriv->sta_hash[index]);
@ -521,7 +521,7 @@ _func_enter_;
} }
} }
spin_unlock(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
exit: exit:
@ -549,7 +549,7 @@ _func_enter_;
index = wifi_mac_hash(addr); index = wifi_mac_hash(addr);
spin_lock(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
phead = &(pstapriv->sta_hash[index]); phead = &(pstapriv->sta_hash[index]);
plist = get_next(phead); plist = get_next(phead);
@ -565,7 +565,7 @@ _func_enter_;
plist = get_next(plist); plist = get_next(plist);
} }
spin_unlock(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
_func_exit_; _func_exit_;
return psta; return psta;
} }
@ -617,7 +617,7 @@ u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list; struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
struct __queue *pacl_node_q = &pacl_list->acl_node_q; struct __queue *pacl_node_q = &pacl_list->acl_node_q;
spin_lock(&pacl_node_q->lock); spin_lock_bh(&pacl_node_q->lock);
phead = get_list_head(pacl_node_q); phead = get_list_head(pacl_node_q);
plist = get_next(phead); plist = get_next(phead);
while ((!rtw_end_of_queue_search(phead, plist))) { while ((!rtw_end_of_queue_search(phead, plist))) {
@ -631,7 +631,7 @@ u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
} }
} }
} }
spin_unlock(&pacl_node_q->lock); spin_unlock_bh(&pacl_node_q->lock);
if (pacl_list->mode == 1)/* accept unless in deny list */ if (pacl_list->mode == 1)/* accept unless in deny list */
res = (match) ? false : true; res = (match) ? false : true;

View file

@ -1428,7 +1428,7 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf
_func_enter_; _func_enter_;
spin_lock(&pfree_xmit_queue->lock); spin_lock_bh(&pfree_xmit_queue->lock);
if (_rtw_queue_empty(pfree_xmit_queue) == true) { 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)); RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_, ("rtw_alloc_xmitframe:%d\n", pxmitpriv->free_xmitframe_cnt));
@ -1463,7 +1463,7 @@ _func_enter_;
pxframe->ack_report = 0; pxframe->ack_report = 0;
} }
spin_unlock(&pfree_xmit_queue->lock); spin_unlock_bh(&pfree_xmit_queue->lock);
_func_exit_; _func_exit_;
@ -1483,7 +1483,7 @@ _func_enter_;
goto exit; goto exit;
} }
spin_lock(&pfree_xmit_queue->lock); spin_lock_bh(&pfree_xmit_queue->lock);
rtw_list_delete(&pxmitframe->list); rtw_list_delete(&pxmitframe->list);
@ -1497,7 +1497,7 @@ _func_enter_;
pxmitpriv->free_xmitframe_cnt++; pxmitpriv->free_xmitframe_cnt++;
RT_TRACE(_module_rtl871x_xmit_c_, _drv_debug_, ("rtw_free_xmitframe():free_xmitframe_cnt=%d\n", pxmitpriv->free_xmitframe_cnt)); RT_TRACE(_module_rtl871x_xmit_c_, _drv_debug_, ("rtw_free_xmitframe():free_xmitframe_cnt=%d\n", pxmitpriv->free_xmitframe_cnt));
spin_unlock(&pfree_xmit_queue->lock); spin_unlock_bh(&pfree_xmit_queue->lock);
if (pndis_pkt) if (pndis_pkt)
rtw_os_pkt_complete(padapter, pndis_pkt); rtw_os_pkt_complete(padapter, pndis_pkt);
@ -1516,7 +1516,7 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pfram
_func_enter_; _func_enter_;
spin_lock(&pframequeue->lock); spin_lock_bh(&pframequeue->lock);
phead = get_list_head(pframequeue); phead = get_list_head(pframequeue);
plist = get_next(phead); plist = get_next(phead);
@ -1528,7 +1528,7 @@ _func_enter_;
rtw_free_xmitframe(pxmitpriv, pxmitframe); rtw_free_xmitframe(pxmitpriv, pxmitframe);
} }
spin_unlock(&pframequeue->lock); spin_unlock_bh(&pframequeue->lock);
_func_exit_; _func_exit_;
} }
@ -1587,7 +1587,7 @@ _func_enter_;
inx[j] = pxmitpriv->wmm_para_seq[j]; inx[j] = pxmitpriv->wmm_para_seq[j];
} }
spin_lock(&pxmitpriv->lock); spin_lock_bh(&pxmitpriv->lock);
for (i = 0; i < entry; i++) { for (i = 0; i < entry; i++) {
phwxmit = phwxmit_i + inx[i]; phwxmit = phwxmit_i + inx[i];
@ -1615,7 +1615,7 @@ _func_enter_;
} }
} }
exit: exit:
spin_unlock(&pxmitpriv->lock); spin_unlock_bh(&pxmitpriv->lock);
_func_exit_; _func_exit_;
return pxmitframe; return pxmitframe;
} }
@ -1760,7 +1760,7 @@ static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
br_port = rcu_dereference(padapter->pnetdev->br_port); br_port = rcu_dereference(padapter->pnetdev->br_port);
#endif #endif
rcu_read_unlock(); rcu_read_unlock();
spin_lock(&padapter->br_ext_lock); spin_lock_bh(&padapter->br_ext_lock);
if (!(skb->data[0] & 1) && br_port && if (!(skb->data[0] & 1) && br_port &&
memcmp(skb->data+MACADDRLEN, padapter->br_mac, MACADDRLEN) && memcmp(skb->data+MACADDRLEN, padapter->br_mac, MACADDRLEN) &&
*((__be16 *)(skb->data+MACADDRLEN*2)) != __constant_htons(ETH_P_8021Q) && *((__be16 *)(skb->data+MACADDRLEN*2)) != __constant_htons(ETH_P_8021Q) &&
@ -1768,7 +1768,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) { !memcmp(padapter->scdb_mac, skb->data+MACADDRLEN, MACADDRLEN) && padapter->scdb_entry) {
memcpy(skb->data+MACADDRLEN, GET_MY_HWADDR(padapter), MACADDRLEN); memcpy(skb->data+MACADDRLEN, GET_MY_HWADDR(padapter), MACADDRLEN);
padapter->scdb_entry->ageing_timer = jiffies; padapter->scdb_entry->ageing_timer = jiffies;
spin_unlock(&padapter->br_ext_lock); spin_unlock_bh(&padapter->br_ext_lock);
} else { } else {
if (*((__be16 *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_8021Q)) { if (*((__be16 *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_8021Q)) {
is_vlan_tag = 1; is_vlan_tag = 1;
@ -1801,7 +1801,7 @@ static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
} }
} }
} }
spin_unlock(&padapter->br_ext_lock); spin_unlock_bh(&padapter->br_ext_lock);
if (do_nat25) { if (do_nat25) {
if (nat25_db_handle(padapter, skb, NAT25_CHECK) == 0) { if (nat25_db_handle(padapter, skb, NAT25_CHECK) == 0) {
struct sk_buff *newskb; struct sk_buff *newskb;
@ -1971,12 +1971,12 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt)
do_queue_select(padapter, &pxmitframe->attrib); do_queue_select(padapter, &pxmitframe->attrib);
#ifdef CONFIG_88EU_AP_MODE #ifdef CONFIG_88EU_AP_MODE
spin_lock(&pxmitpriv->lock); spin_lock_bh(&pxmitpriv->lock);
if (xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe)) { if (xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe)) {
spin_unlock(&pxmitpriv->lock); spin_unlock_bh(&pxmitpriv->lock);
return 1; return 1;
} }
spin_unlock(&pxmitpriv->lock); spin_unlock_bh(&pxmitpriv->lock);
#endif #endif
if (rtw_hal_xmit(padapter, pxmitframe) == false) if (rtw_hal_xmit(padapter, pxmitframe) == false)
@ -2014,7 +2014,7 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra
} }
if (bmcst) { if (bmcst) {
spin_lock(&psta->sleep_q.lock); spin_lock_bh(&psta->sleep_q.lock);
if (pstapriv->sta_dz_bitmap) {/* if any one sta is in ps mode */ if (pstapriv->sta_dz_bitmap) {/* if any one sta is in ps mode */
rtw_list_delete(&pxmitframe->list); rtw_list_delete(&pxmitframe->list);
@ -2031,12 +2031,12 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra
ret = true; ret = true;
} }
spin_unlock(&psta->sleep_q.lock); spin_unlock_bh(&psta->sleep_q.lock);
return ret; return ret;
} }
spin_lock(&psta->sleep_q.lock); spin_lock_bh(&psta->sleep_q.lock);
if (psta->state&WIFI_SLEEP_STATE) { if (psta->state&WIFI_SLEEP_STATE) {
u8 wmmps_ac = 0; u8 wmmps_ac = 0;
@ -2084,7 +2084,7 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra
} }
} }
spin_unlock(&psta->sleep_q.lock); spin_unlock_bh(&psta->sleep_q.lock);
return ret; return ret;
} }
@ -2129,7 +2129,7 @@ void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta)
/* for BC/MC Frames */ /* for BC/MC Frames */
psta_bmc = rtw_get_bcmc_stainfo(padapter); psta_bmc = rtw_get_bcmc_stainfo(padapter);
spin_lock(&pxmitpriv->lock); spin_lock_bh(&pxmitpriv->lock);
psta->state |= WIFI_SLEEP_STATE; psta->state |= WIFI_SLEEP_STATE;
@ -2152,7 +2152,7 @@ void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta)
dequeue_xmitframes_to_sleeping_queue(padapter, psta_bmc, &pstaxmitpriv->be_q.sta_pending); dequeue_xmitframes_to_sleeping_queue(padapter, psta_bmc, &pstaxmitpriv->be_q.sta_pending);
rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending)); rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
spin_unlock(&pxmitpriv->lock); spin_unlock_bh(&pxmitpriv->lock);
} }
void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta) void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
@ -2163,7 +2163,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
struct xmit_frame *pxmitframe = NULL; struct xmit_frame *pxmitframe = NULL;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
spin_lock(&psta->sleep_q.lock); spin_lock_bh(&psta->sleep_q.lock);
xmitframe_phead = get_list_head(&psta->sleep_q); xmitframe_phead = get_list_head(&psta->sleep_q);
xmitframe_plist = get_next(xmitframe_phead); xmitframe_plist = get_next(xmitframe_phead);
@ -2214,10 +2214,10 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
pxmitframe->attrib.triggered = 1; pxmitframe->attrib.triggered = 1;
spin_unlock(&psta->sleep_q.lock); spin_unlock_bh(&psta->sleep_q.lock);
if (rtw_hal_xmit(padapter, pxmitframe)) if (rtw_hal_xmit(padapter, pxmitframe))
rtw_os_xmit_complete(padapter, pxmitframe); rtw_os_xmit_complete(padapter, pxmitframe);
spin_lock(&psta->sleep_q.lock); spin_lock_bh(&psta->sleep_q.lock);
} }
if (psta->sleepq_len == 0) { if (psta->sleepq_len == 0) {
@ -2236,7 +2236,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
pstapriv->sta_dz_bitmap &= ~BIT(psta->aid); pstapriv->sta_dz_bitmap &= ~BIT(psta->aid);
} }
spin_unlock(&psta->sleep_q.lock); spin_unlock_bh(&psta->sleep_q.lock);
/* for BC/MC Frames */ /* for BC/MC Frames */
psta_bmc = rtw_get_bcmc_stainfo(padapter); psta_bmc = rtw_get_bcmc_stainfo(padapter);
@ -2244,7 +2244,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
return; return;
if ((pstapriv->sta_dz_bitmap&0xfffe) == 0x0) { /* no any sta in ps mode */ if ((pstapriv->sta_dz_bitmap&0xfffe) == 0x0) { /* no any sta in ps mode */
spin_lock(&psta_bmc->sleep_q.lock); spin_lock_bh(&psta_bmc->sleep_q.lock);
xmitframe_phead = get_list_head(&psta_bmc->sleep_q); xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
xmitframe_plist = get_next(xmitframe_phead); xmitframe_plist = get_next(xmitframe_phead);
@ -2264,10 +2264,10 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
pxmitframe->attrib.triggered = 1; pxmitframe->attrib.triggered = 1;
spin_unlock(&psta_bmc->sleep_q.lock); spin_unlock_bh(&psta_bmc->sleep_q.lock);
if (rtw_hal_xmit(padapter, pxmitframe)) if (rtw_hal_xmit(padapter, pxmitframe))
rtw_os_xmit_complete(padapter, pxmitframe); rtw_os_xmit_complete(padapter, pxmitframe);
spin_lock(&psta_bmc->sleep_q.lock); spin_lock_bh(&psta_bmc->sleep_q.lock);
} }
if (psta_bmc->sleepq_len == 0) { if (psta_bmc->sleepq_len == 0) {
@ -2277,7 +2277,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
update_mask |= BIT(1); update_mask |= BIT(1);
} }
spin_unlock(&psta_bmc->sleep_q.lock); spin_unlock_bh(&psta_bmc->sleep_q.lock);
} }
if (update_mask) if (update_mask)
@ -2291,7 +2291,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
struct xmit_frame *pxmitframe = NULL; struct xmit_frame *pxmitframe = NULL;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
spin_lock(&psta->sleep_q.lock); spin_lock_bh(&psta->sleep_q.lock);
xmitframe_phead = get_list_head(&psta->sleep_q); xmitframe_phead = get_list_head(&psta->sleep_q);
xmitframe_plist = get_next(xmitframe_phead); xmitframe_plist = get_next(xmitframe_phead);
@ -2350,7 +2350,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
} }
} }
spin_unlock(&psta->sleep_q.lock); spin_unlock_bh(&psta->sleep_q.lock);
} }
#endif #endif

View file

@ -533,7 +533,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
phwxmit = pxmitpriv->hwxmits + 2; phwxmit = pxmitpriv->hwxmits + 2;
break; break;
} }
spin_lock(&pxmitpriv->lock); spin_lock_bh(&pxmitpriv->lock);
xmitframe_phead = get_list_head(&ptxservq->sta_pending); xmitframe_phead = get_list_head(&ptxservq->sta_pending);
xmitframe_plist = get_next(xmitframe_phead); xmitframe_plist = get_next(xmitframe_phead);
@ -589,7 +589,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
if (_rtw_queue_empty(&ptxservq->sta_pending) == true) if (_rtw_queue_empty(&ptxservq->sta_pending) == true)
rtw_list_delete(&ptxservq->tx_pending); rtw_list_delete(&ptxservq->tx_pending);
spin_unlock(&pxmitpriv->lock); spin_unlock_bh(&pxmitpriv->lock);
if ((pfirstframe->attrib.ether_type != 0x0806) && if ((pfirstframe->attrib.ether_type != 0x0806) &&
(pfirstframe->attrib.ether_type != 0x888e) && (pfirstframe->attrib.ether_type != 0x888e) &&
(pfirstframe->attrib.ether_type != 0x88b4) && (pfirstframe->attrib.ether_type != 0x88b4) &&
@ -645,7 +645,7 @@ static s32 pre_xmitframe(struct adapter *adapt, struct xmit_frame *pxmitframe)
struct pkt_attrib *pattrib = &pxmitframe->attrib; struct pkt_attrib *pattrib = &pxmitframe->attrib;
struct mlme_priv *pmlmepriv = &adapt->mlmepriv; struct mlme_priv *pmlmepriv = &adapt->mlmepriv;
spin_lock(&pxmitpriv->lock); spin_lock_bh(&pxmitpriv->lock);
if (rtw_txframes_sta_ac_pending(adapt, pattrib) > 0) if (rtw_txframes_sta_ac_pending(adapt, pattrib) > 0)
goto enqueue; goto enqueue;
@ -657,7 +657,7 @@ static s32 pre_xmitframe(struct adapter *adapt, struct xmit_frame *pxmitframe)
if (pxmitbuf == NULL) if (pxmitbuf == NULL)
goto enqueue; goto enqueue;
spin_unlock(&pxmitpriv->lock); spin_unlock_bh(&pxmitpriv->lock);
pxmitframe->pxmitbuf = pxmitbuf; pxmitframe->pxmitbuf = pxmitbuf;
pxmitframe->buf_addr = pxmitbuf->pbuf; pxmitframe->buf_addr = pxmitbuf->pbuf;
@ -672,7 +672,7 @@ static s32 pre_xmitframe(struct adapter *adapt, struct xmit_frame *pxmitframe)
enqueue: enqueue:
res = rtw_xmitframe_enqueue(adapt, pxmitframe); res = rtw_xmitframe_enqueue(adapt, pxmitframe);
spin_unlock(&pxmitpriv->lock); spin_unlock_bh(&pxmitpriv->lock);
if (res != _SUCCESS) { if (res != _SUCCESS) {
RT_TRACE(_module_xmit_osdep_c_, _drv_err_, ("pre_xmitframe: enqueue xmitframe fail\n")); RT_TRACE(_module_xmit_osdep_c_, _drv_err_, ("pre_xmitframe: enqueue xmitframe fail\n"));

View file

@ -527,38 +527,38 @@ static inline void _clr_fwstate_(struct mlme_priv *pmlmepriv, int state)
*/ */
static inline void clr_fwstate(struct mlme_priv *pmlmepriv, int state) static inline void clr_fwstate(struct mlme_priv *pmlmepriv, int state)
{ {
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
if (check_fwstate(pmlmepriv, state) == true) if (check_fwstate(pmlmepriv, state) == true)
pmlmepriv->fw_state ^= state; pmlmepriv->fw_state ^= state;
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
} }
static inline void clr_fwstate_ex(struct mlme_priv *pmlmepriv, int state) static inline void clr_fwstate_ex(struct mlme_priv *pmlmepriv, int state)
{ {
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
_clr_fwstate_(pmlmepriv, state); _clr_fwstate_(pmlmepriv, state);
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
} }
static inline void up_scanned_network(struct mlme_priv *pmlmepriv) static inline void up_scanned_network(struct mlme_priv *pmlmepriv)
{ {
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
pmlmepriv->num_of_scanned++; pmlmepriv->num_of_scanned++;
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
} }
static inline void down_scanned_network(struct mlme_priv *pmlmepriv) static inline void down_scanned_network(struct mlme_priv *pmlmepriv)
{ {
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
pmlmepriv->num_of_scanned--; pmlmepriv->num_of_scanned--;
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
} }
static inline void set_scanned_network_val(struct mlme_priv *pmlmepriv, int val) static inline void set_scanned_network_val(struct mlme_priv *pmlmepriv, int val)
{ {
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
pmlmepriv->num_of_scanned = val; pmlmepriv->num_of_scanned = val;
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
} }
u16 rtw_get_capability(struct wlan_bssid_ex *bss); u16 rtw_get_capability(struct wlan_bssid_ex *bss);

View file

@ -1136,7 +1136,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
} }
authmode = padapter->securitypriv.ndisauthtype; authmode = padapter->securitypriv.ndisauthtype;
spin_lock(&queue->lock); spin_lock_bh(&queue->lock);
phead = get_list_head(queue); phead = get_list_head(queue);
pmlmepriv->pscanned = get_next(phead); pmlmepriv->pscanned = get_next(phead);
@ -1155,14 +1155,14 @@ static int rtw_wx_set_wap(struct net_device *dev,
if ((!memcmp(dst_bssid, src_bssid, ETH_ALEN))) { if ((!memcmp(dst_bssid, src_bssid, ETH_ALEN))) {
if (!rtw_set_802_11_infrastructure_mode(padapter, pnetwork->network.InfrastructureMode)) { if (!rtw_set_802_11_infrastructure_mode(padapter, pnetwork->network.InfrastructureMode)) {
ret = -1; ret = -1;
spin_unlock(&queue->lock); spin_unlock_bh(&queue->lock);
goto exit; goto exit;
} }
break; break;
} }
} }
spin_unlock(&queue->lock); spin_unlock_bh(&queue->lock);
rtw_set_802_11_authentication_mode(padapter, authmode); rtw_set_802_11_authentication_mode(padapter, authmode);
/* set_802_11_encryption_mode(padapter, padapter->securitypriv.ndisencryptstatus); */ /* set_802_11_encryption_mode(padapter, padapter->securitypriv.ndisencryptstatus); */
@ -1319,11 +1319,11 @@ _func_enter_;
DBG_88E("IW_SCAN_THIS_ESSID, ssid =%s, len =%d\n", req->essid, req->essid_len); DBG_88E("IW_SCAN_THIS_ESSID, ssid =%s, len =%d\n", req->essid, req->essid_len);
spin_lock(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
_status = rtw_sitesurvey_cmd(padapter, ssid, 1, NULL, 0); _status = rtw_sitesurvey_cmd(padapter, ssid, 1, NULL, 0);
spin_unlock(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
} else if (req->scan_type == IW_SCAN_TYPE_PASSIVE) { } else if (req->scan_type == IW_SCAN_TYPE_PASSIVE) {
DBG_88E("rtw_wx_set_scan, req->scan_type == IW_SCAN_TYPE_PASSIVE\n"); DBG_88E("rtw_wx_set_scan, req->scan_type == IW_SCAN_TYPE_PASSIVE\n");
} }
@ -1437,7 +1437,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
break; break;
} }
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
@ -1460,7 +1460,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
plist = get_next(plist); plist = get_next(plist);
} }
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
wrqu->data.length = ev-extra; wrqu->data.length = ev-extra;
wrqu->data.flags = 0; wrqu->data.flags = 0;
@ -1528,7 +1528,7 @@ static int rtw_wx_set_essid(struct net_device *dev,
src_ssid = ndis_ssid.Ssid; src_ssid = ndis_ssid.Ssid;
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_, ("rtw_wx_set_essid: ssid =[%s]\n", src_ssid)); RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_, ("rtw_wx_set_essid: ssid =[%s]\n", src_ssid));
spin_lock(&queue->lock); spin_lock_bh(&queue->lock);
phead = get_list_head(queue); phead = get_list_head(queue);
pmlmepriv->pscanned = get_next(phead); pmlmepriv->pscanned = get_next(phead);
@ -1562,14 +1562,14 @@ static int rtw_wx_set_essid(struct net_device *dev,
if (!rtw_set_802_11_infrastructure_mode(padapter, pnetwork->network.InfrastructureMode)) { if (!rtw_set_802_11_infrastructure_mode(padapter, pnetwork->network.InfrastructureMode)) {
ret = -1; ret = -1;
spin_unlock(&queue->lock); spin_unlock_bh(&queue->lock);
goto exit; goto exit;
} }
break; break;
} }
} }
spin_unlock(&queue->lock); spin_unlock_bh(&queue->lock);
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_, RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_,
("set ssid: set_802_11_auth. mode =%d\n", authmode)); ("set ssid: set_802_11_auth. mode =%d\n", authmode));
rtw_set_802_11_authentication_mode(padapter, authmode); rtw_set_802_11_authentication_mode(padapter, authmode);
@ -2604,7 +2604,7 @@ static int rtw_get_ap_info(struct net_device *dev,
goto exit; goto exit;
} }
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
@ -2617,7 +2617,7 @@ static int rtw_get_ap_info(struct net_device *dev,
if (hwaddr_aton_i(data, bssid)) { if (hwaddr_aton_i(data, bssid)) {
DBG_88E("Invalid BSSID '%s'.\n", (u8 *)data); DBG_88E("Invalid BSSID '%s'.\n", (u8 *)data);
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
return -EINVAL; return -EINVAL;
} }
@ -2641,7 +2641,7 @@ static int rtw_get_ap_info(struct net_device *dev,
plist = get_next(plist); plist = get_next(plist);
} }
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
if (pdata->length >= 34) { if (pdata->length >= 34) {
if (copy_to_user(pdata->pointer+32, (u8 *)&pdata->flags, 1)) { if (copy_to_user(pdata->pointer+32, (u8 *)&pdata->flags, 1)) {
@ -3107,7 +3107,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3) for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3)
peerMAC[jj] = key_2char2num(peerMACStr[kk], peerMACStr[kk + 1]); peerMAC[jj] = key_2char2num(peerMACStr[kk], peerMACStr[kk + 1]);
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
@ -3137,7 +3137,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
plist = get_next(plist); plist = get_next(plist);
} }
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
if (!blnMatch) if (!blnMatch)
sprintf(attr_content_str, "\n\nM = 0000"); sprintf(attr_content_str, "\n\nM = 0000");
@ -3179,7 +3179,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3) for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3)
peerMAC[jj] = key_2char2num(peerMACStr[kk], peerMACStr[kk + 1]); peerMAC[jj] = key_2char2num(peerMACStr[kk], peerMACStr[kk + 1]);
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
@ -3220,7 +3220,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
plist = get_next(plist); plist = get_next(plist);
} }
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
if (!blnMatch) if (!blnMatch)
sprintf(go_devadd_str, "\n\ndev_add = NULL"); sprintf(go_devadd_str, "\n\ndev_add = NULL");
@ -3263,7 +3263,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3) for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3)
peerMAC[jj] = key_2char2num(peerMACStr[kk], peerMACStr[kk + 1]); peerMAC[jj] = key_2char2num(peerMACStr[kk], peerMACStr[kk + 1]);
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
@ -3300,7 +3300,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
plist = get_next(plist); plist = get_next(plist);
} }
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
if (!blnMatch) if (!blnMatch)
sprintf(dev_type_str, "\n\nN = 00"); sprintf(dev_type_str, "\n\nN = 00");
@ -3342,7 +3342,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev,
for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3) for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3)
peerMAC[jj] = key_2char2num(peerMACStr[kk], peerMACStr[kk + 1]); peerMAC[jj] = key_2char2num(peerMACStr[kk], peerMACStr[kk + 1]);
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
@ -3371,7 +3371,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev,
plist = get_next(plist); plist = get_next(plist);
} }
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
if (!blnMatch) if (!blnMatch)
sprintf(dev_name_str, "\n\nN = 0000"); sprintf(dev_name_str, "\n\nN = 0000");
@ -3413,7 +3413,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3) for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3)
peerMAC[jj] = key_2char2num(peerMACStr[kk], peerMACStr[kk + 1]); peerMAC[jj] = key_2char2num(peerMACStr[kk], peerMACStr[kk + 1]);
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
@ -3445,7 +3445,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
plist = get_next(plist); plist = get_next(plist);
} }
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
if (!blnMatch) { if (!blnMatch) {
sprintf(inv_proc_str, "\nIP =-1"); sprintf(inv_proc_str, "\nIP =-1");
@ -3495,7 +3495,7 @@ static int rtw_p2p_connect(struct net_device *dev,
for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3) for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3)
peerMAC[jj] = key_2char2num(extra[kk], extra[kk + 1]); peerMAC[jj] = key_2char2num(extra[kk], extra[kk + 1]);
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
@ -3513,7 +3513,7 @@ static int rtw_p2p_connect(struct net_device *dev,
plist = get_next(plist); plist = get_next(plist);
} }
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
if (uintPeerChannel) { if (uintPeerChannel) {
_rtw_memset(&pwdinfo->nego_req_info, 0x00, sizeof(struct tx_nego_req_info)); _rtw_memset(&pwdinfo->nego_req_info, 0x00, sizeof(struct tx_nego_req_info));
@ -3590,7 +3590,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3) for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3)
pinvite_req_info->peer_macaddr[jj] = key_2char2num(extra[kk], extra[kk + 1]); pinvite_req_info->peer_macaddr[jj] = key_2char2num(extra[kk], extra[kk + 1]);
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
@ -3627,7 +3627,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
plist = get_next(plist); plist = get_next(plist);
} }
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
if (uintPeerChannel) { if (uintPeerChannel) {
/* Store the GO's bssid */ /* Store the GO's bssid */
@ -3740,7 +3740,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
return ret; return ret;
} }
spin_lock(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&pmlmepriv->scanned_queue.lock);
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
@ -3786,7 +3786,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
plist = get_next(plist); plist = get_next(plist);
} }
spin_unlock(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
if (uintPeerChannel) { if (uintPeerChannel) {
DBG_88E("[%s] peer channel: %d!\n", __func__, uintPeerChannel); DBG_88E("[%s] peer channel: %d!\n", __func__, uintPeerChannel);
@ -4434,7 +4434,7 @@ static int rtw_dbg_port(struct net_device *dev,
#ifdef CONFIG_88EU_AP_MODE #ifdef CONFIG_88EU_AP_MODE
DBG_88E("sta_dz_bitmap = 0x%x, tim_bitmap = 0x%x\n", pstapriv->sta_dz_bitmap, pstapriv->tim_bitmap); DBG_88E("sta_dz_bitmap = 0x%x, tim_bitmap = 0x%x\n", pstapriv->sta_dz_bitmap, pstapriv->tim_bitmap);
#endif #endif
spin_lock(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
for (i = 0; i < NUM_STA; i++) { for (i = 0; i < NUM_STA; i++) {
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
@ -4472,7 +4472,7 @@ static int rtw_dbg_port(struct net_device *dev,
} }
} }
} }
spin_unlock(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
} }
break; break;
case 0x0c:/* dump rx/tx packet */ case 0x0c:/* dump rx/tx packet */
@ -5256,13 +5256,13 @@ static int rtw_del_sta(struct net_device *dev, struct ieee_param *param)
psta = rtw_get_stainfo(pstapriv, param->sta_addr); psta = rtw_get_stainfo(pstapriv, param->sta_addr);
if (psta) { if (psta) {
spin_lock(&pstapriv->asoc_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock);
if (!rtw_is_list_empty(&psta->asoc_list)) { if (!rtw_is_list_empty(&psta->asoc_list)) {
rtw_list_delete(&psta->asoc_list); rtw_list_delete(&psta->asoc_list);
pstapriv->asoc_list_cnt--; pstapriv->asoc_list_cnt--;
updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING); updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
} }
spin_unlock(&pstapriv->asoc_list_lock); spin_unlock_bh(&pstapriv->asoc_list_lock);
associated_clients_update(padapter, updated); associated_clients_update(padapter, updated);
psta = NULL; psta = NULL;
} else { } else {

View file

@ -163,12 +163,12 @@ void rtw_os_xmit_schedule(struct adapter *padapter)
pxmitpriv = &padapter->xmitpriv; pxmitpriv = &padapter->xmitpriv;
spin_lock(&pxmitpriv->lock); spin_lock_bh(&pxmitpriv->lock);
if (rtw_txframes_pending(padapter)) if (rtw_txframes_pending(padapter))
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet); tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
spin_unlock(&pxmitpriv->lock); spin_unlock_bh(&pxmitpriv->lock);
} }
static void rtw_check_xmit_resource(struct adapter *padapter, struct sk_buff *pkt) static void rtw_check_xmit_resource(struct adapter *padapter, struct sk_buff *pkt)
@ -198,7 +198,7 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
s32 res; s32 res;
spin_lock(&pstapriv->asoc_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list; phead = &pstapriv->asoc_list;
plist = get_next(phead); plist = get_next(phead);
@ -228,12 +228,12 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
DBG_88E("%s-%d: skb_copy() failed!\n", __func__, __LINE__); DBG_88E("%s-%d: skb_copy() failed!\n", __func__, __LINE__);
pxmitpriv->tx_drop++; pxmitpriv->tx_drop++;
spin_unlock(&pstapriv->asoc_list_lock); spin_unlock_bh(&pstapriv->asoc_list_lock);
return false; /* Caller shall tx this multicast frame via normal way. */ return false; /* Caller shall tx this multicast frame via normal way. */
} }
} }
spin_unlock(&pstapriv->asoc_list_lock); spin_unlock_bh(&pstapriv->asoc_list_lock);
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
return true; return true;
} }