diff options
author | Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> | 2013-07-11 12:07:46 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-07-16 02:58:12 -0400 |
commit | 2ec9c1f67ab1f58b5bf5ac19e4b61b9f75c83a04 (patch) | |
tree | 8e5b9f057f655cbbae4dd718173676f7b50d5b27 /net/mac80211/util.c | |
parent | bf3726457276c8773ec97da30c6459caf512b22f (diff) |
mac80211: fix regression when initializing ibss wmm params
There appear to be two regressions in ibss.c when calling
ieee80211_sta_def_wmm_params():
* the second argument should be a rate length, not a rate array. This
was introduced by my commit "mac80211: select and adjust bitrates
according to channel mode"
* the third argument is not initialized (anymore), making further
checks within this function useless.
Since ieee80211_sta_def_wmm_params() is only used by ibss anyway,
remove the function entirely and handle the operating mode decision
immediately.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 1e45891ca219..d23c5a705a68 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -1073,32 +1073,6 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata, | |||
1073 | } | 1073 | } |
1074 | } | 1074 | } |
1075 | 1075 | ||
1076 | void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata, | ||
1077 | const size_t supp_rates_len, | ||
1078 | const u8 *supp_rates) | ||
1079 | { | ||
1080 | struct ieee80211_chanctx_conf *chanctx_conf; | ||
1081 | int i, have_higher_than_11mbit = 0; | ||
1082 | |||
1083 | /* cf. IEEE 802.11 9.2.12 */ | ||
1084 | for (i = 0; i < supp_rates_len; i++) | ||
1085 | if ((supp_rates[i] & 0x7f) * 5 > 110) | ||
1086 | have_higher_than_11mbit = 1; | ||
1087 | |||
1088 | rcu_read_lock(); | ||
1089 | chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); | ||
1090 | |||
1091 | if (chanctx_conf && | ||
1092 | chanctx_conf->def.chan->band == IEEE80211_BAND_2GHZ && | ||
1093 | have_higher_than_11mbit) | ||
1094 | sdata->flags |= IEEE80211_SDATA_OPERATING_GMODE; | ||
1095 | else | ||
1096 | sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE; | ||
1097 | rcu_read_unlock(); | ||
1098 | |||
1099 | ieee80211_set_wmm_default(sdata, true); | ||
1100 | } | ||
1101 | |||
1102 | void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, | 1076 | void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, |
1103 | u16 transaction, u16 auth_alg, u16 status, | 1077 | u16 transaction, u16 auth_alg, u16 status, |
1104 | const u8 *extra, size_t extra_len, const u8 *da, | 1078 | const u8 *extra, size_t extra_len, const u8 *da, |