rtlwifi: rtl8192cu: Fix value set in descriptor
authorLarry Finger <Larry.Finger@lwfinger.net>
Mon, 12 Aug 2019 19:27:41 +0000 (14:27 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 3 Sep 2019 13:28:13 +0000 (16:28 +0300)
In the process of converting the bit manipulation macros were converted
to use GENMASK(), the compiler reported a value too big for the field.
The offending statement was trying to write 0x100 into a 5-bit field.
An accompaning comment says to set bit 3, thus the code is changed
appropriately.

This error has been in the driver since its initial submission.

Fixes: 29d00a3e46bb ("rtlwifi: rtl8192cu: Add routine trx")
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c

index 0020adc004a5197731d813e70da3ce6d16c49102..9b5c7ec6b6f72c9077c52cb7ccdde984582ef70c 100644 (file)
@@ -611,7 +611,7 @@ void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 *pdesc,
                SET_TX_DESC_NAV_USE_HDR(pdesc, 1);
        } else {
                SET_TX_DESC_HWSEQ_EN(pdesc, 1); /* Hw set sequence number */
-               SET_TX_DESC_PKT_ID(pdesc, 0x100); /* set bit3 to 1. */
+               SET_TX_DESC_PKT_ID(pdesc, BIT(3)); /* set bit3 to 1. */
        }
        SET_TX_DESC_USE_RATE(pdesc, 1); /* use data rate which is set by Sw */
        SET_TX_DESC_OWN(pdesc, 1);