Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp612497rwe; Fri, 14 Apr 2023 07:32:42 -0700 (PDT) X-Google-Smtp-Source: AKy350aE5iIwyG4F8J1MuUoDiyePra7UEFo3u7Qn69LAs3ZUPSAoAGmADx288bK3zN076T6T+kmE X-Received: by 2002:a17:90a:7f92:b0:246:aeee:e61c with SMTP id m18-20020a17090a7f9200b00246aeeee61cmr6303335pjl.11.1681482762576; Fri, 14 Apr 2023 07:32:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681482762; cv=none; d=google.com; s=arc-20160816; b=JQlaJuYXMNdAg011tmByP8q9+hSDRr52uKckXGmmv7R52gcl1SCyLqnwrykjyHv2WT tKXIPrcdX98DNY27XBwvYuMGuE/aM2TxQEsQSQXvmO9FHCJTt6ojQRdxs5fWtjLgLGP9 WeoUIgQi+GSz1HcQq2vvnds1IYndu5swmZJw5kyouxNZ4eCbdb1mZcllm3TrbqXQ0gTw /5uaFsYKwfqQEabby7oPDmPbdp/ZnrHmLMiGgM+NkdSHZY7o/N6wf/F1gv3mB8/878KG QlZLdgXYYs5fI5W0nA5wMA+zuf/ArmU4W2ZyNM1MF279fI2LSEKmxhctpQZU0xHcfKBD eH5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=iati0f2zRpy0nyyz8Yyutu2Mkd1Yr+m83TX/N2DvtAY=; b=gyC8r46hwaSNr5G5lKwXqeProCZFrTh9nWy6s/2O2VE5U3IZGBeMlW6YI+UpuqKLXW fI+LXrBRFvI6p+K2fAPed4wO3zovwzATxqOkO410aXFDKozr/J6VwzEn+J57g85h6GbP kKJ8AVZ4nTSRMT2Q3Mf36sLNhx0J2KSDraV6dSBYNXY9iFB8f25Z0e2q1poeoXx7DeTV hZLAoRdZCdbyni1D9eeJL6uJWcfUE6jCcuWjQDWaoB+DG/nvBepDuFtSYFNVs/AOB6z3 kyQqn+bsQKvxMZ8tGkKE8Ggw9OQtd6QyMmOYpVye52z8yOx0YG3QnDYtes/FOiaGEN8L 9bbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id on17-20020a17090b1d1100b0023f4e5dda3csi8028070pjb.7.2023.04.14.07.32.31; Fri, 14 Apr 2023 07:32:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230304AbjDNOcG (ORCPT + 62 others); Fri, 14 Apr 2023 10:32:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230246AbjDNOcE (ORCPT ); Fri, 14 Apr 2023 10:32:04 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C880E4C for ; Fri, 14 Apr 2023 07:31:58 -0700 (PDT) X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 33EE3TWI0020349, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 33EE3TWI0020349 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Fri, 14 Apr 2023 22:03:29 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Fri, 14 Apr 2023 22:03:51 +0800 Received: from localhost (172.16.20.53) by RTEXDAG02.realtek.com.tw (172.21.6.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Fri, 14 Apr 2023 22:03:50 +0800 From: Ping-Ke Shih To: CC: , , Subject: [PATCH 4/5] wifi: rtw89: Disallow power save with multiple stations Date: Fri, 14 Apr 2023 22:03:15 +0800 Message-ID: <20230414140316.27656-5-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230414140316.27656-1-pkshih@realtek.com> References: <20230414140316.27656-1-pkshih@realtek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [172.16.20.53] X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXDAG02.realtek.com.tw (172.21.6.101) X-KSE-ServerInfo: RTEXDAG02.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Po-Hao Huang 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 Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c index b21fa1721edd7..8cdab81ba5f07 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -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; -- 2.25.1