Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp828590rwi; Wed, 19 Oct 2022 03:34:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7TUditeoUrlirl4zS+yac4mxwrKMkeQHYzBIaW4CIbr5MluE07wvRCX99VHyi62PnSZqok X-Received: by 2002:a17:907:3f23:b0:78e:260a:fc33 with SMTP id hq35-20020a1709073f2300b0078e260afc33mr6252359ejc.152.1666175663807; Wed, 19 Oct 2022 03:34:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666175663; cv=none; d=google.com; s=arc-20160816; b=T/MheRypUcPX7U7MkxSSSzAdJ9Kb+QSf2sKR4ydxF4NxdDeoIXeRwR9swF7pG+VeTh zuac3HNxWkIM87lCJBD0WNkSz23xSUHrivtI621gENgl9Adij2IYyDsDuvt2IMcHKyxF +fofNCzYuygqJI5TvJzJoqgBOKxR4LWFr0Q3ujOldNX6MtJfhP+9jFEbhyKIRiizJPAd 8X4ZldPKXNAZ+t/uaa47hC6NVvn6UUrfDELz7SdCkWDJJyDP63jZWypbR7jypOl6KnD5 Eg5h+tmIQt47dtxJK9HGyE3zZem2nlVYR/HREYMFk4t3nKXKvUq9DldvzU39vi+yH8WF TOLA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Fu5f7y3OX1CXfpf+0Y2nRBjO6dnJzN7cHmwtPGvoLQE=; b=bhILrfwRhRxucf+wAa1aJpHjMl0EuGgXJGWiyG0T7GinB1g/ZTfAive3aB4oa/Ztdy zvdcyJNiRHX3+BGh9kJLnqHU991i+EL9nzTMNqPW4iu5HcYprwwErbpCxSGSOEFGDIUs a1FP2LG54HCr4So2TPnGZljrHT70cfdaqrKY93eAmlPJ/YHKwWr2qK13wPPLJ8Oxoj1S rF2jTDKPrcNbWh6l9FHajrjw1uVbuq0M5L/ct9QD1UWyGAL27ZkSGKj6Idd8/drSxhDK dTq4/FrqLKM5XGjBhaCYC+V5ZDpcVnN8vyJyfj4D0fBXffYhnR5mW/M8sXMSVaiUdITP xIow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rOa9WMUB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sz15-20020a1709078b0f00b0078ddc074afdsi10828451ejc.577.2022.10.19.03.33.55; Wed, 19 Oct 2022 03:34:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rOa9WMUB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230183AbiJSKNB (ORCPT + 99 others); Wed, 19 Oct 2022 06:13:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232151AbiJSKMd (ORCPT ); Wed, 19 Oct 2022 06:12:33 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C68CE09C4; Wed, 19 Oct 2022 02:52:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 16B65CE21A3; Wed, 19 Oct 2022 09:09:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B89CC433B5; Wed, 19 Oct 2022 09:09:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170595; bh=44uRYNzLL2dyaeADFwbtAehncvGKf6ItaLtVtAl1DKk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rOa9WMUBAm2LNOfyNlwnnp0ebKdGdaPzWYuPk+R1kXxZe/1c7NrSd0+37hLTcEHNM wwT48trz+E9eJLZ2dDYCE1zZTJcoihgjL/In5Tw0Col1Oe4kBQcMxcRUaCSlhz7TN6 WcesL+OwyTyIr1JxPwQzOuA5gCdlLlrboqH5z9aU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Po-Hao Huang , Ping-Ke Shih , Kalle Valo , Sasha Levin Subject: [PATCH 6.0 707/862] wifi: rtw89: fix rx filter after scan Date: Wed, 19 Oct 2022 10:33:14 +0200 Message-Id: <20221019083321.204392155@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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-kernel@vger.kernel.org From: Po-Hao Huang [ Upstream commit 812825c2b204c491f1a5586c602e4ac75060493a ] In monitor mode we should be able to received all packets even if it's not destined to us. But after scan, the configuration was wrongly set, so we fix it. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220916033811.13862-7-pkshih@realtek.com Signed-off-by: Sasha Levin --- drivers/net/wireless/realtek/rtw89/fw.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c index 6473015a6b2a..c993fe9cf6b4 100644 --- a/drivers/net/wireless/realtek/rtw89/fw.c +++ b/drivers/net/wireless/realtek/rtw89/fw.c @@ -2289,6 +2289,7 @@ void rtw89_hw_scan_start(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif, { struct rtw89_vif *rtwvif = (struct rtw89_vif *)vif->drv_priv; struct cfg80211_scan_request *req = &scan_req->req; + u32 rx_fltr = rtwdev->hal.rx_fltr; u8 mac_addr[ETH_ALEN]; rtwdev->scan_info.scanning_vif = vif; @@ -2303,13 +2304,13 @@ void rtw89_hw_scan_start(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif, ether_addr_copy(mac_addr, vif->addr); rtw89_core_scan_start(rtwdev, rtwvif, mac_addr, true); - rtwdev->hal.rx_fltr &= ~B_AX_A_BCN_CHK_EN; - rtwdev->hal.rx_fltr &= ~B_AX_A_BC; - rtwdev->hal.rx_fltr &= ~B_AX_A_A1_MATCH; + rx_fltr &= ~B_AX_A_BCN_CHK_EN; + rx_fltr &= ~B_AX_A_BC; + rx_fltr &= ~B_AX_A_A1_MATCH; rtw89_write32_mask(rtwdev, rtw89_mac_reg_by_idx(R_AX_RX_FLTR_OPT, RTW89_MAC_0), B_AX_RX_FLTR_CFG_MASK, - rtwdev->hal.rx_fltr); + rx_fltr); } void rtw89_hw_scan_complete(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif, @@ -2323,9 +2324,6 @@ void rtw89_hw_scan_complete(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif, if (!vif) return; - rtwdev->hal.rx_fltr |= B_AX_A_BCN_CHK_EN; - rtwdev->hal.rx_fltr |= B_AX_A_BC; - rtwdev->hal.rx_fltr |= B_AX_A_A1_MATCH; rtw89_write32_mask(rtwdev, rtw89_mac_reg_by_idx(R_AX_RX_FLTR_OPT, RTW89_MAC_0), B_AX_RX_FLTR_CFG_MASK, -- 2.35.1