diff mbox series

[v2,1/3] wifi: rtw88: usb: Set qsel correctly

Message ID 20230210111632.1985205-2-s.hauer@pengutronix.de (mailing list archive)
State Accepted
Commit 7869b834fb07c79933229840c98b02bbb7bd0d75
Delegated to: Kalle Valo
Headers show
Series wifi: rtw88: USB fixes | expand

Commit Message

Sascha Hauer Feb. 10, 2023, 11:16 a.m. UTC
We have to extract qsel from the skb before doing skb_push() on it,
otherwise qsel will always be 0.

Fixes: a82dfd33d1237 ("wifi: rtw88: Add common USB chip support")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/net/wireless/realtek/rtw88/usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ping-Ke Shih Feb. 13, 2023, 2:50 a.m. UTC | #1
> -----Original Message-----
> From: Sascha Hauer <s.hauer@pengutronix.de>
> Sent: Friday, February 10, 2023 7:17 PM
> To: linux-wireless@vger.kernel.org
> Cc: Neo Jou <neojou@gmail.com>; Hans Ulli Kroll <linux@ulli-kroll.de>; Ping-Ke Shih <pkshih@realtek.com>;
> Yan-Hsuan Chuang <tony0620emma@gmail.com>; Kalle Valo <kvalo@kernel.org>; netdev@vger.kernel.org;
> linux-kernel@vger.kernel.org; Martin Blumenstingl <martin.blumenstingl@googlemail.com>;
> kernel@pengutronix.de; Alexander Hochbaum <alex@appudo.com>; Da Xue <da@libre.computer>; Bernie Huang
> <phhuang@realtek.com>; Andreas Henriksson <andreas@fatal.se>; Viktor Petrenko <g0000ga@gmail.com>; Sascha
> Hauer <s.hauer@pengutronix.de>
> Subject: [PATCH v2 1/3] wifi: rtw88: usb: Set qsel correctly
> 
> We have to extract qsel from the skb before doing skb_push() on it,
> otherwise qsel will always be 0.
> 
> Fixes: a82dfd33d1237 ("wifi: rtw88: Add common USB chip support")
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>

> ---
>  drivers/net/wireless/realtek/rtw88/usb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c
> index 4ef38279b64c9..d9e995544e405 100644
> --- a/drivers/net/wireless/realtek/rtw88/usb.c
> +++ b/drivers/net/wireless/realtek/rtw88/usb.c
> @@ -471,9 +471,9 @@ static int rtw_usb_tx_write(struct rtw_dev *rtwdev,
>  	u8 *pkt_desc;
>  	int ep;
> 
> +	pkt_info->qsel = rtw_usb_tx_queue_mapping_to_qsel(skb);
>  	pkt_desc = skb_push(skb, chip->tx_pkt_desc_sz);
>  	memset(pkt_desc, 0, chip->tx_pkt_desc_sz);
> -	pkt_info->qsel = rtw_usb_tx_queue_mapping_to_qsel(skb);
>  	ep = qsel_to_ep(rtwusb, pkt_info->qsel);
>  	rtw_tx_fill_tx_desc(pkt_info, skb);
>  	rtw_tx_fill_txdesc_checksum(rtwdev, pkt_info, skb->data);
> --
> 2.30.2
Kalle Valo Feb. 15, 2023, 7:50 a.m. UTC | #2
Sascha Hauer <s.hauer@pengutronix.de> wrote:

> We have to extract qsel from the skb before doing skb_push() on it,
> otherwise qsel will always be 0.
> 
> Fixes: a82dfd33d1237 ("wifi: rtw88: Add common USB chip support")
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>

3 patches applied to wireless-next.git, thanks.

7869b834fb07 wifi: rtw88: usb: Set qsel correctly
07ce9fa6ab0e wifi: rtw88: usb: send Zero length packets if necessary
462c8db6a011 wifi: rtw88: usb: drop now unnecessary URB size check
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c
index 4ef38279b64c9..d9e995544e405 100644
--- a/drivers/net/wireless/realtek/rtw88/usb.c
+++ b/drivers/net/wireless/realtek/rtw88/usb.c
@@ -471,9 +471,9 @@  static int rtw_usb_tx_write(struct rtw_dev *rtwdev,
 	u8 *pkt_desc;
 	int ep;
 
+	pkt_info->qsel = rtw_usb_tx_queue_mapping_to_qsel(skb);
 	pkt_desc = skb_push(skb, chip->tx_pkt_desc_sz);
 	memset(pkt_desc, 0, chip->tx_pkt_desc_sz);
-	pkt_info->qsel = rtw_usb_tx_queue_mapping_to_qsel(skb);
 	ep = qsel_to_ep(rtwusb, pkt_info->qsel);
 	rtw_tx_fill_tx_desc(pkt_info, skb);
 	rtw_tx_fill_txdesc_checksum(rtwdev, pkt_info, skb->data);