OSDN Git Service

net: phylink: add generic validate implementation
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 15 Nov 2021 10:00:27 +0000 (10:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Nov 2021 14:31:00 +0000 (14:31 +0000)
commit34ae2c09d46a2d0abd907e139b466f798e4095a8
tree3f0348fcaa1c46c3c2c7071c6d938f109ec6d788
parent5cf46d8e741f3876222f11b0a0bcbdcddfd8754e
net: phylink: add generic validate implementation

Add a generic validate() implementation using the supported_interfaces
and a bitmask of MAC pause/speed/duplex capabilities. This allows us
to entirely eliminate many driver private validate() implementations.

We expose the underlying phylink_get_linkmodes() function so that
drivers which have special needs can still benefit from conversion.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c
include/linux/phylink.h