Skip to contentSkip to conversation

wifi: rtw89: 8851b: avoid using CPUIO feature with old firmware

PATCH In review Ping-Ke Shih 2 participants 3 messages Sep 16 – Sep 23 Realtek wireless driver (rtw89)

lore
Share & tools
lore

Ping-Ke Shih

author maintainer
#0 lore raw

PATCH 1/1 wifi: rtw89: 8851b: avoid using CPUIO feature with old firmware

From: Chih-Kang Chang <[email protected]>

The old firmware for RTL8851B doesn't support CPUIO feature. Add firmware feature check to avoid C2H register polling timeout.

---
 drivers/net/wireless/realtek/rtw89/fw.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/realtek/rtw89/fw.c +1 -0
index fa30543a8b42..8866c81edc7d 100644
@@ -892,6 +892,7 @@ static const struct __fw_feat_cfg fw_feat_tbl[] = {
 	__CFG_FW_FEAT(RTL8851B, ge, 0, 29, 37, 1, TX_WAKE),
 	__CFG_FW_FEAT(RTL8851B, ge, 0, 29, 37, 1, SCAN_OFFLOAD),
 	__CFG_FW_FEAT(RTL8851B, ge, 0, 29, 41, 0, CRASH_TRIGGER_TYPE_0),
+	__CFG_FW_FEAT(RTL8851B, lt, 0, 29, 57, 0, NO_WOW_CPU_IO_RX),
 	__CFG_FW_FEAT(RTL8851B, ge, 0, 29, 127, 0, SER_L1_BY_EVENT),
 	__CFG_FW_FEAT(RTL8851B, ge, 0, 29, 130, 0, SIM_SER_L0L1_BY_HALT_H2C),
 	__CFG_FW_FEAT(RTL8852A, le, 0, 13, 29, 0, OLD_HT_RA_FORMAT),

base-commit: 73e3b1c94c7d5b4a113e7cbb42665dc2fe3b9d78
prerequisite-patch-id: a874231735fadfceb48a05d7f3b8e9c698976037

Signature · 1 line
2.25.1
Tested-by on v1 1/1
#1 lore raw

RTL8851BE, WL_FW 0.29.41.5, so the new entry applies. Applied on 7.3.0-rc1 and rebuilt the rtw89 modules only, one suspend/resume cycle per run with WoWLAN armed for magic-packet and disconnect.

Without the patch:

  [ 1582.387887] PM: suspend entry (deep)
  [ 1586.067431] rtw89_8851be 0000:02:00.0: c2h reg timeout
  [ 1589.406222] rtw89_8851be 0000:02:00.0: c2h reg timeout
  [ 1592.742446] rtw89_8851be 0000:02:00.0: c2h reg timeout
  [ 1594.422876] rtw89_8851be 0000:02:00.0: Unknown wakeup reason 0
  [ 1597.737909] rtw89_8851be 0000:02:00.0: c2h reg timeout
  [ 1601.043919] rtw89_8851be 0000:02:00.0: c2h reg timeout
  [ 1604.353105] rtw89_8851be 0000:02:00.0: c2h reg timeout
  [ 1604.538816] Restarting tasks: Starting

With it:

  [ 1635.641438] PM: suspend entry (deep)
  [ 1637.703234] rtw89_8851be 0000:02:00.0: Unknown wakeup reason 0
  [ 1638.871251] Restarting tasks: Starting

Six timeouts gone, and the cycle spends 3.2 s instead of 22.2 s between suspend entry and task restart.

"Unknown wakeup reason 0" is still there in both runs. That is a separate matter and not what this patch is about, so I mention it only so the tag is not read as covering it.

author maintainer
#2 lore raw
In reply to Ping-Ke Shih
Quoted 10 lines · Ping-Ke Shih

From: Chih-Kang Chang <[email protected]>

The old firmware for RTL8851B doesn't support CPUIO feature. Add firmware feature check to avoid C2H register polling timeout.

1 patch(es) applied to rtw-next branch of rtw.git, thanks.

cb43c5421fb3 wifi: rtw89: 8851b: avoid using CPUIO feature with old firmware

---
https://github.com/pkshih/rtw.git