linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k: Set proper nss value for the peer
@ 2014-02-10 10:22 Marek Kwaczynski
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Kwaczynski @ 2014-02-10 10:22 UTC (permalink / raw)
  Cc: linux-wireless, Marek Kwaczynski

It was found during testing the nss calculation does not
cover all corner cases. Station could request eq. only MCS8
and MCS9 (nss=2 specific). Next num_rates=2 so the driver
sets nss=(max((2+7)/8, 1))=1. Which is wrong. The in-driver
calculation was introduced prior (commit ddcc347b70
mac80211: fix rx_nss calculation for drivers with hw rc).
Since it's fixed, use mac80211 provided value from now.
End user will experience lower throuhputs than expected
if the nss is wrongly calculated.

Signed-off-by: Marek Kwaczynski <marek.kwaczynski@tieto.com>
---
 drivers/net/wireless/ath/ath10k/mac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 144b4d6..e6bf2e8 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -1149,7 +1149,7 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar,
 			arg->peer_ht_rates.rates[n++] = i;
 
 	arg->peer_ht_rates.num_rates = n;
-	arg->peer_num_spatial_streams = max((n+7) / 8, 1);
+	arg->peer_num_spatial_streams = sta->rx_nss;
 
 	ath10k_dbg(ATH10K_DBG_MAC, "mac ht peer %pM mcs cnt %d nss %d\n",
 		   arg->addr,
-- 
1.7.9.5


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

* [PATCH] ath10k: Set proper nss value for the peer
@ 2014-02-10 10:25 Marek Kwaczynski
  2014-02-13 14:50 ` Kalle Valo
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Kwaczynski @ 2014-02-10 10:25 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Marek Kwaczynski

It was found during testing the nss calculation does not
cover all corner cases. Station could request eq. only MCS8
and MCS9 (nss=2 specific). Next num_rates=2 so the driver
sets nss=(max((2+7)/8, 1))=1. Which is wrong. The in-driver
calculation was introduced prior (commit ddcc347b70
mac80211: fix rx_nss calculation for drivers with hw rc).
Since it's fixed, use mac80211 provided value from now.
End user will experience lower throuhputs than expected
if the nss is wrongly calculated.

Signed-off-by: Marek Kwaczynski <marek.kwaczynski@tieto.com>
---
 drivers/net/wireless/ath/ath10k/mac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 144b4d6..e6bf2e8 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -1149,7 +1149,7 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar,
 			arg->peer_ht_rates.rates[n++] = i;
 
 	arg->peer_ht_rates.num_rates = n;
-	arg->peer_num_spatial_streams = max((n+7) / 8, 1);
+	arg->peer_num_spatial_streams = sta->rx_nss;
 
 	ath10k_dbg(ATH10K_DBG_MAC, "mac ht peer %pM mcs cnt %d nss %d\n",
 		   arg->addr,
-- 
1.7.9.5


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

* Re: [PATCH] ath10k: Set proper nss value for the peer
  2014-02-10 10:25 [PATCH] ath10k: Set proper nss value for the peer Marek Kwaczynski
@ 2014-02-13 14:50 ` Kalle Valo
  0 siblings, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2014-02-13 14:50 UTC (permalink / raw)
  To: Marek Kwaczynski; +Cc: ath10k, linux-wireless

Marek Kwaczynski <marek.kwaczynski@tieto.com> writes:

> It was found during testing the nss calculation does not
> cover all corner cases. Station could request eq. only MCS8
> and MCS9 (nss=2 specific). Next num_rates=2 so the driver
> sets nss=(max((2+7)/8, 1))=1. Which is wrong. The in-driver
> calculation was introduced prior (commit ddcc347b70
> mac80211: fix rx_nss calculation for drivers with hw rc).
> Since it's fixed, use mac80211 provided value from now.
> End user will experience lower throuhputs than expected
> if the nss is wrongly calculated.
>
> Signed-off-by: Marek Kwaczynski <marek.kwaczynski@tieto.com>

Thanks, applied.

-- 
Kalle Valo

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

end of thread, other threads:[~2014-02-13 14:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10 10:25 [PATCH] ath10k: Set proper nss value for the peer Marek Kwaczynski
2014-02-13 14:50 ` Kalle Valo
  -- strict thread matches above, loose matches on Subject: below --
2014-02-10 10:22 Marek Kwaczynski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).