net: phylink: add separate pcs operations structure
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 30 Mar 2020 17:44:55 +0000 (18:44 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Mar 2020 18:52:27 +0000 (11:52 -0700)
commit4c0d6d3a7a81fcd2dcb4abf15fe2e13074cf8619
tree66247c20e215aae9c50572d235daa230fe9e1f86
parente7765d634aaa9dd5db3cb59155269ef6c18d4592
net: phylink: add separate pcs operations structure

Add a separate set of PCS operations, which MAC drivers can use to
couple phylink with their associated MAC PCS layer.  The PCS
operations include:

- pcs_get_state() - reads the link up/down, resolved speed, duplex
   and pause from the PCS.
- pcs_config() - configures the PCS for the specified mode, PHY
   interface type, and setting the advertisement.
- pcs_an_restart() - restarts 802.3 in-band negotiation with the
   link partner
- pcs_link_up() - informs the PCS that link has come up, and the
   parameters of the link. Link parameters are used to program the
   PCS for fixed speed and non-inband modes.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c
include/linux/phylink.h