提交 faa6ce60 编写于 作者: T Tim Harvey 提交者: Tom Rini

net: fix phy_string_for_interface

commit ffb0f6f4 ("treewide: Rename PHY_INTERFACE_MODE_NONE to
PHY_INTERFACE_MODE_NA") broke the phy_string_for_interface function.
Fix it.

Fixes ffb0f6f4 ("treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA")
Signed-off-by: NTim Harvey <tharvey@gateworks.com>
Cc: Marek Behún <marek.behun@nic.cz>
Cc: Stefan Roese <sr@denx.de>
Cc: Ramon Fried <rfried.dev@gmail.com>
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: NStefan Roese <sr@denx.de>
Reviewed-by: NMarek Behún <marek.behun@nic.cz>
Reviewed-by: NRamon Fried <rfried.dev@gmail.com>
上级 c1abf765
......@@ -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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册