mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 12:33:40 +00:00
rtl8188eu: Simplify handling of LE variables
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
15519e9bf3
commit
d6aed151f2
1 changed files with 6 additions and 5 deletions
|
@ -621,6 +621,8 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
|
||||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||||
struct ht_priv *phtpriv_ap = &pmlmepriv->htpriv;
|
struct ht_priv *phtpriv_ap = &pmlmepriv->htpriv;
|
||||||
struct ht_priv *phtpriv_sta = &psta->htpriv;
|
struct ht_priv *phtpriv_sta = &psta->htpriv;
|
||||||
|
u16 sta_cap_info;
|
||||||
|
u16 ap_cap_info;
|
||||||
|
|
||||||
psta->mac_id = psta->aid+1;
|
psta->mac_id = psta->aid+1;
|
||||||
DBG_88E("%s\n", __func__);
|
DBG_88E("%s\n", __func__);
|
||||||
|
@ -641,17 +643,16 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
|
||||||
if (phtpriv_sta->ht_option) {
|
if (phtpriv_sta->ht_option) {
|
||||||
/* check if sta supports rx ampdu */
|
/* check if sta supports rx ampdu */
|
||||||
phtpriv_sta->ampdu_enable = phtpriv_ap->ampdu_enable;
|
phtpriv_sta->ampdu_enable = phtpriv_ap->ampdu_enable;
|
||||||
|
sta_cap_info = le16_to_cpu(phtpriv_sta->ht_cap.cap_info);
|
||||||
|
ap_cap_info = le16_to_cpu(phtpriv_ap->ht_cap.cap_info);
|
||||||
|
|
||||||
/* check if sta support s Short GI */
|
/* check if sta support s Short GI */
|
||||||
if ((le16_to_cpu(phtpriv_sta->ht_cap.cap_info) &
|
if ((sta_cap_info & ap_cap_info) &
|
||||||
le16_to_cpu(phtpriv_ap->ht_cap.cap_info)) &
|
|
||||||
(IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40))
|
(IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40))
|
||||||
phtpriv_sta->sgi = true;
|
phtpriv_sta->sgi = true;
|
||||||
|
|
||||||
/* bwmode */
|
/* bwmode */
|
||||||
if ((le16_to_cpu(phtpriv_sta->ht_cap.cap_info) &
|
if ((sta_cap_info & ap_cap_info) & IEEE80211_HT_CAP_SUP_WIDTH) {
|
||||||
le16_to_cpu(phtpriv_ap->ht_cap.cap_info)) &
|
|
||||||
IEEE80211_HT_CAP_SUP_WIDTH) {
|
|
||||||
phtpriv_sta->bwmode = pmlmeext->cur_bwmode;
|
phtpriv_sta->bwmode = pmlmeext->cur_bwmode;
|
||||||
phtpriv_sta->ch_offset = pmlmeext->cur_ch_offset;
|
phtpriv_sta->ch_offset = pmlmeext->cur_ch_offset;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue