aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/vht.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-07 05:58:58 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-02-15 03:41:29 -0500
commit4a34215ef7487b1cbd783e7cc485eb03de893bd0 (patch)
tree53fed3935c3a9e3138cf952c6ed95d32da05a796 /net/mac80211/vht.c
parent8cdc196b743c4224ffa59fef38133559c1fd2a5e (diff)
mac80211: pass station to ieee80211_vht_cap_ie_to_sta_vht_cap
Like with HT, make things a bit simpler in future patches by passing the station to ieee80211_vht_cap_ie_to_sta_vht_cap() instead of the vht_cap pointer. Also disable VHT here if HT isn't supported. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/vht.c')
-rw-r--r--net/mac80211/vht.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c
index f311388aeedf..1606aa165d5f 100644
--- a/net/mac80211/vht.c
+++ b/net/mac80211/vht.c
@@ -15,13 +15,15 @@
15void ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata, 15void ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata,
16 struct ieee80211_supported_band *sband, 16 struct ieee80211_supported_band *sband,
17 struct ieee80211_vht_cap *vht_cap_ie, 17 struct ieee80211_vht_cap *vht_cap_ie,
18 struct ieee80211_sta_vht_cap *vht_cap) 18 struct sta_info *sta)
19{ 19{
20 if (WARN_ON_ONCE(!vht_cap)) 20 struct ieee80211_sta_vht_cap *vht_cap = &sta->sta.vht_cap;
21 return;
22 21
23 memset(vht_cap, 0, sizeof(*vht_cap)); 22 memset(vht_cap, 0, sizeof(*vht_cap));
24 23
24 if (!sta->sta.ht_cap.ht_supported)
25 return;
26
25 if (!vht_cap_ie || !sband->vht_cap.vht_supported) 27 if (!vht_cap_ie || !sband->vht_cap.vht_supported)
26 return; 28 return;
27 29