]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ethtool: replace struct ethtool_eee with a new struct ethtool_keee on kernel side
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 27 Jan 2024 13:25:09 +0000 (14:25 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Jan 2024 12:30:47 +0000 (12:30 +0000)
In order to pass EEE link modes beyond bit 32 to userspace we have to
complement the 32 bit bitmaps in struct ethtool_eee with linkmode
bitmaps. Therefore, similar to ethtool_link_settings and
ethtool_link_ksettings, add a struct ethtool_keee. In a first step
it's an identical copy of ethtool_eee. This patch simply does a
s/ethtool_eee/ethtool_keee/g for all users.
No functional change intended.

Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
54 files changed:
drivers/net/dsa/b53/b53_common.c
drivers/net/dsa/b53/b53_priv.h
drivers/net/dsa/bcm_sf2.c
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/mt7530.c
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/qca/qca8k-common.c
drivers/net/dsa/qca/qca8k.h
drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c
drivers/net/ethernet/broadcom/asp2/bcmasp.h
drivers/net/ethernet/broadcom/asp2/bcmasp_ethtool.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
drivers/net/ethernet/broadcom/genet/bcmgenet.c
drivers/net/ethernet/broadcom/genet/bcmgenet.h
drivers/net/ethernet/broadcom/tg3.c
drivers/net/ethernet/broadcom/tg3.h
drivers/net/ethernet/engleder/tsnep_main.c
drivers/net/ethernet/freescale/enetc/enetc.c
drivers/net/ethernet/freescale/fec.h
drivers/net/ethernet/freescale/fec_main.c
drivers/net/ethernet/freescale/gianfar.c
drivers/net/ethernet/intel/e1000e/ethtool.c
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/igc/igc.h
drivers/net/ethernet/intel/igc/igc_ethtool.c
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
drivers/net/ethernet/marvell/mvneta.c
drivers/net/ethernet/microchip/lan743x_ethtool.c
drivers/net/ethernet/qlogic/qede/qede_ethtool.c
drivers/net/ethernet/realtek/r8169_main.c
drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
drivers/net/ethernet/ti/am65-cpsw-ethtool.c
drivers/net/ethernet/ti/cpsw_ethtool.c
drivers/net/ethernet/ti/cpsw_priv.h
drivers/net/ethernet/ti/icssg/icssg_ethtool.c
drivers/net/phy/marvell.c
drivers/net/phy/phy-c45.c
drivers/net/phy/phy.c
drivers/net/phy/phylink.c
drivers/net/usb/ax88179_178a.c
drivers/net/usb/lan78xx.c
drivers/net/usb/r8152.c
include/linux/ethtool.h
include/linux/phy.h
include/linux/phylink.h
include/net/dsa.h
net/dsa/user.c
net/ethtool/eee.c
net/ethtool/ioctl.c

index 0d628b35fd5c10081a17a12e44e76f9510edaeac..adc93abf4551a7a2746a245e9a7a5da57c8a3d5f 100644 (file)
@@ -1257,7 +1257,7 @@ static void b53_adjust_link(struct dsa_switch *ds, int port,
                            struct phy_device *phydev)
 {
        struct b53_device *dev = ds->priv;
-       struct ethtool_eee *p = &dev->ports[port].eee;
+       struct ethtool_keee *p = &dev->ports[port].eee;
        u8 rgmii_ctrl = 0, reg = 0, off;
        bool tx_pause = false;
        bool rx_pause = false;
@@ -2224,10 +2224,10 @@ int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy)
 }
 EXPORT_SYMBOL(b53_eee_init);
 
-int b53_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_eee *e)
+int b53_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e)
 {
        struct b53_device *dev = ds->priv;
-       struct ethtool_eee *p = &dev->ports[port].eee;
+       struct ethtool_keee *p = &dev->ports[port].eee;
        u16 reg;
 
        if (is5325(dev) || is5365(dev))
@@ -2241,10 +2241,10 @@ int b53_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_eee *e)
 }
 EXPORT_SYMBOL(b53_get_mac_eee);
 
-int b53_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_eee *e)
+int b53_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e)
 {
        struct b53_device *dev = ds->priv;
-       struct ethtool_eee *p = &dev->ports[port].eee;
+       struct ethtool_keee *p = &dev->ports[port].eee;
 
        if (is5325(dev) || is5365(dev))
                return -EOPNOTSUPP;
index fdcfd5081c284137c0a4448a2351b39880fae1c6..c26a03755e8338ee5c7abdede16e06635334f478 100644 (file)
@@ -95,7 +95,7 @@ struct b53_pcs {
 
 struct b53_port {
        u16             vlan_ctl_mask;
-       struct ethtool_eee eee;
+       struct ethtool_keee eee;
 };
 
 struct b53_vlan {
@@ -397,7 +397,7 @@ void b53_disable_port(struct dsa_switch *ds, int port);
 void b53_brcm_hdr_setup(struct dsa_switch *ds, int port);
 void b53_eee_enable_set(struct dsa_switch *ds, int port, bool enable);
 int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy);
-int b53_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_eee *e);
-int b53_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_eee *e);
+int b53_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e);
+int b53_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e);
 
 #endif
index 4a52ccbe393f771d04e10e4989d62f3fa3c46a95..bc77ee9e6d0aa9ed7a80400dc64c8a77156856cf 100644 (file)
@@ -835,7 +835,7 @@ static void bcm_sf2_sw_mac_link_up(struct dsa_switch *ds, int port,
                                   bool tx_pause, bool rx_pause)
 {
        struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
-       struct ethtool_eee *p = &priv->dev->ports[port].eee;
+       struct ethtool_keee *p = &priv->dev->ports[port].eee;
        u32 reg_rgmii_ctrl = 0;
        u32 reg, offset;
 
index 245dfb7a7a315dd82dcb8275137247976438b0e8..a7b5ddb8656edb5348344353b1c47c0e89af0808 100644 (file)
@@ -2852,7 +2852,7 @@ static int ksz_validate_eee(struct dsa_switch *ds, int port)
 }
 
 static int ksz_get_mac_eee(struct dsa_switch *ds, int port,
-                          struct ethtool_eee *e)
+                          struct ethtool_keee *e)
 {
        int ret;
 
@@ -2872,7 +2872,7 @@ static int ksz_get_mac_eee(struct dsa_switch *ds, int port,
 }
 
 static int ksz_set_mac_eee(struct dsa_switch *ds, int port,
-                          struct ethtool_eee *e)
+                          struct ethtool_keee *e)
 {
        struct ksz_device *dev = ds->priv;
        int ret;
index 68be38ae66e050b98f57a842d1934f30b84c7892..98a73a62f2ee21ee82ee1fc246de2480a803ea9f 100644 (file)
@@ -3048,7 +3048,7 @@ mt753x_setup(struct dsa_switch *ds)
 }
 
 static int mt753x_get_mac_eee(struct dsa_switch *ds, int port,
-                             struct ethtool_eee *e)
+                             struct ethtool_keee *e)
 {
        struct mt7530_priv *priv = ds->priv;
        u32 eeecr = mt7530_read(priv, MT7530_PMEEECR_P(port));
@@ -3060,7 +3060,7 @@ static int mt753x_get_mac_eee(struct dsa_switch *ds, int port,
 }
 
 static int mt753x_set_mac_eee(struct dsa_switch *ds, int port,
-                             struct ethtool_eee *e)
+                             struct ethtool_keee *e)
 {
        struct mt7530_priv *priv = ds->priv;
        u32 set, mask = LPI_THRESH_MASK | LPI_MODE_EN;
index 383b3c4d6f599c57358d8970c9c26941231e9898..8b0079b8e0e03c50eaa7f72d08cc02aa2f163215 100644 (file)
@@ -1451,14 +1451,14 @@ static void mv88e6xxx_get_regs(struct dsa_switch *ds, int port,
 }
 
 static int mv88e6xxx_get_mac_eee(struct dsa_switch *ds, int port,
-                                struct ethtool_eee *e)
+                                struct ethtool_keee *e)
 {
        /* Nothing to do on the port's MAC */
        return 0;
 }
 
 static int mv88e6xxx_set_mac_eee(struct dsa_switch *ds, int port,
-                                struct ethtool_eee *e)
+                                struct ethtool_keee *e)
 {
        /* Nothing to do on the port's MAC */
        return 0;
index 2358cd399c7eb56835139bf78b0f38996616fbbc..7f80035c5441b8a2bc50e959391cb1f31f0f291e 100644 (file)
@@ -534,7 +534,7 @@ int qca8k_get_sset_count(struct dsa_switch *ds, int port, int sset)
 }
 
 int qca8k_set_mac_eee(struct dsa_switch *ds, int port,
-                     struct ethtool_eee *eee)
+                     struct ethtool_keee *eee)
 {
        u32 lpi_en = QCA8K_REG_EEE_CTRL_LPI_EN(port);
        struct qca8k_priv *priv = ds->priv;
@@ -558,7 +558,7 @@ exit:
 }
 
 int qca8k_get_mac_eee(struct dsa_switch *ds, int port,
-                     struct ethtool_eee *e)
+                     struct ethtool_keee *e)
 {
        /* Nothing to do on the port's MAC */
        return 0;
index c8785c36c54e1395d12dbdd1f151ba3ca0e05adc..2184d8d2d5a93eb6ac9ff6bd443555c9925616e0 100644 (file)
@@ -518,8 +518,8 @@ void qca8k_get_ethtool_stats(struct dsa_switch *ds, int port,
 int qca8k_get_sset_count(struct dsa_switch *ds, int port, int sset);
 
 /* Common eee function */
-int qca8k_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_eee *eee);
-int qca8k_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_eee *e);
+int qca8k_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *eee);
+int qca8k_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e);
 
 /* Common bridge function */
 void qca8k_port_stp_state_set(struct dsa_switch *ds, int port, u8 state);
