Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp576430rwe; Fri, 14 Apr 2023 07:07:58 -0700 (PDT) X-Google-Smtp-Source: AKy350at9BD6F5nw9htrhu2fYNeTGuNf/e1/JV9ZbT6lE3pP2UsYekvXae0wj8zrf8IjXMgvUsm8 X-Received: by 2002:a05:6a20:1b1e:b0:d4:ea20:2185 with SMTP id ch30-20020a056a201b1e00b000d4ea202185mr5360548pzb.6.1681481277881; Fri, 14 Apr 2023 07:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681481277; cv=none; d=google.com; s=arc-20160816; b=KXYPlV0szBLpS5fOdfy58kZ4W0AhYJBMoppi2rCTn3BT0+RyXE6EQext2NnvH8ZWoU f+X3CsrmsyibjhAIC5bVO4tG7Nt/ylxYM1eHjmJjGs6pgDQKN1HYnG16AU61bpUQxRv+ uh5bmIctL2AX8agDY2DkD7EIWCOgElzDoW0clcHlQ+iUgiOCeTHqriRoGS3D05mjIDv8 N9Rr6vue50r+eZ60amYvm3mjWbTg+CGqqZ3o43hXXOoygzfdK1PA55VX4bBPN4/LgifP 7d8b29XBbRIlUn9cSnZMQLd7/NuF/3sr5JMUofFqyWKVk/DaidB9VkHg6N8E2IoJO8gd +GJQ== 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 :authenticated-by; bh=GdvQoZ7i9+Rf/N5cZ2LnAnT/KwFZY1edwbkWGH1/uig=; b=bWEs7ADC0PvvGxsFKO2z0gtbN9dQQVaPkH9p0m8E2cfKzXxNtIaSJD3EZhisy8S05x z5if0bJp9SjUnHi50yf/hUWGku0gV93+kPIzx/uP9Q21MCspLugoVNnJGAbA2HVmqHi7 BxYNLytjpwUSqpTnFC6XHOyQEKH2CqDFTRdxOvW0cGdmEXMmzuY34ZIbOahZlVrLz6Th zQZlIGAF1XHP6EQ+c5YgZOyjjwM/SLhAK+aYCfnpgn9V+36IaIO8jDEnE6ZQjUFc1D2N lxQpyDNx7C8GM7xcwgebiP+2gSVDZKR+f3PzYVd9aECJR54BsUz53IYq9iuvt3AqXAzc ESDw== 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 y29-20020aa7943d000000b0063b1bfa94dfsi4269466pfo.301.2023.04.14.07.07.48; Fri, 14 Apr 2023 07:07:57 -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 S230290AbjDNOFD (ORCPT + 62 others); Fri, 14 Apr 2023 10:05:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbjDNOFC (ORCPT ); Fri, 14 Apr 2023 10:05:02 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68B22AD37 for ; Fri, 14 Apr 2023 07:04:33 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 33EE3HKk8020006, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 33EE3HKk8020006 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Fri, 14 Apr 2023 22:03:17 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Fri, 14 Apr 2023 22:03:39 +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:39 +0800 From: Ping-Ke Shih To: CC: , , Subject: [PATCH 1/5] wifi: rtw89: prohibit enter IPS during HW scan Date: Fri, 14 Apr 2023 22:03:12 +0800 Message-ID: <20230414140316.27656-2-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-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: Chih-Kang Chang Mac80211 core may ask driver to change to idle mode during HW scan, then H2C command for HW scan will send failed since chip is in idle mode. Therefore, We check the SCANNING flag before entering IPS to prevent this behavior. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/mac80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw89/mac80211.c b/drivers/net/wireless/realtek/rtw89/mac80211.c index b059aa8d88dbf..b5cbfc15ebad8 100644 --- a/drivers/net/wireless/realtek/rtw89/mac80211.c +++ b/drivers/net/wireless/realtek/rtw89/mac80211.c @@ -105,7 +105,8 @@ static int rtw89_ops_config(struct ieee80211_hw *hw, u32 changed) } if ((changed & IEEE80211_CONF_CHANGE_IDLE) && - (hw->conf.flags & IEEE80211_CONF_IDLE)) + (hw->conf.flags & IEEE80211_CONF_IDLE) && + !rtwdev->scanning) rtw89_enter_ips(rtwdev); mutex_unlock(&rtwdev->mutex); -- 2.25.1