]> git.baikalelectronics.ru Git - kernel.git/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)
commitc3c3a4df2e03e0f4e6ced332d474337ad098a8b8
tree0718280ec13c9d0df85dc105ab3a8d9b954af435
parent88230122f323281a45b2acabdd199abb62628681
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