[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230330070336.10781-1-boon.khai.ng@intel.com>
Date: Thu, 30 Mar 2023 15:03:36 +0800
From: Boon Khai Ng <boon.khai.ng@...el.com>
To: "David S . Miller" <davem@...emloft.net>
Cc: linux-kernel@...r.kernel.org,
Mun Yew Tham <mun.yew.tham@...el.com>,
Tien Sung Ang <tien.sung.ang@...el.com>,
Boon Khai Ng <boon.khai.ng@...el.com>
Subject: [PATCH v1 4/8] drivers: net: dwmac: Add use_hw_vlan setting
This is to handle the use_hw_vlan setting at dwmac-socfpga
level.
Signed-off-by: Boon Khai Ng <boon.khai.ng@...el.com>
---
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
Powered by blists - more mailing lists