From: Florian Fainelli Date: Thu, 26 Mar 2009 09:28:24 +0000 (+0000) Subject: move the mii_ioctl to generic patches, fixes (#1802) X-Git-Tag: reboot~24082 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fc432e4371272ec2d33accbbba6604199e7d0858;p=oweals%2Fopenwrt.git move the mii_ioctl to generic patches, fixes (#1802) SVN-Revision: 15045 --- diff --git a/target/linux/brcm-2.4/patches/120-mii_ioctl.patch b/target/linux/brcm-2.4/patches/120-mii_ioctl.patch deleted file mode 100644 index 9c74a58bac..0000000000 --- a/target/linux/brcm-2.4/patches/120-mii_ioctl.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff -urN linux-2.4.35.4/include/linux/mii.h linux-2.4.35.4.new/include/linux/mii.h ---- linux-2.4.35.4/include/linux/mii.h 2007-11-17 18:23:15.000000000 +0100 -+++ linux-2.4.35.4.new/include/linux/mii.h 2009-03-15 17:32:45.000000000 +0100 -@@ -9,7 +9,6 @@ - #define __LINUX_MII_H__ - - #include --#include - - /* Generic MII registers. */ - -@@ -104,6 +103,19 @@ - #define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */ - #define NWAYTEST_RESV2 0xfe00 /* Unused... */ - -+/* 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; -@@ -119,9 +131,6 @@ - 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); -@@ -136,15 +145,6 @@ - - - --/* 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; -@@ -202,5 +202,5 @@ - return 0; - } - -- -+#endif /* __KERNEL__ */ - #endif /* __LINUX_MII_H__ */ diff --git a/target/linux/generic-2.4/patches/803-mii_ioctl.patch b/target/linux/generic-2.4/patches/803-mii_ioctl.patch new file mode 100644 index 0000000000..9c74a58bac --- /dev/null +++ b/target/linux/generic-2.4/patches/803-mii_ioctl.patch @@ -0,0 +1,64 @@ +diff -urN linux-2.4.35.4/include/linux/mii.h linux-2.4.35.4.new/include/linux/mii.h +--- linux-2.4.35.4/include/linux/mii.h 2007-11-17 18:23:15.000000000 +0100 ++++ linux-2.4.35.4.new/include/linux/mii.h 2009-03-15 17:32:45.000000000 +0100 +@@ -9,7 +9,6 @@ + #define __LINUX_MII_H__ + + #include +-#include + + /* Generic MII registers. */ + +@@ -104,6 +103,19 @@ + #define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */ + #define NWAYTEST_RESV2 0xfe00 /* Unused... */ + ++/* 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; +@@ -119,9 +131,6 @@ + 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); +@@ -136,15 +145,6 @@ + + + +-/* 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; +@@ -202,5 +202,5 @@ + return 0; + } + +- ++#endif /* __KERNEL__ */ + #endif /* __LINUX_MII_H__ */