wifi: rtw89: Disallow power save with multiple stations
authorPo-Hao Huang <phhuang@realtek.com>
Sat, 15 Apr 2023 03:50:15 +0000 (11:50 +0800)
committerKalle Valo <kvalo@kernel.org>
Mon, 17 Apr 2023 09:49:52 +0000 (12:49 +0300)
Power saving for more than one station is not supported currently.
Disallow entering PS mode when we have more than one associated
stations.

Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230415035016.15788-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c

index 8bbc055..a589f09 100644 (file)
@@ -2509,6 +2509,9 @@ static void rtw89_vif_enter_lps(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwv
            rtwvif->tdls_peer)
                return;
 
+       if (rtwdev->total_sta_assoc > 1)
+               return;
+
        if (rtwvif->offchan)
                return;