Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2057866rwd; Thu, 15 Jun 2023 21:16:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ZhMkJM/NTk3Ltta8WVHBkmU1Kenmn5rRbZ1GCPb4/HN+Xn1iMMxiCqpOrDUwPC5LE6J0I X-Received: by 2002:a17:902:e88c:b0:1b3:bb30:d8ec with SMTP id w12-20020a170902e88c00b001b3bb30d8ecmr1193497plg.58.1686889011517; Thu, 15 Jun 2023 21:16:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686889011; cv=none; d=google.com; s=arc-20160816; b=Kc/K0i3wFtpUXcNmJEYBbgAZeXYS4IIciS27QI5Z/P2aVkXqJEPDp2+I2euTmIoXwk q1j5bQ3SJXN1Hzhsat2zjj03tOJHc+Iw0JoTO+5YqZDWX1jWHhSfO/vXT+LnvKu6If9A Mup9h4Pc2mUsphoJEleXvGH86iuvjwvEziFZoNEB2vQnd5VMxG47erYwJU+SMfum/j7w 8/XRAr6hosokmk6UUECM08xu4xelDEqJgD5ZIJCxbGv+XLjIS4oB88dppztqip+iyyqf sEN2+24ORVclb45SMNJ4muccexIdHlnDxOH1GZFnNAsieTrelFBldRk4DH8bcejTrXSl rrbA== 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=DmZewS0ckZXDJGsOt0XjbZmQcpg/uqCikEB+pDtpzB4=; b=YYJhPrlt3d6WM9M1fPwHWxhlKAEWY8YKP8+wwwKhe8mqA/WDcSgjrtXWU3b17R+xnL ebz/2eMLB4rIpCJ91df0fFEWdZZWF6DIw5RCbtJyMFLwtyjkR76jfJESVdGpBR/YHbfW UH90e/+82HYFuWjIVFs9WTsN1nZIBjiwvC/oA65pKg6+53XZ2rZWdSgF3MYaiaDIi1Hw Ku0fcoUyYt9bZdqgcaqLGI88uKitAzstYvMyRy/iBRRsck0TUFBKG2/Xgp3DNJvi1PpP xb7miLh2hktKDkvjGUYIlfsMKB5DMi4HjyRPiDzP4GYmGEOkzmDzkp/bX89s6jyhX4r3 Y9hA== 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 t18-20020a170902d21200b001b199c98cf4si10157097ply.280.2023.06.15.21.16.42; Thu, 15 Jun 2023 21:16:51 -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 S240622AbjFPDpa (ORCPT + 61 others); Thu, 15 Jun 2023 23:45:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240998AbjFPDp0 (ORCPT ); Thu, 15 Jun 2023 23:45:26 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7192C1BF8 for ; Thu, 15 Jun 2023 20:45:24 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 35G3iw6qB029363, 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 35G3iw6qB029363 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Fri, 16 Jun 2023 11:44:58 +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 11:45:17 +0800 Received: from [127.0.1.1] (172.21.69.188) 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 11:45:16 +0800 From: Ping-Ke Shih To: , CC: , Subject: [PATCH 4/6] wifi: rtw88: Stop high queue during scan Date: Fri, 16 Jun 2023 11:44:29 +0800 Message-ID: <20230616034431.17403-5-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230616034431.17403-1-pkshih@realtek.com> References: <20230616034431.17403-1-pkshih@realtek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [172.21.69.188] 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 --- 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