rtl8188eu: Remove wrappers around spin_lock_bh and spin_unlock_bh

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-03-06 11:54:48 -06:00
parent dc4dbd3a7c
commit c0ef452bab
19 changed files with 389 additions and 604 deletions

View file

@ -348,7 +348,6 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl
}
/* To reduce PBC Overlap rate */
/* _enter_critical_bh(&pwdev_priv->scan_req_lock, &irqL); */
if(wdev_to_priv(wdev)->scan_request != NULL)
{
u8 *psr=NULL, sr = 0;
@ -1759,7 +1758,7 @@ void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv, bool abor
{
_irqL irqL;
_enter_critical_bh(&pwdev_priv->scan_req_lock, &irqL);
spin_lock_bh(&pwdev_priv->scan_req_lock);
if(pwdev_priv->scan_request != NULL)
{
/* struct cfg80211_scan_request *scan_request = pwdev_priv->scan_request; */
@ -1786,7 +1785,7 @@ void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv, bool abor
DBG_871X("%s without scan req\n", __FUNCTION__);
#endif
}
_exit_critical_bh(&pwdev_priv->scan_req_lock, &irqL);
spin_unlock_bh(&pwdev_priv->scan_req_lock);
}
void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter)
@ -1808,7 +1807,7 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter)
DBG_8192C("%s\n", __func__);
#endif
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
phead = get_list_head(queue);
plist = get_next(phead);
@ -1833,7 +1832,7 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter)
}
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
/* call this after other things have been done */
rtw_cfg80211_indicate_scan_done(wdev_to_priv(padapter->rtw_wdev), false);
@ -1988,9 +1987,9 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
DBG_871X(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
_enter_critical_bh(&pwdev_priv->scan_req_lock, &irqL);
spin_lock_bh(&pwdev_priv->scan_req_lock);
pwdev_priv->scan_request = request;
_exit_critical_bh(&pwdev_priv->scan_req_lock, &irqL);
spin_unlock_bh(&pwdev_priv->scan_req_lock);
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
{
@ -2116,7 +2115,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
ch[i].flags = request->channels[i]->flags;
}
_enter_critical_bh(&pmlmepriv->lock, &irqL);
spin_lock_bh(&pmlmepriv->lock);
if (request->n_channels == 1) {
for(i=1;i<survey_times_for_one_ch;i++)
memcpy(&ch[i], &ch[0], sizeof(struct rtw_ieee80211_channel));
@ -2131,7 +2130,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
} else {
_status = rtw_sitesurvey_cmd(padapter, ssid, RTW_SSID_SCAN_AMOUNT, NULL, 0);
}
_exit_critical_bh(&pmlmepriv->lock, &irqL);
spin_unlock_bh(&pmlmepriv->lock);
if(_status == false)
@ -3637,7 +3636,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
}
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list;
plist = get_next(phead);
@ -3662,9 +3661,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
rtw_list_delete(&psta->asoc_list);
pstapriv->asoc_list_cnt--;
/* _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); */
updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
/* _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); */
psta = NULL;
@ -3675,7 +3672,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
}
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_unlock_bh(&pstapriv->asoc_list_lock);
associated_clients_update(padapter, updated);

View file

