diff options
author | Janusz Dziedzic <janusz.dziedzic@tieto.com> | 2014-12-17 04:00:52 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-12-17 05:47:26 -0500 |
commit | d29544571507336811b81ca631baf6159cc8146a (patch) | |
tree | 9e3be3350e69e5febc1a7b0d7f52a8fa3afd3c59 | |
parent | 848955ccf0bdf42fff33e021a76f6daec98fe59b (diff) |
mac80211: notify NSS changed when IBSS and HT
When using IBSS in HT mode, we always get NSS=1
in rc_update callback. Force NSS recalculation when
rates updated and notify driver that NSS changed.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/mac80211/ibss.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 509bc157ce55..b606b53a49a7 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -1069,9 +1069,16 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
1069 | } | 1069 | } |
1070 | 1070 | ||
1071 | if (sta && rates_updated) { | 1071 | if (sta && rates_updated) { |
1072 | drv_sta_rc_update(local, sdata, &sta->sta, | 1072 | u32 changed = IEEE80211_RC_SUPP_RATES_CHANGED; |
1073 | IEEE80211_RC_SUPP_RATES_CHANGED); | 1073 | u8 rx_nss = sta->sta.rx_nss; |
1074 | |||
1075 | /* Force rx_nss recalculation */ | ||
1076 | sta->sta.rx_nss = 0; | ||
1074 | rate_control_rate_init(sta); | 1077 | rate_control_rate_init(sta); |
1078 | if (sta->sta.rx_nss != rx_nss) | ||
1079 | changed |= IEEE80211_RC_NSS_CHANGED; | ||
1080 | |||
1081 | drv_sta_rc_update(local, sdata, &sta->sta, changed); | ||
1075 | } | 1082 | } |
1076 | 1083 | ||
1077 | rcu_read_unlock(); | 1084 | rcu_read_unlock(); |