Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2597455lqp; Mon, 25 Mar 2024 04:04:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUB4MgMjrQOkXTQQZAyt+vNHT6Lj2XpURtls5TugyYdG2X+61FuTxsyB+dsEmDZffpHYbe3OLULMh8faVFScrkgLtJ2Ar8OhbdaW/9DBg== X-Google-Smtp-Source: AGHT+IGR0C9fR3GnH7IZ87ToKdZqcsDgFPRvs5ikutpfZnPjvsESs4shjTQ9YajvbIZhQ6elP2Vu X-Received: by 2002:a17:906:70d1:b0:a46:4bd4:df86 with SMTP id g17-20020a17090670d100b00a464bd4df86mr4682257ejk.3.1711364659442; Mon, 25 Mar 2024 04:04:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711364659; cv=pass; d=google.com; s=arc-20160816; b=MemeYU40zzPNdMC0O0bJjWkETyM+VJDEbBDcnQSZ3ClFA31wD+3ro8sugLfbp0B0CP +Bj3VbMssnMq2zvcjnDBo/NGGb6TjsEwFsImSxCEeGDdTBusjiuUw0xx3xLDOdbTB0XC lq1nc/F/3Pk9tqo8ClIRJbitfwLsyNIG8tVY/+pktp76f+exjVa+90RrKHwlkbgf5Upy /uGZutM3GMQIppclkzn098c1OYJTRR5S1X7aGRkxV8DJLyIozhJ40FXyquprp2azwWP7 j3wJTKOZRuLpHU4xgpWI9EGgJlxMr8/nF83r/LMZMCqu5SWQOQ0aT5/1S//yzGlKURUM t+9A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=SAOfJ9A/E64/kiqziDMreCauCqiE0O4ek9XDrs/tl3w=; fh=t2RbNP99dZ5LTGBwG+uUzFRqJO1HX3ssXVXZXq+ItZo=; b=FQhTeSeqH3MMGkdaWeJytpAwpZZlFLKiI3yjVQWync/Aaoiyt1GyrKAxq12HHO7OmU KTr4SX72W9Yikvvb+Kw98BojNLSKAxveY+vAEVFKt5BVjgylweBUk8WhFpGQNDtu1/YW 3TnToi6CULOUe91AWRebiTCWjPOygyZF1Mib4/Jk+gC+u5twyx7g9+Nj/DWbnWBXB8B1 1+5yqoGmVKWPImIjgxv+8JtJ2kjaHdNfDgtiAfGez54KQl1bjf19bdfUGzPuIO1ptya9 USqmqDVm8e9RuYHrF3oANNDetAto9vHy4Y946fPaTv4JSA9BDOiJ9H52NjYULhmqQgpi CYWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s2oUMfzl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115489-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115489-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f11-20020a170906048b00b00a46b8563a31si2288303eja.405.2024.03.25.04.04.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 04:04:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115489-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s2oUMfzl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115489-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115489-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2F4B81F35418 for ; Mon, 25 Mar 2024 11:04:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F40A22EACE; Mon, 25 Mar 2024 02:41:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="s2oUMfzl" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 58B521DD2AB; Sun, 24 Mar 2024 22:52:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320726; cv=none; b=aon/NMBMKxHNlkb61kHS8TPcyjXO3LBGzchIQQMA+W20d9T7coxwM7dD1DiYSw+FMWjuDJHJl0hQHWdqfdhQ6gnEYGP6542gVKvz5USib5QoblomYRveAMYym8NtUPtg0jhtxsWUfzNgOJkg1RYSt01pa3v60ewGohp51Hyx9JY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320726; c=relaxed/simple; bh=ZqHYJmWbjAaWX7RMHrG6rxMCX1+c2Hs/9yWUkPKYsSc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lVgrdxzWPSIbfwxDdTy8pAV+pDgp9wGVD6ov9JHAEILVYizmfdMJRCcHEPpywbFhPfjZDiLMwS8Bxgi8bEwsufP7wMd33eSd0PsXQtzBvjN8pCeTZr5bEHt+h7KXbPKPW/xm0p5TiR1Y1q0S+1HcpaBZRQEhglCAOlBQPpKgc+s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=s2oUMfzl; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96FE3C43399; Sun, 24 Mar 2024 22:52:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320726; bh=ZqHYJmWbjAaWX7RMHrG6rxMCX1+c2Hs/9yWUkPKYsSc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s2oUMfzlsaUDxApqjwD2waZRo+nGDcSX68VH9WJz7gq53bQTie5J83uBB5DysXKuU F+Ik6uKURqUWWNGQQcJcxkzk24yLez67AmzAUYTQOtqe8WyhRr3s0YvcoRYDE3AcWv +JuFbidjOyQNqGc2yX5TNweFXsTc2PghtAhSqRanY1dpqXiKfc0pIOZ5AA5VdVvlBv 4UqgytJai5e6KmluKlI2NUJRq1ZK69gwRdw0y2CyADqw+6vbEa0EPiqKfz5Wb8QL3B Vjl79PbnJ6+gClbZWobK/wyL/5UAyYhSgZKrZmnc1Zbz9wwBzjLTzVn9GGmAY7x/2Q aknmVCwTWxDRA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ming Yen Hsieh , Felix Fietkau , Sasha Levin Subject: [PATCH 6.7 289/713] wifi: mt76: mt7925: fix the wrong header translation config Date: Sun, 24 Mar 2024 18:40:15 -0400 Message-ID: <20240324224720.1345309-290-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324224720.1345309-1-sashal@kernel.org> References: <20240324224720.1345309-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Ming Yen Hsieh [ Upstream commit d8cf7e1344727b80b4ec3dc17ca520238d55a88d ] 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 Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- .../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 bafd6ec72ef24..28b871e552f0c 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.43.0