mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
net: move ethtool-related netdev state into its own struct
net_dev->ethtool is a pointer to new struct ethtool_netdev_state, which currently contains only the wol_enabled field. Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Edward Cree <ecree.xilinx@gmail.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Link: https://patch.msgid.link/293a562278371de7534ed1eb17531838ca090633.1719502239.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
c2dd2139e0
commit
3ebbd9f6de
@@ -80,6 +80,7 @@ struct xdp_buff;
|
||||
struct xdp_frame;
|
||||
struct xdp_metadata_ops;
|
||||
struct xdp_md;
|
||||
struct ethtool_netdev_state;
|
||||
|
||||
typedef u32 xdp_features_t;
|
||||
|
||||
@@ -1986,8 +1987,6 @@ enum netdev_reg_state {
|
||||
* switch driver and used to set the phys state of the
|
||||
* switch port.
|
||||
*
|
||||
* @wol_enabled: Wake-on-LAN is enabled
|
||||
*
|
||||
* @threaded: napi threaded mode is enabled
|
||||
*
|
||||
* @module_fw_flash_in_progress: Module firmware flashing is in progress.
|
||||
@@ -2001,6 +2000,7 @@ enum netdev_reg_state {
|
||||
* @udp_tunnel_nic_info: static structure describing the UDP tunnel
|
||||
* offload capabilities of the device
|
||||
* @udp_tunnel_nic: UDP tunnel offload state
|
||||
* @ethtool: ethtool related state
|
||||
* @xdp_state: stores info on attached XDP BPF programs
|
||||
*
|
||||
* @nested_level: Used as a parameter of spin_lock_nested() of
|
||||
@@ -2375,7 +2375,7 @@ struct net_device {
|
||||
struct lock_class_key *qdisc_tx_busylock;
|
||||
bool proto_down;
|
||||
bool threaded;
|
||||
unsigned wol_enabled:1;
|
||||
|
||||
unsigned module_fw_flash_in_progress:1;
|
||||
struct list_head net_notifier_list;
|
||||
|
||||
@@ -2386,6 +2386,8 @@ struct net_device {
|
||||
const struct udp_tunnel_nic_info *udp_tunnel_nic_info;
|
||||
struct udp_tunnel_nic *udp_tunnel_nic;
|
||||
|
||||
struct ethtool_netdev_state *ethtool;
|
||||
|
||||
/* protected by rtnl_lock */
|
||||
struct bpf_xdp_entity xdp_state[__MAX_XDP_MODE];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user