From 4a34215ef7487b1cbd783e7cc485eb03de893bd0 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Thu, 7 Feb 2013 11:58:58 +0100 Subject: 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 --- net/mac80211/vht.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'net/mac80211/vht.c') 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 @@ void ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata, struct ieee80211_supported_band *sband, struct ieee80211_vht_cap *vht_cap_ie, - struct ieee80211_sta_vht_cap *vht_cap) + struct sta_info *sta) { - if (WARN_ON_ONCE(!vht_cap)) - return; + struct ieee80211_sta_vht_cap *vht_cap = &sta->sta.vht_cap; memset(vht_cap, 0, sizeof(*vht_cap)); + if (!sta->sta.ht_cap.ht_supported) + return; + if (!vht_cap_ie || !sband->vht_cap.vht_supported) return; -- cgit v1.2.3-59-g8ed1b