From mboxrd@z Thu Jan 1 00:00:00 1970 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 CE920189BB0; Sun, 7 Sep 2025 20:22:39 +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=1757276559; cv=none; b=PKlB/Tvve3D1rN+sUNSzb8mmpOQonnWJTZTvLU2QTwhK6J5VGzvnEM+Oa+OjJ8xmceGxxeE75ob3tAP5vvxZs9qb0Pa0ujr0TWjVoRrR4oFKtnicaNs9KRgrbv5nei0+y83cgqHvBiWd4lYdGGkglZCbMLNCK7Jv4Q5GzZTvdGE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757276559; c=relaxed/simple; bh=z8+w+bDcqIxz5pMwdQlSr2pmX6hzFS+g13brUvvryw4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UmNfBx/0jw1cVSaTbn16X/9HiH3v5lemB5AwStI+VDSz6qL/5oB+bHpR1O1KDVY8NkZp1HqRl+8ErFShwmSl3/so/Uj2LmHjIt+uSG9+o3UegAkEuOuGgZc7K96ZKFaugQBdpqfOE/pbrDwHpojc6gTgzWkAl2L/OVMLf5xFnfs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OtMWO+Gu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="OtMWO+Gu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5252EC4CEF0; Sun, 7 Sep 2025 20:22:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757276559; bh=z8+w+bDcqIxz5pMwdQlSr2pmX6hzFS+g13brUvvryw4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OtMWO+GukKoy7IxX51meSlfOP3H/G5O/0kW8F2Fokg7TM/69WpU+6EZtq+TqTSKHm oByZm5ZGVPJjB2cTuefqjVGBG4oRIzyB4fQGXAXnJPSx64azUFjRxAMBBTXGQhIgKH wceBANIQcdrOfj23/Gflo4Y6WtI5l0PuEptp9EnA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Thibaut VARENE , Felix Fietkau , Simon Horman , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.6 037/121] net: ethernet: mtk_eth_soc: fix tx vlan tag for llc packets Date: Sun, 7 Sep 2025 21:57:53 +0200 Message-ID: <20250907195610.780716212@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250907195609.817339617@linuxfoundation.org> References: <20250907195609.817339617@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Felix Fietkau [ Upstream commit d4736737110ffa83d29f1c5d17b26113864205f6 ] When sending llc packets with vlan tx offload, the hardware fails to actually add the tag. Deal with this by fixing it up in software. Fixes: 656e705243fd ("net-next: mediatek: add support for MT7623 ethernet") Reported-by: Thibaut VARENE Signed-off-by: Felix Fietkau Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250831182007.51619-1-nbd@nbd.name Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index cb8efc952dfda..aefe2af6f01d4 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -1586,6 +1586,13 @@ static netdev_tx_t mtk_start_xmit(struct sk_buff *skb, struct net_device *dev) bool gso = false; int tx_num; + if (skb_vlan_tag_present(skb) && + !eth_proto_is_802_3(eth_hdr(skb)->h_proto)) { + skb = __vlan_hwaccel_push_inside(skb); + if (!skb) + goto dropped; + } + /* normally we can rely on the stack not calling this more than once, * however we have 2 queues running on the same ring so we need to lock * the ring access @@ -1631,8 +1638,9 @@ static netdev_tx_t mtk_start_xmit(struct sk_buff *skb, struct net_device *dev) drop: spin_unlock(ð->page_lock); - stats->tx_dropped++; dev_kfree_skb_any(skb); +dropped: + stats->tx_dropped++; return NETDEV_TX_OK; } -- 2.50.1