* [PATCH] ath10k: fix bug in masking of TID value
@ 2018-06-15 12:01 Erik Stromdahl
2018-06-15 12:58 ` Kalle Valo
2018-06-28 9:55 ` Kalle Valo
0 siblings, 2 replies; 4+ messages in thread
From: Erik Stromdahl @ 2018-06-15 12:01 UTC (permalink / raw)
To: kvalo, linux-wireless, ath10k; +Cc: Erik Stromdahl
Although the TID mask is 0xf, the modulus operation does still not
produce identical results as the bitwise and operator.
If the TID is 15, the modulus operation will "convert" it to 0, whereas
the bitwise and will keep it as 15.
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
drivers/net/wireless/ath/ath10k/htt_tx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
index 89157c5b5e5f..be5b52aaffa6 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -1056,7 +1056,7 @@ static u8 ath10k_htt_tx_get_tid(struct sk_buff *skb, bool is_eth)
if (!is_eth && ieee80211_is_mgmt(hdr->frame_control))
return HTT_DATA_TX_EXT_TID_MGMT;
else if (cb->flags & ATH10K_SKB_F_QOS)
- return skb->priority % IEEE80211_QOS_CTL_TID_MASK;
+ return skb->priority & IEEE80211_QOS_CTL_TID_MASK;
else
return HTT_DATA_TX_EXT_TID_NON_QOS_MCAST_BCAST;
}
--
2.17.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ath10k: fix bug in masking of TID value
2018-06-15 12:01 [PATCH] ath10k: fix bug in masking of TID value Erik Stromdahl
@ 2018-06-15 12:58 ` Kalle Valo
2018-06-15 19:38 ` Erik Stromdahl
2018-06-28 9:55 ` Kalle Valo
1 sibling, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2018-06-15 12:58 UTC (permalink / raw)
To: Erik Stromdahl; +Cc: linux-wireless, ath10k
Erik Stromdahl <erik.stromdahl@gmail.com> writes:
> Although the TID mask is 0xf, the modulus operation does still not
> produce identical results as the bitwise and operator.
>
> If the TID is 15, the modulus operation will "convert" it to 0, whereas
> the bitwise and will keep it as 15.
>
> Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
> ---
> drivers/net/wireless/ath/ath10k/htt_tx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
> index 89157c5b5e5f..be5b52aaffa6 100644
> --- a/drivers/net/wireless/ath/ath10k/htt_tx.c
> +++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
> @@ -1056,7 +1056,7 @@ static u8 ath10k_htt_tx_get_tid(struct sk_buff *skb, bool is_eth)
> if (!is_eth && ieee80211_is_mgmt(hdr->frame_control))
> return HTT_DATA_TX_EXT_TID_MGMT;
> else if (cb->flags & ATH10K_SKB_F_QOS)
> - return skb->priority % IEEE80211_QOS_CTL_TID_MASK;
> + return skb->priority & IEEE80211_QOS_CTL_TID_MASK;
I guess you just found this during code review? If yes, I'll add that to
the commit log.
--
Kalle Valo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath10k: fix bug in masking of TID value
2018-06-15 12:58 ` Kalle Valo
@ 2018-06-15 19:38 ` Erik Stromdahl
0 siblings, 0 replies; 4+ messages in thread
From: Erik Stromdahl @ 2018-06-15 19:38 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless, ath10k
Hi Kalle,
On 06/15/2018 02:58 PM, Kalle Valo wrote:
> Erik Stromdahl <erik.stromdahl@gmail.com> writes:
>
>> Although the TID mask is 0xf, the modulus operation does still not
>> produce identical results as the bitwise and operator.
>>
>> If the TID is 15, the modulus operation will "convert" it to 0, whereas
>> the bitwise and will keep it as 15.
>>
>> Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
>> ---
>> drivers/net/wireless/ath/ath10k/htt_tx.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
>> index 89157c5b5e5f..be5b52aaffa6 100644
>> --- a/drivers/net/wireless/ath/ath10k/htt_tx.c
>> +++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
>> @@ -1056,7 +1056,7 @@ static u8 ath10k_htt_tx_get_tid(struct sk_buff *skb, bool is_eth)
>> if (!is_eth && ieee80211_is_mgmt(hdr->frame_control))
>> return HTT_DATA_TX_EXT_TID_MGMT;
>> else if (cb->flags & ATH10K_SKB_F_QOS)
>> - return skb->priority % IEEE80211_QOS_CTL_TID_MASK;
>> + return skb->priority & IEEE80211_QOS_CTL_TID_MASK;
>
> I guess you just found this during code review? If yes, I'll add that to
> the commit log.
>
Correct, I kind of stumbled upon it while working with TX bundling for SDIO.
--
Erik
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ath10k: fix bug in masking of TID value
2018-06-15 12:01 [PATCH] ath10k: fix bug in masking of TID value Erik Stromdahl
2018-06-15 12:58 ` Kalle Valo
@ 2018-06-28 9:55 ` Kalle Valo
1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2018-06-28 9:55 UTC (permalink / raw)
To: Erik Stromdahl; +Cc: kvalo, linux-wireless, ath10k, Erik Stromdahl
Erik Stromdahl <erik.stromdahl@gmail.com> wrote:
> Although the TID mask is 0xf, the modulus operation does still not
> produce identical results as the bitwise and operator. If the TID is 15, the
> modulus operation will "convert" it to 0, whereas the bitwise and will keep it
> as 15.
>
> This was found during code review.
>
> Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
d1a566bec588 ath10k: fix bug in masking of TID value
--
https://patchwork.kernel.org/patch/10466271/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-06-28 9:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-15 12:01 [PATCH] ath10k: fix bug in masking of TID value Erik Stromdahl
2018-06-15 12:58 ` Kalle Valo
2018-06-15 19:38 ` Erik Stromdahl
2018-06-28 9:55 ` 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).