net/ice/base: add helper functions for PHY caching
authorQi Zhang <qi.z.zhang@intel.com>
Thu, 29 Aug 2019 02:36:05 +0000 (10:36 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:53 +0000 (15:00 +0200)
commitd13ad9cf1721cc84b4507c5e4ce96001155b9f4a
tree0430bda1b89a28bdea745dc8172cd8782e038802
parenta175216fbaecd461f755e39ea23c7929649d797e
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>
drivers/net/ice/base/ice_adminq_cmd.h
drivers/net/ice/base/ice_common.c
drivers/net/ice/base/ice_common.h