[PATCH] mac80211: notify NSS changed when IBSS and HT

Janusz Dziedzic janusz.dziedzic at tieto.com
Tue Dec 16 00:56:05 PST 2014


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 at tieto.com>
---
 net/mac80211/ibss.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 509bc15..d95c2dd 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) {
+			u8 rx_nss = sta->sta.rx_nss;
+
 			drv_sta_rc_update(local, sdata, &sta->sta,
 					  IEEE80211_RC_SUPP_RATES_CHANGED);
+			/* Force rx_nss recalculation */
+			sta->sta.rx_nss = 0;
 			rate_control_rate_init(sta);
+			if (rx_nss != sta->sta.rx_nss)
+				drv_sta_rc_update(local, sdata, &sta->sta,
+						  IEEE80211_RC_NSS_CHANGED);
 		}
 
 		rcu_read_unlock();
-- 
1.9.1




More information about the ath10k mailing list