From patchwork Mon Nov 14 12:42:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 19796 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2121768wru; Mon, 14 Nov 2022 04:46:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf51ydkASl0/i+WyYNYqsqfSRtudY5hOROqleOZ5Mo2rcVbBGxP3HZ0g+JMq54CG2Iu0QW68 X-Received: by 2002:a17:907:98e1:b0:7ae:f441:6ade with SMTP id ke1-20020a17090798e100b007aef4416ademr4046235ejc.436.1668429969993; Mon, 14 Nov 2022 04:46:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668429969; cv=none; d=google.com; s=arc-20160816; b=E1hmG15Up0BzxW0BKhmUMZx98o9jgKnjw3HHXnurMmegwOmTBj/6NTROLeLnHGABvD BVzdmg/BJfWcO55r4B4XGtYZRrla3QNzvc7tiwZk9nW1N9fYkX9ngTViftfthcuv7F+V KGggU9g0lh/VzpgcfRmmFhf0HAKNLVOxd9lPI3g4r5Bkp7piRt/p4WfwOzQnbQKB1iXf 0LrVIlIbQA7nPJJlsebKaojRe8ALbWDZktaBZWQoDzbpFoK258KG2z7dyi/UKx+c7YWd 6cfM0KH+aCMCwVCVO8UB1B+ZJwX+2tW5Xvk3xu8BvYYLCOABCc6eFNVpaDDK57dpeMGo e0iA== 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=lXDyaFvg50mlPb6ND8xpvv2dNTBBSxaiLJ+kVihya1xlsbnfPzbtnIdFbBAwekQM3e 2/ekhcdiFq0Lb5jj3M+2InT664VLbx91cioFROptZ5YTbNPEbjyG9y41dBh0eLW7euZX A1819Eo6bxmRYsLfE5VKLNKbnX8AGSsx2ZXglNTtAbYHNTwmP/1twYP3lHTF/1l0qCax FT/EDuFH7TSlCHKlhTevcrlSocaDr1bkraaksrYn5PzoG8xaK7A2srflS2XeeSJRmFjd Lg2NA1+y/mrHqLEybHYWxgJexLVQPu+mrSWzb6h72lVRIOjM9RN8PyoO3TcJohOVtkl1 lqyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=mpH1bONm; 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 cs15-20020a170906dc8f00b007ad2d85d753si8535067ejc.495.2022.11.14.04.45.46; Mon, 14 Nov 2022 04:46:09 -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=mpH1bONm; 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 S237414AbiKNMnr (ORCPT + 99 others); Mon, 14 Nov 2022 07:43:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237377AbiKNMnJ (ORCPT ); Mon, 14 Nov 2022 07:43:09 -0500 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FC57252B3; Mon, 14 Nov 2022 04:42:36 -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=mpH1bONmjSCvOi0+J+hPhjU8mC 1oswAP9yAi37PrMZNA8IxVosUeXdtgxMiZvyEb5db48xJYzlS24FUVO8xJoKMkJYuBPLajw02u9CN paP0lkBfKFQjAbPqtNyfTDwXTmoyjO1ZXjP0OwGobN6abNAkVW8u4sq9bOrF+5zqzam4=; Received: from p54ae9c3f.dip0.t-ipconnect.de ([84.174.156.63] helo=Maecks.lan) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1ouYn8-0021wc-7O; Mon, 14 Nov 2022 13:42:22 +0100 From: Felix Fietkau To: netdev@vger.kernel.org, John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , "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 v4 2/4] net: ethernet: mtk_eth_soc: pass correct VLAN protocol ID to the network stack Date: Mon, 14 Nov 2022 13:42:12 +0100 Message-Id: <20221114124214.58199-3-nbd@nbd.name> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221114124214.58199-1-nbd@nbd.name> References: <20221114124214.58199-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?1749475624537750164?= X-GMAIL-MSGID: =?utf-8?q?1749475624537750164?= 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)); }