Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2619185rwd; Fri, 16 Jun 2023 06:13:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6H0D9xamF/BDY4VBYerTeEhRLCvUNpNF3wQWuIl1oGMZ6q/t743FOWTUJLTsIdzXeYB1ov X-Received: by 2002:a05:6a20:2449:b0:10d:5390:eadb with SMTP id t9-20020a056a20244900b0010d5390eadbmr2682697pzc.2.1686921200007; Fri, 16 Jun 2023 06:13:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686921199; cv=none; d=google.com; s=arc-20160816; b=SUHyED/3v6TeOit4T+vai++267jabGWbhPRKtPT9JzJGWosmBcdTuVrLA0pXqZpvlj WrssbEW8P+H1pueOKaTYBU+bKi029HESJ7iNZOGyAVrYsfrhFBtUIUfRzX6QlqF1sqHP sIL8S8u6HPnNpj345NBLVG0qvYlhGw6eZ70xpnNSB+9a0ct+gFkB/uFjg44IajMWLmgW mq5kIcILr70KnvLsLw5x8T3+Eikrs4Cpw60kjw52j4Yq5T3H8byFiGJ23EKR+/ZDxuni nNaJK1qnNpC1jOoSK6Ej3TBBgxZmTrXgCW1ZIRLTtnuehBngbYOJ9tt8cT6bGus4e6LF 46Ag== 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=DSoIbY7m+no3Hxn+uwVptoKoZhmmf+FVCcq0rS7RMdQ=; b=vePGpEh1+pU0RZK6U7Ccp5rhzfPpUAw63nqBOIQekWP/qSERykmrAhhSof2U10x3Fy +X3KPpHu9r+l/Qzn6vxTbfeBgzCW+yb+/Ax7FbcGV0CBQ0d/Ouzh1Oo7HMHrIvlg5X1R PzE3h52pOYo1PLIIdLExknDLw90kyUGWvWbamrdV1gnjQWNJwLmOUa3C8vqaPsWPrHt8 U3zTewvuH59NBcViOCT7zQH2lUP0CnS/9qMvHd91lElPRapWjToBSKCIQSHt9YmasEUt cNqZ1voo6WLANlVczrv/5JG5tfZOEQ2+0EwvwYzyYBuP67oJyyvAkDJEIYEie2qEHfAz I/oA== 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 x26-20020aa7941a000000b006536902d31fsi15189800pfo.185.2023.06.16.06.13.05; Fri, 16 Jun 2023 06:13:19 -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 S1345482AbjFPM4c (ORCPT + 61 others); Fri, 16 Jun 2023 08:56:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbjFPM4b (ORCPT ); Fri, 16 Jun 2023 08:56:31 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B97AE30FE for ; Fri, 16 Jun 2023 05:56:29 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 35GCu2tqD024348, 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 35GCu2tqD024348 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Fri, 16 Jun 2023 20:56:02 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) 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, 16 Jun 2023 20:56:21 +0800 Received: from [127.0.1.1] (172.16.16.227) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Fri, 16 Jun 2023 20:56:20 +0800 From: Ping-Ke Shih To: , CC: , Subject: [PATCH v2 4/6] wifi: rtw88: Stop high queue during scan Date: Fri, 16 Jun 2023 20:55:38 +0800 Message-ID: <20230616125540.36877-5-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230616125540.36877-1-pkshih@realtek.com> References: <20230616125540.36877-1-pkshih@realtek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [172.16.16.227] X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXMBS04.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 When traversing channel list, TX in high queue should be disabled along with beacon function, so packets won't be sent to incorrect channels. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih --- v2: no change --- drivers/net/wireless/realtek/rtw88/main.c | 7 +++++-- drivers/net/wireless/realtek/rtw88/reg.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c index 9447a3aae3b5e..d55b041a6bb93 100644 --- a/drivers/net/wireless/realtek/rtw88/main.c +++ b/drivers/net/wireless/realtek/rtw88/main.c @@ -2403,10 +2403,13 @@ void rtw_core_enable_beacon(struct rtw_dev *rtwdev, bool enable) if (!rtwdev->ap_active) return; - if (enable) + if (enable) { rtw_write32_set(rtwdev, REG_BCN_CTRL, BIT_EN_BCN_FUNCTION); - else + rtw_write32_clr(rtwdev, REG_TXPAUSE, BIT_HIGH_QUEUE); + } else { rtw_write32_clr(rtwdev, REG_BCN_CTRL, BIT_EN_BCN_FUNCTION); + rtw_write32_set(rtwdev, REG_TXPAUSE, BIT_HIGH_QUEUE); + } } MODULE_AUTHOR("Realtek Corporation"); diff --git a/drivers/net/wireless/realtek/rtw88/reg.h b/drivers/net/wireless/realtek/rtw88/reg.h index 60de9de1cc7a8..7c6c11d50ff30 100644 --- a/drivers/net/wireless/realtek/rtw88/reg.h +++ b/drivers/net/wireless/realtek/rtw88/reg.h @@ -378,6 +378,7 @@ #define BIT_SIFS_BK_EN BIT(12) #define REG_TXPAUSE 0x0522 #define BIT_AC_QUEUE GENMASK(7, 0) +#define BIT_HIGH_QUEUE BIT(5) #define REG_RD_CTRL 0x0524 #define BIT_EDCCA_MSK_CNTDOWN_EN BIT(11) #define BIT_DIS_TXOP_CFE BIT(10) -- 2.25.1