On Wed, 20 Oct 2021 12:32:28 +0300 Volodymyr Mytnyk wrote:
+struct prestera_port_mac_state {
+ bool oper;
+ u32 mode;
+ u32 speed;
+ u8 duplex;
+ u8 fc;
+ u8 fec;
+};
+
+struct prestera_port_phy_state {
+ u64 lmode_bmap;
+ struct {
+ bool pause;
+ bool asym_pause;
+ } remote_fc;
+ u8 mdix;
+};
+
+struct prestera_port_mac_config {
+ bool admin;
+ u32 mode;
+ u8 inband;
+ u32 speed;
+ u8 duplex;
+ u8 fec;
Is it just me or these structures are offensively badly laid out?
pahole is your friend.
+};
+
+/* TODO: add another parameters here: modes, etc... */
+struct prestera_port_phy_config {
+ bool admin;
+ u32 mode;
+ u8 mdix;
+};