]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: rtw89: tweak tx wake notify matching condition
authorChih-Kang Chang <gary.chang@realtek.com>
Thu, 10 Jul 2025 04:24:19 +0000 (12:24 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Tue, 15 Jul 2025 01:50:51 +0000 (09:50 +0800)
8852BT needs to call TX wake notify once entering Leisure Power Save.
8852C needs to call TX wake notify after entering low power mode. Other
AX chips only MGMT packets needs to call TX wake after entering low power
mode. BE chips no need to call TX wake.

Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250710042423.73617-11-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c

index da82a88cce988deb3a8ef8152f59827e97d2bdb3..57590f5577a36099503a75ed9732865fc6b3bb90 100644 (file)
@@ -994,13 +994,25 @@ rtw89_core_tx_wake(struct rtw89_dev *rtwdev,
        if (!RTW89_CHK_FW_FEATURE(TX_WAKE, &rtwdev->fw))
                return;
 
-       if (!test_bit(RTW89_FLAG_LOW_POWER_MODE, rtwdev->flags))
-               return;
+       switch (chip->chip_id) {
+       case RTL8852BT:
+               if (test_bit(RTW89_FLAG_LEISURE_PS, rtwdev->flags))
+                       goto notify;
+               break;
+       case RTL8852C:
+               if (test_bit(RTW89_FLAG_LOW_POWER_MODE, rtwdev->flags))
+                       goto notify;
+               break;
+       default:
+               if (test_bit(RTW89_FLAG_LOW_POWER_MODE, rtwdev->flags) &&
+                   tx_req->tx_type == RTW89_CORE_TX_TYPE_MGMT)
+                       goto notify;
+               break;
+       }
 
-       if (chip->chip_id != RTL8852C &&
-           tx_req->tx_type != RTW89_CORE_TX_TYPE_MGMT)
-               return;
+       return;
 
+notify:
        rtw89_mac_notify_wake(rtwdev);
 }