* [PATCH] carl9170: fix missing bit-wise or operator for tx_params
@ 2022-01-25 0:44 Colin Ian King
2022-01-26 20:03 ` Christian Lamparter
2022-01-31 14:14 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2022-01-25 0:44 UTC (permalink / raw)
To: Christian Lamparter, Kalle Valo, David S . Miller,
Jakub Kicinski, linux-wireless, netdev
Cc: kernel-janitors, linux-kernel, Stable
Currently tx_params is being re-assigned with a new value and the
previous setting IEEE80211_HT_MCS_TX_RX_DIFF is being overwritten.
The assignment operator is incorrect, the original intent was to
bit-wise or the value in. Fix this by replacing the = operator
with |= instead.
Kudos to Christian Lamparter for suggesting the correct fix.
Fixes: fe8ee9ad80b2 ("carl9170: mac80211 glue and command interface")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Cc: <Stable@vger.kernel.org>
---
V2: change subject line to match the correct fix, add in the
missing | operator
---
drivers/net/wireless/ath/carl9170/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c
index 49f7ee1c912b..2208ec800482 100644
--- a/drivers/net/wireless/ath/carl9170/main.c
+++ b/drivers/net/wireless/ath/carl9170/main.c
@@ -1914,7 +1914,7 @@ static int carl9170_parse_eeprom(struct ar9170 *ar)
WARN_ON(!(tx_streams >= 1 && tx_streams <=
IEEE80211_HT_MCS_TX_MAX_STREAMS));
- tx_params = (tx_streams - 1) <<
+ tx_params |= (tx_streams - 1) <<
IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT;
carl9170_band_2GHz.ht_cap.mcs.tx_params |= tx_params;
--
2.33.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] carl9170: fix missing bit-wise or operator for tx_params
2022-01-25 0:44 [PATCH] carl9170: fix missing bit-wise or operator for tx_params Colin Ian King
@ 2022-01-26 20:03 ` Christian Lamparter
2022-01-31 14:14 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Christian Lamparter @ 2022-01-26 20:03 UTC (permalink / raw)
To: Colin Ian King, Kalle Valo, David S . Miller, Jakub Kicinski,
linux-wireless, netdev
Cc: kernel-janitors, linux-kernel, Stable
On 25/01/2022 01:44, Colin Ian King wrote:
> Currently tx_params is being re-assigned with a new value and the
> previous setting IEEE80211_HT_MCS_TX_RX_DIFF is being overwritten.
> The assignment operator is incorrect, the original intent was to
> bit-wise or the value in. Fix this by replacing the = operator
> with |= instead.
>
> Kudos to Christian Lamparter for suggesting the correct fix.
>
> Fixes: fe8ee9ad80b2 ("carl9170: mac80211 glue and command interface")
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> Cc: <Stable@vger.kernel.org>
Of course:
Acked-by: Christian Lamparter <chunkeey@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] carl9170: fix missing bit-wise or operator for tx_params
2022-01-25 0:44 [PATCH] carl9170: fix missing bit-wise or operator for tx_params Colin Ian King
2022-01-26 20:03 ` Christian Lamparter
@ 2022-01-31 14:14 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2022-01-31 14:14 UTC (permalink / raw)
To: Colin Ian King
Cc: Christian Lamparter, David S . Miller, Jakub Kicinski,
linux-wireless, netdev, kernel-janitors, linux-kernel, Stable
Colin Ian King <colin.i.king@gmail.com> wrote:
> Currently tx_params is being re-assigned with a new value and the
> previous setting IEEE80211_HT_MCS_TX_RX_DIFF is being overwritten.
> The assignment operator is incorrect, the original intent was to
> bit-wise or the value in. Fix this by replacing the = operator
> with |= instead.
>
> Kudos to Christian Lamparter for suggesting the correct fix.
>
> Fixes: fe8ee9ad80b2 ("carl9170: mac80211 glue and command interface")
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> Cc: <Stable@vger.kernel.org>
> Acked-by: Christian Lamparter <chunkeey@gmail.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Patch applied to ath-next branch of ath.git, thanks.
02a95374b5ee carl9170: fix missing bit-wise or operator for tx_params
--
https://patchwork.kernel.org/project/linux-wireless/patch/20220125004406.344422-1-colin.i.king@gmail.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-31 14:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25 0:44 [PATCH] carl9170: fix missing bit-wise or operator for tx_params Colin Ian King
2022-01-26 20:03 ` Christian Lamparter
2022-01-31 14:14 ` 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).