From: Jes Sorensen Date: Sat, 31 May 2014 16:05:14 +0000 (+0200) Subject: staging: rtl8723au: Don't carry ht_cap_info and ht_param in struct wlan_bcn_info X-Git-Tag: firefly_0821_release~176^2~3491^2~2101 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ed08b4de7c26a898b9deb65ee46c5d7eaf2bdd62;p=firefly-linux-kernel-4.4.55.git staging: rtl8723au: Don't carry ht_cap_info and ht_param in struct wlan_bcn_info These were just stored to check whether the beacon info had changed and print a debug message in this case. If we ever need this again, we can determine this change differently. Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_ieee80211.c b/drivers/staging/rtl8723au/core/rtw_ieee80211.c index 69d2423ac176..2740639ade94 100644 --- a/drivers/staging/rtl8723au/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8723au/core/rtw_ieee80211.c @@ -859,9 +859,6 @@ void rtw_get_bcn_info23a(struct wlan_network *pnetwork) u8 bencrypt = 0; /* u8 wpa_ie[255], rsn_ie[255]; */ u16 wpa_len = 0, rsn_len = 0; - struct ieee80211_ht_operation *pht_info; - struct ieee80211_ht_cap *pht_cap; - const u8 *p; cap = get_unaligned_le16( rtw_get_capability23a_from_ie(pnetwork->network.IEs)); @@ -901,25 +898,6 @@ void rtw_get_bcn_info23a(struct wlan_network *pnetwork) rtw_get_cipher_info(pnetwork); /* get bwmode and ch_offset */ - /* parsing HT_CAP_IE */ - p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, - pnetwork->network.IEs + _FIXED_IE_LENGTH_, - pnetwork->network.IELength - _FIXED_IE_LENGTH_); - if (p && p[1] > 0) { - pht_cap = (struct ieee80211_ht_cap *)(p + 2); - pnetwork->BcnInfo.ht_cap_info = pht_cap->cap_info; - } else - pnetwork->BcnInfo.ht_cap_info = 0; - - /* parsing HT_INFO_IE */ - p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, - pnetwork->network.IEs + _FIXED_IE_LENGTH_, - pnetwork->network.IELength - _FIXED_IE_LENGTH_); - if (p && p[1] > 0) { - pht_info = (struct ieee80211_ht_operation *)(p + 2); - pnetwork->BcnInfo.ht_info_infos_0 = pht_info->ht_param; - } else - pnetwork->BcnInfo.ht_info_infos_0 = 0; } /* show MCS rate, unit: 100Kbps */ diff --git a/drivers/staging/rtl8723au/core/rtw_wlan_util.c b/drivers/staging/rtl8723au/core/rtw_wlan_util.c index 6d69811b904c..8c007cddd4b9 100644 --- a/drivers/staging/rtl8723au/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8723au/core/rtw_wlan_util.c @@ -885,15 +885,12 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter, { struct wlan_network *cur_network = &Adapter->mlmepriv.cur_network; struct ieee80211_ht_operation *pht_info; - struct ieee80211_ht_cap *pht_cap; struct wlan_bssid_ex *bssid; unsigned short val16; u16 wpa_len = 0, rsn_len = 0; u8 encryp_protocol; int group_cipher = 0, pairwise_cipher = 0, is_8021x = 0, r; u32 bcn_channel; - unsigned short ht_cap_info; - unsigned char ht_info_infos_0; int len, pie_len, ie_offset; const u8 *p; u8 *pie; @@ -941,41 +938,6 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter, pie = bssid->IEs + ie_offset; pie_len = pkt_len - ie_offset; - p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, pie, pie_len); - if (p && p[1] > 0) { - pht_cap = (struct ieee80211_ht_cap *)(p + 2); - ht_cap_info = pht_cap->cap_info; - } else { - pht_cap = NULL; - ht_cap_info = 0; - } - - /* parsing HT_INFO_IE */ - p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, pie, pie_len); - if (p && p[1] > 0) { - pht_info = (struct ieee80211_ht_operation *)(p + 2); - ht_info_infos_0 = pht_info->ht_param; - } else { - pht_info = NULL; - ht_info_infos_0 = 0; - } - - if (ht_cap_info != cur_network->BcnInfo.ht_cap_info || - ((ht_info_infos_0 & 0x03) != - (cur_network->BcnInfo.ht_info_infos_0 & 0x03))) { - DBG_8723A("%s bcn now: ht_cap_info:%x ht_info_infos_0:%x\n", - __func__, ht_cap_info, ht_info_infos_0); - DBG_8723A("%s bcn link: ht_cap_info:%x ht_info_infos_0:%x\n", - __func__, cur_network->BcnInfo.ht_cap_info, - cur_network->BcnInfo.ht_info_infos_0); - DBG_8723A("%s bw mode change, disconnect\n", __func__); - /* bcn_info_update */ - cur_network->BcnInfo.ht_cap_info = ht_cap_info; - cur_network->BcnInfo.ht_info_infos_0 = ht_info_infos_0; - /* to do : need to check that whether modify related - register of BB or not */ - } - /* Checking for channel */ p = cfg80211_find_ie(WLAN_EID_DS_PARAMS, pie, pie_len); if (p) @@ -985,9 +947,10 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter, info for channel */ p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, pie, pie_len); - if (pht_info) + if (p && p[1] > 0) { + pht_info = (struct ieee80211_ht_operation *)(p + 2); bcn_channel = pht_info->primary_chan; - else { /* we don't find channel IE, so don't check it */ + } else { /* we don't find channel IE, so don't check it */ DBG_8723A("Oops: %s we don't find channel IE, so don't " "check it\n", __func__); bcn_channel = Adapter->mlmeextpriv.cur_channel; diff --git a/drivers/staging/rtl8723au/include/wlan_bssdef.h b/drivers/staging/rtl8723au/include/wlan_bssdef.h index 664015d049e8..b7176874c396 100644 --- a/drivers/staging/rtl8723au/include/wlan_bssdef.h +++ b/drivers/staging/rtl8723au/include/wlan_bssdef.h @@ -83,8 +83,6 @@ struct wlan_bcn_info { int is_8021x; /* bwmode 20/40 and ch_offset UP/LOW */ - unsigned short ht_cap_info; - unsigned char ht_info_infos_0; }; struct wlan_bssid_ex {