net: 3com: typhoon: fix typhoon_get_link_ksettings
Subsystems (3)
PATCH 1/1 net: 3com: typhoon: fix typhoon_get_link_ksettings
When moving from typhoon_get_settings to typhoon_getlink_ksettings in the commit commit f7a5537cd2a5 ("net: 3com: typhoon: use new api ethtool_{get|set}_link_ksettings"), we use a local variable supported but we forgot to update the struct ethtool_link_ksettings with this value.
We also initialize advertising to zero, because otherwise it may be uninitialized if no case of the switch (tp->xcvr_select) is used.
--- drivers/net/ethernet/3com/typhoon.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/net/ethernet/3com/typhoon.c +6 -1
@@ -1000,7 +1000,7 @@ enum state_values { struct ethtool_link_ksettings *cmd) {struct typhoon *tp =netdev_priv (dev); -u32 supported, advertising; +u32 supported, advertising =0 ; supported = SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | SUPPORTED_Autoneg;
@@ -1049,6 +1049,11 @@ enum state_values {else cmd->base.autoneg =AUTONEG_DISABLE ; +ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, + supported); +ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, + advertising); +return 0 ; }
Signature · 1 line
1.7.4.4
Hello.
Quoted 2 lines · Philippe Reynes
When moving from
typhoon_get_settingstotyphoon_getlink_ksettingsin the commit commitf7a5537cd2a5("net: 3com: typhoon: use new api
One "commit" is enough. :-)
Quoted 8 lines
ethtool_{get|set}_link_ksettings"), we use a local variable supported but we forgot to update the struct
ethtool_link_ksettingswith this value.We also initialize advertising to zero, because otherwise it may be uninitialized if no case of the switch (
tp->xcvr_select) is used.Signed-off-by Philippe Reynes <[email protected]>
[...]
MBR, Sergei