aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-21 11:40:19 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-03-06 10:35:48 -0500
commitdd5ecfeac8d1a96d0aba6bbcaec431756f8d8854 (patch)
tree0cb22d0f1cff85e89f280325cb250e8ac2211ceb /net/mac80211/mlme.c
parentee2aca343c9aa64d277a75a5df043299dc84cfd9 (diff)
mac80211: support VHT capability overrides
Support the cfg80211 API to override VHT capabilities on association. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 141577412d84..9784622cd3d1 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -609,6 +609,7 @@ static void ieee80211_add_vht_ie(struct ieee80211_sub_if_data *sdata,
609 BUILD_BUG_ON(sizeof(vht_cap) != sizeof(sband->vht_cap)); 609 BUILD_BUG_ON(sizeof(vht_cap) != sizeof(sband->vht_cap));
610 610
611 memcpy(&vht_cap, &sband->vht_cap, sizeof(vht_cap)); 611 memcpy(&vht_cap, &sband->vht_cap, sizeof(vht_cap));
612 ieee80211_apply_vhtcap_overrides(sdata, &vht_cap);
612 613
613 /* determine capability flags */ 614 /* determine capability flags */
614 cap = vht_cap.cap; 615 cap = vht_cap.cap;
@@ -1802,9 +1803,11 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
1802 sdata->vif.bss_conf.p2p_ctwindow = 0; 1803 sdata->vif.bss_conf.p2p_ctwindow = 0;
1803 sdata->vif.bss_conf.p2p_oppps = false; 1804 sdata->vif.bss_conf.p2p_oppps = false;
1804 1805
1805 /* on the next assoc, re-program HT parameters */ 1806 /* on the next assoc, re-program HT/VHT parameters */
1806 memset(&ifmgd->ht_capa, 0, sizeof(ifmgd->ht_capa)); 1807 memset(&ifmgd->ht_capa, 0, sizeof(ifmgd->ht_capa));
1807 memset(&ifmgd->ht_capa_mask, 0, sizeof(ifmgd->ht_capa_mask)); 1808 memset(&ifmgd->ht_capa_mask, 0, sizeof(ifmgd->ht_capa_mask));
1809 memset(&ifmgd->vht_capa, 0, sizeof(ifmgd->vht_capa));
1810 memset(&ifmgd->vht_capa_mask, 0, sizeof(ifmgd->vht_capa_mask));
1808 1811
1809 sdata->ap_power_level = IEEE80211_UNSET_POWER_LEVEL; 1812 sdata->ap_power_level = IEEE80211_UNSET_POWER_LEVEL;
1810 1813
@@ -4071,6 +4074,9 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
4071 ifmgd->flags |= IEEE80211_STA_DISABLE_VHT; 4074 ifmgd->flags |= IEEE80211_STA_DISABLE_VHT;
4072 } 4075 }
4073 4076
4077 if (req->flags & ASSOC_REQ_DISABLE_VHT)
4078 ifmgd->flags |= IEEE80211_STA_DISABLE_VHT;
4079
4074 /* Also disable HT if we don't support it or the AP doesn't use WMM */ 4080 /* Also disable HT if we don't support it or the AP doesn't use WMM */
4075 sband = local->hw.wiphy->bands[req->bss->channel->band]; 4081 sband = local->hw.wiphy->bands[req->bss->channel->band];
4076 if (!sband->ht_cap.ht_supported || 4082 if (!sband->ht_cap.ht_supported ||
@@ -4094,6 +4100,10 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
4094 memcpy(&ifmgd->ht_capa_mask, &req->ht_capa_mask, 4100 memcpy(&ifmgd->ht_capa_mask, &req->ht_capa_mask,
4095 sizeof(ifmgd->ht_capa_mask)); 4101 sizeof(ifmgd->ht_capa_mask));
4096 4102
4103 memcpy(&ifmgd->vht_capa, &req->vht_capa, sizeof(ifmgd->vht_capa));
4104 memcpy(&ifmgd->vht_capa_mask, &req->vht_capa_mask,
4105 sizeof(ifmgd->vht_capa_mask));
4106
4097 if (req->ie && req->ie_len) { 4107 if (req->ie && req->ie_len) {
4098 memcpy(assoc_data->ie, req->ie, req->ie_len); 4108 memcpy(assoc_data->ie, req->ie, req->ie_len);
4099 assoc_data->ie_len = req->ie_len; 4109 assoc_data->ie_len = req->ie_len;