patch-2.4.18 linux/include/linux/mii.h
Next file: linux/include/linux/netdevice.h
Previous file: linux/include/linux/limits.h
Back to the patch index
Back to the overall index
- Lines: 37
- Date:
Mon Jan 14 17:27:24 2002
- Orig file:
linux.orig/include/linux/mii.h
- Orig date:
Mon Feb 18 20:18:40 2002
diff -Naur -X /home/marcelo/lib/dontdiff linux.orig/include/linux/mii.h linux/include/linux/mii.h
@@ -70,6 +70,8 @@
#define ADVERTISE_LPACK 0x4000 /* Ack link partners response */
#define ADVERTISE_NPAGE 0x8000 /* Next page bit */
+#define ADVERTISE_FULL (ADVERTISE_100FULL | ADVERTISE_10FULL | \
+ ADVERTISE_CSMA)
#define ADVERTISE_ALL (ADVERTISE_10HALF | ADVERTISE_10FULL | \
ADVERTISE_100HALF | ADVERTISE_100FULL)
@@ -100,6 +102,27 @@
#define NWAYTEST_RESV1 0x00ff /* Unused... */
#define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */
#define NWAYTEST_RESV2 0xfe00 /* Unused... */
+
+
+struct mii_if_info {
+ int phy_id;
+ int advertising;
+
+ unsigned int full_duplex : 1;
+ unsigned int duplex_lock : 1;
+
+ struct net_device *dev;
+ int (*mdio_read) (struct net_device *dev, int phy_id, int location);
+ void (*mdio_write) (struct net_device *dev, int phy_id, int location, int val);
+};
+
+struct ethtool_cmd;
+
+int mii_link_ok (struct mii_if_info *mii);
+int mii_nway_restart (struct mii_if_info *mii);
+int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd);
+int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd);
+
/* This structure is used in all SIOCxMIIxxx ioctl calls */
struct mii_ioctl_data {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)