Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp439706pxp; Wed, 16 Mar 2022 08:47:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7ANnsX/iQNUImUDUpHWe/DeRD1Ib78y/g5WT5WeJlT5XD0z9Kv/9bNZbIQ2saJoS+FAKM X-Received: by 2002:a17:90b:3ec8:b0:1c5:68d3:1883 with SMTP id rm8-20020a17090b3ec800b001c568d31883mr318247pjb.201.1647445639027; Wed, 16 Mar 2022 08:47:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647445639; cv=none; d=google.com; s=arc-20160816; b=bgYaGvUHO5XtYi1WpY7XnD3bXu0EoR/Yvqi1RVlAarouq1VShRzXixSQpO6rqluYlT XbKmnwnQozJKkPJuHizqeOf8xcpBO5CXAlgrXwRZ+xbBHPu9RjYEruxy6W7t4vycMwJB T2QToBn+YOCAo8GKn1Mlb0ds++7C4a7UxoRR89w2Z71MdQZRKtK0h89tjGPoq8PqrYTD gm0EwGAtwH2AbG2Mtl2IUE9iT1QLmskXji2gqwKux8+mpy/W8ueSboROWO3ahhtuO1uS 6Fj0ahXyWFhWbJzanpCqQ/vjK/Av9Zr6O1C1wm/vR6MHNhe6C014O+N/jIrkrE5x9YAn NXqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=hO8gT9WB36oxibBjmub/uxnJfx/v+SIVJnfjyRyut5I=; b=xFRJGY8id6OAE7QySkop7jBhaHVa2Ap0CPeIUxnSTl2doJjHTRWz26IhOnN5Dvdtx5 93HGRARIr5cwYbG0OLxdX9JHk6wIFunYsn6+94PtXCNUCKg8smQeXATMz3JvbOWpN13E Dazja0GFY31fEWhs78Px43GhKyuApPYYGMIb2JvKeIUdNTLA2oGoWKR34sy2bkQjZfio E68ixPpz+kWwyBoFwfsVAbiqWS8ptHJc9wmtvOtNWXHlW81zMXNPQHsZQOz0lgZlfizb fC8oEUaDuTed7KVO+H8G8M8ZpZyf/9wJc7Mh5zFy4ohQWgsJRW1lc8qn951nEE0WSVF6 aeiQ== 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 b8-20020a170902bd4800b0015008cc08b8si2046771plx.335.2022.03.16.08.47.02; Wed, 16 Mar 2022 08:47: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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355063AbiCPJxf (ORCPT + 70 others); Wed, 16 Mar 2022 05:53:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355031AbiCPJxZ (ORCPT ); Wed, 16 Mar 2022 05:53:25 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55A7F654A2 for ; Wed, 16 Mar 2022 02:52:06 -0700 (PDT) X-UUID: 46de2c701738466997815f8b63ccdc6d-20220316 X-UUID: 46de2c701738466997815f8b63ccdc6d-20220316 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1966844173; Wed, 16 Mar 2022 17:52:00 +0800 Received: from mtkexhb01.mediatek.inc (172.21.101.102) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Wed, 16 Mar 2022 17:51:59 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb01.mediatek.inc (172.21.101.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Mar 2022 17:51:58 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 16 Mar 2022 17:51:58 +0800 From: Deren Wu To: Felix Fietkau , Lorenzo Bianconi CC: Sean Wang , Soul Huang , YN Chen , Leon Yen , "Eric-SY Chang" , Deren Wu , KM Lin , Robin Chiu , CH Yeh , Posh Sun , Eric Liang , Stella Chang , "Evelyn Tsai" , Ryder Lee , "Shayne Chen" , linux-wireless , linux-mediatek , Deren Wu Subject: [PATCH] mt76: fix monitor rx FCS error in DFS channel Date: Wed, 16 Mar 2022 17:51:52 +0800 Message-ID: <7243650f3d51b1919bd4fd0017ff8b0186149e54.1647421054.git.deren.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain 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 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. 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) 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