7 #ifndef __LINUX_MII_H__
8 #define __LINUX_MII_H__
38 unsigned int ok_to_print,
39 unsigned int init_media);
42 unsigned int *duplex_changed);
64 static inline unsigned int mii_nway_result (
unsigned int negotiated)
91 static inline unsigned int mii_duplex (
unsigned int duplex_lock,
92 unsigned int negotiated)
109 static inline u32 ethtool_adv_to_mii_adv_t(
u32 ethadv)
136 static inline u32 mii_adv_to_ethtool_adv_t(
u32 adv)
164 static inline u32 ethtool_adv_to_mii_ctrl1000_t(
u32 ethadv)
184 static inline u32 mii_ctrl1000_to_ethtool_adv_t(
u32 adv)
204 static inline u32 mii_lpa_to_ethtool_lpa_t(
u32 lpa)
211 return result | mii_adv_to_ethtool_adv_t(lpa);
222 static inline u32 mii_stat1000_to_ethtool_lpa_t(
u32 lpa)
242 static inline u32 ethtool_adv_to_mii_adv_x(
u32 ethadv)
246 if (ethadv & ADVERTISED_1000baseT_Half)
250 if (ethadv & ADVERTISED_Pause)
266 static inline u32 mii_adv_to_ethtool_adv_x(
u32 adv)
290 static inline u32 mii_lpa_to_ethtool_lpa_x(
u32 lpa)
297 return result | mii_adv_to_ethtool_adv_x(lpa);
304 static inline u16 mii_advertise_flowctrl(
int cap)
323 static inline u8 mii_resolve_flowctrl_fdx(
u16 lcladv,
u16 rmtadv)
327 if (lcladv & rmtadv & ADVERTISE_PAUSE_CAP) {
330 if (lcladv & ADVERTISE_PAUSE_CAP)
332 else if (rmtadv & ADVERTISE_PAUSE_CAP)