From d6aed151f2460da501e41373842732ef4721c06d Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Fri, 12 Dec 2014 21:50:54 -0600 Subject: [PATCH] rtl8188eu: Simplify handling of LE variables Signed-off-by: Larry Finger --- core/rtw_ap.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 3345fcf..3ed2091 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -621,6 +621,8 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta) struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct ht_priv *phtpriv_ap = &pmlmepriv->htpriv; struct ht_priv *phtpriv_sta = &psta->htpriv; + u16 sta_cap_info; + u16 ap_cap_info; psta->mac_id = psta->aid+1; 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) { /* check if sta supports rx ampdu */ 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 */ - if ((le16_to_cpu(phtpriv_sta->ht_cap.cap_info) & - le16_to_cpu(phtpriv_ap->ht_cap.cap_info)) & + if ((sta_cap_info & ap_cap_info) & (IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40)) phtpriv_sta->sgi = true; /* bwmode */ - if ((le16_to_cpu(phtpriv_sta->ht_cap.cap_info) & - le16_to_cpu(phtpriv_ap->ht_cap.cap_info)) & - IEEE80211_HT_CAP_SUP_WIDTH) { + if ((sta_cap_info & ap_cap_info) & IEEE80211_HT_CAP_SUP_WIDTH) { phtpriv_sta->bwmode = pmlmeext->cur_bwmode; phtpriv_sta->ch_offset = pmlmeext->cur_ch_offset; }