net/ice/base: add helper functions for PHY caching
Add additional functions to aide in caching PHY
configuration. In order to cache the initial modes,
we need to determine the operating mode based on
capabilities. Add helper functions for flow control
and FEC to take a set of capabilities and return the
operating mode matching those capabilities. Also add
a helper function to determine whether a PHY capability
matches a PHY configuration.
Introduce a mask for valid link speeds and unwrap
ice_copy_caps_to_cfg() for more builds so that we can utilize
it in more places.
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>