return 0;
 }
 
+static void i40e_eee_capability_to_kedata_supported(__le16 eee_capability_,
+                                                   unsigned long *supported)
+{
+       const int eee_capability = le16_to_cpu(eee_capability_);
+       static const int lut[] = {
+               ETHTOOL_LINK_MODE_100baseT_Full_BIT,
+               ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
+               ETHTOOL_LINK_MODE_10000baseT_Full_BIT,
+               ETHTOOL_LINK_MODE_1000baseKX_Full_BIT,
+               ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT,
+               ETHTOOL_LINK_MODE_10000baseKR_Full_BIT,
+               ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT,
+       };
+
+       linkmode_zero(supported);
+       for (unsigned int i = ARRAY_SIZE(lut); i--; )
+               if (eee_capability & BIT(i + 1))
+                       linkmode_set_bit(lut[i], supported);
+}
+
 static int i40e_get_eee(struct net_device *netdev, struct ethtool_keee *edata)
 {
        struct i40e_netdev_priv *np = netdev_priv(netdev);
        struct i40e_vsi *vsi = np->vsi;
        struct i40e_pf *pf = vsi->back;
        struct i40e_hw *hw = &pf->hw;
-       int status = 0;
+       int status;
 
        /* Get initial PHY capabilities */
        status = i40e_aq_get_phy_capabilities(hw, false, true, &phy_cfg, NULL);
        if (phy_cfg.eee_capability == 0)
                return -EOPNOTSUPP;
 
+       i40e_eee_capability_to_kedata_supported(phy_cfg.eee_capability,
+                                               edata->supported);
+       linkmode_copy(edata->lp_advertised, edata->supported);
+
        /* Get current configuration */
        status = i40e_aq_get_phy_capabilities(hw, false, false, &phy_cfg, NULL);
        if (status)
                return -EAGAIN;
 
+       linkmode_zero(edata->advertised);
+       if (phy_cfg.eee_capability)
+               linkmode_copy(edata->advertised, edata->supported);
        edata->eee_enabled = !!phy_cfg.eee_capability;
        edata->tx_lpi_enabled = pf->stats.tx_lpi_status;
 
        struct i40e_vsi *vsi = np->vsi;
        struct i40e_pf *pf = vsi->back;
        struct i40e_ethtool_not_used {
-               u32 value;
+               bool value;
                const char *name;
        } param[] = {
-               {edata->tx_lpi_timer, "tx-timer"},
+               {!!(edata->advertised[0] & ~edata->supported[0]), "advertise"},
+               {!!edata->tx_lpi_timer, "tx-timer"},
                {edata->tx_lpi_enabled != pf->stats.tx_lpi_status, "tx-lpi"}
        };
        int i;
        struct i40e_pf *pf = vsi->back;
        struct i40e_hw *hw = &pf->hw;
        __le16 eee_capability;
-       int status = 0;
+       int status;
 
        /* Deny parameters we don't support */
        if (i40e_is_eee_param_supported(netdev, edata))
 
 }
 #endif /* CONFIG_I40E_DCB */
 
+static void i40e_print_link_message_eee(struct i40e_vsi *vsi,
+                                       const char *speed, const char *fc)
+{
+       struct ethtool_keee kedata;
+
+       memzero_explicit(&kedata, sizeof(kedata));
+       if (vsi->netdev->ethtool_ops->get_eee)
+               vsi->netdev->ethtool_ops->get_eee(vsi->netdev, &kedata);
+
+       if (!linkmode_empty(kedata.supported))
+               netdev_info(vsi->netdev,
+                           "NIC Link is Up, %sbps Full Duplex, Flow Control: %s, EEE: %s\n",
+                           speed, fc,
+                           kedata.eee_enabled ? "Enabled" : "Disabled");
+       else
+               netdev_info(vsi->netdev,
+                           "NIC Link is Up, %sbps Full Duplex, Flow Control: %s\n",
+                           speed, fc);
+}
+
 /**
  * i40e_print_link_message - print link up or down
  * @vsi: the VSI for which link needs a message
                            "NIC Link is Up, %sbps Full Duplex, Requested FEC: %s, Negotiated FEC: %s, Autoneg: %s, Flow Control: %s\n",
                            speed, req_fec, fec, an, fc);
        } else {
-               netdev_info(vsi->netdev,
-                           "NIC Link is Up, %sbps Full Duplex, Flow Control: %s\n",
-                           speed, fc);
+               i40e_print_link_message_eee(vsi, speed, fc);
        }
 
 }