summaryrefslogtreecommitdiff
path: root/include/phy_interface.h
diff options
context:
space:
mode:
authorTim Harvey <[email protected]>2022-05-10 15:49:10 -0700
committerTom Rini <[email protected]>2022-05-23 13:52:02 -0400
commitfaa6ce6061a03617785310ccbc5436a56cce4ab4 (patch)
treefba72973e7f91d3375c42c5e854dc0c90cf1583f /include/phy_interface.h
parentc1abf7659c9b29874d9d718df6890de1638cedba (diff)
net: fix phy_string_for_interface
commit ffb0f6f488b9 ("treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA") broke the phy_string_for_interface function. Fix it. Fixes ffb0f6f488b9 ("treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA") Signed-off-by: Tim Harvey <[email protected]> Cc: Marek BehĂșn <[email protected]> Cc: Stefan Roese <[email protected]> Cc: Ramon Fried <[email protected]> Cc: Vladimir Oltean <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Reviewed-by: Marek BehĂșn <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
Diffstat (limited to 'include/phy_interface.h')
-rw-r--r--include/phy_interface.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/phy_interface.h b/include/phy_interface.h
index ce3b5004ec2..fed3357b9a2 100644
--- a/include/phy_interface.h
+++ b/include/phy_interface.h
@@ -85,7 +85,7 @@ static const char * const backplane_mode_strings[] = {
static inline const char *phy_string_for_interface(phy_interface_t i)
{
/* Default to unknown */
- if (i > PHY_INTERFACE_MODE_NA)
+ if (i >= PHY_INTERFACE_MODE_MAX)
i = PHY_INTERFACE_MODE_NA;
return phy_interface_strings[i];