[RFC net-next 02/12] net: add a PON device pointer to struct net_device
From: John Crispin
Date: Thu Oct 08 2026 - 10:34:02 EST
A PON device attaches to three kinds of network device: the ethernet
device whose rings carry its frames (the conduit), its data network
device and the GEM network devices that stack on the data network
device. Give struct net_device the pointer, beside the other subsystem
pointers, as an RCU pointer under CONFIG_PON.
Nothing sets the pointer yet. The PON core and its accessor,
netdev_uses_pon(), follow.
Assisted-by: LLM
Signed-off-by: John Crispin <john@xxxxxxxxxxx>
---
include/linux/netdevice.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 8cae9b00211e..1b4ed6ae7e87 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -72,6 +72,7 @@ struct wireless_dev;
/* 802.15.4 specific */
struct wpan_dev;
struct mpls_dev;
+struct pon_dev;
/* UDP Tunnel offloads */
struct udp_tunnel_info;
struct udp_tunnel_nic_info;
@@ -1974,6 +1975,8 @@ enum netdev_reg_state {
* @mpls_ptr: mpls_dev struct pointer
* @mctp_ptr: MCTP specific data
* @psp_dev: PSP crypto device registered for this netdev
+ * @pon_dev: PON device that uses this netdev as conduit, data
+ * interface or GEM network device
*
* @dev_addr: Hw address (before bcast,
* because most packets are unicast)
@@ -2390,6 +2393,9 @@ struct net_device {
#if IS_ENABLED(CONFIG_INET_PSP)
struct psp_dev __rcu *psp_dev;
#endif
+#if IS_ENABLED(CONFIG_PON)
+ struct pon_dev __rcu *pon_dev;
+#endif
/*
* Cache lines mostly used on receive path (including eth_type_trans())
--
2.34.1