OSDN Git Service

igc: Refactor igc_ptp_set_timestamp_mode()
authorAndre Guedes <andre.guedes@intel.com>
Thu, 4 Jun 2020 00:01:04 +0000 (17:01 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 30 Jun 2020 01:21:35 +0000 (18:21 -0700)
commit3df7fd799b1d70a7d3afeee12784f208b47e97a7
tree8973697544921850342fd3aa7876d03000424915
parent3b44d4c10c798d7d20c46e5364959558b6b2f73b
igc: Refactor igc_ptp_set_timestamp_mode()

Current igc_ptp_set_timestamp_mode() logic is a bit tangled since it
handles many different hardware configurations in one single place,
making it harder to follow. This patch untangles that code by breaking
it into helper functions.

Quick note about the hw->mac.type check which was removed in this
refactoring: this check it not really needed since igc_i225 is the only
type supported by the IGC driver.

Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igc/igc_ptp.c