diff options
Diffstat (limited to 'include/linux/mdio.h')
-rw-r--r-- | include/linux/mdio.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/mdio.h b/include/linux/mdio.h index b1494aced217..ec90da7232cc 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h | |||
@@ -273,6 +273,8 @@ static inline __u16 mdio_phy_id_c45(int prtad, int devad) | |||
273 | return MDIO_PHY_ID_C45 | (prtad << 5) | devad; | 273 | return MDIO_PHY_ID_C45 | (prtad << 5) | devad; |
274 | } | 274 | } |
275 | 275 | ||
276 | #ifdef __KERNEL__ | ||
277 | |||
276 | static inline bool mdio_phy_id_is_c45(int phy_id) | 278 | static inline bool mdio_phy_id_is_c45(int phy_id) |
277 | { | 279 | { |
278 | return (phy_id & MDIO_PHY_ID_C45) && !(phy_id & ~MDIO_PHY_ID_C45_MASK); | 280 | return (phy_id & MDIO_PHY_ID_C45) && !(phy_id & ~MDIO_PHY_ID_C45_MASK); |
@@ -288,11 +290,6 @@ static inline __u16 mdio_phy_id_devad(int phy_id) | |||
288 | return phy_id & MDIO_PHY_ID_DEVAD; | 290 | return phy_id & MDIO_PHY_ID_DEVAD; |
289 | } | 291 | } |
290 | 292 | ||
291 | #define MDIO_SUPPORTS_C22 1 | ||
292 | #define MDIO_SUPPORTS_C45 2 | ||
293 | |||
294 | #ifdef __KERNEL__ | ||
295 | |||
296 | /** | 293 | /** |
297 | * struct mdio_if_info - Ethernet controller MDIO interface | 294 | * struct mdio_if_info - Ethernet controller MDIO interface |
298 | * @prtad: PRTAD of the PHY (%MDIO_PRTAD_NONE if not present/unknown) | 295 | * @prtad: PRTAD of the PHY (%MDIO_PRTAD_NONE if not present/unknown) |
@@ -321,6 +318,8 @@ struct mdio_if_info { | |||
321 | 318 | ||
322 | #define MDIO_PRTAD_NONE (-1) | 319 | #define MDIO_PRTAD_NONE (-1) |
323 | #define MDIO_DEVAD_NONE (-1) | 320 | #define MDIO_DEVAD_NONE (-1) |
321 | #define MDIO_SUPPORTS_C22 1 | ||
322 | #define MDIO_SUPPORTS_C45 2 | ||
324 | #define MDIO_EMULATE_C22 4 | 323 | #define MDIO_EMULATE_C22 4 |
325 | 324 | ||
326 | struct ethtool_cmd; | 325 | struct ethtool_cmd; |