[v2,2/2] ena: Fix settings/advertising for ethtool

Message ID 20180515180155.19164-2-jeffrey.t.kirsher@intel.com
State Rejected
Delegated to: Jeff Kirsher
Headers show
Series
  • [v2,1/2] ethtool: stop the line wrapping madness
Related show

Commit Message

Jeff Kirsher May 15, 2018, 6:01 p.m.
It appears that the Amazon Ethernet driver was setting bits in the
'settings' field twice.  Almost certainly this was supposed to set bits in
the 'advertising' field instead.

CC: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/amazon/ena/ena_ethtool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Brown, Aaron F May 17, 2018, 11:07 p.m. | #1
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On
> Behalf Of Jeff Kirsher
> Sent: Tuesday, May 15, 2018 11:02 AM
> To: intel-wired-lan@lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH v2 2/2] ena: Fix settings/advertising for
> ethtool
> 
> It appears that the Amazon Ethernet driver was setting bits in the
> 'settings' field twice.  Almost certainly this was supposed to set bits in
> the 'advertising' field instead.
> 
> CC: Mitch Williams <mitch.a.williams@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>  drivers/net/ethernet/amazon/ena/ena_ethtool.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

Patch

diff --git a/drivers/net/ethernet/amazon/ena/ena_ethtool.c b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
index 0a4de911e6cc..2f5e4cf84934 100644
--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c
+++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
@@ -283,7 +283,7 @@  static int ena_get_link_ksettings(struct net_device *netdev,
 
 	if (link->flags & ENA_ADMIN_GET_FEATURE_LINK_DESC_AUTONEG_MASK) {
 		ethtool_ks_add_mode(link_ksettings, supported, Autoneg);
-		ethtool_ks_add_mode(link_ksettings, supported, Autoneg);
+		ethtool_ks_add_mode(link_ksettings, advertising, Autoneg);
 	}
 
 	link_ksettings->base.autoneg =