OSDN Git Service

igc: Change byte order in struct igc_nfc_filter
authorAndre Guedes <andre.guedes@intel.com>
Fri, 24 Apr 2020 20:16:11 +0000 (13:16 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 21 May 2020 23:19:28 +0000 (16:19 -0700)
commitc983e3271923c96cd5f90de0b580f1b210f7f8b6
tree89667c3da96275b92264a25b9335a531dcc42d94
parent97700bc86d068442ee19ca6d31fc0a600cdbd672
igc: Change byte order in struct igc_nfc_filter

Every time we access the 'etype' and 'vlan_tci' fields from struct
igc_nfc_filter to enable or disable filters in hardware we have to
convert them from big endian to host order so it makes more sense to
simply have these fields in host order.

The byte order conversion should take place in igc_ethtool_get_nfc_
rule() and igc_ethtool_add_nfc_rule(), which are called by .get_rxnfc
and .set_rxnfc ethtool ops, since ethtool subsystem is the one who deals
with them in big endian order.

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.h
drivers/net/ethernet/intel/igc/igc_ethtool.c