Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1047342pxp; Thu, 17 Mar 2022 01:23:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXYIltnqGx+Z6BLj9cB9yb6KwF3saRXy8SJrTPwTfkvpfp0h77lCsnlvb04ayypDWQ/NIQ X-Received: by 2002:aa7:cb18:0:b0:413:3a7a:b5d6 with SMTP id s24-20020aa7cb18000000b004133a7ab5d6mr3059176edt.254.1647505417175; Thu, 17 Mar 2022 01:23:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647505417; cv=none; d=google.com; s=arc-20160816; b=tE13fwHdtiWLDL/05Hw0C+H/xSN+UXx/rlCUgvmPcohI8NN2ogXaJorkuPIxtmpdRD RI0uMdTsilQAYz18jzo3TmwOa86CfsuJGtK8e940WrtLd0B9Zsr6BCzOl+XjJwMoXeRC tPUviJxt71ya6qdpxqxkFOWsH27XwrMJrMFE7HSxsMh+IiXw8PYoIyPbruYagKZSY9zN 1x78JYh5Jnn7zAcbPTBiEK+hJV5UdVSokoQ7kTHZO+4EqGfy/GOVSqrHUjRT4rtHzQAh 29FZurmtZQPY3Q9z+6CQwVFndAlVKdv+4KDELUSO948BekUguVsIQr5JnnGWu9mWv1se HTcQ== 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:date:cc:to:from:subject:message-id; bh=5ozWFOrG/WJ9V8e5t8mlzXYjizEvqR0CGx18fYbkwlo=; b=dZXMxXXClO6G7sCaKBU+DEMp/fffihCb3XDonsb6OrBw/8LwBJ0ZSyHpTfCDSKw24A 2wozWw7YpofligbUwztuvKEJyKGN3TAtxjiLfGavW7mkEpX8grRVb/ZZqUi0JeQ0iVvR pm1N4Muz4WHvCS9jZqss+6HZrxlLmep3SoMbQZKHVzR2HxVQEbr9QCZXKc/PUu5SLA9d zhkLAWse8ZbbIwu/5+WPafLhryBus2TaHL074I5rMm/mGYrwldYDkDY3g1jvdmguJlGp 75VvONhg5WkcfuzKmQNP2Y9rLsFIs0Wv3KK+qMfIzfquiXAypH45zS5cyYaW09qm6CTQ KcAQ== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq26-20020a1709073f1a00b006d9f4f899cfsi2639074ejc.164.2022.03.17.01.23.17; Thu, 17 Mar 2022 01:23:37 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230004AbiCQHDm (ORCPT + 70 others); Thu, 17 Mar 2022 03:03:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbiCQHDl (ORCPT ); Thu, 17 Mar 2022 03:03:41 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F4C813CA31 for ; Thu, 17 Mar 2022 00:02:21 -0700 (PDT) X-UUID: 599849c0ea5542b8af348f8611d94c12-20220317 X-UUID: 599849c0ea5542b8af348f8611d94c12-20220317 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 186581333; Thu, 17 Mar 2022 15:02:14 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Thu, 17 Mar 2022 15:02:13 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 17 Mar 2022 15:02:13 +0800 Message-ID: Subject: Re: [PATCH] mt76: fix monitor rx FCS error in DFS channel From: Deren Wu To: Lorenzo Bianconi CC: Felix Fietkau , Sean Wang , "Soul Huang" , YN Chen , Leon Yen , Eric-SY Chang , KM Lin , Robin Chiu , CH Yeh , Posh Sun , Eric Liang , Stella Chang , "Evelyn Tsai" , Ryder Lee , "Shayne Chen" , linux-wireless , linux-mediatek Date: Thu, 17 Mar 2022 15:02:13 +0800 In-Reply-To: References: <7243650f3d51b1919bd4fd0017ff8b0186149e54.1647421054.git.deren.wu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR,UNPARSEABLE_RELAY 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 Hi Lore, On Wed, 2022-03-16 at 16:15 +0100, Lorenzo Bianconi wrote: > > From: Deren Wu > > > > When setup monitor mode in DFS channel, mt76 send CH_SWITCH_DFS to > > fw for channel config. This would cause rx performance bad while > > monitoring frames. Settings CH_SWITCH_NORMAL in monitor mode would > > get the same performance as normal channels. > > Hi Deren, > > > > > Reviewed-by: Shayne Chen > > Signed-off-by: Deren Wu > > --- > > drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 3 ++- > > drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 3 ++- > > drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 ++- > > 3 files changed, 6 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c > > b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c > > index 390add3144c2..97e2a85cb728 100644 > > --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c > > +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c > > @@ -2151,7 +2151,8 @@ int mt7615_mcu_set_chan_info(struct > > mt7615_phy *phy, int cmd) > > .center_chan2 = ieee80211_frequency_to_channel(freq2), > > }; > > > > - if (cmd == MCU_EXT_CMD(SET_RX_PATH)) > > + if (cmd == MCU_EXT_CMD(SET_RX_PATH) || > > + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR) > > is this patch compliant with 802.11h DFS standard? Monitor mode would not tx packets and still follow standard. We will keep tracking this point to avoid violations. Regards, Deren > > Regards, > Lorenzo > > > req.switch_reason = CH_SWITCH_NORMAL; > > else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL) > > req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD; > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c > > b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c > > index 10dc4bf5adec..c56d48342aaf 100644 > > --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c > > +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c > > @@ -2833,7 +2833,8 @@ int mt7915_mcu_set_chan_info(struct > > mt7915_phy *phy, int cmd) > > } > > #endif > > > > - if (cmd == MCU_EXT_CMD(SET_RX_PATH)) > > + if (cmd == MCU_EXT_CMD(SET_RX_PATH) || > > + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR) > > req.switch_reason = CH_SWITCH_NORMAL; > > else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL) > > req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD; > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c > > b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c > > index 5ef8b24f0ab3..da2be050ed7c 100644 > > --- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c > > +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c > > @@ -863,7 +863,8 @@ int mt7921_mcu_set_chan_info(struct mt7921_phy > > *phy, int cmd) > > else > > req.channel_band = chandef->chan->band; > > > > - if (cmd == MCU_EXT_CMD(SET_RX_PATH)) > > + if (cmd == MCU_EXT_CMD(SET_RX_PATH) || > > + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR) > > req.switch_reason = CH_SWITCH_NORMAL; > > else if (dev->mt76.hw->conf.flags & IEEE80211_CONF_OFFCHANNEL) > > req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD; > > -- > > 2.18.0 > >