* [PATCH v2] mac80211: notify NSS changed when IBSS and HT
@ 2014-12-17 9:00 Janusz Dziedzic
2014-12-17 10:47 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Janusz Dziedzic @ 2014-12-17 9:00 UTC (permalink / raw)
To: linux-wireless; +Cc: Janusz Dziedzic, johannes, ath10k
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>
---
net/mac80211/ibss.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 509bc15..b606b53 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,
}
if (sta && rates_updated) {
- drv_sta_rc_update(local, sdata, &sta->sta,
- IEEE80211_RC_SUPP_RATES_CHANGED);
+ u32 changed = IEEE80211_RC_SUPP_RATES_CHANGED;
+ u8 rx_nss = sta->sta.rx_nss;
+
+ /* Force rx_nss recalculation */
+ sta->sta.rx_nss = 0;
rate_control_rate_init(sta);
+ if (sta->sta.rx_nss != rx_nss)
+ changed |= IEEE80211_RC_NSS_CHANGED;
+
+ drv_sta_rc_update(local, sdata, &sta->sta, changed);
}
rcu_read_unlock();
--
1.9.1
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-17 10:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-17 9:00 [PATCH v2] mac80211: notify NSS changed when IBSS and HT Janusz Dziedzic
2014-12-17 10:47 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox