OSDN Git Service

net: xpcs: add support for retrieving supported interface modes
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 26 Jan 2022 10:25:55 +0000 (10:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Jan 2022 11:20:37 +0000 (11:20 +0000)
commitbe6ec5b7026620b931e0fa9287d24ad2cd2ab9b6
tree1bac086e5fa55151df980b32b11f958377cd0e76
parent3cade91d0e1817e7cf62943525c7b6fe15ff8f1b
net: xpcs: add support for retrieving supported interface modes

Add a function to the xpcs driver to retrieve the supported PHY
interface modes, which can be used by drivers to fill in phylink's
supported_interfaces mask.

We validate the interface bit index to ensure that it fits within the
bitmap as xpcs lists PHY_INTERFACE_MODE_MAX in an entry.

Tested-by: Wong Vee Khee <vee.khee.wong@linux.intel.com> # Intel EHL Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/pcs/pcs-xpcs.c
include/linux/pcs/pcs-xpcs.h