carl9170: fix missing bit-wise or operator for tx_params
Subsystems (5)
PATCH 1/1 carl9170: fix missing bit-wise or operator for tx_params
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.
---
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(-)
drivers/net/wireless/ath/carl9170/main.c +1 -1
@@ -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;
Signature · 1 line
2.33.1
Quoted 11 lines · Colin Ian King
Currently
tx_paramsis being re-assigned with a new value and the previous settingIEEE80211_HT_MCS_TX_RX_DIFFis 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 <[email protected]>Cc <[email protected]>
Of course:
Quoted 6 lines · Colin Ian King
Currently
tx_paramsis being re-assigned with a new value and the previous settingIEEE80211_HT_MCS_TX_RX_DIFFis 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.
Quoted 7 lines
Kudos to Christian Lamparter for suggesting the correct fix.
Fixes fe8ee9ad80b2 ("carl9170: mac80211 glue and command interface")Signed-off-by Colin Ian King <[email protected]>Cc <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Patch applied to ath-next branch of ath.git, thanks.
02a95374b5ee carl9170: fix missing bit-wise or operator for tx_params
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches