diff options
Diffstat (limited to 'drivers/staging/r8188eu/core/rtw_sta_mgt.c')
-rw-r--r-- | drivers/staging/r8188eu/core/rtw_sta_mgt.c | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r8188eu/core/rtw_sta_mgt.c index f6dffed53a60..a3d4d5d8a785 100644 --- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c +++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c @@ -18,14 +18,12 @@ static void _rtw_init_stainfo(struct sta_info *psta) spin_lock_init(&psta->lock); INIT_LIST_HEAD(&psta->list); INIT_LIST_HEAD(&psta->hash_list); - _rtw_init_queue(&psta->sleep_q); + rtw_init_queue(&psta->sleep_q); psta->sleepq_len = 0; _rtw_init_sta_xmit_priv(&psta->sta_xmitpriv); _rtw_init_sta_recv_priv(&psta->sta_recvpriv); -#ifdef CONFIG_88EU_AP_MODE - INIT_LIST_HEAD(&psta->asoc_list); INIT_LIST_HEAD(&psta->auth_list); @@ -38,21 +36,16 @@ static void _rtw_init_stainfo(struct sta_info *psta) psta->bpairwise_key_installed = false; -#ifdef CONFIG_88EU_AP_MODE psta->nonerp_set = 0; psta->no_short_slot_time_set = 0; psta->no_short_preamble_set = 0; psta->no_ht_gf_set = 0; psta->no_ht_set = 0; psta->ht_20mhz_set = 0; -#endif psta->under_exist_checking = 0; psta->keep_alive_trycnt = 0; - -#endif /* CONFIG_88EU_AP_MODE */ - } u32 _rtw_init_sta_priv(struct sta_priv *pstapriv) @@ -68,13 +61,13 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv) pstapriv->pstainfo_buf = pstapriv->pallocated_stainfo_buf + 4 - ((size_t)(pstapriv->pallocated_stainfo_buf) & 3); - _rtw_init_queue(&pstapriv->free_sta_queue); + rtw_init_queue(&pstapriv->free_sta_queue); spin_lock_init(&pstapriv->sta_hash_lock); pstapriv->asoc_sta_count = 0; - _rtw_init_queue(&pstapriv->sleep_q); - _rtw_init_queue(&pstapriv->wakeup_q); + rtw_init_queue(&pstapriv->sleep_q); + rtw_init_queue(&pstapriv->wakeup_q); psta = (struct sta_info *)(pstapriv->pstainfo_buf); @@ -88,8 +81,6 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv) psta++; } -#ifdef CONFIG_88EU_AP_MODE - pstapriv->sta_dz_bitmap = 0; pstapriv->tim_bitmap = 0; @@ -104,7 +95,6 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv) pstapriv->assoc_to = 3; pstapriv->expire_to = 3; /* 3*2 = 6 sec */ pstapriv->max_num_sta = NUM_STA; -#endif return _SUCCESS; } @@ -155,9 +145,8 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv) spin_unlock_bh(&pstapriv->sta_hash_lock); /*===============================*/ - if (pstapriv->pallocated_stainfo_buf) - vfree(pstapriv->pallocated_stainfo_buf); - } + vfree(pstapriv->pallocated_stainfo_buf); + } return _SUCCESS; } @@ -222,7 +211,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) preorder_ctrl->wend_b = 0xffff; preorder_ctrl->wsize_b = 64;/* 64; */ - _rtw_init_queue(&preorder_ctrl->pending_recvframe_queue); + rtw_init_queue(&preorder_ctrl->pending_recvframe_queue); rtw_init_recv_timer(preorder_ctrl); } @@ -321,9 +310,7 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta) } if (!(psta->state & WIFI_AP_STATE)) - rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, false); - -#ifdef CONFIG_88EU_AP_MODE + rtl8188e_SetHalODMVar(padapter, HAL_ODM_STA_INFO, psta, false); spin_lock_bh(&pstapriv->auth_list_lock); if (!list_empty(&psta->auth_list)) { @@ -354,8 +341,6 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta) psta->under_exist_checking = 0; -#endif /* CONFIG_88EU_AP_MODE */ - spin_lock_bh(&pfree_sta_queue->lock); list_add_tail(&psta->list, get_list_head(pfree_sta_queue)); spin_unlock_bh(&pfree_sta_queue->lock); @@ -471,7 +456,6 @@ struct sta_info *rtw_get_bcmc_stainfo(struct adapter *padapter) u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr) { u8 res = true; -#ifdef CONFIG_88EU_AP_MODE struct list_head *plist, *phead; struct rtw_wlan_acl_node *paclnode; u8 match = false; @@ -502,7 +486,5 @@ u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr) else res = true; -#endif - return res; } |