X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fmii.h;h=beddc6d3b0f668e2f8af2ecfb2ef6a13062656a0;hb=ee7b9e3706b9c5f90113eb16a1a84a1c01e09f95;hp=9b8d0476988ad3bb1aa9bfeeae74b9d8b1a6f57f;hpb=d7f6884ae0ae6e406ec3500fcde16e8f51642460;p=linux-2.6 diff --git a/include/linux/mii.h b/include/linux/mii.h index 9b8d047698..beddc6d3b0 100644 --- a/include/linux/mii.h +++ b/include/linux/mii.h @@ -9,7 +9,6 @@ #define __LINUX_MII_H__ #include -#include /* Generic MII registers. */ @@ -136,6 +135,20 @@ #define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */ #define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */ +/* This structure is used in all SIOCxMIIxxx ioctl calls */ +struct mii_ioctl_data { + __u16 phy_id; + __u16 reg_num; + __u16 val_in; + __u16 val_out; +}; + +#ifdef __KERNEL__ + +#include + +struct ethtool_cmd; + struct mii_if_info { int phy_id; int advertising; @@ -151,13 +164,11 @@ struct mii_if_info { void (*mdio_write) (struct net_device *dev, int phy_id, int location, int val); }; -struct ethtool_cmd; -struct mii_ioctl_data; - extern int mii_link_ok (struct mii_if_info *mii); extern int mii_nway_restart (struct mii_if_info *mii); extern int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd); extern int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd); +extern int mii_check_gmii_support(struct mii_if_info *mii); extern void mii_check_link (struct mii_if_info *mii); extern unsigned int mii_check_media (struct mii_if_info *mii, unsigned int ok_to_print, @@ -167,16 +178,6 @@ extern int generic_mii_ioctl(struct mii_if_info *mii_if, unsigned int *duplex_changed); - -/* This structure is used in all SIOCxMIIxxx ioctl calls */ -struct mii_ioctl_data { - u16 phy_id; - u16 reg_num; - u16 val_in; - u16 val_out; -}; - - static inline struct mii_ioctl_data *if_mii(struct ifreq *rq) { return (struct mii_ioctl_data *) &rq->ifr_ifru; @@ -234,5 +235,5 @@ static inline unsigned int mii_duplex (unsigned int duplex_lock, return 0; } - +#endif /* __KERNEL__ */ #endif /* __LINUX_MII_H__ */