|
@@ -94,7 +94,8 @@ static int ieee80211_compatible_rates(const u8 *supp_rates, int supp_rates_len,
|
|
|
|
|
|
/* frame sending functions */
|
|
/* frame sending functions */
|
|
|
|
|
|
-static void ieee80211_add_ht_ie(struct sk_buff *skb, const u8 *ht_info_ie,
|
|
|
|
|
|
+static void ieee80211_add_ht_ie(struct ieee80211_sub_if_data *sdata,
|
|
|
|
+ struct sk_buff *skb, const u8 *ht_info_ie,
|
|
struct ieee80211_supported_band *sband,
|
|
struct ieee80211_supported_band *sband,
|
|
struct ieee80211_channel *channel,
|
|
struct ieee80211_channel *channel,
|
|
enum ieee80211_smps_mode smps)
|
|
enum ieee80211_smps_mode smps)
|
|
@@ -102,7 +103,10 @@ static void ieee80211_add_ht_ie(struct sk_buff *skb, const u8 *ht_info_ie,
|
|
struct ieee80211_ht_info *ht_info;
|
|
struct ieee80211_ht_info *ht_info;
|
|
u8 *pos;
|
|
u8 *pos;
|
|
u32 flags = channel->flags;
|
|
u32 flags = channel->flags;
|
|
- u16 cap = sband->ht_cap.cap;
|
|
|
|
|
|
+ u16 cap;
|
|
|
|
+ struct ieee80211_sta_ht_cap ht_cap;
|
|
|
|
+
|
|
|
|
+ BUILD_BUG_ON(sizeof(ht_cap) != sizeof(sband->ht_cap));
|
|
|
|
|
|
if (!sband->ht_cap.ht_supported)
|
|
if (!sband->ht_cap.ht_supported)
|
|
return;
|
|
return;
|
|
@@ -113,9 +117,13 @@ static void ieee80211_add_ht_ie(struct sk_buff *skb, const u8 *ht_info_ie,
|
|
if (ht_info_ie[1] < sizeof(struct ieee80211_ht_info))
|
|
if (ht_info_ie[1] < sizeof(struct ieee80211_ht_info))
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
+ memcpy(&ht_cap, &sband->ht_cap, sizeof(ht_cap));
|
|
|
|
+ ieee80211_apply_htcap_overrides(sdata, &ht_cap);
|
|
|
|
+
|
|
ht_info = (struct ieee80211_ht_info *)(ht_info_ie + 2);
|
|
ht_info = (struct ieee80211_ht_info *)(ht_info_ie + 2);
|
|
|
|
|
|
/* determine capability flags */
|
|
/* determine capability flags */
|
|
|
|
+ cap = ht_cap.cap;
|
|
|
|
|
|
switch (ht_info->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
|
|
switch (ht_info->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
|
|
case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
|
|
case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
|
|
@@ -154,7 +162,7 @@ static void ieee80211_add_ht_ie(struct sk_buff *skb, const u8 *ht_info_ie,
|
|
|
|
|
|
/* reserve and fill IE */
|
|
/* reserve and fill IE */
|
|
pos = skb_put(skb, sizeof(struct ieee80211_ht_cap) + 2);
|
|
pos = skb_put(skb, sizeof(struct ieee80211_ht_cap) + 2);
|
|
- ieee80211_ie_build_ht_cap(pos, sband, cap);
|
|
|
|
|
|
+ ieee80211_ie_build_ht_cap(pos, &ht_cap, cap);
|
|
}
|
|
}
|
|
|
|
|
|
static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
|
|
static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
|
|
@@ -329,7 +337,7 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
|
|
|
|
|
|
if (wk->assoc.use_11n && wk->assoc.wmm_used &&
|
|
if (wk->assoc.use_11n && wk->assoc.wmm_used &&
|
|
local->hw.queues >= 4)
|
|
local->hw.queues >= 4)
|
|
- ieee80211_add_ht_ie(skb, wk->assoc.ht_information_ie,
|
|
|
|
|
|
+ ieee80211_add_ht_ie(sdata, skb, wk->assoc.ht_information_ie,
|
|
sband, wk->chan, wk->assoc.smps);
|
|
sband, wk->chan, wk->assoc.smps);
|
|
|
|
|
|
/* if present, add any custom non-vendor IEs that go after HT */
|
|
/* if present, add any custom non-vendor IEs that go after HT */
|