]> git.itanic.dy.fi Git - linux-stable/commit
net: phylink: Generate caps and convert to linkmodes separately
authorSean Anderson <sean.anderson@seco.com>
Tue, 20 Sep 2022 22:12:30 +0000 (18:12 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Sep 2022 10:55:35 +0000 (11:55 +0100)
commit3e6eab8f3ef93cd78cd4b67f497ef6035eb073ad
tree0718280ec13c9d0df85dc105ab3a8d9b954af435
parent606116529ab2d12e93bf751f74ed50a621b46846
net: phylink: Generate caps and convert to linkmodes separately

If we call phylink_caps_to_linkmodes directly from
phylink_get_linkmodes, it is difficult to re-use this functionality in
MAC drivers. This is because MAC drivers must then work with an ethtool
linkmode bitmap, instead of with mac capabilities. Instead, let the
caller of phylink_get_linkmodes do the conversion. To reflect this
change, rename the function to phylink_get_capabilities.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c
include/linux/phylink.h