ice: Refactor PR ethtool ops
authorWojciech Drewek <wojciech.drewek@intel.com>
Fri, 8 Oct 2021 08:44:03 +0000 (10:44 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 19 Oct 2021 17:53:27 +0000 (10:53 -0700)
commit3f13f570ff2c413dbdf088058a3e019db376f49d
tree77a876e4b2eb369f8a98917fceaa80ee41ba5ae6
parent73b483b7902918cd7de3481313ed4943eb9c3f3b
ice: Refactor PR ethtool ops

This patch improves a few things:

- it fixes issue where ethtool -i reports that PR supports
  priv-flags and tests when in fact it does not support them
- instead of using the same functions for both PF and PR ethtool ops,
  this patch introduces separate ops for both cases and internal
  functions with core logic.
- prevent accessing VF VSI while VF is not ready by calling
  ice_check_vf_ready_for_cfg
- all PR specific functions in ethtool.c were moved to one place in
  file
- instead overwriting n_priv_flags in ice_repr_get_drvinfo,
  priv-flags code was moved from __ice_get_drvinfo to ice_get_drvinfo

Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_ethtool.c