]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit50f9ea5a4a1f018a5f1c39681c85c7138d3f44bf
tree8973697544921850342fd3aa7876d03000424915
parentcce2e40aa4d2d43e634f25ec9fe608e5a0232bf9
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