From patchwork Thu Nov 10 21:22:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 18327 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp384791wru; Thu, 10 Nov 2022 13:30:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf59PmVYgwwHXpuZY6Ns09irSqzCMVWbGBUsTvW5WNHGuVFiXdK+/FlpBElbiL2BKMoUmrPM X-Received: by 2002:a17:907:75e7:b0:7ae:6450:9269 with SMTP id jz7-20020a17090775e700b007ae64509269mr3485108ejc.408.1668115801107; Thu, 10 Nov 2022 13:30:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668115801; cv=none; d=google.com; s=arc-20160816; b=gLidLez6zv6FSz7SwinE/NKOCQlC8bTr38SevuYGgJd1rcU6mxq6anLhfDXhzVKnft svJk4hnTX1J2fjCHQP27N3o6mKjhWdYlUIB4yha7qwUmfSok9TRbn8JxBc2wl04x1dmm F8gfZl57btulfL5tR8AZxXM+He+LwK2LrV7xnVFb15i3tlTb/bFVyiBuBqYkiCQoci2V FrUVukq+2egCdPnga7vThu3qt5Os4wgvxB0vMi5ImN7iQiXNDeSUEIEEnA5z5E15s/za Xq3Wg7W1gKr7J36Ii1EGS4f/ybfpJaU/I5H5JZsAD6gmlh+SEmVugc4Hb39BK1hWnrq0 a95g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XKOsIjWD9UiWHhSPTpYvwZctofSL/DoRkI6SCzJGFi8=; b=SrrVhy6/M0c4wZ60YS59zn2L76BsVbta7bt6rGHPm7McspKN3SyOMbfrl+ktuvgy02 SM53SryZf3aCYACPNGa4TA+82m+RMGTYEwfWi2hjfkPwAYd6F2mAYzrnkr3OcgK4r+jb cTSaed76i1URU7EXeKaZ2J0O+05+pclEHn6wzxSO+sfbne6GV4WIEEhSUdFu6Ml0Qnp2 P8RNUYEL4jVKXyyculfHTIRN6vb3hix5SxrzyRoa6NXkqhYmIjjKaHh6jBCuMvdsaw+n iKvQg3rulidcRFFhY4aUPZx3o4J28N6obxzuZqAyF6KHcVbvtul9h6rUV5uFyrMzm+ar nxWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=s1z7yzME; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr22-20020a170907721600b007ad9adaf33dsi409431ejc.372.2022.11.10.13.29.37; Thu, 10 Nov 2022 13:30:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=s1z7yzME; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232273AbiKJVWp (ORCPT + 99 others); Thu, 10 Nov 2022 16:22:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231985AbiKJVW2 (ORCPT ); Thu, 10 Nov 2022 16:22:28 -0500 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEE0A31DCE; Thu, 10 Nov 2022 13:22:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=XKOsIjWD9UiWHhSPTpYvwZctofSL/DoRkI6SCzJGFi8=; b=s1z7yzMESfXzDhx7aJHfunCO5+ u1WwU4WteCJetVzMY4zgbJndQmKkGHnp15bUZPLAabaMhQkzi5yxvWm72msGHOhhjREaQAW9NyXs1 VWkoC9lnFfMukB7Nyn/UB6RNlKqZ1qJtZjNQj4PSVb0HpxnFazol4H5alBY+S9tbh1lA=; Received: from p200300daa72ee10c199752172ce6dd7a.dip0.t-ipconnect.de ([2003:da:a72e:e10c:1997:5217:2ce6:dd7a] helo=Maecks.lan) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1otF04-0011Om-G7; Thu, 10 Nov 2022 22:22:16 +0100 From: Felix Fietkau To: netdev@vger.kernel.org, John Crispin , Sean Wang , Mark Lee , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger Cc: Vladimir Oltean , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v3 2/4] net: ethernet: mtk_eth_soc: pass correct VLAN protocol ID to the network stack Date: Thu, 10 Nov 2022 22:22:09 +0100 Message-Id: <20221110212212.96825-3-nbd@nbd.name> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221110212212.96825-1-nbd@nbd.name> References: <20221110212212.96825-1-nbd@nbd.name> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749146194406100989?= X-GMAIL-MSGID: =?utf-8?q?1749146194406100989?= Use the id from the DMA descriptor instead of hardcoding 802.1q Signed-off-by: Felix Fietkau --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index 1cf76fd7afbc..891dd6937f89 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -1936,7 +1936,7 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget, htons(RX_DMA_VPID(trxd.rxd4)), RX_DMA_VID(trxd.rxd4)); } else if (trxd.rxd2 & RX_DMA_VTAG) { - __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), + __vlan_hwaccel_put_tag(skb, htons(RX_DMA_VPID(trxd.rxd3)), RX_DMA_VID(trxd.rxd3)); }