Skip to content

Commit

Permalink
net: pse-pd: Clean ethtool header of PSE structures
Browse files Browse the repository at this point in the history
Remove PSE-specific structures from the ethtool header to improve code
modularity, maintain independent headers, and reduce incremental build
time.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Kory Maincent authored and Paolo Abeni committed Jan 14, 2025
1 parent 10276f3 commit 5385f1e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions drivers/net/pse-pd/pse_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

#include <linux/device.h>
#include <linux/ethtool.h>
#include <linux/of.h>
#include <linux/pse-pd/pse.h>
#include <linux/regulator/driver.h>
Expand Down
20 changes: 0 additions & 20 deletions include/linux/ethtool.h
Original file line number Diff line number Diff line change
Expand Up @@ -1326,24 +1326,4 @@ struct ethtool_forced_speed_map {

void
ethtool_forced_speed_maps_init(struct ethtool_forced_speed_map *maps, u32 size);

/* C33 PSE extended state and substate. */
struct ethtool_c33_pse_ext_state_info {
enum ethtool_c33_pse_ext_state c33_pse_ext_state;
union {
enum ethtool_c33_pse_ext_substate_error_condition error_condition;
enum ethtool_c33_pse_ext_substate_mr_pse_enable mr_pse_enable;
enum ethtool_c33_pse_ext_substate_option_detect_ted option_detect_ted;
enum ethtool_c33_pse_ext_substate_option_vport_lim option_vport_lim;
enum ethtool_c33_pse_ext_substate_ovld_detected ovld_detected;
enum ethtool_c33_pse_ext_substate_power_not_available power_not_available;
enum ethtool_c33_pse_ext_substate_short_detected short_detected;
u32 __c33_pse_ext_substate;
};
};

struct ethtool_c33_pse_pw_limit_range {
u32 min;
u32 max;
};
#endif /* _LINUX_ETHTOOL_H */
22 changes: 21 additions & 1 deletion include/linux/pse-pd/pse.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef _LINUX_PSE_CONTROLLER_H
#define _LINUX_PSE_CONTROLLER_H

#include <linux/ethtool.h>
#include <linux/list.h>
#include <uapi/linux/ethtool.h>

Expand All @@ -16,6 +15,27 @@

struct phy_device;
struct pse_controller_dev;
struct netlink_ext_ack;

/* C33 PSE extended state and substate. */
struct ethtool_c33_pse_ext_state_info {
enum ethtool_c33_pse_ext_state c33_pse_ext_state;
union {
enum ethtool_c33_pse_ext_substate_error_condition error_condition;
enum ethtool_c33_pse_ext_substate_mr_pse_enable mr_pse_enable;
enum ethtool_c33_pse_ext_substate_option_detect_ted option_detect_ted;
enum ethtool_c33_pse_ext_substate_option_vport_lim option_vport_lim;
enum ethtool_c33_pse_ext_substate_ovld_detected ovld_detected;
enum ethtool_c33_pse_ext_substate_power_not_available power_not_available;
enum ethtool_c33_pse_ext_substate_short_detected short_detected;
u32 __c33_pse_ext_substate;
};
};

struct ethtool_c33_pse_pw_limit_range {
u32 min;
u32 max;
};

/**
* struct pse_control_config - PSE control/channel configuration.
Expand Down

0 comments on commit 5385f1e

Please sign in to comment.