Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4321338rdb; Thu, 28 Dec 2023 19:10:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQccHOwm1y2aFnchzjYtNcKjtZGQC77NPFfpNgKSJ4biDaKxfLEL7dvSuijj+0IZe61Rhn X-Received: by 2002:a05:6a20:7f90:b0:196:8679:7185 with SMTP id d16-20020a056a207f9000b0019686797185mr168661pzj.106.1703819424626; Thu, 28 Dec 2023 19:10:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703819424; cv=none; d=google.com; s=arc-20160816; b=xAIEAlE4seh3kq/tLCpkRyX7BZXvJ6tKEpY4hSuEWUosL3SYI4jmX0QT2BJS/VkPAG NdydzTkD88AgRPNCaQ2QVcCIqCCIcioeY/ZtqGI0+13E4B7nue3o+1bIktVkUtexTEvS KLtVS9ldtfNioyBKhLNZlbuQ/mFqQvK32JQKxjf7i0PCuuJ/UlTpJ/mCc7dbA09cHKUj q9o7wRdJk6OHXtoZFDBDicI3PPGvAlPGnleeJpTEq/BcuZpzryJxpVZ0eOq23iCQFSFS 8zkAmj9NQ7iLgGtmcceXKW/r/gDnK2mxTU/PpivyDdfbloh2TtXXAImOiPVSf4ZEC1pj mzcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/vDByupUfyISXXTWuopoR7VUqbCKko4NXwHDyQ6l7KU=; fh=xmX3nUiCDRywM7GN/jnkxEI0WXifvWaaBmhMyTMYa4c=; b=n53s6CS3O6lulf6CG/K6rn8ry1770RvbYl45X4Ig/IMpm6DysTm4d4Mm7nxf4nWy7Y V5fJIATRbVfw6npN1wyPcYB5aMnZzbrpNWks21Vtr6LrN6tW82XbXm3o0dvqz8vk5/EQ BrGUac+oGveboNuDSFCsqB3U1eEFr9+ivNuAF1LBMUVK3eIk4DCUWd3O+hQn+hL2wiNL sV/QKbM/R0BvFfTK6dG9ITy4qfYekvtgNK9NBtJFxnBObJuE8AUGNeXgMGe6+5d7jtaq iJMxbpugu64Fj+Fjz+J8Dz0h1ZKi2pVcPYj32pbC7GuLJSKI4ZfOtFspDsj3W5sbhODI 1Dbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=SZr3L481; spf=pass (google.com: domain of linux-wireless+bounces-1321-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1321-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ep7-20020a17090ae64700b0028bc8cf5305si14122277pjb.173.2023.12.28.19.10.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 19:10:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1321-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=SZr3L481; spf=pass (google.com: domain of linux-wireless+bounces-1321-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1321-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id EFEF3B238D6 for ; Fri, 29 Dec 2023 03:10:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C42DA23B4; Fri, 29 Dec 2023 03:09:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="SZr3L481" X-Original-To: linux-wireless@vger.kernel.org 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 0E2951FB6 for ; Fri, 29 Dec 2023 03:09:49 +0000 (UTC) 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 X-UUID: b638374ca5f711eea2298b7352fd921d-20231229 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=/vDByupUfyISXXTWuopoR7VUqbCKko4NXwHDyQ6l7KU=; b=SZr3L481QVMQ4s9NfDSPccWv5elbNbRMeXNRdRJuyo2XgawhkQiBUjXvNdZ9ZCewN5ma/Smu5Ge/hydQVPEmqcOBwSVMJm1G+1uJX+Uq7Y/L+1lcV9RVWlvvmwENf9tTDT9EzeQADum5kh4fTPCm0sEDwiDv8rdGf2ZJGbOOWp0=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:3514195e-0570-4ad4-84b8-33f52ba55830,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:5d391d7,CLOUDID:ce044982-8d4f-477b-89d2-1e3bdbef96d1,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File: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 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: b638374ca5f711eea2298b7352fd921d-20231229 Received: from mtkmbs13n1.mediatek.inc [(172.21.101.193)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2075042076; Fri, 29 Dec 2023 11:09:42 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) 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; Fri, 29 Dec 2023 11:09:41 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 29 Dec 2023 11:09:41 +0800 From: Mingyen Hsieh To: , CC: , , , , , , , , , , , , , , Ming Yen Hsieh Subject: [PATCH v2 07/10] wifi: mt76: mt7925: fix the wrong header translation config Date: Fri, 29 Dec 2023 11:09:34 +0800 Message-ID: <20231229030937.22605-8-mingyen.hsieh@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20231229030937.22605-1-mingyen.hsieh@mediatek.com> References: <20231229030937.22605-1-mingyen.hsieh@mediatek.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain From: Ming Yen Hsieh The header translation config should set to broadcast and unicast cases correctly, not only unicast case. And also remove the cmds of wtbl (wlan table) series, because these MCU commands have already been replaced by other commands in mt7925. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Ming Yen Hsieh --- .../net/wireless/mediatek/mt76/mt7925/mcu.c | 32 +++++-------------- 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c index 8c3233182083..932ecf38672c 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c @@ -814,6 +814,7 @@ mt7925_mcu_sta_hdr_trans_tlv(struct sk_buff *skb, struct ieee80211_vif *vif, struct ieee80211_sta *sta) { + struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; struct sta_rec_hdr_trans *hdr_trans; struct mt76_wcid *wcid; struct tlv *tlv; @@ -827,7 +828,11 @@ mt7925_mcu_sta_hdr_trans_tlv(struct sk_buff *skb, else hdr_trans->from_ds = true; - wcid = (struct mt76_wcid *)sta->drv_priv; + if (sta) + wcid = (struct mt76_wcid *)sta->drv_priv; + else + wcid = &mvif->sta.wcid; + if (!wcid) return; @@ -1577,8 +1582,6 @@ mt7925_mcu_sta_cmd(struct mt76_phy *phy, { struct mt76_vif *mvif = (struct mt76_vif *)info->vif->drv_priv; struct mt76_dev *dev = phy->dev; - struct wtbl_req_hdr *wtbl_hdr; - struct tlv *sta_wtbl; struct sk_buff *skb; skb = __mt76_connac_mcu_alloc_sta_req(dev, mvif, info->wcid, @@ -1602,30 +1605,11 @@ mt7925_mcu_sta_cmd(struct mt76_phy *phy, mt7925_mcu_sta_state_v2_tlv(phy, skb, info->sta, info->vif, info->rcpi, info->state); - mt7925_mcu_sta_hdr_trans_tlv(skb, info->vif, info->sta); mt7925_mcu_sta_mld_tlv(skb, info->vif, info->sta); } - sta_wtbl = mt76_connac_mcu_add_tlv(skb, STA_REC_WTBL, - sizeof(struct tlv)); - - wtbl_hdr = mt76_connac_mcu_alloc_wtbl_req(dev, info->wcid, - WTBL_RESET_AND_SET, - sta_wtbl, &skb); - if (IS_ERR(wtbl_hdr)) - return PTR_ERR(wtbl_hdr); - - if (info->enable) { - mt76_connac_mcu_wtbl_generic_tlv(dev, skb, info->vif, - info->sta, sta_wtbl, - wtbl_hdr); - mt76_connac_mcu_wtbl_hdr_trans_tlv(skb, info->vif, info->wcid, - sta_wtbl, wtbl_hdr); - if (info->sta) - mt76_connac_mcu_wtbl_ht_tlv(dev, skb, info->sta, - sta_wtbl, wtbl_hdr, - true, true); - } + if (info->enable) + mt7925_mcu_sta_hdr_trans_tlv(skb, info->vif, info->sta); return mt76_mcu_skb_send_msg(dev, skb, info->cmd, true); } -- 2.18.0