summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIoana Ciornei <ioana.ciornei@nxp.com>2022-06-02 12:11:11 +0300
committerXiaobo Xie <xiaobo.xie@nxp.com>2022-06-06 08:27:41 +0200
commite4c8a0d1040834bc566c404d23956e786493ef31 (patch)
treed5474a320c089911fc8916e1a213dbe5d3bd3791 /drivers
parent6951b6e60ca1f35295c36c4eb309c07d82edfa88 (diff)
net: phylink: treat PHY_INTERFACE_MODE_2500SGMII in phylink_get_linkmodes
There is a downstream patch which adds a new interface type - PHY_INTERFACE_MODE_2500SGMII (which is really the same one as PHY_INTERFACE_MODE_2500BASEX). We backported from upstream the following phylink patch which, of course, does not treat the PHY_INTERFACE_MODE_2500SGMII interface mode in a switch case statement. 34ae2c09d46a ("net: phylink: add generic validate implementation") Because of this, we get the following build warning. drivers/net/phy/phylink.c: In function ‘phylink_get_linkmodes’: drivers/net/phy/phylink.c:322:2: warning: enumeration value ‘PHY_INTERFACE_MODE_2500SGMII’ not handled in switch [-Wswitch] 322 | switch (interface) { | ^~~~~~ Fix it by treating the new interface mode in the switch-case statement. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/phylink.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index a208626652c8..0a0f457dc494 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -356,6 +356,7 @@ void phylink_get_linkmodes(unsigned long *linkmodes, phy_interface_t interface,
break;
case PHY_INTERFACE_MODE_2500BASEX:
+ case PHY_INTERFACE_MODE_2500SGMII:
caps |= MAC_2500FD;
break;