Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2666344rwr; Fri, 28 Apr 2023 13:56:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6WzY0SCI3gFHSBCiFmYv2qRRFYdHYOTnexcYButwXXGs7mgxE/sfUF584JUgjvjKS5vmf/ X-Received: by 2002:a05:6a20:3c87:b0:ec:236b:2fce with SMTP id b7-20020a056a203c8700b000ec236b2fcemr8299799pzj.35.1682715393097; Fri, 28 Apr 2023 13:56:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682715393; cv=none; d=google.com; s=arc-20160816; b=WUcYErowEmvna9H1qKRT8jRGzrwYHqJRq5zq+ifgKKiozAeRySe6cMXSB6Jp8S73GZ 84GgoaxXq4LZh3KSAmGloyoe9esdCfqK6TTLhBMvQTbjYsVuQe52ZZEx5PDaGxNE/qTL YjLH0GODoXTIPJV1zVzTMHOYYcpCcMKWaCvyYyxD4v9osGtWFy53XLHRxF03KIoAcsYL NLaqYGagUt5J2QkIRb1VapsBQJ4djyTubcD3dAKpU/aEjbZrJkjc7Vv2PX4tY2koPBUF sItPAib911XP2EEL2efuNaPbDvG0ofEFa7sHpvQtfz3NNt7BhlvjirT3U01s6ItJoLyM TSbw== 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 :dkim-signature:dkim-filter; bh=E5Qma7jI8vhSmN+pnDPDayL3bppP/lVo2xYVak4Z+8I=; b=l3WpkEmRvnLgOoWRp+BVNoC1aKm+k3GmpHAAni2ZNGvy+BNbQsjbiGdKRvsIqRKvvu 5IOw7z2rDFdV0Yzig8kIsJByuxJlXa8vFpWimBXsXZ1bU6K9tkxnACe45aYmQoTSE1CK M5cJYMgRr5jYvou2EbKOg3WgAq/6dvH3V1W6Gak+G3B4dsl02Sxlcw8z6JRS2NVDaJlm vDTxTn7DW1ZFE/RXKDuLZIDmE+4Yv9OsmrCrjNpf0Qz6VIJj3skiRXKSDhX+qMJWol0M QW1yLuLrfXIUi4E+Sdkt1Bn5iRxOQc8k+UguKfAHH5leSs1yWiadlTfpKDExtTqAKrd2 +iew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=LmdQ+i2L; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t83-20020a635f56000000b0051b90567f99si23717925pgb.690.2023.04.28.13.56.21; Fri, 28 Apr 2023 13:56:33 -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; dkim=pass header.i=@candelatech.com header.s=default header.b=LmdQ+i2L; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346741AbjD1UuM (ORCPT + 63 others); Fri, 28 Apr 2023 16:50:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346529AbjD1UuK (ORCPT ); Fri, 28 Apr 2023 16:50:10 -0400 Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 950863C1E for ; Fri, 28 Apr 2023 13:50:09 -0700 (PDT) X-Virus-Scanned: Proofpoint Essentials engine Received: from mail3.candelatech.com (mail2.candelatech.com [208.74.158.173]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id B77E1A80063 for ; Fri, 28 Apr 2023 20:50:07 +0000 (UTC) Received: from ben-dt5.candelatech.com (50-251-239-81-static.hfc.comcastbusiness.net [50.251.239.81]) by mail3.candelatech.com (Postfix) with ESMTP id 51B2313C2B5; Fri, 28 Apr 2023 13:50:07 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com 51B2313C2B5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1682715007; bh=RqE1AIEdNgbVYLScyDN2gV1E2BYcfXU21jinsV4Uz4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LmdQ+i2Lb9Vmkf9NjCh0u5ytSAhpknVaKbtaBVzfZWk5TPg9jLXxX15QH4B/K1mUA QHl1rwE4mrpzdRd4A663iK+su4I+/iCQhfrmRAzkKdIjmg6mDcBO1CuyAB86s+b9H9 QVr9hRGncwh7qa8ZQ9I6bePVrlVsAzZBM2PcesYU= From: greearb@candelatech.com To: linux-wireless@vger.kernel.org Cc: Ben Greear Subject: [PATCH 5/6] wifi: mt76: mt7915: Improve monitor-mode flags settings. Date: Fri, 28 Apr 2023 13:49:59 -0700 Message-Id: <20230428205000.2647945-5-greearb@candelatech.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230428205000.2647945-1-greearb@candelatech.com> References: <20230428205000.2647945-1-greearb@candelatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MDID: 1682715008-pC02MzYU_i3C X-MDID-O: us5;ut7;1682715008;pC02MzYU_i3C;;f7146c1849a4b08a52804beb1c1cdf45 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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: Ben Greear This enables capturing more frames, and now when the rx5 group option is also enabled for rx-status, wireshark shows HE-TRIG as well as HE-MU frames. Signed-off-by: Ben Greear --- .../net/wireless/mediatek/mt76/mt7915/main.c | 26 +++++++++++++++++-- .../net/wireless/mediatek/mt76/mt7915/regs.h | 16 ++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c index 64c14fc303a2..55aed3c6d3be 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c @@ -562,6 +562,12 @@ static void __mt7915_configure_filter(struct ieee80211_hw *hw, MT_WF_RFCR1_DROP_BF_POLL | MT_WF_RFCR1_DROP_BA | MT_WF_RFCR1_DROP_CFEND | + MT_WF_RFCR1_DROP_PS_BFRPOL | + MT_WF_RFCR1_DROP_PS_NDPA | + MT_WF_RFCR1_DROP_NO2ME_TF | + MT_WF_RFCR1_DROP_NON_MUBAR_TF | + MT_WF_RFCR1_DROP_RXS_BRP | + MT_WF_RFCR1_DROP_TF_BFRP | MT_WF_RFCR1_DROP_CFACK; u32 flags = 0; bool is_promisc = *total_flags & FIF_CONTROL || phy->monitor_vif || @@ -587,7 +593,9 @@ static void __mt7915_configure_filter(struct ieee80211_hw *hw, MT_WF_RFCR_DROP_BCAST | MT_WF_RFCR_DROP_DUPLICATE | MT_WF_RFCR_DROP_A2_BSSID | - MT_WF_RFCR_DROP_UNWANTED_CTL | + MT_WF_RFCR_DROP_UNWANTED_CTL | /* 0 means drop */ + MT_WF_RFCR_IND_FILTER_EN_OF_31_23_BIT | + MT_WF_RFCR_DROP_DIFFBSSIDMGT_CTRL | MT_WF_RFCR_DROP_STBC_MULTI); phy->rxfilter |= MT_WF_RFCR_DROP_OTHER_UC; @@ -602,8 +610,22 @@ static void __mt7915_configure_filter(struct ieee80211_hw *hw, MT_WF_RFCR_DROP_RTS | MT_WF_RFCR_DROP_CTL_RSV | MT_WF_RFCR_DROP_NDPA); - if (is_promisc) + if (is_promisc) { phy->rxfilter &= ~MT_WF_RFCR_DROP_OTHER_UC; + phy->rxfilter |= MT_WF_RFCR_IND_FILTER_EN_OF_31_23_BIT; + if (flags & FIF_CONTROL) { + phy->rxfilter |= MT_WF_RFCR_DROP_UNWANTED_CTL; /* 1 means receive */ + phy->rxfilter |= MT_WF_RFCR_SECOND_BCN_EN; + phy->rxfilter |= MT_WF_RFCR_RX_MGMT_FRAME_CTRL; + phy->rxfilter |= MT_WF_RFCR_RX_SAMEBSSIDPRORESP_CTRL; + phy->rxfilter |= MT_WF_RFCR_RX_DIFFBSSIDPRORESP_CTRL; + phy->rxfilter |= MT_WF_RFCR_RX_SAMEBSSIDBCN_CTRL; + phy->rxfilter |= MT_WF_RFCR_RX_SAMEBSSIDNULL_CTRL; + phy->rxfilter |= MT_WF_RFCR_RX_DIFFBSSIDNULL_CTRL; + phy->rxfilter &= ~(MT_WF_RFCR_DROP_DIFFBSSIDMGT_CTRL); + } + phy->rxfilter |= MT_WF_RFCR_RX_DATA_FRAME_CTRL; + } *total_flags = flags; mt76_wr(dev, MT_WF_RFCR(band), phy->rxfilter); diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/regs.h b/drivers/net/wireless/mediatek/mt76/mt7915/regs.h index db81c9902832..db52334204ed 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/regs.h +++ b/drivers/net/wireless/mediatek/mt76/mt7915/regs.h @@ -547,6 +547,16 @@ enum offs_rev { #define MT_WF_RFCR_DROP_OTHER_TIM BIT(19) #define MT_WF_RFCR_DROP_NDPA BIT(20) #define MT_WF_RFCR_DROP_UNWANTED_CTL BIT(21) +#define MT_WF_RFCR_IND_FILTER_EN_OF_31_23_BIT BIT(22) +#define MT_WF_RFCR_SECOND_BCN_EN BIT(23) +#define MT_WF_RFCR_RX_MGMT_FRAME_CTRL BIT(24) +#define MT_WF_RFCR_RX_DATA_FRAME_CTRL BIT(25) +#define MT_WF_RFCR_RX_SAMEBSSIDPRORESP_CTRL BIT(26) +#define MT_WF_RFCR_RX_DIFFBSSIDPRORESP_CTRL BIT(27) +#define MT_WF_RFCR_RX_SAMEBSSIDBCN_CTRL BIT(28) +#define MT_WF_RFCR_RX_SAMEBSSIDNULL_CTRL BIT(29) +#define MT_WF_RFCR_RX_DIFFBSSIDNULL_CTRL BIT(30) +#define MT_WF_RFCR_DROP_DIFFBSSIDMGT_CTRL BIT(31) #define MT_WF_RFCR1(_band) MT_WF_RMAC(_band, 0x004) #define MT_WF_RFCR1_DROP_ACK BIT(4) @@ -554,6 +564,12 @@ enum offs_rev { #define MT_WF_RFCR1_DROP_BA BIT(6) #define MT_WF_RFCR1_DROP_CFEND BIT(7) #define MT_WF_RFCR1_DROP_CFACK BIT(8) +#define MT_WF_RFCR1_DROP_PS_BFRPOL BIT(11) +#define MT_WF_RFCR1_DROP_PS_NDPA BIT(12) +#define MT_WF_RFCR1_DROP_NO2ME_TF BIT(22) +#define MT_WF_RFCR1_DROP_NON_MUBAR_TF BIT(23) +#define MT_WF_RFCR1_DROP_RXS_BRP BIT(25) +#define MT_WF_RFCR1_DROP_TF_BFRP BIT(30) #define MT_WF_RMAC_RSVD0(_band) MT_WF_RMAC(_band, 0x02e0) #define MT_WF_RMAC_RSVD0_EIFS_CLR BIT(21) -- 2.40.0