linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k: AP: handle HT station which does not have HT RX MCS
@ 2014-02-10 12:12 Bartosz Markowski
  2014-02-11  8:06 ` Kalle Valo
  0 siblings, 1 reply; 4+ messages in thread
From: Bartosz Markowski @ 2014-02-10 12:12 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Bartosz Markowski

This is a workaround for HT-enabled STAs which break the spec
and have no HT capabilities RX mask (no HT RX MCS map).

As per spec, in section 20.3.5 Modulation and coding scheme (MCS),
MCS 0 through 7 are mandatory in 20MHz with 800 ns GI at all STAs.

Firmware asserts if such situation occurs.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
 drivers/net/wireless/ath/ath10k/mac.c |   19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 144b4d6..162920a 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -1148,8 +1148,23 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar,
 		if (ht_cap->mcs.rx_mask[i/8] & (1 << i%8))
 			arg->peer_ht_rates.rates[n++] = i;
 
-	arg->peer_ht_rates.num_rates = n;
-	arg->peer_num_spatial_streams = max((n+7) / 8, 1);
+	/*
+	 * This is a workaround for HT-enabled STAs which break the spec
+	 * and have no HT capabilities RX mask (no HT RX MCS map).
+	 *
+	 * As per spec, in section 20.3.5 Modulation and coding scheme (MCS),
+	 * MCS 0 through 7 are mandatory in 20MHz with 800 ns GI at all STAs.
+	 *
+	 * Firmware asserts if such situation occurs.
+	 */
+	if (n == 0) {
+		arg->peer_ht_rates.num_rates = 8;
+		for (i = 0; i < arg->peer_ht_rates.num_rates; i++)
+			arg->peer_ht_rates.rates[i] = i;
+	} else {
+		arg->peer_ht_rates.num_rates = n;
+		arg->peer_num_spatial_streams = max((n+7) / 8, 1);
+	}
 
 	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] 4+ messages in thread

* Re: [PATCH] ath10k: AP: handle HT station which does not have HT RX MCS
  2014-02-10 12:12 [PATCH] ath10k: AP: handle HT station which does not have HT RX MCS Bartosz Markowski
@ 2014-02-11  8:06 ` Kalle Valo
  2014-02-11  8:10   ` Bartosz Markowski
  0 siblings, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2014-02-11  8:06 UTC (permalink / raw)
  To: Bartosz Markowski; +Cc: ath10k, linux-wireless

Bartosz Markowski <bartosz.markowski@tieto.com> writes:

> This is a workaround for HT-enabled STAs which break the spec
> and have no HT capabilities RX mask (no HT RX MCS map).
>
> As per spec, in section 20.3.5 Modulation and coding scheme (MCS),
> MCS 0 through 7 are mandatory in 20MHz with 800 ns GI at all STAs.
>
> Firmware asserts if such situation occurs.
>
> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>

This conflicted with Marek K's patch "ath10k: Set proper nss value for
the peer". Please check that my resolution in ath-next-test is correct:

https://github.com/kvalo/ath/commit/d56aa0e779c17f8048a70a9dbd5228b54d9a712e

-- 
Kalle Valo

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

* Re: [PATCH] ath10k: AP: handle HT station which does not have HT RX MCS
  2014-02-11  8:06 ` Kalle Valo
@ 2014-02-11  8:10   ` Bartosz Markowski
  2014-02-13 15:46     ` Kalle Valo
  0 siblings, 1 reply; 4+ messages in thread
From: Bartosz Markowski @ 2014-02-11  8:10 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath10k, linux-wireless@vger.kernel.org

On 11 February 2014 09:06, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Bartosz Markowski <bartosz.markowski@tieto.com> writes:
>
>> This is a workaround for HT-enabled STAs which break the spec
>> and have no HT capabilities RX mask (no HT RX MCS map).
>>
>> As per spec, in section 20.3.5 Modulation and coding scheme (MCS),
>> MCS 0 through 7 are mandatory in 20MHz with 800 ns GI at all STAs.
>>
>> Firmware asserts if such situation occurs.
>>
>> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
>
> This conflicted with Marek K's patch "ath10k: Set proper nss value for
> the peer". Please check that my resolution in ath-next-test is correct:
>
> https://github.com/kvalo/ath/commit/d56aa0e779c17f8048a70a9dbd5228b54d9a712e

Looks good.

-- 
Bartosz

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

* Re: [PATCH] ath10k: AP: handle HT station which does not have HT RX MCS
  2014-02-11  8:10   ` Bartosz Markowski
@ 2014-02-13 15:46     ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2014-02-13 15:46 UTC (permalink / raw)
  To: Bartosz Markowski; +Cc: linux-wireless@vger.kernel.org, ath10k

Bartosz Markowski <bartosz.markowski@tieto.com> writes:

> On 11 February 2014 09:06, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
>> Bartosz Markowski <bartosz.markowski@tieto.com> writes:
>>
>>> This is a workaround for HT-enabled STAs which break the spec
>>> and have no HT capabilities RX mask (no HT RX MCS map).
>>>
>>> As per spec, in section 20.3.5 Modulation and coding scheme (MCS),
>>> MCS 0 through 7 are mandatory in 20MHz with 800 ns GI at all STAs.
>>>
>>> Firmware asserts if such situation occurs.
>>>
>>> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
>>
>> This conflicted with Marek K's patch "ath10k: Set proper nss value for
>> the peer". Please check that my resolution in ath-next-test is correct:
>>
>> https://github.com/kvalo/ath/commit/d56aa0e779c17f8048a70a9dbd5228b54d9a712e
>
> Looks good.

Thanks, applied.

-- 
Kalle Valo

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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10 12:12 [PATCH] ath10k: AP: handle HT station which does not have HT RX MCS Bartosz Markowski
2014-02-11  8:06 ` Kalle Valo
2014-02-11  8:10   ` Bartosz Markowski
2014-02-13 15:46     ` Kalle Valo

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