diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-02-07 05:58:58 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-15 03:41:29 -0500 |
commit | 4a34215ef7487b1cbd783e7cc485eb03de893bd0 (patch) | |
tree | 53fed3935c3a9e3138cf952c6ed95d32da05a796 | |
parent | 8cdc196b743c4224ffa59fef38133559c1fd2a5e (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>
-rw-r--r-- | net/mac80211/cfg.c | 3 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 3 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 3 | ||||
-rw-r--r-- | net/mac80211/vht.c | 8 |
4 files changed, 9 insertions, 8 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 9b179309e073..9c9496d01120 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1257,8 +1257,7 @@ static int sta_apply_parameters(struct ieee80211_local *local, | |||
1257 | 1257 | ||
1258 | if (params->vht_capa) | 1258 | if (params->vht_capa) |
1259 | ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, sband, | 1259 | ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, sband, |
1260 | params->vht_capa, | 1260 | params->vht_capa, sta); |
1261 | &sta->sta.vht_cap); | ||
1262 | 1261 | ||
1263 | if (ieee80211_vif_is_mesh(&sdata->vif)) { | 1262 | if (ieee80211_vif_is_mesh(&sdata->vif)) { |
1264 | #ifdef CONFIG_MAC80211_MESH | 1263 | #ifdef CONFIG_MAC80211_MESH |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 8f9564460cb0..9206d43ca572 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1430,7 +1430,8 @@ u8 ieee80211_mcs_to_chains(const struct ieee80211_mcs_info *mcs); | |||
1430 | void ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata, | 1430 | void ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata, |
1431 | struct ieee80211_supported_band *sband, | 1431 | struct ieee80211_supported_band *sband, |
1432 | struct ieee80211_vht_cap *vht_cap_ie, | 1432 | struct ieee80211_vht_cap *vht_cap_ie, |
1433 | struct ieee80211_sta_vht_cap *vht_cap); | 1433 | struct sta_info *sta); |
1434 | |||
1434 | /* Spectrum management */ | 1435 | /* Spectrum management */ |
1435 | void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata, | 1436 | void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata, |
1436 | struct ieee80211_mgmt *mgmt, | 1437 | struct ieee80211_mgmt *mgmt, |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index ac1374a8c30a..58b6e67ffbed 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -2217,8 +2217,7 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata, | |||
2217 | 2217 | ||
2218 | if (elems.vht_cap_elem && !(ifmgd->flags & IEEE80211_STA_DISABLE_VHT)) | 2218 | if (elems.vht_cap_elem && !(ifmgd->flags & IEEE80211_STA_DISABLE_VHT)) |
2219 | ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, sband, | 2219 | ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, sband, |
2220 | elems.vht_cap_elem, | 2220 | elems.vht_cap_elem, sta); |
2221 | &sta->sta.vht_cap); | ||
2222 | 2221 | ||
2223 | rate_control_rate_init(sta); | 2222 | rate_control_rate_init(sta); |
2224 | 2223 | ||
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 @@ | |||
15 | void ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata, | 15 | void 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 | ||