diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2006-04-28 20:53:47 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-04-28 20:53:47 -0400 |
commit | c3ce7e203af5d8eab7c3390fc991a1fcb152f741 (patch) | |
tree | 43b0837c42a1deb5b0f87800bf6a5ed8eea2eafe /include/linux/mii.h | |
parent | 56142536868a2be34f261ed8fdca1610f8a73fbd (diff) |
Sanitise ethtool.h and mii.h for userspace.
They shouldn't be using 'u32' et al in structures which are used for
communication with userspace. Switch to the proper types (__u32 etc).
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include/linux/mii.h')
-rw-r--r-- | include/linux/mii.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/include/linux/mii.h b/include/linux/mii.h index 68f5a0f392dd..beddc6d3b0f6 100644 --- a/include/linux/mii.h +++ b/include/linux/mii.h | |||
@@ -9,7 +9,6 @@ | |||
9 | #define __LINUX_MII_H__ | 9 | #define __LINUX_MII_H__ |
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/if.h> | ||
13 | 12 | ||
14 | /* Generic MII registers. */ | 13 | /* Generic MII registers. */ |
15 | 14 | ||
@@ -136,6 +135,20 @@ | |||
136 | #define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */ | 135 | #define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */ |
137 | #define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */ | 136 | #define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */ |
138 | 137 | ||
138 | /* This structure is used in all SIOCxMIIxxx ioctl calls */ | ||
139 | struct mii_ioctl_data { | ||
140 | __u16 phy_id; | ||
141 | __u16 reg_num; | ||
142 | __u16 val_in; | ||
143 | __u16 val_out; | ||
144 | }; | ||
145 | |||
146 | #ifdef __KERNEL__ | ||
147 | |||
148 | #include <linux/if.h> | ||
149 | |||
150 | struct ethtool_cmd; | ||
151 | |||
139 | struct mii_if_info { | 152 | struct mii_if_info { |
140 | int phy_id; | 153 | int phy_id; |
141 | int advertising; | 154 | int advertising; |
@@ -151,9 +164,6 @@ struct mii_if_info { | |||
151 | void (*mdio_write) (struct net_device *dev, int phy_id, int location, int val); | 164 | void (*mdio_write) (struct net_device *dev, int phy_id, int location, int val); |
152 | }; | 165 | }; |
153 | 166 | ||
154 | struct ethtool_cmd; | ||
155 | struct mii_ioctl_data; | ||
156 | |||
157 | extern int mii_link_ok (struct mii_if_info *mii); | 167 | extern int mii_link_ok (struct mii_if_info *mii); |
158 | extern int mii_nway_restart (struct mii_if_info *mii); | 168 | extern int mii_nway_restart (struct mii_if_info *mii); |
159 | extern int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd); | 169 | extern int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd); |
@@ -168,16 +178,6 @@ extern int generic_mii_ioctl(struct mii_if_info *mii_if, | |||
168 | unsigned int *duplex_changed); | 178 | unsigned int *duplex_changed); |
169 | 179 | ||
170 | 180 | ||
171 | |||
172 | /* This structure is used in all SIOCxMIIxxx ioctl calls */ | ||
173 | struct mii_ioctl_data { | ||
174 | u16 phy_id; | ||
175 | u16 reg_num; | ||
176 | u16 val_in; | ||
177 | u16 val_out; | ||
178 | }; | ||
179 | |||
180 | |||
181 | static inline struct mii_ioctl_data *if_mii(struct ifreq *rq) | 181 | static inline struct mii_ioctl_data *if_mii(struct ifreq *rq) |
182 | { | 182 | { |
183 | return (struct mii_ioctl_data *) &rq->ifr_ifru; | 183 | return (struct mii_ioctl_data *) &rq->ifr_ifru; |
@@ -235,5 +235,5 @@ static inline unsigned int mii_duplex (unsigned int duplex_lock, | |||
235 | return 0; | 235 | return 0; |
236 | } | 236 | } |
237 | 237 | ||
238 | 238 | #endif /* __KERNEL__ */ | |
239 | #endif /* __LINUX_MII_H__ */ | 239 | #endif /* __LINUX_MII_H__ */ |