index 18a6c8d99fa0a6182ddf6588de06bd0d95e3af1a..be865776de55e8c4633d113d95edaa64bdfcde9e 100644 (file)
@@ -697,7 +697,7 @@ static u32 eee_mask_to_ethtool_mask(u32 speed)
        return rate;
 }
 
-static int aq_ethtool_get_eee(struct net_device *ndev, struct ethtool_eee *eee)
+static int aq_ethtool_get_eee(struct net_device *ndev, struct ethtool_keee *eee)
 {
        struct aq_nic_s *aq_nic = netdev_priv(ndev);
        u32 rate, supported_rates;
@@ -729,7 +729,7 @@ static int aq_ethtool_get_eee(struct net_device *ndev, struct ethtool_eee *eee)
        return 0;
 }
 
-static int aq_ethtool_set_eee(struct net_device *ndev, struct ethtool_eee *eee)
+static int aq_ethtool_set_eee(struct net_device *ndev, struct ethtool_keee *eee)
 {
        struct aq_nic_s *aq_nic = netdev_priv(ndev);
        u32 rate, supported_rates;
index ec90add6b03e28889d61e53e9eab6d072ce0f1f6..312bf9b6576efd9df86496b779c1b7c02940d94f 100644 (file)
@@ -337,7 +337,7 @@ struct bcmasp_intf {
        int                             wol_irq;
        unsigned int                    wol_irq_enabled:1;
 
-       struct ethtool_eee              eee;
+       struct ethtool_keee             eee;
 };
 
 #define NUM_NET_FILTERS                                32
index ce6a3d56fb2395baab61779210ab0b26bd6da659..2851bed153e6143b425912a8d35700e41973a17f 100644 (file)
@@ -363,10 +363,10 @@ void bcmasp_eee_enable_set(struct bcmasp_intf *intf, bool enable)
        intf->eee.eee_active = enable;
 }
 
-static int bcmasp_get_eee(struct net_device *dev, struct ethtool_eee *e)
+static int bcmasp_get_eee(struct net_device *dev, struct ethtool_keee *e)
 {
        struct bcmasp_intf *intf = netdev_priv(dev);
-       struct ethtool_eee *p = &intf->eee;
+       struct ethtool_keee *p = &intf->eee;
 
        if (!dev->phydev)
                return -ENODEV;
@@ -379,10 +379,10 @@ static int bcmasp_get_eee(struct net_device *dev, struct ethtool_eee *e)
        return phy_ethtool_get_eee(dev->phydev, e);
 }
 
-static int bcmasp_set_eee(struct net_device *dev, struct ethtool_eee *e)
+static int bcmasp_set_eee(struct net_device *dev, struct ethtool_keee *e)
 {
        struct bcmasp_intf *intf = netdev_priv(dev);
-       struct ethtool_eee *p = &intf->eee;
+       struct ethtool_keee *p = &intf->eee;
        int ret;
 
        if (!dev->phydev)
index 0bc7690cdee169fc48844f2f465feb4ffb2b0ddc..12d2785eeb8a26b9aaa959919629a15368ca089f 100644 (file)
@@ -2108,7 +2108,7 @@ static u32 bnx2x_adv_to_eee(u32 modes, u32 shift)
        return eee_adv << shift;
 }
 
-static int bnx2x_get_eee(struct net_device *dev, struct ethtool_eee *edata)
+static int bnx2x_get_eee(struct net_device *dev, struct ethtool_keee *edata)
 {
        struct bnx2x *bp = netdev_priv(dev);
        u32 eee_cfg;
@@ -2141,7 +2141,7 @@ static int bnx2x_get_eee(struct net_device *dev, struct ethtool_eee *edata)
        return 0;
 }
 
