mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
mac80211: order IEs in association request correctly
In association request frames, there may be IEs passed from userspace (such as interworking IEs) between HT and VHT, so add code to insert those inbetween them. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
4d9523005f
commit
3de3802c3d
1 changed files with 28 additions and 0 deletions
|
@ -756,6 +756,34 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
|
||||||
ieee80211_add_ht_ie(sdata, skb, assoc_data->ap_ht_param,
|
ieee80211_add_ht_ie(sdata, skb, assoc_data->ap_ht_param,
|
||||||
sband, chan, sdata->smps_mode);
|
sband, chan, sdata->smps_mode);
|
||||||
|
|
||||||
|
/* if present, add any custom IEs that go before VHT */
|
||||||
|
if (assoc_data->ie_len) {
|
||||||
|
static const u8 before_vht[] = {
|
||||||
|
WLAN_EID_SSID,
|
||||||
|
WLAN_EID_SUPP_RATES,
|
||||||
|
WLAN_EID_EXT_SUPP_RATES,
|
||||||
|
WLAN_EID_PWR_CAPABILITY,
|
||||||
|
WLAN_EID_SUPPORTED_CHANNELS,
|
||||||
|
WLAN_EID_RSN,
|
||||||
|
WLAN_EID_QOS_CAPA,
|
||||||
|
WLAN_EID_RRM_ENABLED_CAPABILITIES,
|
||||||
|
WLAN_EID_MOBILITY_DOMAIN,
|
||||||
|
WLAN_EID_SUPPORTED_REGULATORY_CLASSES,
|
||||||
|
WLAN_EID_HT_CAPABILITY,
|
||||||
|
WLAN_EID_BSS_COEX_2040,
|
||||||
|
WLAN_EID_EXT_CAPABILITY,
|
||||||
|
WLAN_EID_QOS_TRAFFIC_CAPA,
|
||||||
|
WLAN_EID_TIM_BCAST_REQ,
|
||||||
|
WLAN_EID_INTERWORKING,
|
||||||
|
};
|
||||||
|
noffset = ieee80211_ie_split(assoc_data->ie, assoc_data->ie_len,
|
||||||
|
before_vht, ARRAY_SIZE(before_vht),
|
||||||
|
offset);
|
||||||
|
pos = skb_put(skb, noffset - offset);
|
||||||
|
memcpy(pos, assoc_data->ie + offset, noffset - offset);
|
||||||
|
offset = noffset;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(ifmgd->flags & IEEE80211_STA_DISABLE_VHT))
|
if (!(ifmgd->flags & IEEE80211_STA_DISABLE_VHT))
|
||||||
ieee80211_add_vht_ie(sdata, skb, sband,
|
ieee80211_add_vht_ie(sdata, skb, sband,
|
||||||
&assoc_data->ap_vht_cap);
|
&assoc_data->ap_vht_cap);
|
||||||
|
|
Loading…
Reference in a new issue