wifi: rtw88: Fix USB/SDIO devices not transmitting beacons
PATCH v2 1/1 wifi: rtw88: Fix USB/SDIO devices not transmitting beacons
All USB devices supported by rtw88 have the same problem: they don't transmit beacons in AP mode. (Some?) SDIO devices are also affected. The cause appears to be clearing BIT_EN_BCNQ_DL of REG_FWHW_TXQ_CTRL before uploading the beacon reserved page, so don't clear the bit for USB and SDIO devices.
Tested with RTL8811CU and RTL8723DU.
---
v2:
- Only clear BIT_EN_BCNQ_DL for PCIE devices:
https://lore.kernel.org/linux-wireless/CAP8xZ6n8utvFJCmTwnRzFccRkZZzk+R5Bf69UArbbzd4Ev9aRQ@mail.gmail.com/
- Update the commit message.
--- drivers/net/wireless/realtek/rtw88/fw.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/net/wireless/realtek/rtw88/fw.c +8 -5
@@ -1468,10 +1468,12 @@ int rtw_fw_write_data_rsvd_page(struct rtw_dev *rtwdev, u16 pg_addr, val |=BIT_ENSWBCN >>8 ;rtw_write8 (rtwdev,REG_CR +1 , val); - val =rtw_read8 (rtwdev,REG_FWHW_TXQ_CTRL +2 ); - bckp[1 ] = val; - val &= ~(BIT_EN_BCNQ_DL >>16 ); -rtw_write8 (rtwdev,REG_FWHW_TXQ_CTRL +2 , val); +if (rtw_hci_type (rtwdev) ==RTW_HCI_TYPE_PCIE ) { + val =rtw_read8 (rtwdev,REG_FWHW_TXQ_CTRL +2 ); + bckp[1 ] = val; + val &= ~(BIT_EN_BCNQ_DL >>16 ); +rtw_write8 (rtwdev,REG_FWHW_TXQ_CTRL +2 , val); + } ret =rtw_hci_write_data_rsvd_page (rtwdev, buf, size);if (ret) {
@@ -1496,7 +1498,8 @@ int rtw_fw_write_data_rsvd_page(struct rtw_dev *rtwdev, u16 pg_addr, rsvd_pg_head = rtwdev->fifo.rsvd_boundary;rtw_write16 (rtwdev,REG_FIFOPAGE_CTRL_2 , rsvd_pg_head |BIT_BCN_VALID_V1 ); -rtw_write8 (rtwdev,REG_FWHW_TXQ_CTRL +2 , bckp[1 ]); +if (rtw_hci_type (rtwdev) ==RTW_HCI_TYPE_PCIE ) +rtw_write8 (rtwdev,REG_FWHW_TXQ_CTRL +2 , bckp[1 ]);rtw_write8 (rtwdev,REG_CR +1 , bckp[0 ]);return ret;
Signature · 1 line
2.46.0
Ping-Ke Shih
maintainerHi Bitterblue,
Quoted 11 lines · Bitterblue Smith
All USB devices supported by rtw88 have the same problem: they don't transmit beacons in AP mode. (Some?) SDIO devices are also affected. The cause appears to be clearing
BIT_EN_BCNQ_DLofREG_FWHW_TXQ_CTRLbefore uploading the beacon reserved page, so don't clear the bit for USB and SDIO devices.Tested with RTL8811CU and RTL8723DU.
Cc <[email protected]> # 6.6.xSigned-off-by Bitterblue Smith <[email protected]>
Can I say two below patchset are equivalent in your side?
[Patchset 1: your v1]
13744097 New [1/2] wifi: rtw88: Fix USB devices not transmitting beacons
13744098 New [2/2] wifi: rtw88: Avoid using macid 0 in AP mode
[Patchset 2: your v2 + mine]
13771597 New [v2] wifi: rtw88: Fix USB/SDIO devices not transmitting beacons
13767746 New wifi: rtw88: assign mac_id for vif/sta and update to TX desc
If this can make AP mode on USB devices step forward, I will merge them ahead.
Quoted 21 lines · Ping-Ke Shih
Hi Bitterblue,
Quoted 11 lines · Bitterblue Smith
All USB devices supported by rtw88 have the same problem: they don't transmit beacons in AP mode. (Some?) SDIO devices are also affected. The cause appears to be clearing
BIT_EN_BCNQ_DLofREG_FWHW_TXQ_CTRLbefore uploading the beacon reserved page, so don't clear the bit for USB and SDIO devices.Tested with RTL8811CU and RTL8723DU.
Cc <[email protected]> # 6.6.xSigned-off-by Bitterblue Smith <[email protected]>Can I say two below patchset are equivalent in your side?
[Patchset 1: your v1]
13744097 New [1/2] wifi: rtw88: Fix USB devices not transmitting beacons
13744098 New [2/2] wifi: rtw88: Avoid using macid 0 in AP mode
Quoted 6 lines
[Patchset 2: your v2 + mine]
13771597 New [v2] wifi: rtw88: Fix USB/SDIO devices not transmitting beacons
13767746 New wifi: rtw88: assignmac_idfor vif/sta and update to TX descIf this can make AP mode on USB devices step forward, I will merge them ahead.
Yes, patchset 2 works for me.
Ping-Ke Shih
maintainerQuoted 10 lines · Bitterblue Smith
All USB devices supported by rtw88 have the same problem: they don't transmit beacons in AP mode. (Some?) SDIO devices are also affected. The cause appears to be clearing
BIT_EN_BCNQ_DLofREG_FWHW_TXQ_CTRLbefore uploading the beacon reserved page, so don't clear the bit for USB and SDIO devices.Tested with RTL8811CU and RTL8723DU.
Cc <[email protected]> # 6.6.xSigned-off-by Bitterblue Smith <[email protected]>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
faa2e484b393 wifi: rtw88: Fix USB/SDIO devices not transmitting beacons