mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 4/8] drivers: net: dwmac: Add use_hw_vlan setting
@ 2023-03-30  7:03 Boon Khai Ng
  2023-03-30 17:24 ` Please ignore this review, send out by accident Boon Khai Ng
  0 siblings, 1 reply; 2+ messages in thread
From: Boon Khai Ng @ 2023-03-30  7:03 UTC (permalink / raw)
  To: David S . Miller; +Cc: linux-kernel, Mun Yew Tham, Tien Sung Ang, Boon Khai Ng

This is to handle the use_hw_vlan setting at dwmac-socfpga
level.

Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-30 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30  7:03 [PATCH v1 4/8] drivers: net: dwmac: Add use_hw_vlan setting Boon Khai Ng
2023-03-30 17:24 ` Please ignore this review, send out by accident Boon Khai Ng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®