public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wifi: rtw89: fix 8852AE disconnection caused by RX full flags
@ 2023-08-04 10:50 Ping-Ke Shih
  2023-08-07  6:45 ` Damian Bronecki
  0 siblings, 1 reply; 3+ messages in thread
From: Ping-Ke Shih @ 2023-08-04 10:50 UTC (permalink / raw)
  To: kvalo; +Cc: Stable, bronecki.damian, linux-wireless

RX full flags are raised if certain types of RX FIFO are full, and then
drop all following MSDU of APMDU. In order to resume to receive MSDU
when RX FIFO becomes available, we clear the regitster bits by the
commit a0d99ebb3ecd ("wifi: rtw89: initialize DMA of CMAC"). But, 8852AE
needs more settings to support this. To quickly fix disconnection problem,
revert the behavior as before.

Fixes: a0d99ebb3ecd ("wifi: rtw89: initialize DMA of CMAC")
Reported-by: Damian B <bronecki.damian@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217710
Cc: <Stable@vger.kernel.org>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c
index 1efa4da3cebc..cebefa3b1db3 100644
--- a/drivers/net/wireless/realtek/rtw89/mac.c
+++ b/drivers/net/wireless/realtek/rtw89/mac.c
@@ -2524,7 +2524,7 @@ static int cmac_dma_init(struct rtw89_dev *rtwdev, u8 mac_idx)
 	u32 reg;
 	int ret;
 
-	if (chip_id != RTL8852A && chip_id != RTL8852B)
+	if (chip_id != RTL8852B)
 		return 0;
 
 	ret = rtw89_mac_check_mac_en(rtwdev, mac_idx, RTW89_CMAC_SEL);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] wifi: rtw89: fix 8852AE disconnection caused by RX full flags
  2023-08-04 10:50 [PATCH] wifi: rtw89: fix 8852AE disconnection caused by RX full flags Ping-Ke Shih
@ 2023-08-07  6:45 ` Damian Bronecki
  2023-08-08  0:59   ` Ping-Ke Shih
  0 siblings, 1 reply; 3+ messages in thread
From: Damian Bronecki @ 2023-08-07  6:45 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: kvalo, Stable, linux-wireless

> RX full flags are raised if certain types of RX FIFO are full, and then
> drop all following MSDU of APMDU. In order to resume to receive MSDU
> when RX FIFO becomes available, we clear the regitster bits by the
> commit a0d99ebb3ecd ("wifi: rtw89: initialize DMA of CMAC"). But, 8852AE
> needs more settings to support this. To quickly fix disconnection problem,
> revert the behavior as before.
>
> Fixes: a0d99ebb3ecd ("wifi: rtw89: initialize DMA of CMAC")
> Reported-by: Damian B <bronecki.damian@gmail.com>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217710
> Cc: <Stable@vger.kernel.org>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>

This patch fixed connection drops for me. Thanks!

Tested-by: Damian B <bronecki.damian@gmail.com>

> ---
>  drivers/net/wireless/realtek/rtw89/mac.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c
> index 1efa4da3cebc..cebefa3b1db3 100644
> --- a/drivers/net/wireless/realtek/rtw89/mac.c
> +++ b/drivers/net/wireless/realtek/rtw89/mac.c
> @@ -2524,7 +2524,7 @@ static int cmac_dma_init(struct rtw89_dev *rtwdev, u8 mac_idx)
>         u32 reg;
>         int ret;
>
> -       if (chip_id != RTL8852A && chip_id != RTL8852B)
> +       if (chip_id != RTL8852B)
>                 return 0;
>
>         ret = rtw89_mac_check_mac_en(rtwdev, mac_idx, RTW89_CMAC_SEL);
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] wifi: rtw89: fix 8852AE disconnection caused by RX full flags
  2023-08-07  6:45 ` Damian Bronecki
@ 2023-08-08  0:59   ` Ping-Ke Shih
  0 siblings, 0 replies; 3+ messages in thread
From: Ping-Ke Shih @ 2023-08-08  0:59 UTC (permalink / raw)
  To: Damian Bronecki
  Cc: kvalo@kernel.org, Stable@vger.kernel.org,
	linux-wireless@vger.kernel.org



> -----Original Message-----
> From: Damian Bronecki <bronecki.damian@gmail.com>
> Sent: Monday, August 7, 2023 2:46 PM
> To: Ping-Ke Shih <pkshih@realtek.com>
> Cc: kvalo@kernel.org; Stable@vger.kernel.org; linux-wireless@vger.kernel.org
> Subject: Re: [PATCH] wifi: rtw89: fix 8852AE disconnection caused by RX full flags
> 
> > RX full flags are raised if certain types of RX FIFO are full, and then
> > drop all following MSDU of APMDU. In order to resume to receive MSDU
> > when RX FIFO becomes available, we clear the regitster bits by the
> > commit a0d99ebb3ecd ("wifi: rtw89: initialize DMA of CMAC"). But, 8852AE
> > needs more settings to support this. To quickly fix disconnection problem,
> > revert the behavior as before.
> >
> > Fixes: a0d99ebb3ecd ("wifi: rtw89: initialize DMA of CMAC")
> > Reported-by: Damian B <bronecki.damian@gmail.com>
> > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217710
> > Cc: <Stable@vger.kernel.org>
> > Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> 
> This patch fixed connection drops for me. Thanks!
> 
> Tested-by: Damian B <bronecki.damian@gmail.com>
> 

Thanks for your test. 

Due to typo of commit message, I sent v2 with the Tested-by.

Ping-Ke



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-08  1:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-04 10:50 [PATCH] wifi: rtw89: fix 8852AE disconnection caused by RX full flags Ping-Ke Shih
2023-08-07  6:45 ` Damian Bronecki
2023-08-08  0:59   ` Ping-Ke Shih

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox