Skip to content
Commit 09005c2f authored by Nishanth Menon's avatar Nishanth Menon Committed by Tom Rini
Browse files

net: phy: Make phy_interface_is_rgmii a switch statement



Recent commit 75d28899 ("net: phy: Synchronize PHY interface modes
with Linux") reordered the enum definitions. This exposed a problem
in range checking functions to identify the interface type. Though
this specific api wasn't impacted (all the RGMII definitions remained
within range), this experience should be used to never to have to face
this kind of challenge again.

While it is possible for the phy drivers to use the enums directly,
drivers such as dp83867, dp83869, marvell, micrel_ksz90x1 etc use this
api.

Reported-by: default avatarTom Rini <trini@konsulko.com>
Reviewed-by: default avatarMarek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: default avatarMarek Behún <kabel@kernel.org>
Signed-off-by: default avatarNishanth Menon <nm@ti.com>
Reviewed-by: default avatarRamon Fried <rfried.dev@gmail.com>
parent f1a63f71
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment