]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw89: debug: disable inactive power save to reduce bus overhead
authorJohnson Tsai <wenjie.tsai@realtek.com>
Mon, 20 Apr 2026 03:40:39 +0000 (11:40 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Wed, 29 Apr 2026 04:34:03 +0000 (12:34 +0800)
This helps avoid excessive bus traffic and I/O overhead on
slower HCIs (e.g., USB, SDIO) caused by frequent power state
transitions.

Add RTW89_DM_INACTIVE_PS to the disabled_dm bitmap via debugfs and
check it in the rtw89_enter_ips path. When set, the driver skips
entering inactive power save and returns immediately.

Signed-off-by: Johnson Tsai <wenjie.tsai@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260420034051.17666-5-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.h
drivers/net/wireless/realtek/rtw89/debug.c
drivers/net/wireless/realtek/rtw89/ps.c

index b2dfed064555523b5b93f383c90f238afb51f059..ac399ecaea6b3253cef82d42525f58c79added3d 100644 (file)
@@ -5179,6 +5179,7 @@ enum rtw89_dm_type {
        RTW89_DM_TAS,
        RTW89_DM_MLO,
        RTW89_DM_HW_SCAN,
+       RTW89_DM_INACTIVE_PS,
 };
 
 #define RTW89_THERMAL_PROT_LV_MAX 5
index 02386d1d07c625148267510e1ad14325a0161f74..ebe3b1f9c39d2655e4d5593be87dc5c3173b7103 100644 (file)
@@ -4348,6 +4348,7 @@ static const struct rtw89_disabled_dm_info {
        DM_INFO(TAS),
        DM_INFO(MLO),
        DM_INFO(HW_SCAN),
+       DM_INFO(INACTIVE_PS),
 };
 
 static ssize_t
index 125cf14fa581fc474345f67034d82c49fbdf0146..31bb5dcd284aeca6518e4595ccad04718b2c9907 100644 (file)
@@ -234,8 +234,14 @@ void rtw89_enter_ips(struct rtw89_dev *rtwdev)
 {
        struct rtw89_vif_link *rtwvif_link;
        struct rtw89_vif *rtwvif;
+       struct rtw89_hal *hal = &rtwdev->hal;
        unsigned int link_id;
 
+       if (hal->disabled_dm_bitmap & BIT(RTW89_DM_INACTIVE_PS)) {
+               rtw89_debug(rtwdev, RTW89_DBG_PS, "skip enter IPS due to disabled_dm\n");
+               return;
+       }
+
        set_bit(RTW89_FLAG_INACTIVE_PS, rtwdev->flags);
 
        if (!test_bit(RTW89_FLAG_POWERON, rtwdev->flags))