Add a netdevice_tracker inside struct net_device, to track the self reference when a device has an active watchdog timer.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -1951,6 +1951,7 @@ enum netdev_ml_priv_type { · 1950 unmodified lines | ||
| 1951 | 1951 | * |
| 1952 | 1952 | * @dev_addr_shadow: Copy of @dev_addr to catch direct writes. |
| 1953 | 1953 | * @linkwatch_dev_tracker: refcount tracker used by linkwatch. |
| 1954 | + * @watchdog_dev_tracker: refcount tracker used by watchdog. | |
| 1954 | 1955 | * |
| 1955 | 1956 | * FIXME: cleanup struct net_device such that network protocol info |
| 1956 | 1957 | * moves out. |
| @@ -2282,6 +2283,7 @@ struct net_device { · 325 unmodified lines | ||
| 2282 | 2283 | |
| 2283 | 2284 | u8 dev_addr_shadow[MAX_ADDR_LEN]; |
| 2284 | 2285 | netdevice_tracker linkwatch_dev_tracker; |
| 2286 | + netdevice_tracker watchdog_dev_tracker; | |
| 2285 | 2287 | }; |
| 2286 | 2288 | #define to_net_dev(d) container_of(d, struct net_device, dev) |
| 2287 | 2289 | |