]> Git Repo - linux.git/commitdiff
wifi: rtw89: wow: do not configure CPU IO to receive packets for old firmware
authorChin-Yen Lee <[email protected]>
Fri, 4 Oct 2024 06:54:08 +0000 (14:54 +0800)
committerPing-Ke Shih <[email protected]>
Thu, 10 Oct 2024 00:45:37 +0000 (08:45 +0800)
The older firmware of 8852A and 8852B can't receive packets via
CPU IO function and will lead to WoWLAN fail if calling it.
So use firmware feature to distinguish.

Signed-off-by: Chin-Yen Lee <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
Link: https://patch.msgid.link/[email protected]
drivers/net/wireless/realtek/rtw89/core.h
drivers/net/wireless/realtek/rtw89/fw.c
drivers/net/wireless/realtek/rtw89/mac.c

index ff7c90533c621fad9ef0ea53f486035b22aca85b..38df161bfd351253b27da3617b41b4736424a778 100644 (file)
@@ -4445,6 +4445,7 @@ enum rtw89_fw_feature {
        RTW89_FW_FEATURE_WOW_REASON_V1,
        RTW89_FW_FEATURE_RFK_PRE_NOTIFY_V0,
        RTW89_FW_FEATURE_RFK_RXDCK_V0,
+       RTW89_FW_FEATURE_NO_WOW_CPU_IO_RX,
 };
 
 struct rtw89_fw_suit {
index 752a3c2536d4c51098f78b02bee293db90c22654..2c2fdf21f06587a3e3a26364a5dff146a5f5c008 100644 (file)
@@ -665,11 +665,13 @@ static const struct __fw_feat_cfg fw_feat_tbl[] = {
        __CFG_FW_FEAT(RTL8852A, ge, 0, 13, 35, 0, SCAN_OFFLOAD),
        __CFG_FW_FEAT(RTL8852A, ge, 0, 13, 35, 0, TX_WAKE),
        __CFG_FW_FEAT(RTL8852A, ge, 0, 13, 36, 0, CRASH_TRIGGER),
+       __CFG_FW_FEAT(RTL8852A, lt, 0, 13, 37, 0, NO_WOW_CPU_IO_RX),
        __CFG_FW_FEAT(RTL8852A, lt, 0, 13, 38, 0, NO_PACKET_DROP),
        __CFG_FW_FEAT(RTL8852B, ge, 0, 29, 26, 0, NO_LPS_PG),
        __CFG_FW_FEAT(RTL8852B, ge, 0, 29, 26, 0, TX_WAKE),
        __CFG_FW_FEAT(RTL8852B, ge, 0, 29, 29, 0, CRASH_TRIGGER),
        __CFG_FW_FEAT(RTL8852B, ge, 0, 29, 29, 0, SCAN_OFFLOAD),
+       __CFG_FW_FEAT(RTL8852B, lt, 0, 29, 30, 0, NO_WOW_CPU_IO_RX),
        __CFG_FW_FEAT(RTL8852BT, ge, 0, 29, 74, 0, NO_LPS_PG),
        __CFG_FW_FEAT(RTL8852BT, ge, 0, 29, 74, 0, TX_WAKE),
        __CFG_FW_FEAT(RTL8852BT, ge, 0, 29, 90, 0, CRASH_TRIGGER),
index b3f4170030870d575facb98050757bc98103d7bb..e09f926bb4a0961be6507a183b289cfd47dc00c1 100644 (file)
@@ -6521,6 +6521,9 @@ int rtw89_mac_cpu_io_rx(struct rtw89_dev *rtwdev, bool wow_enable)
        struct rtw89_mac_c2h_info c2h_info = {};
        u32 ret;
 
+       if (RTW89_CHK_FW_FEATURE(NO_WOW_CPU_IO_RX, &rtwdev->fw))
+               return 0;
+
        h2c_info.id = RTW89_FWCMD_H2CREG_FUNC_WOW_CPUIO_RX_CTRL;
        h2c_info.content_len = sizeof(h2c_info.u.hdr);
        h2c_info.u.hdr.w0 = u32_encode_bits(wow_enable, RTW89_H2CREG_WOW_CPUIO_RX_CTRL_EN);
@@ -6557,6 +6560,9 @@ static int rtw89_wow_config_mac_ax(struct rtw89_dev *rtwdev, bool enable_wow)
                rtw89_write32(rtwdev, R_AX_TF_FWD, 0);
                rtw89_write32(rtwdev, R_AX_HW_RPT_FWD, 0);
 
+               if (RTW89_CHK_FW_FEATURE(NO_WOW_CPU_IO_RX, &rtwdev->fw))
+                       return 0;
+
                if (chip->chip_id == RTL8852A || rtw89_is_rtl885xb(rtwdev))
                        rtw89_write8(rtwdev, R_BE_DBG_WOW_READY, WOWLAN_NOT_READY);
                else
This page took 0.101695 seconds and 4 git commands to generate.