* [PATCH] wifi: rtl8xxxu: fix txdw7 assignment of TX DESC v3
@ 2023-01-19 11:31 Ping-Ke Shih
2023-01-22 15:17 ` Bitterblue Smith
2023-02-13 17:25 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Ping-Ke Shih @ 2023-01-19 11:31 UTC (permalink / raw)
To: Jes.Sorensen, kvalo; +Cc: linux-wireless, rtl8821cerfe2
Type of txdw7 is __le16, so assign __le32 is wrong. Also, the
TXDESC_ANTENNA_SELECT_C is defined for __le32, so shift 16 bits to fit
the value. Compile test only.
sparse warnings: (new ones prefixed by >>)
>> rtl8xxxu_core.c:5198:24: sparse: sparse: invalid assignment: |=
>> rtl8xxxu_core.c:5198:24: sparse: left side has type restricted __le16
>> rtl8xxxu_core.c:5198:24: sparse: right side has type restricted __le32
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index 35dc777c1fba8..0869b95f1b3f3 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -5250,7 +5250,7 @@ rtl8xxxu_fill_txdesc_v3(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
tx_desc->txdw2 |= cpu_to_le32(TXDESC_ANTENNA_SELECT_A |
TXDESC_ANTENNA_SELECT_B);
- tx_desc->txdw7 |= cpu_to_le32(TXDESC_ANTENNA_SELECT_C);
+ tx_desc->txdw7 |= cpu_to_le16(TXDESC_ANTENNA_SELECT_C >> 16);
}
static void rtl8xxxu_tx(struct ieee80211_hw *hw,
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] wifi: rtl8xxxu: fix txdw7 assignment of TX DESC v3
2023-01-19 11:31 [PATCH] wifi: rtl8xxxu: fix txdw7 assignment of TX DESC v3 Ping-Ke Shih
@ 2023-01-22 15:17 ` Bitterblue Smith
2023-02-13 17:25 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Bitterblue Smith @ 2023-01-22 15:17 UTC (permalink / raw)
To: Ping-Ke Shih, Jes.Sorensen, kvalo; +Cc: linux-wireless
On 19/01/2023 13:31, Ping-Ke Shih wrote:
> Type of txdw7 is __le16, so assign __le32 is wrong. Also, the
> TXDESC_ANTENNA_SELECT_C is defined for __le32, so shift 16 bits to fit
> the value. Compile test only.
>
> sparse warnings: (new ones prefixed by >>)
>>> rtl8xxxu_core.c:5198:24: sparse: sparse: invalid assignment: |=
>>> rtl8xxxu_core.c:5198:24: sparse: left side has type restricted __le16
>>> rtl8xxxu_core.c:5198:24: sparse: right side has type restricted __le32
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> ---
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> index 35dc777c1fba8..0869b95f1b3f3 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> @@ -5250,7 +5250,7 @@ rtl8xxxu_fill_txdesc_v3(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
>
> tx_desc->txdw2 |= cpu_to_le32(TXDESC_ANTENNA_SELECT_A |
> TXDESC_ANTENNA_SELECT_B);
> - tx_desc->txdw7 |= cpu_to_le32(TXDESC_ANTENNA_SELECT_C);
> + tx_desc->txdw7 |= cpu_to_le16(TXDESC_ANTENNA_SELECT_C >> 16);
> }
>
> static void rtl8xxxu_tx(struct ieee80211_hw *hw,
Tested-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wifi: rtl8xxxu: fix txdw7 assignment of TX DESC v3
2023-01-19 11:31 [PATCH] wifi: rtl8xxxu: fix txdw7 assignment of TX DESC v3 Ping-Ke Shih
2023-01-22 15:17 ` Bitterblue Smith
@ 2023-02-13 17:25 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2023-02-13 17:25 UTC (permalink / raw)
To: Ping-Ke Shih; +Cc: Jes.Sorensen, linux-wireless, rtl8821cerfe2
Ping-Ke Shih <pkshih@realtek.com> wrote:
> Type of txdw7 is __le16, so assign __le32 is wrong. Also, the
> TXDESC_ANTENNA_SELECT_C is defined for __le32, so shift 16 bits to fit
> the value. Compile test only.
>
> sparse warnings: (new ones prefixed by >>)
> >> rtl8xxxu_core.c:5198:24: sparse: sparse: invalid assignment: |=
> >> rtl8xxxu_core.c:5198:24: sparse: left side has type restricted __le16
> >> rtl8xxxu_core.c:5198:24: sparse: right side has type restricted __le32
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> Tested-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Patch applied to wireless-next.git, thanks.
6869ba4911df wifi: rtl8xxxu: fix txdw7 assignment of TX DESC v3
--
https://patchwork.kernel.org/project/linux-wireless/patch/20230119113146.9640-1-pkshih@realtek.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-13 17:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-19 11:31 [PATCH] wifi: rtl8xxxu: fix txdw7 assignment of TX DESC v3 Ping-Ke Shih
2023-01-22 15:17 ` Bitterblue Smith
2023-02-13 17:25 ` 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).