All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: notify NSS changed when IBSS and HT
@ 2014-12-16  8:56 ` Janusz Dziedzic
  0 siblings, 0 replies; 6+ messages in thread
From: Janusz Dziedzic @ 2014-12-16  8:56 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 | 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


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] mac80211: notify NSS changed when IBSS and HT
@ 2014-12-16  8:56 ` Janusz Dziedzic
  0 siblings, 0 replies; 6+ messages in thread
From: Janusz Dziedzic @ 2014-12-16  8:56 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath10k, johannes, Janusz Dziedzic

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 | 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mac80211: notify NSS changed when IBSS and HT
  2014-12-16  8:56 ` Janusz Dziedzic
@ 2014-12-16 19:54   ` Johannes Berg
  -1 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2014-12-16 19:54 UTC (permalink / raw)
  To: Janusz Dziedzic; +Cc: linux-wireless, ath10k

On Tue, 2014-12-16 at 09:56 +0100, Janusz Dziedzic wrote:

>  			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);

Seems to me you should consolidate those two drv_sta_rc_update() calls
and just make the flags dependent on the NSS change?

johannes


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mac80211: notify NSS changed when IBSS and HT
@ 2014-12-16 19:54   ` Johannes Berg
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2014-12-16 19:54 UTC (permalink / raw)
  To: Janusz Dziedzic; +Cc: linux-wireless, ath10k

On Tue, 2014-12-16 at 09:56 +0100, Janusz Dziedzic wrote:

>  			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);

Seems to me you should consolidate those two drv_sta_rc_update() calls
and just make the flags dependent on the NSS change?

johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mac80211: notify NSS changed when IBSS and HT
  2014-12-16 19:54   ` Johannes Berg
@ 2014-12-17  8:06     ` Janusz Dziedzic
  -1 siblings, 0 replies; 6+ messages in thread
From: Janusz Dziedzic @ 2014-12-17  8:06 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, ath10k@lists.infradead.org

On 16 December 2014 at 20:54, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Tue, 2014-12-16 at 09:56 +0100, Janusz Dziedzic wrote:
>
>>                       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);
>
> Seems to me you should consolidate those two drv_sta_rc_update() calls
> and just make the flags dependent on the NSS change?
>
Will send v2.

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mac80211: notify NSS changed when IBSS and HT
@ 2014-12-17  8:06     ` Janusz Dziedzic
  0 siblings, 0 replies; 6+ messages in thread
From: Janusz Dziedzic @ 2014-12-17  8:06 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, ath10k@lists.infradead.org

On 16 December 2014 at 20:54, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Tue, 2014-12-16 at 09:56 +0100, Janusz Dziedzic wrote:
>
>>                       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);
>
> Seems to me you should consolidate those two drv_sta_rc_update() calls
> and just make the flags dependent on the NSS change?
>
Will send v2.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-12-17  8:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-16  8:56 [PATCH] mac80211: notify NSS changed when IBSS and HT Janusz Dziedzic
2014-12-16  8:56 ` Janusz Dziedzic
2014-12-16 19:54 ` Johannes Berg
2014-12-16 19:54   ` Johannes Berg
2014-12-17  8:06   ` Janusz Dziedzic
2014-12-17  8:06     ` Janusz Dziedzic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.