summaryrefslogtreecommitdiff
path: root/include/linux/phylink.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2017-12-01 10:24:26 +0000
committerDavid S. Miller <davem@davemloft.net>2017-12-05 11:16:18 -0500
commit86a362c49f3c0ba72f2e9217c704e10959c54bec (patch)
tree0832439d2d96175fcc7e9d5f7427570b909b7494 /include/linux/phylink.h
parentcf4f267534e29c53cfdd92d8811168d5d34af80f (diff)
phylink: get rid of separate Cisco SGMII and 802.3z modes
Since the handling of SGMII and 802.3z is now the same, combine the MLO_AN_xxx constants into a single MLO_AN_INBAND, and use the PHY interface mode to distinguish between Cisco SGMII and 802.3z. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phylink.h')
-rw-r--r--include/linux/phylink.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/include/linux/phylink.h b/include/linux/phylink.h
index af67edd4ae38..cab22ad3bd6f 100644
--- a/include/linux/phylink.h
+++ b/include/linux/phylink.h
@@ -20,13 +20,12 @@ enum {
MLO_AN_PHY = 0, /* Conventional PHY */
MLO_AN_FIXED, /* Fixed-link mode */
- MLO_AN_SGMII, /* Cisco SGMII protocol */
- MLO_AN_8023Z, /* 1000base-X protocol */
+ MLO_AN_INBAND, /* In-band protocol */
};
static inline bool phylink_autoneg_inband(unsigned int mode)
{
- return mode == MLO_AN_SGMII || mode == MLO_AN_8023Z;
+ return mode == MLO_AN_INBAND;
}
struct phylink_link_state {
@@ -69,7 +68,7 @@ struct phylink_mac_ops {
/**
* mac_config: configure the MAC for the selected mode and state
* @ndev: net_device structure for the MAC
- * @mode: one of MLO_AN_FIXED, MLO_AN_PHY, MLO_AN_8023Z, MLO_AN_SGMII
+ * @mode: one of MLO_AN_FIXED, MLO_AN_PHY, MLO_AN_INBAND
* @state: state structure
*
* The action performed depends on the currently selected mode:
@@ -77,14 +76,10 @@ struct phylink_mac_ops {
* %MLO_AN_FIXED, %MLO_AN_PHY:
* set the specified speed, duplex, pause mode, and phy interface
* mode in the provided @state.
- * %MLO_AN_8023Z:
- * place the link in 1000base-X mode, advertising the parameters
- * given in advertising in @state.
- * %MLO_AN_SGMII:
- * place the link in Cisco SGMII mode - there is no advertisment
- * to make as the PHY communicates the speed and duplex to the
- * MAC over the in-band control word. Configuration of the pause
- * mode is as per MLO_AN_PHY since this is not included.
+ * %MLO_AN_INBAND:
+ * place the link in an inband negotiation mode (such as
+ * 1000base-X or Cisco SGMII mode depending on the phy interface
+ * mode), advertising the parameters given in advertising in @state.
*/
void (*mac_config)(struct net_device *ndev, unsigned int mode,
const struct phylink_link_state *state);