-static int bnx2x_set_eee(struct net_device *dev, struct ethtool_eee *edata)
+static int bnx2x_set_eee(struct net_device *dev, struct ethtool_keee *edata)
 {
        struct bnx2x *bp = netdev_priv(dev);
        u32 eee_cfg;
index 39845d556bafc949cdf4e599007db26c11b414ac..d7626c26f9a9b41e2a1ea84c25bda11b17c56f0e 100644 (file)
@@ -10621,7 +10621,7 @@ static int bnxt_hwrm_phy_qcaps(struct bnxt *bp)
 
        bp->phy_flags = resp->flags | (le16_to_cpu(resp->flags2) << 8);
        if (resp->flags & PORT_PHY_QCAPS_RESP_FLAGS_EEE_SUPPORTED) {
-               struct ethtool_eee *eee = &bp->eee;
+               struct ethtool_keee *eee = &bp->eee;
                u16 fw_speeds = le16_to_cpu(resp->supported_speeds_eee_mode);
 
                eee->supported = _bnxt_fw_to_ethtool_adv_spds(fw_speeds, 0);
@@ -10766,7 +10766,7 @@ int bnxt_update_link(struct bnxt *bp, bool chng_link_state)
        link_info->module_status = resp->module_status;
 
        if (bp->phy_flags & BNXT_PHY_FL_EEE_CAP) {
-               struct ethtool_eee *eee = &bp->eee;
+               struct ethtool_keee *eee = &bp->eee;
                u16 fw_speeds;
 
                eee->eee_active = 0;
@@ -10957,7 +10957,7 @@ int bnxt_hwrm_set_pause(struct bnxt *bp)
 static void bnxt_hwrm_set_eee(struct bnxt *bp,
                              struct hwrm_port_phy_cfg_input *req)
 {
-       struct ethtool_eee *eee = &bp->eee;
+       struct ethtool_keee *eee = &bp->eee;
 
        if (eee->eee_enabled) {
                u16 eee_speeds;
@@ -11322,7 +11322,7 @@ static void bnxt_get_wol_settings(struct bnxt *bp)
 
 static bool bnxt_eee_config_ok(struct bnxt *bp)
 {
-       struct ethtool_eee *eee = &bp->eee;
+       struct ethtool_keee *eee = &bp->eee;
        struct bnxt_link_info *link_info = &bp->link_info;
 
        if (!(bp->phy_flags & BNXT_PHY_FL_EEE_CAP))
index 47338b48ca203d2ebea4c72b433690a0afde3c58..b2cb3e77559dcd6a2e87a02d575a4262f45ebd5b 100644 (file)
@@ -2442,7 +2442,7 @@ struct bnxt {
         */
        struct mutex            link_lock;
        struct bnxt_link_info   link_info;
-       struct ethtool_eee      eee;
+       struct ethtool_keee     eee;
        u32                     lpi_tmr_lo;
        u32                     lpi_tmr_hi;
 
index dc4ca706b0e299d9df7da1b2edba240becd68878..d6a8577d68af9f094da9572faeba71162464c578 100644 (file)
@@ -3884,10 +3884,10 @@ static int bnxt_set_eeprom(struct net_device *dev,
                                eeprom->len);
 }
 
-static int bnxt_set_eee(struct net_device *dev, struct ethtool_eee *edata)
+static int bnxt_set_eee(struct net_device *dev, struct ethtool_keee *edata)
 {
        struct bnxt *bp = netdev_priv(dev);
-       struct ethtool_eee *eee = &bp->eee;
+       struct ethtool_keee *eee = &bp->eee;
        struct bnxt_link_info *link_info = &bp->link_info;
        u32 advertising;
        int rc = 0;
@@ -3942,7 +3942,7 @@ eee_exit:
        return rc;
 }
 
-static int bnxt_get_eee(struct net_device *dev, struct ethtool_eee *edata)
+static int bnxt_get_eee(struct net_device *dev, struct ethtool_keee *edata)
 {
        struct bnxt *bp = netdev_priv(dev);
 
index 2d7ae71287b14ea8a52a8fb1d90c84c6e7fc75ed..051c31fb17c2d816dd7b8a4cb59205a3b4d70240 100644 (file)
@@ -1317,10 +1317,10 @@ void bcmgenet_eee_enable_set(struct net_device *dev, bool enable,
        priv->eee.tx_lpi_enabled = tx_lpi_enabled;
 }
 
-static int bcmgenet_get_eee(struct net_device *dev, struct ethtool_eee *e)
+static int bcmgenet_get_eee(struct net_device *dev, struct ethtool_keee *e)
 {
        struct bcmgenet_priv *priv = netdev_priv(dev);
-       struct ethtool_eee *p = &priv->eee;
+       struct ethtool_keee *p = &priv->eee;
 
        if (GENET_IS_V1(priv))
                return -EOPNOTSUPP;
@@ -1336,10 +1336,10 @@ static int bcmgenet_get_eee(struct net_device *dev, struct ethtool_eee *e)
        return phy_ethtool_get_eee(dev->phydev, e);
 }
 
-static int bcmgenet_set_eee(struct net_device *dev, struct ethtool_eee *e)
+static int bcmgenet_set_eee(struct net_device *dev, struct ethtool_keee *e)
 {
        struct bcmgenet_priv *priv = netdev_priv(dev);
-       struct ethtool_eee *p = &priv->eee;
+       struct ethtool_keee *p = &priv->eee;
 
        if (GENET_IS_V1(priv))
                return -EOPNOTSUPP;
index 1985c0ec4da2ab05af224113b2b57c6cf33b7b74..7523b60b3c1c016de74fd74b7d1e286596aac1ae 100644 (file)
@@ -645,7 +645,7 @@ struct bcmgenet_priv {
 
        struct bcmgenet_mib_counters mib;
 
-       struct ethtool_eee eee;
+       struct ethtool_keee eee;
 };
 
 #define GENET_IO_MACRO(name, offset)                                   \
index 04964bbe08cf333e5c5843682ee46e287abb058c..11054177c2eceec1a9442c1c3bf0a0d49c5493a8 100644 (file)
@@ -2338,10 +2338,10 @@ static void tg3_phy_apply_otp(struct tg3 *tp)
        tg3_phy_toggle_auxctl_smdsp(tp, false);
 }
 
-static void tg3_eee_pull_config(struct tg3 *tp, struct ethtool_eee *eee)
+static void tg3_eee_pull_config(struct tg3 *tp, struct ethtool_keee *eee)
 {
        u32 val;
-       struct ethtool_eee *dest = &tp->eee;
+       struct ethtool_keee *dest = &tp->eee;
 
        if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP))
                return;
@@ -4618,7 +4618,7 @@ static int tg3_init_5401phy_dsp(struct tg3 *tp)
 
 static bool tg3_phy_eee_config_ok(struct tg3 *tp)
 {
-       struct ethtool_eee eee;
+       struct ethtool_keee eee;
 
        if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP))
                return true;
@@ -14180,7 +14180,7 @@ static int tg3_set_coalesce(struct net_device *dev,
        return 0;
 }
 
-static int tg3_set_eee(struct net_device *dev, struct ethtool_eee *edata)
+static int tg3_set_eee(struct net_device *dev, struct ethtool_keee *edata)
 {
        struct tg3 *tp = netdev_priv(dev);
 
@@ -14217,7 +14217,7 @@ static int tg3_set_eee(struct net_device *dev, struct ethtool_eee *edata)
        return 0;
 }
 
-static int tg3_get_eee(struct net_device *dev, struct ethtool_eee *edata)
+static int tg3_get_eee(struct net_device *dev, struct ethtool_keee *edata)
 {
        struct tg3 *tp = netdev_priv(dev);
 
index 5016475e50054d627cfb541ce18d9808450a200f..cf1b2b123c7ee9a906aa516b43b5452f778c8895 100644 (file)
@@ -3419,7 +3419,7 @@ struct tg3 {
        unsigned int                    irq_cnt;
 
        struct ethtool_coalesce         coal;
-       struct ethtool_eee              eee;
+       struct ethtool_keee             eee;
 
        /* firmware info */
        const char                      *fw_needed;
index ae0b8b37b9bf11f0ac9fb509d711068ae4d54cdb..eb64118f5b1882347081690aaaeb784c83c350f1 100644 (file)
@@ -240,7 +240,7 @@ static int tsnep_phy_loopback(struct tsnep_adapter *adapter, bool enable)
 static int tsnep_phy_open(struct tsnep_adapter *adapter)
 {
        struct phy_device *phydev;
-       struct ethtool_eee ethtool_eee;
+       struct ethtool_keee ethtool_keee;
        int retval;
 
        retval = phy_connect_direct(adapter->netdev, adapter->phydev,
@@ -259,8 +259,8 @@ static int tsnep_phy_open(struct tsnep_adapter *adapter)
        phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_1000baseT_Half_BIT);
 
        /* disable EEE autoneg, EEE not supported by TSNEP */
-       memset(&ethtool_eee, 0, sizeof(ethtool_eee));
-       phy_ethtool_set_eee(adapter->phydev, &ethtool_eee);
+       memset(&ethtool_keee, 0, sizeof(ethtool_keee));
+       phy_ethtool_set_eee(adapter->phydev, &ethtool_keee);
 
        adapter->phydev->irq = PHY_MAC_INTERRUPT;
        phy_start(adapter->phydev);
index bfdbdab443ae0ddcf93dca777f134e659b5d4040..9f07f4947b631b81ae4c2d17c00e76c18b88d885 100644 (file)
@@ -2402,7 +2402,7 @@ static void enetc_clear_interrupts(struct enetc_ndev_priv *priv)
 static int enetc_phylink_connect(struct net_device *ndev)
 {
        struct enetc_ndev_priv *priv = netdev_priv(ndev);
-       struct ethtool_eee edata;
+       struct ethtool_keee edata;
        int err;
 
        if (!priv->phylink) {
@@ -2418,7 +2418,7 @@ static int enetc_phylink_connect(struct net_device *ndev)
        }
 
        /* disable EEE autoneg, until ENETC driver supports it */
-       memset(&edata, 0, sizeof(struct ethtool_eee));
+       memset(&edata, 0, sizeof(struct ethtool_keee));
        phylink_ethtool_set_eee(priv->phylink, &edata);
 
        phylink_start(priv->phylink);
index a8fbcada6b01ff297eaf7e16f7b38b6eea024bb7..a19cb2a786fd2808e355dd91c057afa35c752f17 100644 (file)
@@ -672,7 +672,7 @@ struct fec_enet_private {
        unsigned int itr_clk_rate;
 
        /* tx lpi eee mode */
-       struct ethtool_eee eee;
+       struct ethtool_keee eee;
        unsigned int clk_ref_rate;
 
        /* ptp clock period in ns*/
index 432523b2c789216b21440e4e6576c06ae30b674c..63707e0651419ac52128b7aa31f2945959748146 100644 (file)
@@ -3122,7 +3122,7 @@ static int fec_enet_us_to_tx_cycle(struct net_device *ndev, int us)
 static int fec_enet_eee_mode_set(struct net_device *ndev, bool enable)
 {
        struct fec_enet_private *fep = netdev_priv(ndev);
-       struct ethtool_eee *p = &fep->eee;
+       struct ethtool_keee *p = &fep->eee;
        unsigned int sleep_cycle, wake_cycle;
        int ret = 0;
 
@@ -3149,10 +3149,10 @@ static int fec_enet_eee_mode_set(struct net_device *ndev, bool enable)
 }
 
 static int
-fec_enet_get_eee(struct net_device *ndev, struct ethtool_eee *edata)
+fec_enet_get_eee(struct net_device *ndev, struct ethtool_keee *edata)
 {
        struct fec_enet_private *fep = netdev_priv(ndev);
-       struct ethtool_eee *p = &fep->eee;
+       struct ethtool_keee *p = &fep->eee;
 
        if (!(fep->quirks & FEC_QUIRK_HAS_EEE))
                return -EOPNOTSUPP;
@@ -3169,10 +3169,10 @@ fec_enet_get_eee(struct net_device *ndev, struct ethtool_eee *edata)
 }
 
 static int
-fec_enet_set_eee(struct net_device *ndev, struct ethtool_eee *edata)
+fec_enet_set_eee(struct net_device *ndev, struct ethtool_keee *edata)
 {
        struct fec_enet_private *fep = netdev_priv(ndev);
-       struct ethtool_eee *p = &fep->eee;
+       struct ethtool_keee *p = &fep->eee;
        int ret = 0;
 
        if (!(fep->quirks & FEC_QUIRK_HAS_EEE))
index e3dfbd7a42361e47f253f9ad4a8474f4d02f378b..a811238c018deedb812e23390d785006f1ed2268 100644 (file)
@@ -1649,7 +1649,7 @@ static int init_phy(struct net_device *dev)
        struct gfar_private *priv = netdev_priv(dev);
        phy_interface_t interface = priv->interface;
        struct phy_device *phydev;
-       struct ethtool_eee edata;
+       struct ethtool_keee edata;
 
        linkmode_set_bit_array(phy_10_100_features_array,
                               ARRAY_SIZE(phy_10_100_features_array),
@@ -1681,7 +1681,7 @@ static int init_phy(struct net_device *dev)
        phy_support_asym_pause(phydev);
 
        /* disable EEE autoneg, EEE not supported by eTSEC */
-       memset(&edata, 0, sizeof(struct ethtool_eee));
+       memset(&edata, 0, sizeof(struct ethtool_keee));
        phy_ethtool_set_eee(phydev, &edata);
 
        return 0;
index fc0f98ea61332f9ecb118695e39491e434d689cf..343f54b2b6ae28758546fb65939c8d2c6660319d 100644 (file)
@@ -2186,7 +2186,7 @@ static int e1000_get_rxnfc(struct net_device *netdev,
        }
 }
 
-static int e1000e_get_eee(struct net_device *netdev, struct ethtool_eee *edata)
+static int e1000e_get_eee(struct net_device *netdev, struct ethtool_keee *edata)
 {
        struct e1000_adapter *adapter = netdev_priv(netdev);
        struct e1000_hw *hw = &adapter->hw;
@@ -2262,11 +2262,11 @@ release:
        return ret_val;
 }
 
-static int e1000e_set_eee(struct net_device *netdev, struct ethtool_eee *edata)
+static int e1000e_set_eee(struct net_device *netdev, struct ethtool_keee *edata)
 {
        struct e1000_adapter *adapter = netdev_priv(netdev);
        struct e1000_hw *hw = &adapter->hw;
-       struct ethtool_eee eee_curr;
+       struct ethtool_keee eee_curr;
        s32 ret_val;
 
        ret_val = e1000e_get_eee(netdev, &eee_curr);
index c841779713f669dba90c1ce72293b16970cb2796..9dfda3c48af35a083aa5dad1c3f5a2c754ebfe1f 100644 (file)
@@ -5644,7 +5644,7 @@ static int i40e_get_module_eeprom(struct net_device *netdev,
        return 0;
 }
 
-static int i40e_get_eee(struct net_device *netdev, struct ethtool_eee *edata)
+static int i40e_get_eee(struct net_device *netdev, struct ethtool_keee *edata)
 {
        struct i40e_netdev_priv *np = netdev_priv(netdev);
        struct i40e_aq_get_phy_abilities_resp phy_cfg;
@@ -5682,7 +5682,7 @@ static int i40e_get_eee(struct net_device *netdev, struct ethtool_eee *edata)
 }
 
 static int i40e_is_eee_param_supported(struct net_device *netdev,
-                                      struct ethtool_eee *edata)
+                                      struct ethtool_keee *edata)
 {
        struct i40e_netdev_priv *np = netdev_priv(netdev);
        struct i40e_vsi *vsi = np->vsi;
@@ -5709,7 +5709,7 @@ static int i40e_is_eee_param_supported(struct net_device *netdev,
        return 0;
 }
 
-static int i40e_set_eee(struct net_device *netdev, struct ethtool_eee *edata)
+static int i40e_set_eee(struct net_device *netdev, struct ethtool_keee *edata)
 {
        struct i40e_netdev_priv *np = netdev_priv(netdev);
        struct i40e_aq_get_phy_abilities_resp abilities;
index b66199c9bb3a97f60989800c37b4a90cf87de33c..778d1e6cfc45dcb2ceeebb8753a44638582c6e6d 100644 (file)
@@ -3027,7 +3027,7 @@ static int igb_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
        return ret;
 }
 
-static int igb_get_eee(struct net_device *netdev, struct ethtool_eee *edata)
+static int igb_get_eee(struct net_device *netdev, struct ethtool_keee *edata)
 {
        struct igb_adapter *adapter = netdev_priv(netdev);
        struct e1000_hw *hw = &adapter->hw;
@@ -3106,11 +3106,11 @@ static int igb_get_eee(struct net_device *netdev, struct ethtool_eee *edata)
 }
 
 static int igb_set_eee(struct net_device *netdev,
-                      struct ethtool_eee *edata)
+                      struct ethtool_keee *edata)
 {
        struct igb_adapter *adapter = netdev_priv(netdev);
        struct e1000_hw *hw = &adapter->hw;
-       struct ethtool_eee eee_curr;
+       struct ethtool_keee eee_curr;
        bool adv1g_eee = true, adv100m_eee = true;
        s32 ret_val;
 
@@ -3118,7 +3118,7 @@ static int igb_set_eee(struct net_device *netdev,
            (hw->phy.media_type != e1000_media_type_copper))
                return -EOPNOTSUPP;
 
-       memset(&eee_curr, 0, sizeof(struct ethtool_eee));
+       memset(&eee_curr, 0, sizeof(struct ethtool_keee));
 
        ret_val = igb_get_eee(netdev, &eee_curr);
        if (ret_val)
index 45430e246e9cbb42482d8b65c723a196ae62e720..75f7c5ba65e091196641f512bf41179b04cb877c 100644 (file)
@@ -168,7 +168,7 @@ struct igc_ring {
 struct igc_adapter {
        struct net_device *netdev;
 
-       struct ethtool_eee eee;
+       struct ethtool_keee eee;
        u16 eee_advert;
 
        unsigned long state;
index b95d2c86e803eae94aac48dce32d7573d77f606b..f2dcfe920f4f3b4aa3c36366b673197e0f017565 100644 (file)
@@ -1623,7 +1623,7 @@ static int igc_ethtool_set_priv_flags(struct net_device *netdev, u32 priv_flags)
 }
 
 static int igc_ethtool_get_eee(struct net_device *netdev,
-                              struct ethtool_eee *edata)
+                              struct ethtool_keee *edata)
 {
        struct igc_adapter *adapter = netdev_priv(netdev);
        struct igc_hw *hw = &adapter->hw;
@@ -1664,14 +1664,14 @@ static int igc_ethtool_get_eee(struct net_device *netdev,
 }
 
 static int igc_ethtool_set_eee(struct net_device *netdev,
-                              struct ethtool_eee *edata)
+                              struct ethtool_keee *edata)
 {
        struct igc_adapter *adapter = netdev_priv(netdev);
        struct igc_hw *hw = &adapter->hw;
-       struct ethtool_eee eee_curr;
+       struct ethtool_keee eee_curr;
        s32 ret_val;
 
-       memset(&eee_curr, 0, sizeof(struct ethtool_eee));
+       memset(&eee_curr, 0, sizeof(struct ethtool_keee));
 
        ret_val = igc_ethtool_get_eee(netdev, &eee_curr);
        if (ret_val) {
index 9a63457712c7b4aeb26ea8284acdbc60b9f6a9e9..0aa73519a29d39080b330279a9aff9f6fc1beb5f 100644 (file)
@@ -3425,7 +3425,7 @@ static const struct {
 };
 
 static int
-ixgbe_get_eee_fw(struct ixgbe_adapter *adapter, struct ethtool_eee *edata)
+ixgbe_get_eee_fw(struct ixgbe_adapter *adapter, struct ethtool_keee *edata)
 {
        u32 info[FW_PHY_ACT_DATA_COUNT] = { 0 };
        struct ixgbe_hw *hw = &adapter->hw;
@@ -3462,7 +3462,7 @@ ixgbe_get_eee_fw(struct ixgbe_adapter *adapter, struct ethtool_eee *edata)
        return 0;
 }
 
-static int ixgbe_get_eee(struct net_device *netdev, struct ethtool_eee *edata)
+static int ixgbe_get_eee(struct net_device *netdev, struct ethtool_keee *edata)
 {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
        struct ixgbe_hw *hw = &adapter->hw;
@@ -3476,17 +3476,17 @@ static int ixgbe_get_eee(struct net_device *netdev, struct ethtool_eee *edata)
        return -EOPNOTSUPP;
 }
 
-static int ixgbe_set_eee(struct net_device *netdev, struct ethtool_eee *edata)
+static int ixgbe_set_eee(struct net_device *netdev, struct ethtool_keee *edata)
 {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
        struct ixgbe_hw *hw = &adapter->hw;
-       struct ethtool_eee eee_data;
+       struct ethtool_keee eee_data;
        s32 ret_val;
 
        if (!(adapter->flags2 & IXGBE_FLAG2_EEE_CAPABLE))
                return -EOPNOTSUPP;
 
-       memset(&eee_data, 0, sizeof(struct ethtool_eee));
+       memset(&eee_data, 0, sizeof(struct ethtool_keee));
 
        ret_val = ixgbe_get_eee(netdev, &eee_data);
        if (ret_val)
index a641b3534ca3c1c5b8a1f6bcb008e59f6fea0f80..40a5f1431e4e8259054f20774f48025129c1c6d7 100644 (file)
@@ -5097,7 +5097,7 @@ static int mvneta_ethtool_set_wol(struct net_device *dev,
 }
 
 static int mvneta_ethtool_get_eee(struct net_device *dev,
-                                 struct ethtool_eee *eee)
+                                 struct ethtool_keee *eee)
 {
        struct mvneta_port *pp = netdev_priv(dev);
        u32 lpi_ctl0;
@@ -5113,7 +5113,7 @@ static int mvneta_ethtool_get_eee(struct net_device *dev,
 }
 
 static int mvneta_ethtool_set_eee(struct net_device *dev,
-                                 struct ethtool_eee *eee)
+                                 struct ethtool_keee *eee)
 {
        struct mvneta_port *pp = netdev_priv(dev);
        u32 lpi_ctl0;
index a2b3f4433ca8fa1e95eac8481cb4cf9dbee883cd..8a6ae171e375b852919d8cbe3cd13983c2c16767 100644 (file)
@@ -1055,7 +1055,7 @@ static int lan743x_ethtool_get_ts_info(struct net_device *netdev,
 }
 
 static int lan743x_ethtool_get_eee(struct net_device *netdev,
-                                  struct ethtool_eee *eee)
+                                  struct ethtool_keee *eee)
 {
        struct lan743x_adapter *adapter = netdev_priv(netdev);
        struct phy_device *phydev = netdev->phydev;
@@ -1092,7 +1092,7 @@ static int lan743x_ethtool_get_eee(struct net_device *netdev,
 }
 
 static int lan743x_ethtool_set_eee(struct net_device *netdev,
-                                  struct ethtool_eee *eee)
+                                  struct ethtool_keee *eee)
 {
        struct lan743x_adapter *adapter;
        struct phy_device *phydev;
index 0e240b5ab8d4866e99c7761f804930ae869576fa..77491fb640393075bd89eb915a33800d92fda47f 100644 (file)
@@ -1776,7 +1776,7 @@ static int qede_get_tunable(struct net_device *dev,
        return 0;
 }
 
-static int qede_get_eee(struct net_device *dev, struct ethtool_eee *edata)
+static int qede_get_eee(struct net_device *dev, struct ethtool_keee *edata)
 {
        struct qede_dev *edev = netdev_priv(dev);
        struct qed_link_output current_link;
@@ -1810,7 +1810,7 @@ static int qede_get_eee(struct net_device *dev, struct ethtool_eee *edata)
        return 0;
 }
 
-static int qede_set_eee(struct net_device *dev, struct ethtool_eee *edata)
+static int qede_set_eee(struct net_device *dev, struct ethtool_keee *edata)
 {
        struct qede_dev *edev = netdev_priv(dev);
        struct qed_link_output current_link;
index dd73df6b17b067ee84c7be2178bc306e3cbf21ac..3d30d44997918202f5738225209c34b34ea1be5c 100644 (file)
@@ -1974,7 +1974,7 @@ static int rtl_set_coalesce(struct net_device *dev,
        return 0;
 }
 
-static int rtl8169_get_eee(struct net_device *dev, struct ethtool_eee *data)
+static int rtl8169_get_eee(struct net_device *dev, struct ethtool_keee *data)
 {
        struct rtl8169_private *tp = netdev_priv(dev);
 
@@ -1984,7 +1984,7 @@ static int rtl8169_get_eee(struct net_device *dev, struct ethtool_eee *data)
        return phy_ethtool_get_eee(tp->phydev, data);
 }
 
-static int rtl8169_set_eee(struct net_device *dev, struct ethtool_eee *data)
+static int rtl8169_set_eee(struct net_device *dev, struct ethtool_keee *data)
 {
        struct rtl8169_private *tp = netdev_priv(dev);
        int ret;
index 8ba017ec9849325cc9506cb5a32c1f0858a147d5..d93b628b704680b8282736eb7b9236c05a43263a 100644 (file)
@@ -133,7 +133,7 @@ static const struct sxgbe_stats sxgbe_gstrings_stats[] = {
 #define SXGBE_STATS_LEN ARRAY_SIZE(sxgbe_gstrings_stats)
 
 static int sxgbe_get_eee(struct net_device *dev,
-                        struct ethtool_eee *edata)
+                        struct ethtool_keee *edata)
 {
        struct sxgbe_priv_data *priv = netdev_priv(dev);
 
@@ -148,7 +148,7 @@ static int sxgbe_get_eee(struct net_device *dev,
 }
 
 static int sxgbe_set_eee(struct net_device *dev,
-                        struct ethtool_eee *edata)
+                        struct ethtool_keee *edata)
 {
        struct sxgbe_priv_data *priv = netdev_priv(dev);
 
index 42d27b97dd1d036e1410131060b65220b0ab2180..bbecb3b89535c3d8dee01a7fbe8b75fc324fcb8d 100644 (file)
@@ -852,7 +852,7 @@ static int stmmac_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
 }
 
 static int stmmac_ethtool_op_get_eee(struct net_device *dev,
-                                    struct ethtool_eee *edata)
+                                    struct ethtool_keee *edata)
 {
        struct stmmac_priv *priv = netdev_priv(dev);
 
@@ -868,7 +868,7 @@ static int stmmac_ethtool_op_get_eee(struct net_device *dev,
 }
 
 static int stmmac_ethtool_op_set_eee(struct net_device *dev,
-                                    struct ethtool_eee *edata)
+                                    struct ethtool_keee *edata)
 {
        struct stmmac_priv *priv = netdev_priv(dev);
        int ret;
index 35fceba01ea453141602e1a79038c8fd0d3a07c6..d6ce2c9f0a8d8d43064b1ec74add5846cdea3199 100644 (file)
@@ -514,14 +514,14 @@ am65_cpsw_set_link_ksettings(struct net_device *ndev,
        return phylink_ethtool_ksettings_set(salve->phylink, ecmd);
 }
 
-static int am65_cpsw_get_eee(struct net_device *ndev, struct ethtool_eee *edata)
+static int am65_cpsw_get_eee(struct net_device *ndev, struct ethtool_keee *edata)
 {
        struct am65_cpsw_slave_data *salve = am65_ndev_to_slave(ndev);
 
        return phylink_ethtool_get_eee(salve->phylink, edata);
 }
 
-static int am65_cpsw_set_eee(struct net_device *ndev, struct ethtool_eee *edata)
+static int am65_cpsw_set_eee(struct net_device *ndev, struct ethtool_keee *edata)
 {
        struct am65_cpsw_slave_data *salve = am65_ndev_to_slave(ndev);
 
index a557a477d039331d7e9d9727fcf45b443c94bef0..f7b283353ba26658455b727a6b3b46d73ff28342 100644 (file)
@@ -422,7 +422,7 @@ int cpsw_set_link_ksettings(struct net_device *ndev,
        return phy_ethtool_ksettings_set(cpsw->slaves[slave_no].phy, ecmd);
 }
 
-int cpsw_get_eee(struct net_device *ndev, struct ethtool_eee *edata)
+int cpsw_get_eee(struct net_device *ndev, struct ethtool_keee *edata)
 {
        struct cpsw_priv *priv = netdev_priv(ndev);
        struct cpsw_common *cpsw = priv->cpsw;
@@ -434,7 +434,7 @@ int cpsw_get_eee(struct net_device *ndev, struct ethtool_eee *edata)
                return -EOPNOTSUPP;
 }
 
-int cpsw_set_eee(struct net_device *ndev, struct ethtool_eee *edata)
+int cpsw_set_eee(struct net_device *ndev, struct ethtool_keee *edata)
 {
        struct cpsw_priv *priv = netdev_priv(ndev);
        struct cpsw_common *cpsw = priv->cpsw;
index 0e27c433098d801fffa6d33b9a29f389f1ac4057..7efa72502c86c22c0d398fae4d587e3255f806eb 100644 (file)
@@ -496,8 +496,8 @@ int cpsw_get_link_ksettings(struct net_device *ndev,
                            struct ethtool_link_ksettings *ecmd);
 int cpsw_set_link_ksettings(struct net_device *ndev,
                            const struct ethtool_link_ksettings *ecmd);
-int cpsw_get_eee(struct net_device *ndev, struct ethtool_eee *edata);
-int cpsw_set_eee(struct net_device *ndev, struct ethtool_eee *edata);
+int cpsw_get_eee(struct net_device *ndev, struct ethtool_keee *edata);
+int cpsw_set_eee(struct net_device *ndev, struct ethtool_keee *edata);
 int cpsw_nway_reset(struct net_device *ndev);
 void cpsw_get_ringparam(struct net_device *ndev,
                        struct ethtool_ringparam *ering,
index a27ec1dcc8d56ca9a6a8e3fdb7407140dad75351..9a7dd7efcf6990a990ceeffe9916f125bb524fc1 100644 (file)
@@ -45,7 +45,7 @@ static int emac_set_link_ksettings(struct net_device *ndev,
        return phy_ethtool_set_link_ksettings(ndev, ecmd);
 }
 
-static int emac_get_eee(struct net_device *ndev, struct ethtool_eee *edata)
+static int emac_get_eee(struct net_device *ndev, struct ethtool_keee *edata)
 {
        if (!ndev->phydev)
                return -EOPNOTSUPP;
@@ -53,7 +53,7 @@ static int emac_get_eee(struct net_device *ndev, struct ethtool_eee *edata)
        return phy_ethtool_get_eee(ndev->phydev, edata);
 }
 
-static int emac_set_eee(struct net_device *ndev, struct ethtool_eee *edata)
+static int emac_set_eee(struct net_device *ndev, struct ethtool_keee *edata)
 {
        if (!ndev->phydev)
                return -EOPNOTSUPP;
index eba652a4c1d8873ed758f267e20ea34a0880552c..1faa22f58366617021010aa339f876160d86c766 100644 (file)
@@ -1461,7 +1461,7 @@ static int m88e1540_get_fld(struct phy_device *phydev, u8 *msecs)
 
 static int m88e1540_set_fld(struct phy_device *phydev, const u8 *msecs)
 {
-       struct ethtool_eee eee;
+       struct ethtool_keee eee;
        int val, ret;
 
        if (*msecs == ETHTOOL_PHY_FAST_LINK_DOWN_OFF)
index 747d14bf152c37e341ec11e64e8be58ccba749c3..adee5e712871fef174a121b548d99268a839a51d 100644 (file)
@@ -1443,13 +1443,13 @@ EXPORT_SYMBOL(genphy_c45_eee_is_active);
 /**
  * genphy_c45_ethtool_get_eee - get EEE supported and status
  * @phydev: target phy_device struct
- * @data: ethtool_eee data
+ * @data: ethtool_keee data
  *
  * Description: it reports the Supported/Advertisement/LP Advertisement
  * capabilities.
  */
 int genphy_c45_ethtool_get_eee(struct phy_device *phydev,
-                              struct ethtool_eee *data)
+                              struct ethtool_keee *data)
 {
        __ETHTOOL_DECLARE_LINK_MODE_MASK(adv) = {};
        __ETHTOOL_DECLARE_LINK_MODE_MASK(lp) = {};
@@ -1481,7 +1481,7 @@ EXPORT_SYMBOL(genphy_c45_ethtool_get_eee);
 /**
  * genphy_c45_ethtool_set_eee - set EEE supported and status
  * @phydev: target phy_device struct
- * @data: ethtool_eee data
+ * @data: ethtool_keee data
  *
  * Description: sets the Supported/Advertisement/LP Advertisement
  * capabilities. If eee_enabled is false, no links modes are
@@ -1490,7 +1490,7 @@ EXPORT_SYMBOL(genphy_c45_ethtool_get_eee);
  * non-destructive way.
  */
 int genphy_c45_ethtool_set_eee(struct phy_device *phydev,
-                              struct ethtool_eee *data)
+                              struct ethtool_keee *data)
 {
        int ret;
 
index 3376e58e2b88e58d2a9b17a018c58c5d4a9f6956..3b9531143be1cc02b846272ad89bac152cd08971 100644 (file)
@@ -1632,12 +1632,12 @@ EXPORT_SYMBOL(phy_get_eee_err);
 /**
  * phy_ethtool_get_eee - get EEE supported and status
  * @phydev: target phy_device struct
- * @data: ethtool_eee data
+ * @data: ethtool_keee data
  *
  * Description: it reportes the Supported/Advertisement/LP Advertisement
  * capabilities.
  */
-int phy_ethtool_get_eee(struct phy_device *phydev, struct ethtool_eee *data)
+int phy_ethtool_get_eee(struct phy_device *phydev, struct ethtool_keee *data)
 {
        int ret;
 
@@ -1655,11 +1655,11 @@ EXPORT_SYMBOL(phy_ethtool_get_eee);
 /**
  * phy_ethtool_set_eee - set EEE supported and status
  * @phydev: target phy_device struct
- * @data: ethtool_eee data
+ * @data: ethtool_keee data
  *
  * Description: it is to program the Advertisement EEE register.
  */
-int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data)
+int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_keee *data)
 {
        int ret;
 
index ed0b4ccaa6a66aa19f9a46dabfbe96a83f2cf20d..503fd7c40523549f7b04d31594a818d126ccce07 100644 (file)
@@ -2764,9 +2764,9 @@ EXPORT_SYMBOL_GPL(phylink_init_eee);
 /**
  * phylink_ethtool_get_eee() - read the energy efficient ethernet parameters
  * @pl: a pointer to a &struct phylink returned from phylink_create()
- * @eee: a pointer to a &struct ethtool_eee for the read parameters
+ * @eee: a pointer to a &struct ethtool_keee for the read parameters
  */
-int phylink_ethtool_get_eee(struct phylink *pl, struct ethtool_eee *eee)
+int phylink_ethtool_get_eee(struct phylink *pl, struct ethtool_keee *eee)
 {
        int ret = -EOPNOTSUPP;
 
@@ -2782,9 +2782,9 @@ EXPORT_SYMBOL_GPL(phylink_ethtool_get_eee);
 /**
  * phylink_ethtool_set_eee() - set the energy efficient ethernet parameters
  * @pl: a pointer to a &struct phylink returned from phylink_create()
- * @eee: a pointer to a &struct ethtool_eee for the desired parameters
+ * @eee: a pointer to a &struct ethtool_keee for the desired parameters
  */
-int phylink_ethtool_set_eee(struct phylink *pl, struct ethtool_eee *eee)
+int phylink_ethtool_set_eee(struct phylink *pl, struct ethtool_keee *eee)
 {
        int ret = -EOPNOTSUPP;
 
index d837c18874161d41cdf2b388bd8a96aaaff2eba1..3922a9afdd1fe0ede433e2d8c22495409a00f7fc 100644 (file)
@@ -667,7 +667,7 @@ static int ax88179_set_link_ksettings(struct net_device *net,
 }
 
 static int
-ax88179_ethtool_get_eee(struct usbnet *dev, struct ethtool_eee *data)
+ax88179_ethtool_get_eee(struct usbnet *dev, struct ethtool_keee *data)
 {
        int val;
 
@@ -696,7 +696,7 @@ ax88179_ethtool_get_eee(struct usbnet *dev, struct ethtool_eee *data)
 }
 
 static int
-ax88179_ethtool_set_eee(struct usbnet *dev, struct ethtool_eee *data)
+ax88179_ethtool_set_eee(struct usbnet *dev, struct ethtool_keee *data)
 {
        u16 tmp16 = ethtool_adv_to_mmd_eee_adv_t(data->advertised);
 
@@ -807,7 +807,7 @@ static void ax88179_enable_eee(struct usbnet *dev)
                          GMII_PHY_PAGE_SELECT, 2, &tmp16);
 }
 
-static int ax88179_get_eee(struct net_device *net, struct ethtool_eee *edata)
+static int ax88179_get_eee(struct net_device *net, struct ethtool_keee *edata)
 {
        struct usbnet *dev = netdev_priv(net);
        struct ax88179_data *priv = dev->driver_priv;
@@ -818,7 +818,7 @@ static int ax88179_get_eee(struct net_device *net, struct ethtool_eee *edata)
        return ax88179_ethtool_get_eee(dev, edata);
 }
 
-static int ax88179_set_eee(struct net_device *net, struct ethtool_eee *edata)
+static int ax88179_set_eee(struct net_device *net, struct ethtool_keee *edata)
 {
        struct usbnet *dev = netdev_priv(net);
        struct ax88179_data *priv = dev->driver_priv;
@@ -1587,7 +1587,7 @@ static int ax88179_reset(struct usbnet *dev)
        u16 *tmp16;
        u8 *tmp;
        struct ax88179_data *ax179_data = dev->driver_priv;
-       struct ethtool_eee eee_data;
+       struct ethtool_keee eee_data;
 
        tmp16 = (u16 *)buf;
        tmp = (u8 *)buf;
index a6d653ff552a261ca50d331dd7d7aa875ca3c362..106282612bc25ad02e7ad0b41005af5809a63cf2 100644 (file)
@@ -1673,7 +1673,7 @@ static int lan78xx_set_wol(struct net_device *netdev,
        return ret;
 }
 
-static int lan78xx_get_eee(struct net_device *net, struct ethtool_eee *edata)
+static int lan78xx_get_eee(struct net_device *net, struct ethtool_keee *edata)
 {
        struct lan78xx_net *dev = netdev_priv(net);
        struct phy_device *phydev = net->phydev;
@@ -1709,7 +1709,7 @@ exit:
        return ret;
 }
 
-static int lan78xx_set_eee(struct net_device *net, struct ethtool_eee *edata)
+static int lan78xx_set_eee(struct net_device *net, struct ethtool_keee *edata)
 {
        struct lan78xx_net *dev = netdev_priv(net);
        int ret;
index 0d0672d2a65457748a77f1a39e5507773a33c2fb..dc163b766a8903aec0fcec614e27bfd91a811ae5 100644 (file)
@@ -891,8 +891,8 @@ struct r8152 {
                void (*up)(struct r8152 *tp);
                void (*down)(struct r8152 *tp);
                void (*unload)(struct r8152 *tp);
-               int (*eee_get)(struct r8152 *tp, struct ethtool_eee *eee);
-               int (*eee_set)(struct r8152 *tp, struct ethtool_eee *eee);
+               int (*eee_get)(struct r8152 *tp, struct ethtool_keee *eee);
+               int (*eee_set)(struct r8152 *tp, struct ethtool_keee *eee);
                bool (*in_nway)(struct r8152 *tp);
                void (*hw_phy_cfg)(struct r8152 *tp);
                void (*autosuspend_en)(struct r8152 *tp, bool enable);
@@ -8922,7 +8922,7 @@ static void rtl8152_get_strings(struct net_device *dev, u32 stringset, u8 *data)
        }
 }
 
-static int r8152_get_eee(struct r8152 *tp, struct ethtool_eee *eee)
+static int r8152_get_eee(struct r8152 *tp, struct ethtool_keee *eee)
 {
        u32 lp, adv, supported = 0;
        u16 val;
@@ -8945,7 +8945,7 @@ static int r8152_get_eee(struct r8152 *tp, struct ethtool_eee *eee)
        return 0;
 }
 
-static int r8152_set_eee(struct r8152 *tp, struct ethtool_eee *eee)
+static int r8152_set_eee(struct r8152 *tp, struct ethtool_keee *eee)
 {
        u16 val = ethtool_adv_to_mmd_eee_adv_t(eee->advertised);
 
@@ -8957,7 +8957,7 @@ static int r8152_set_eee(struct r8152 *tp, struct ethtool_eee *eee)
        return 0;
 }
 
-static int r8153_get_eee(struct r8152 *tp, struct ethtool_eee *eee)
+static int r8153_get_eee(struct r8152 *tp, struct ethtool_keee *eee)
 {
        u32 lp, adv, supported = 0;
        u16 val;
@@ -8981,7 +8981,7 @@ static int r8153_get_eee(struct r8152 *tp, struct ethtool_eee *eee)
 }
 
 static int
-rtl_ethtool_get_eee(struct net_device *net, struct ethtool_eee *edata)
+rtl_ethtool_get_eee(struct net_device *net, struct ethtool_keee *edata)
 {
        struct r8152 *tp = netdev_priv(net);
        int ret;
@@ -9008,7 +9008,7 @@ out:
 }
 
 static int
-rtl_ethtool_set_eee(struct net_device *net, struct ethtool_eee *edata)
+rtl_ethtool_set_eee(struct net_device *net, struct ethtool_keee *edata)
 {
        struct r8152 *tp = netdev_priv(net);
        int ret;
index 325e0778e93710487c12323c63e5014a0d49f535..a850bab8489f229a7a626b488fa89c482a6bb5a1 100644 (file)
@@ -222,6 +222,18 @@ extern int
 __ethtool_get_link_ksettings(struct net_device *dev,
                             struct ethtool_link_ksettings *link_ksettings);
 
+struct ethtool_keee {
+       u32     cmd;
+       u32     supported;
+       u32     advertised;
+       u32     lp_advertised;
+       u32     eee_active;
+       u32     eee_enabled;
+       u32     tx_lpi_enabled;
+       u32     tx_lpi_timer;
+       u32     reserved[2];
+};
+
 struct kernel_ethtool_coalesce {
        u8 use_cqe_mode_tx;
        u8 use_cqe_mode_rx;
@@ -892,8 +904,8 @@ struct ethtool_ops {
                                   struct ethtool_modinfo *);
        int     (*get_module_eeprom)(struct net_device *,
                                     struct ethtool_eeprom *, u8 *);
-       int     (*get_eee)(struct net_device *, struct ethtool_eee *);
-       int     (*set_eee)(struct net_device *, struct ethtool_eee *);
+       int     (*get_eee)(struct net_device *dev, struct ethtool_keee *eee);
+       int     (*set_eee)(struct net_device *dev, struct ethtool_keee *eee);
        int     (*get_tunable)(struct net_device *,
                               const struct ethtool_tunable *, void *);
        int     (*set_tunable)(struct net_device *,
index c9994a59ca2e6cdc57af0a87c158e0d4cdb4c85c..a66f07d3f5f49a8e8c737a6f1d4d408a89596cc3 100644 (file)
@@ -1908,9 +1908,9 @@ int genphy_c45_plca_get_status(struct phy_device *phydev,
 int genphy_c45_eee_is_active(struct phy_device *phydev, unsigned long *adv,
                             unsigned long *lp, bool *is_enabled);
 int genphy_c45_ethtool_get_eee(struct phy_device *phydev,
-                              struct ethtool_eee *data);
+                              struct ethtool_keee *data);
 int genphy_c45_ethtool_set_eee(struct phy_device *phydev,
-                              struct ethtool_eee *data);
+                              struct ethtool_keee *data);
 int genphy_c45_write_eee_adv(struct phy_device *phydev, unsigned long *adv);
 int genphy_c45_an_config_eee_aneg(struct phy_device *phydev);
 int genphy_c45_read_eee_adv(struct phy_device *phydev, unsigned long *adv);
@@ -1988,8 +1988,8 @@ int phy_unregister_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask);
 
 int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable);
 int phy_get_eee_err(struct phy_device *phydev);
-int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data);
-int phy_ethtool_get_eee(struct phy_device *phydev, struct ethtool_eee *data);
+int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_keee *data);
+int phy_ethtool_get_eee(struct phy_device *phydev, struct ethtool_keee *data);
 int phy_ethtool_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol);
 void phy_ethtool_get_wol(struct phy_device *phydev,
                         struct ethtool_wolinfo *wol);
index d589f89c612c67da0d39e7b45e6bda56be754745..6ba411732a0d2dbd3c3a69b6c0e53fecdb47b8d7 100644 (file)
@@ -584,8 +584,8 @@ int phylink_ethtool_set_pauseparam(struct phylink *,
                                   struct ethtool_pauseparam *);
 int phylink_get_eee_err(struct phylink *);
 int phylink_init_eee(struct phylink *, bool);
-int phylink_ethtool_get_eee(struct phylink *, struct ethtool_eee *);
-int phylink_ethtool_set_eee(struct phylink *, struct ethtool_eee *);
+int phylink_ethtool_get_eee(struct phylink *link, struct ethtool_keee *eee);
+int phylink_ethtool_set_eee(struct phylink *link, struct ethtool_keee *eee);
 int phylink_mii_ioctl(struct phylink *, struct ifreq *, int);
 int phylink_speed_down(struct phylink *pl, bool sync);
 int phylink_speed_up(struct phylink *pl);
index 82135fbdb1e6837f795b0cf935b9bf6e77a65dc6..7c0da9effe4e925275ec593114acc0752b2cf8ee 100644 (file)
@@ -991,9 +991,9 @@ struct dsa_switch_ops {
         * Port's MAC EEE settings
         */
        int     (*set_mac_eee)(struct dsa_switch *ds, int port,
-                              struct ethtool_eee *e);
+                              struct ethtool_keee *e);
        int     (*get_mac_eee)(struct dsa_switch *ds, int port,
-                              struct ethtool_eee *e);
+                              struct ethtool_keee *e);
 
        /* EEPROM access */
        int     (*get_eeprom_len)(struct dsa_switch *ds);
index b15e71cc342c7963c9c88951d5e058314dd15575..e03da3a4ac38065f9b9f1dd40455c0f470f03773 100644 (file)
@@ -1222,7 +1222,7 @@ static int dsa_user_set_wol(struct net_device *dev, struct ethtool_wolinfo *w)
        return ret;
 }
 
-static int dsa_user_set_eee(struct net_device *dev, struct ethtool_eee *e)
+static int dsa_user_set_eee(struct net_device *dev, struct ethtool_keee *e)
 {
        struct dsa_port *dp = dsa_user_to_port(dev);
        struct dsa_switch *ds = dp->ds;
@@ -1242,7 +1242,7 @@ static int dsa_user_set_eee(struct net_device *dev, struct ethtool_eee *e)
        return phylink_ethtool_set_eee(dp->pl, e);
 }
 
-static int dsa_user_get_eee(struct net_device *dev, struct ethtool_eee *e)
+static int dsa_user_get_eee(struct net_device *dev, struct ethtool_keee *e)
 {
        struct dsa_port *dp = dsa_user_to_port(dev);
        struct dsa_switch *ds = dp->ds;
index 2853394d06a899a33603b552552b1417dab221e5..21b0e845a531b411cfe57c03e22420d44fcf7ca3 100644 (file)
@@ -5,7 +5,7 @@
 #include "bitset.h"
 
 #define EEE_MODES_COUNT \
-       (sizeof_field(struct ethtool_eee, supported) * BITS_PER_BYTE)
+       (sizeof_field(struct ethtool_keee, supported) * BITS_PER_BYTE)
 
 struct eee_req_info {
        struct ethnl_req_info           base;
@@ -13,7 +13,7 @@ struct eee_req_info {
 
 struct eee_reply_data {
        struct ethnl_reply_data         base;
-       struct ethtool_eee              eee;
+       struct ethtool_keee             eee;
 };
 
 #define EEE_REPDATA(__reply_base) \
@@ -48,7 +48,7 @@ static int eee_reply_size(const struct ethnl_req_info *req_base,
 {
        bool compact = req_base->flags & ETHTOOL_FLAG_COMPACT_BITSETS;
        const struct eee_reply_data *data = EEE_REPDATA(reply_base);
-       const struct ethtool_eee *eee = &data->eee;
+       const struct ethtool_keee *eee = &data->eee;
        int len = 0;
        int ret;
 
@@ -84,7 +84,7 @@ static int eee_fill_reply(struct sk_buff *skb,
 {
        bool compact = req_base->flags & ETHTOOL_FLAG_COMPACT_BITSETS;
        const struct eee_reply_data *data = EEE_REPDATA(reply_base);
-       const struct ethtool_eee *eee = &data->eee;
+       const struct ethtool_keee *eee = &data->eee;
        int ret;
 
        ret = ethnl_put_bitset32(skb, ETHTOOL_A_EEE_MODES_OURS,
@@ -132,7 +132,7 @@ ethnl_set_eee(struct ethnl_req_info *req_info, struct genl_info *info)
 {
        struct net_device *dev = req_info->dev;
        struct nlattr **tb = info->attrs;
-       struct ethtool_eee eee = {};
+       struct ethtool_keee eee = {};
        bool mod = false;
        int ret;
 
index 7519b0818b913a494e81de3980f577e6deb902d0..b02ca72f438e58005e49d248f696989859cf8cb7 100644 (file)
@@ -1510,13 +1510,13 @@ static int ethtool_set_wol(struct net_device *dev, char __user *useraddr)
 
 static int ethtool_get_eee(struct net_device *dev, char __user *useraddr)
 {
-       struct ethtool_eee edata;
+       struct ethtool_keee edata;
        int rc;
 
        if (!dev->ethtool_ops->get_eee)
                return -EOPNOTSUPP;
 
-       memset(&edata, 0, sizeof(struct ethtool_eee));
+       memset(&edata, 0, sizeof(struct ethtool_keee));
        edata.cmd = ETHTOOL_GEEE;
        rc = dev->ethtool_ops->get_eee(dev, &edata);
 
@@ -1531,7 +1531,7 @@ static int ethtool_get_eee(struct net_device *dev, char __user *useraddr)
 
 static int ethtool_set_eee(struct net_device *dev, char __user *useraddr)
 {
-       struct ethtool_eee edata;
+       struct ethtool_keee edata;
        int ret;
 
        if (!dev->ethtool_ops->set_eee)