Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1721803rwl; Thu, 30 Mar 2023 00:07:50 -0700 (PDT) X-Google-Smtp-Source: AKy350b0zehrXud7Wfvt12lM/8SfcFA4wA4/a1RD8hlm1qruXqIuIVgH6YvTG/aYA6mNzi3QfY21 X-Received: by 2002:a17:906:5307:b0:933:2e79:4632 with SMTP id h7-20020a170906530700b009332e794632mr17883291ejo.1.1680160070436; Thu, 30 Mar 2023 00:07:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680160070; cv=none; d=google.com; s=arc-20160816; b=YSeIzjKPZKdzSeAl38uzW4WzpdcH4LGHPJiNGV5Qzknc/jLob48WRt+dRSUm/mu/Qq 9SJueL6U5z5lI55LUpfGP3w7OQuubr+TbDKdN6/VQlW3x1+ciMXCss1Lw6WOQFRsHpVn +dO8V6odSYZhJMD0tXikMwH1Ce4P5gRyJenwkvqr4pXarSZJxIK4fGUu8K/7nsooxpIx pITkwP+sCt22C0vDHgBAWmIRcakxE77Sp6Qj6RYCPIETqqxS72ZDLGVYlwe0vqt8lD7B oUNTwS+wrI30PRJnryUFbGBC/Ts7HT2DQ7wSNE5jikTlCuLbRDpA/AfKwbDENKznLyVW P4Ug== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=mFLtHTOZ9xjJ6Bdj5P3ysRbo7dyMd/Mc/onRz9a83AQ=; b=eSvM81tahzR9yfOO3cBEHNEKRaVGOcE6xC+frBfzZLmtMMe9//ct/QRi7lXvSYJ819 LZOiCKzTf0evBm8QdL5VteOOzNzbIOSuv7xT9C1amvCZn36jOhBeqmhj2BpmW9lODMhj 3lkRFBaonfve6hFeJU2dlaK6IxVLR7cNaSEHyHMGVYnnKVNDdXgFcrltheMTv0eIz+ZB f2BgVkOlUWoWIsDOUQAWDTovfseTZD5TgCUmRqKrza2mP3kORkyQTD2jagkBSSGPP0wU 8fejTDJX3aiTOoiq5Q6NK0ZCkvfxwFhh/TPQZpy7rQ7IKFk+i9wJIwk4xFskn4NOjXUe tznQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=niG1JNws; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a8-20020a1709062b0800b00933314f56fdsi11354730ejg.737.2023.03.30.00.07.24; Thu, 30 Mar 2023 00:07:50 -0700 (PDT) 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=pass header.i=@intel.com header.s=Intel header.b=niG1JNws; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230123AbjC3HEF (ORCPT + 99 others); Thu, 30 Mar 2023 03:04:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230112AbjC3HEE (ORCPT ); Thu, 30 Mar 2023 03:04:04 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62BE55FEC for ; Thu, 30 Mar 2023 00:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680159837; x=1711695837; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=vTwh61qjsVEdLTsPz/f55VFpFiD95Ge+Rto9FZrYjVU=; b=niG1JNwsXJV6lCfn+6Z8fz9oBOwGTm4VJTBuknn66KvypTwIk2Pz8X9m tgf2mIHxqsBbK5FJsCd3br77Pn7a7b4L7q4Tx8dAEGdQfbLf+5BTGIDbx zNdkryyYHpT44x/pkAGXck0UcJtLYhMmJvkcPLpg9bcSQHhtnvUaZj+xu pDKO8fgn9rxo4/eWltyeEjxGNi54N88+tibKiNmYv1wI/MNJ66SDaBtRI pYrGXI/edxOHa3gobkiRJC21KGdlVqaAtaWExt8LqDKz8bVAkBVnOtNsY 9/VoAnqgYXwfCtKYW0su6TJdZPSzTFw4vXXlg9FEAdG/hlL95Oobn/JzS g==; X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="342699066" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="342699066" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 00:03:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="930614012" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="930614012" Received: from pglmail07.png.intel.com ([10.221.193.207]) by fmsmga006.fm.intel.com with ESMTP; 30 Mar 2023 00:03:40 -0700 Received: from localhost (ppgyli0109.png.intel.com [10.126.160.114]) by pglmail07.png.intel.com (Postfix) with ESMTP id 836932B76; Thu, 30 Mar 2023 15:03:38 +0800 (+08) Received: by localhost (Postfix, from userid 11742525) id 820AA3040; Thu, 30 Mar 2023 15:03:38 +0800 (+08) From: Boon Khai Ng To: "David S . Miller" Cc: linux-kernel@vger.kernel.org, Mun Yew Tham , Tien Sung Ang , Boon Khai Ng Subject: [PATCH v1 4/8] drivers: net: dwmac: Add use_hw_vlan setting Date: Thu, 30 Mar 2023 15:03:36 +0800 Message-Id: <20230330070336.10781-1-boon.khai.ng@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=AC_FROM_MANY_DOTS, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE autolearn=unavailable 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 This is to handle the use_hw_vlan setting at dwmac-socfpga level. Signed-off-by: Boon Khai Ng --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 067a40fe0a23..26da3a9da345 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -537,6 +537,12 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac) plat->has_xgmac = 1; plat->pmt = 1; plat->tso_en = of_property_read_bool(np, "snps,tso"); + + /* Rx VLAN HW Stripping */ + if (of_property_read_bool(np, "snps,rx-vlan-offload")) { + dev_info(&pdev->dev, "RX VLAN HW Stripping\n"); + plat->use_hw_vlan = true; + } } dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*dma_cfg), -- 2.25.1