aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723au/core/rtw_ap.c
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2014-06-24 15:03:29 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-24 13:50:59 -0400
commit68e6c79609fc2d2d1132fd293f4d9dd7bdd514b5 (patch)
treefc7ce1cf5cede8a80fd1f8a1d2c930431aa58953 /drivers/staging/rtl8723au/core/rtw_ap.c
parentstaging: rtl8723au: rtw_generate_ie23a(): update network info as well as IE (diff)
downloadlinux-dev-68e6c79609fc2d2d1132fd293f4d9dd7bdd514b5.tar.xz
linux-dev-68e6c79609fc2d2d1132fd293f4d9dd7bdd514b5.zip
staging: rtl8723au: Stop carrying half the beacon frame header in the stored IE array
This gets rid of the odd carrying of half the beacon frame in the IE array stored for the network. Instead we rely on the relevant fields (timestamp, beacon_interval, and capability) stored in struct wlan_bssid_ex. Carrying only half the ieee80211_mgmt header led to a number of bugs and simply obfuscated the code. I have tried catching all instances relying on these three elements in the IEs array, but missed cases may still need to be tracked down. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723au/core/rtw_ap.c')
-rw-r--r--drivers/staging/rtl8723au/core/rtw_ap.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c
index c19ed951d103..5c30f7b269de 100644
--- a/drivers/staging/rtl8723au/core/rtw_ap.c
+++ b/drivers/staging/rtl8723au/core/rtw_ap.c
@@ -652,7 +652,6 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
struct wlan_bssid_ex *pnetwork_mlmeext = &pmlmeinfo->network;
struct ieee80211_ht_operation *pht_info = NULL;
- int bcn_fixed_size;
bcn_interval = (u16)pnetwork->beacon_interval;
cur_channel = pnetwork->DSConfig;
@@ -728,12 +727,9 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
DYNAMIC_ALL_FUNC_ENABLE);
}
/* set channel, bwmode */
- bcn_fixed_size = offsetof(struct ieee80211_mgmt, u.beacon.variable) -
- offsetof(struct ieee80211_mgmt, u.beacon);
- p = cfg80211_find_ie(WLAN_EID_HT_OPERATION,
- pnetwork->IEs + bcn_fixed_size,
- pnetwork->IELength - bcn_fixed_size);
+ p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, pnetwork->IEs,
+ pnetwork->IELength);
if (p && p[1]) {
pht_info = (struct ieee80211_ht_operation *)(p + 2);