From patchwork Fri Nov 1 07:43:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mingyen Hsieh X-Patchwork-Id: 841058 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87F52153BF8 for ; Fri, 1 Nov 2024 07:43:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730447031; cv=none; b=fjFEpgcl7ql/CQFgyVnQo+A8x8fywgMVtnTS6A5InS3+u7CXFViHXf9jL8dCI3m+buBX0MxIumbl5JhOAl+Kf7Jomiu4lCycPsqJrOTpPJ6Lq75D5SsjiQNwf9mSEZkN93FUL1kZJgXcVinYqO1grVYV/S+dAS5UHWuQCAD5IUM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730447031; c=relaxed/simple; bh=qyOm7gvxKj0RZR7OrB6A7QAN/dhtEnmyw1XSO9wi2w0=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=qCpbfqKoR+0RWYHdjckIs/qz0o3LQvoHs6ObE/FHQCyipaz2dOHh4Qrl72IFusJ7APVoYynex7kMcr3SlYZlL/kaqhM/ximU08KhrdHIfMvnQhq91taeOqutpByVOVArFaQTVdMqCyWMDFgk3GDjNN274VHC54eRIGHfmh3ikqs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=HChLYq/g; arc=none smtp.client-ip=210.61.82.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="HChLYq/g" X-UUID: 05675242982511efbd192953cf12861f-20241101 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=6AqGcsri7zwJ/2h2Z5MTFdBRd/tfwRbvqw31kzTsa6U=; b=HChLYq/gebXVLGVu3Zm+xTg9fSa21OTRIqardhQxXzBUKC3DyzZ9qxPSWOHA+0dIH/+EZtJqBa4Bz2OwX7Fh8gBDoOXFN0qFdQDCgGpPfOx+5N9upj/DQTc7UnbQTrUDgvnPaMh87pKQJuXLpZ7Fb3kPIvqDK8a2FxgK1ZVliX4=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.42, REQID:90162a69-0777-4ceb-93ee-af7b72ff1852, 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:b0fcdc3, CLOUDID:5f1e6107-7990-429c-b1a0-768435f03014, B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1, SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 05675242982511efbd192953cf12861f-20241101 Received: from mtkmbs14n2.mediatek.inc [(172.21.101.76)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 19747090; Fri, 01 Nov 2024 15:43:44 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by MTKMBS09N2.mediatek.inc (172.21.101.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 1 Nov 2024 00:43:43 -0700 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 1 Nov 2024 15:43:43 +0800 From: Mingyen Hsieh To: , CC: , , , , , , , , , , , , , , , Eric-SY Chang , Ming Yen Hsieh Subject: [PATCH] wifi: mt76: mt7925: fix wrong band_idx setting when enable sniffer mode Date: Fri, 1 Nov 2024 15:43:40 +0800 Message-ID: <20241101074340.26176-1-mingyen.hsieh@mediatek.com> X-Mailer: git-send-email 2.18.0 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Eric-SY Chang Currently, sniffer mode does not support band auto, so set band_idx to the default 0. Fixes: 0cb349d742d1 ("wifi: mt76: mt7925: update mt7925_mac_link_bss_add for MLO") Signed-off-by: Eric-SY Chang Signed-off-by: Ming Yen Hsieh --- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c index 0c2a2337c313..a78883d4d6df 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c @@ -1976,8 +1976,6 @@ int mt7925_get_txpwr_info(struct mt792x_dev *dev, u8 band_idx, struct mt7925_txp int mt7925_mcu_set_sniffer(struct mt792x_dev *dev, struct ieee80211_vif *vif, bool enable) { - struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; - struct { struct { u8 band_idx; @@ -1991,7 +1989,7 @@ int mt7925_mcu_set_sniffer(struct mt792x_dev *dev, struct ieee80211_vif *vif, } __packed enable; } __packed req = { .hdr = { - .band_idx = mvif->bss_conf.mt76.band_idx, + .band_idx = 0, }, .enable = { .tag = cpu_to_le16(UNI_SNIFFER_ENABLE), @@ -2050,7 +2048,7 @@ int mt7925_mcu_config_sniffer(struct mt792x_vif *vif, } __packed tlv; } __packed req = { .hdr = { - .band_idx = vif->bss_conf.mt76.band_idx, + .band_idx = 0, }, .tlv = { .tag = cpu_to_le16(UNI_SNIFFER_CONFIG),