wifi: rtw89: tweak tx wake notify matching condition

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
This commit is contained in:
Chih-Kang Chang 2025-07-10 12:24:19 +08:00 committed by Ping-Ke Shih
parent e044f5d40f
commit 094bb62c58

View 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);
}