linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org, pkshih@realtek.com,
	Larry Finger <Larry.Finger@lwfinger.net>
Subject: [PATCH 5/5] rtlwifi: rtl8192cu: Fix value set in descriptor
Date: Mon, 12 Aug 2019 14:27:41 -0500	[thread overview]
Message-ID: <20190812192741.14479-1-Larry.Finger@lwfinger.net> (raw)

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>
---
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c
index 0020adc004a5..9b5c7ec6b6f7 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c
@@ -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);
-- 
2.22.0


             reply	other threads:[~2019-08-12 19:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12 19:27 Larry Finger [this message]
2019-08-20 14:08 ` [PATCH 5/5] rtlwifi: rtl8192cu: Fix value set in descriptor Kalle Valo
2019-08-20 15:36   ` Larry Finger
2019-08-20 15:52     ` Kalle Valo
2019-09-03 13:28 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190812192741.14479-1-Larry.Finger@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).