Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1378263rwe; Fri, 14 Apr 2023 20:52:08 -0700 (PDT) X-Google-Smtp-Source: AKy350YqgG4h2khpdmpm2HjrJFr6CaQ708XYK53JHm6nJ51I9R4I3cJkrE5v8ScV4Wvv+msDXmPf X-Received: by 2002:a17:90b:234d:b0:23f:84b9:d7a9 with SMTP id ms13-20020a17090b234d00b0023f84b9d7a9mr8695600pjb.18.1681530728662; Fri, 14 Apr 2023 20:52:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681530728; cv=none; d=google.com; s=arc-20160816; b=TTMepOuNnHQ35a/MCcIBDIUQDLn5L10E/u9asTbPdWtnhbmNKGqclyleFChRpdrC31 woxqWM0Og4jhh544knT9RUnoc8JR0rvLli+Fen74yxzG6F8ZLf7kAMlcx19/u5gys/Mq vxO9GdSQ24p5aj6RM45leIqNAW+tyULLqvuH8eFwBtY3PSAC0YBIPToXkG/9RffyZ9sb ygfV1jBRSAeQ9Pdti7RlmzKXtn4rp30unCE1Fo8TdxeyUeJe96y84WdhzztRhoF56Nz7 2fL1H/OTPHfXJXlTSOr7UC19awPXwqBTvF0iOv2qIaxarmjRHuq/7/1vEdAFcWE1xiZE hy+g== 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 :message-id:date:subject:cc:to:from:authenticated-by; bh=iati0f2zRpy0nyyz8Yyutu2Mkd1Yr+m83TX/N2DvtAY=; b=Qb/ergcBpHP7EXQkajNcAXxaYyQuX25pJ8tD1K2OdaXskJ0Jk1whrDb0of4QI9Yqsi wEcjIdDUUDfznDqWgYU1BR/bXq+rE+6W9b79eQhEt4otbCyqKcD9z7XA12SvuBtLGk30 1tMpY1szgsw7mKuzfaHfRtSfs4N8EaMQ6QRM99noB5ysvVvJVKN3KCGCUFF+FOpt4sxZ tDquXsL9TO7hprfw/z2UTAgxx0osGPKiGfCpNaQaV4nAiNjDDfJ7cmIbx4JEphvuWsjr Hegt7RYW/8apsbUAkWWcqN5uziO1vu1iH7hKTDgGSt9eT9QE8bjgy+5WxZhpqDKKJCMz 3njQ== 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 23-20020a17090a0b9700b00246be290788si8316984pjr.42.2023.04.14.20.51.59; Fri, 14 Apr 2023 20:52:08 -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 S229591AbjDODuq (ORCPT + 63 others); Fri, 14 Apr 2023 23:50:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjDODup (ORCPT ); Fri, 14 Apr 2023 23:50:45 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2006D4C2D for ; Fri, 14 Apr 2023 20:50:43 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 33F3oFWi9022005, 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 33F3oFWi9022005 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Sat, 15 Apr 2023 11:50:15 +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; Sat, 15 Apr 2023 11:50:38 +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; Sat, 15 Apr 2023 11:50:35 +0800 From: Ping-Ke Shih To: CC: , , Subject: [PATCH v2 5/6] wifi: rtw89: Disallow power save with multiple stations Date: Sat, 15 Apr 2023 11:50:15 +0800 Message-ID: <20230415035016.15788-1-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 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