@ -1502,7 +1502,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
}
authmode = padapter->securitypriv.ndisauthtype;
_enter_critical_bh(&queue->lock, &irqL);
spin_lock_bh(&queue->lock);
phead = get_list_head(queue);
pmlmepriv->pscanned = get_next(phead);
@ -1524,7 +1524,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
if(!rtw_set_802_11_infrastructure_mode(padapter, pnetwork->network.InfrastructureMode))
{
ret = -1;
_exit_critical_bh(&queue->lock, &irqL);
spin_unlock_bh(&queue->lock);
goto exit;
}
@ -1532,7 +1532,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
}
}
_exit_critical_bh(&queue->lock, &irqL);
spin_unlock_bh(&queue->lock);
rtw_set_802_11_authentication_mode(padapter, authmode);
/* set_802_11_encryption_mode(padapter, padapter->securitypriv.ndisencryptstatus); */
@ -1721,11 +1721,11 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
DBG_871X("IW_SCAN_THIS_ESSID, ssid=%s, len=%d\n", req->essid, req->essid_len);
_enter_critical_bh(&pmlmepriv->lock, &irqL);
spin_lock_bh(&pmlmepriv->lock);
_status = rtw_sitesurvey_cmd(padapter, ssid, 1, NULL, 0);
_exit_critical_bh(&pmlmepriv->lock, &irqL);
spin_unlock_bh(&pmlmepriv->lock);
}
else if (req->scan_type == IW_SCAN_TYPE_PASSIVE)
@ -1876,7 +1876,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
return -EAGAIN;
}
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
phead = get_list_head(queue);
plist = get_next(phead);
@ -1905,7 +1905,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
}
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
wrqu->data.length = ev-extra;
wrqu->data.flags = 0;
@ -2004,7 +2004,7 @@ static int rtw_wx_set_essid(struct net_device *dev,
src_ssid = ndis_ssid.Ssid;
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_, ("rtw_wx_set_essid: ssid=[%s]\n", src_ssid));
_enter_critical_bh(&queue->lock, &irqL);
spin_lock_bh(&queue->lock);
phead = get_list_head(queue);
pmlmepriv->pscanned = get_next(phead);
@ -2041,18 +2041,17 @@ static int rtw_wx_set_essid(struct net_device *dev,
if (rtw_set_802_11_infrastructure_mode(padapter, pnetwork->network.InfrastructureMode) == false)
{
ret = -1;
_exit_critical_bh(&queue->lock, &irqL);
spin_unlock_bh(&queue->lock);
goto exit;
}
break;
}
}
_exit_critical_bh(&queue->lock, &irqL);
spin_unlock_bh(&queue->lock);
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_,
("set ssid: set_802_11_auth. mode=%d\n", authmode));
rtw_set_802_11_authentication_mode(padapter, authmode);
/* set_802_11_encryption_mode(padapter, padapter->securitypriv.ndisencryptstatus); */
if (rtw_set_802_11_ssid(padapter, &ndis_ssid) == false) {
ret = -1;
goto exit;
@ -3262,7 +3261,7 @@ static int rtw_get_ap_info(struct net_device *dev,
goto exit;
}
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
phead = get_list_head(queue);
plist = get_next(phead);
@ -3279,7 +3278,7 @@ static int rtw_get_ap_info(struct net_device *dev,
if(hwaddr_aton_i(data, bssid))
{
DBG_871X("Invalid BSSID '%s'.\n", (u8*)data);
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
return -EINVAL;
}
@ -3308,7 +3307,7 @@ static int rtw_get_ap_info(struct net_device *dev,
}
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
if(pdata->length>=34) {
if(copy_to_user((u8 __user *)pdata->pointer+32, (u8*)&pdata->flags, 1)) {
@ -3862,7 +3861,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
macstr2num(peerMAC, subcmd);
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
phead = get_list_head(queue);
plist = get_next(phead);
@ -3896,18 +3895,15 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
}
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
if (!blnMatch)
{
sprintf(attr_content_str, "\n\nM=0000");
}
wrqu->data.length = strlen(attr_content_str);
memcpy(extra, attr_content_str, wrqu->data.length);
return ret;
}
#ifdef CONFIG_P2P
@ -3998,7 +3994,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
macstr2num(peerMAC, subcmd);
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
phead = get_list_head(queue);
plist = get_next(phead);
@ -4045,13 +4041,11 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
}
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
if (!blnMatch)
{
if (!blnMatch) {
sprintf(go_devadd_str, "\n\ndev_add=NULL");
} else
{
} else {
sprintf(go_devadd_str, "\n\ndev_add=%.2X:%.2X:%.2X:%.2X:%.2X:%.2X",
attr_content[0], attr_content[1], attr_content[2], attr_content[3], attr_content[4], attr_content[5]);
}
@ -4090,7 +4084,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
macstr2num(peerMAC, subcmd);
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
phead = get_list_head(queue);
plist = get_next(phead);
@ -4127,18 +4121,15 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
}
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
if (!blnMatch)
{
sprintf(dev_type_str, "\n\nN=00");
}
wrqu->data.length = strlen(dev_type_str);
memcpy(extra, dev_type_str, wrqu->data.length);
return ret;
}
static int rtw_p2p_get_device_name(struct net_device *dev,
@ -4168,7 +4159,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev,
macstr2num(peerMAC, subcmd);
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
phead = get_list_head(queue);
plist = get_next(phead);
@ -4201,18 +4192,15 @@ static int rtw_p2p_get_device_name(struct net_device *dev,
}
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
if (!blnMatch)
{
sprintf(dev_name_str, "\n\nN=0000");
}
wrqu->data.length = strlen(dev_name_str);
memcpy(extra, dev_name_str, wrqu->data.length);
return ret;
}
static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
@ -4242,7 +4230,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
macstr2num(peerMAC, subcmd);
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
phead = get_list_head(queue);
plist = get_next(phead);
@ -4281,27 +4269,21 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
}
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
if (!blnMatch)
{
if (!blnMatch) {
sprintf(inv_proc_str, "\nIP=-1");
} else
{
} else {
if (attr_content[0] && 0x20)
{
sprintf(inv_proc_str, "\nIP=1");
} else
{
else
sprintf(inv_proc_str, "\nIP=0");
}
}
wrqu->data.length = strlen(inv_proc_str);
memcpy(extra, inv_proc_str, wrqu->data.length);
return ret;
}
static int rtw_p2p_connect(struct net_device *dev,
@ -4347,7 +4329,7 @@ static int rtw_p2p_connect(struct net_device *dev,
peerMAC[ jj ] = key_2char2num( extra[kk], extra[kk+ 1] );
}
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
phead = get_list_head(queue);
plist = get_next(phead);
@ -4368,7 +4350,7 @@ static int rtw_p2p_connect(struct net_device *dev,
}
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
if ( uintPeerChannel ) {
memset( &pwdinfo->nego_req_info, 0x00, sizeof( struct tx_nego_req_info ) );
@ -4462,7 +4444,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
pinvite_req_info->peer_macaddr[ jj ] = key_2char2num( extra[kk], extra[kk+ 1] );
}
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
phead = get_list_head(queue);
plist = get_next(phead);
@ -4508,7 +4490,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
}
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
#ifdef CONFIG_P2P
if ( uintPeerChannel )
@ -4754,7 +4736,7 @@ static int rtw_p2p_set_pc(struct net_device *dev,
peerMAC[ jj ] = key_2char2num( extra[kk], extra[kk+ 1] );
}
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
phead = get_list_head(queue);
plist = get_next(phead);
@ -4802,7 +4784,7 @@ static int rtw_p2p_set_pc(struct net_device *dev,
}
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
printk( "[%s] channel = %d\n", __FUNCTION__, uintPeerChannel );
if ( uintPeerChannel )
@ -5087,7 +5069,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
return( ret );
}
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
phead = get_list_head(queue);
plist = get_next(phead);
@ -5144,7 +5126,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
plist = get_next(plist);
}
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
if ( uintPeerChannel )
{
@ -6006,7 +5988,7 @@ static int rtw_dbg_port(struct net_device *dev,
#ifdef CONFIG_AP_MODE
DBG_871X("sta_dz_bitmap=0x%x, tim_bitmap=0x%x\n", pstapriv->sta_dz_bitmap, pstapriv->tim_bitmap);
#endif
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
spin_lock_bh(&pstapriv->sta_hash_lock);
for(i=0; i< NUM_STA; i++)
{
@ -6055,7 +6037,7 @@ static int rtw_dbg_port(struct net_device *dev,
}
}
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
spin_unlock_bh(&pstapriv->sta_hash_lock);
}
break;
@ -6065,7 +6047,7 @@ static int rtw_dbg_port(struct net_device *dev,
int i, j;
_list *plist, *phead;
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
spin_lock_bh(&pstapriv->sta_hash_lock);
for(i=0; i< NUM_STA; i++)
{
@ -6105,7 +6087,7 @@ static int rtw_dbg_port(struct net_device *dev,
}
}
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
spin_unlock_bh(&pstapriv->sta_hash_lock);
#endif
}
break;
@ -7016,31 +6998,14 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param)
return -EINVAL;
}
/*
psta = rtw_get_stainfo(pstapriv, param->sta_addr);
if(psta)
{
DBG_871X("rtw_add_sta(), free has been added psta=%p\n", psta);
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
rtw_free_stainfo(padapter, psta);
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
psta = NULL;
}
*/
/* psta = rtw_alloc_stainfo(pstapriv, param->sta_addr); */
psta = rtw_get_stainfo(pstapriv, param->sta_addr);
if(psta)
{
int flags = param->u.add_sta.flags;
/* DBG_871X("rtw_add_sta(), init sta's variables, psta=%p\n", psta); */
psta->aid = param->u.add_sta.aid;/* aid=1~2007 */
memcpy(psta->bssrateset, param->u.add_sta.tx_supp_rates, 16);
/* check wmm cap. */
if(WLAN_STA_WME&flags)
psta->qos_option = 1;
@ -7105,17 +7070,14 @@ static int rtw_del_sta(struct net_device *dev, struct ieee_param *param)
{
u8 updated;
/* DBG_871X("free psta=%p, aid=%d\n", psta, psta->aid); */
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_lock_bh(&pstapriv->asoc_list_lock);
if(rtw_is_list_empty(&psta->asoc_list)==false)
{
rtw_list_delete(&psta->asoc_list);
pstapriv->asoc_list_cnt--;
updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
}
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_lock_bh(&pstapriv->asoc_list_lock);
associated_clients_update(padapter, updated);
@ -9083,9 +9045,9 @@ static s32 createpseudoadhoc(struct adapter *padapter)
rtw_update_registrypriv_dev_network(padapter);
rtw_generate_random_ibss(pibss);
_enter_critical_bh(&pmlmepriv->lock, &irqL);
spin_lock_bh(&pmlmepriv->lock);
pmlmepriv->fw_state = WIFI_ADHOC_MASTER_STATE;
_exit_critical_bh(&pmlmepriv->lock, &irqL);
spin_unlock_bh(&pmlmepriv->lock);
{
struct wlan_network *pcur_network;
@ -9142,9 +9104,9 @@ static struct xmit_frame* createloopbackpkt(struct adapter *padapter, u32 size)
pframe->padapter = padapter;
/* 2 2. allocate xmit buffer */
_enter_critical_bh(&pxmitpriv->lock, &irqL);
spin_lock_bh(&pxmitpriv->lock);
pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
_exit_critical_bh(&pxmitpriv->lock, &irqL);
spin_unlock_bh(&pxmitpriv->lock);
if (pxmitbuf == NULL) {
rtw_free_xmitframe(pxmitpriv, pframe);
return NULL;

View file

@ -188,7 +188,7 @@ void rtw_reset_securitypriv( struct adapter *adapter )
_irqL irqL;
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
_enter_critical_bh(&adapter->security_key_mutex, &irqL);
spin_lock_bh(&adapter->security_key_mutex);
if(adapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)/* 802.1x */
{
@ -240,7 +240,7 @@ void rtw_reset_securitypriv( struct adapter *adapter )
/* */
}
/* add for CONFIG_IEEE80211W, none 11w also can use */
_exit_critical_bh(&adapter->security_key_mutex, &irqL);
spin_unlock_bh(&adapter->security_key_mutex);
}
void rtw_os_indicate_disconnect( struct adapter *adapter )

View file

@ -232,14 +232,12 @@ void rtw_os_xmit_schedule(struct adapter *padapter)
pxmitpriv = &padapter->xmitpriv;
_enter_critical_bh(&pxmitpriv->lock, &irqL);
spin_lock_bh(&pxmitpriv->lock);
if(rtw_txframes_pending(padapter))
{
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
}
_exit_critical_bh(&pxmitpriv->lock, &irqL);
spin_unlock_bh(&pxmitpriv->lock);
}
static void rtw_check_xmit_resource(struct adapter *padapter, _pkt *pkt)
@ -286,7 +284,7 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
int i;
s32 res;
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list;
plist = get_next(phead);
@ -301,7 +299,7 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
chk_alive_list[chk_alive_num++] = stainfo_offset;
}
}
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_unlock_bh(&pstapriv->asoc_list_lock);
for (i = 0; i < chk_alive_num; i++) {
psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);