aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igc/igc_base.c
diff options
context:
space:
mode:
authorSasha Neftin <sasha.neftin@intel.com>2019-01-13 04:22:31 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2019-02-05 20:05:35 -0500
commit439c71f7d2ca07cb5bc3ee0686f1e8a3de45b9cd (patch)
tree78395b4c49fb8901319919f5b11afdc01da703f6 /drivers/net/ethernet/intel/igc/igc_base.c
parent55fdbeaa2db8b271db767240fba24a60bd232528 (diff)
igc: Remove unneeded code
Remove the 'igc_get_link_up_info_base method' from igc_base.c file. Use the 'igc_get_speed_and_duplex_copper' method directly and reduce the code redundancy. Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc_base.c')
-rw-r--r--drivers/net/ethernet/intel/igc/igc_base.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc_base.c b/drivers/net/ethernet/intel/igc/igc_base.c
index 19ff987922d2..a31ec1682090 100644
--- a/drivers/net/ethernet/intel/igc/igc_base.c
+++ b/drivers/net/ethernet/intel/igc/igc_base.c
@@ -334,26 +334,6 @@ static void igc_release_phy_base(struct igc_hw *hw)
334} 334}
335 335
336/** 336/**
337 * igc_get_link_up_info_base - Get link speed/duplex info
338 * @hw: pointer to the HW structure
339 * @speed: stores the current speed
340 * @duplex: stores the current duplex
341 *
342 * This is a wrapper function, if using the serial gigabit media independent
343 * interface, use PCS to retrieve the link speed and duplex information.
344 * Otherwise, use the generic function to get the link speed and duplex info.
345 */
346static s32 igc_get_link_up_info_base(struct igc_hw *hw, u16 *speed,
347 u16 *duplex)
348{
349 s32 ret_val;
350
351 ret_val = igc_get_speed_and_duplex_copper(hw, speed, duplex);
352
353 return ret_val;
354}
355
356/**
357 * igc_init_hw_base - Initialize hardware 337 * igc_init_hw_base - Initialize hardware
358 * @hw: pointer to the HW structure 338 * @hw: pointer to the HW structure
359 * 339 *
@@ -499,7 +479,7 @@ static struct igc_mac_operations igc_mac_ops_base = {
499 .check_for_link = igc_check_for_copper_link, 479 .check_for_link = igc_check_for_copper_link,
500 .rar_set = igc_rar_set, 480 .rar_set = igc_rar_set,
501 .read_mac_addr = igc_read_mac_addr_base, 481 .read_mac_addr = igc_read_mac_addr_base,
502 .get_speed_and_duplex = igc_get_link_up_info_base, 482 .get_speed_and_duplex = igc_get_speed_and_duplex_copper,
503}; 483};
504 484
505static const struct igc_phy_operations igc_phy_ops_base = { 485static const struct igc_phy_operations igc_phy_ops_base = {