From patchwork Tue May 9 03:11:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 13235324 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ECDA7C77B7C for ; Tue, 9 May 2023 03:12:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=KGzNdZj5bBIgcavZMAN1mE0iGEII7p8CqoCQyefWETw=; b=e/H3Pc+8l4uSH8LVHYVGK36/IC L15ZwfPqhvAatt8ByvVVFWbT79DVVX72ZC7nfRlTTG2La3X+j+Sz0z1dBV/gSJgYLP7l2jAVFLDOc 0qtOo13XoE/T3jiJ3YGO6F/cf9hLGQKDdso/OYQAcXI8Ci7NeO3TeXY9nUNB0Sr/DwRrmp7lwLX/r W0IUfkc+3YW4bhZsUeQAEBw8+jFaBirOSPIeyVyHWXLfzkOzrHmXTnN1jQV7reeSDlqD2NBTyKVl6 Jz0xuCVJ/Z9U+K9fMwG1W/SbaURVv9rEpk9+8XtbXAHYZmXOfAEmjWUOq6i7IYLbQrRX0ACEgQafd RzQXcqWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pwDlv-002Abb-0t; Tue, 09 May 2023 03:12:15 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pwDls-002Aam-0i for linux-mediatek@lists.infradead.org; Tue, 09 May 2023 03:12:13 +0000 X-UUID: 44d3415cee1711ed912e1518a6540028-20230508 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=KGzNdZj5bBIgcavZMAN1mE0iGEII7p8CqoCQyefWETw=; b=hrbsO0vrU6OQZnpvUkbc1nODgIZ01IVEefuOmoihwfCyj6zdcI/V437uUVqBC4mhcA12vzHhb+YEKSKf4MffZXT3g03bEDwsOThTgNjeCxJPBzKcNTjoeElU1k4kPgKYCb2H+9Sdk9y6TKVryjNRC3aSNep7QO81feryiZkpy4E=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.23,REQID:1ad2efc5-8d67-4d8c-bf8d-26008381ad59,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:697ab71,CLOUDID:9a312f6b-2f20-4998-991c-3b78627e4938,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-UUID: 44d3415cee1711ed912e1518a6540028-20230508 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 455151935; Mon, 08 May 2023 20:12:02 -0700 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Tue, 9 May 2023 11:12:00 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Tue, 9 May 2023 11:12:00 +0800 From: Ryder Lee To: Felix Fietkau , CC: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , , StanleyYP Wang , Ryder Lee Subject: [PATCH] wifi: mt76: mt7915: fix background radar event being blocked Date: Tue, 9 May 2023 11:11:57 +0800 Message-ID: <5cc3ad59270940a3c4229a4c780e106b1b0fe53c.1683587774.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230508_201212_301380_E0A0BB1D X-CRM114-Status: GOOD ( 10.52 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: StanleyYP Wang The background radar uses MT_RX_SEL2 as its band indication, so fix it. Fixes: 7a53eecd5c87 (wifi: mt76: mt7915: check the correctness of event data) Signed-off-by: StanleyYP Wang Signed-off-by: Ryder Lee --- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index 9fcb22fa1f97..088a065e37d5 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -274,7 +274,7 @@ mt7915_mcu_rx_radar_detected(struct mt7915_dev *dev, struct sk_buff *skb) r = (struct mt7915_mcu_rdd_report *)skb->data; - if (r->band_idx > MT_BAND1) + if (r->band_idx > MT_RX_SEL2) return; if ((r->band_idx && !dev->phy.mt76->band_idx) &&