diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 11:34:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 11:34:36 -0500 |
commit | a7c243b544c0e9f6775c2607decaa59d54fb9e11 (patch) | |
tree | 86fdb4d2d6cef932af7497f28827e7d52b29e48c /arch | |
parent | 7df446e7e043b2ba5fd5de42529f9d797e8b501a (diff) | |
parent | f406db8cba6bbce42b96490e6d31bdec229ad994 (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/drivers/net_kern.c | 38 | ||||
-rw-r--r-- | arch/xtensa/platform-iss/network.c | 33 |
2 files changed, 11 insertions, 60 deletions
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index fe865d9a3721..4cf31a2ae19c 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -243,34 +243,18 @@ static int uml_net_change_mtu(struct net_device *dev, int new_mtu) | |||
243 | return err; | 243 | return err; |
244 | } | 244 | } |
245 | 245 | ||
246 | static int uml_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | 246 | static void uml_net_get_drvinfo(struct net_device *dev, |
247 | { | 247 | struct ethtool_drvinfo *info) |
248 | static const struct ethtool_drvinfo info = { | 248 | { |
249 | .cmd = ETHTOOL_GDRVINFO, | 249 | strcpy(info->driver, DRIVER_NAME); |
250 | .driver = DRIVER_NAME, | 250 | strcpy(info->version, "42"); |
251 | .version = "42", | ||
252 | }; | ||
253 | void *useraddr; | ||
254 | u32 ethcmd; | ||
255 | |||
256 | switch (cmd) { | ||
257 | case SIOCETHTOOL: | ||
258 | useraddr = ifr->ifr_data; | ||
259 | if (copy_from_user(ðcmd, useraddr, sizeof(ethcmd))) | ||
260 | return -EFAULT; | ||
261 | switch (ethcmd) { | ||
262 | case ETHTOOL_GDRVINFO: | ||
263 | if (copy_to_user(useraddr, &info, sizeof(info))) | ||
264 | return -EFAULT; | ||
265 | return 0; | ||
266 | default: | ||
267 | return -EOPNOTSUPP; | ||
268 | } | ||
269 | default: | ||
270 | return -EINVAL; | ||
271 | } | ||
272 | } | 251 | } |
273 | 252 | ||
253 | static struct ethtool_ops uml_net_ethtool_ops = { | ||
254 | .get_drvinfo = uml_net_get_drvinfo, | ||
255 | .get_link = ethtool_op_get_link, | ||
256 | }; | ||
257 | |||
274 | void uml_net_user_timer_expire(unsigned long _conn) | 258 | void uml_net_user_timer_expire(unsigned long _conn) |
275 | { | 259 | { |
276 | #ifdef undef | 260 | #ifdef undef |
@@ -359,7 +343,7 @@ static int eth_configure(int n, void *init, char *mac, | |||
359 | dev->tx_timeout = uml_net_tx_timeout; | 343 | dev->tx_timeout = uml_net_tx_timeout; |
360 | dev->set_mac_address = uml_net_set_mac; | 344 | dev->set_mac_address = uml_net_set_mac; |
361 | dev->change_mtu = uml_net_change_mtu; | 345 | dev->change_mtu = uml_net_change_mtu; |
362 | dev->do_ioctl = uml_net_ioctl; | 346 | dev->ethtool_ops = ¨_net_ethtool_ops; |
363 | dev->watchdog_timeo = (HZ >> 1); | 347 | dev->watchdog_timeo = (HZ >> 1); |
364 | dev->irq = UM_ETH_IRQ; | 348 | dev->irq = UM_ETH_IRQ; |
365 | 349 | ||
diff --git a/arch/xtensa/platform-iss/network.c b/arch/xtensa/platform-iss/network.c index 0682ffd38175..96b9bb4a478d 100644 --- a/arch/xtensa/platform-iss/network.c +++ b/arch/xtensa/platform-iss/network.c | |||
@@ -611,38 +611,6 @@ static int iss_net_change_mtu(struct net_device *dev, int new_mtu) | |||
611 | return -EINVAL; | 611 | return -EINVAL; |
612 | } | 612 | } |
613 | 613 | ||
614 | static int iss_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | ||
615 | { | ||
616 | #if 0 | ||
617 | static const struct ethtool_drvinfo info = { | ||
618 | .cmd = ETHTOOL_GDRVINFO, | ||
619 | .driver = DRIVER_NAME, | ||
620 | .version = "42", | ||
621 | }; | ||
622 | void *useraddr; | ||
623 | u32 ethcmd; | ||
624 | |||
625 | switch (cmd) { | ||
626 | case SIOCETHTOOL: | ||
627 | useraddr = ifr->ifr_data; | ||
628 | if (copy_from_user(ðcmd, useraddr, sizeof(ethcmd))) | ||
629 | return -EFAULT; | ||
630 | |||
631 | switch (ethcmd) { | ||
632 | case ETHTOOL_GDRVINFO: | ||
633 | if (copy_to_user(useraddr, &info, sizeof(info))) | ||
634 | return -EFAULT; | ||
635 | return 0; | ||
636 | default: | ||
637 | return -EOPNOTSUPP; | ||
638 | } | ||
639 | default: | ||
640 | return -EINVAL; | ||
641 | } | ||
642 | #endif | ||
643 | return -EINVAL; | ||
644 | } | ||
645 | |||
646 | void iss_net_user_timer_expire(unsigned long _conn) | 614 | void iss_net_user_timer_expire(unsigned long _conn) |
647 | { | 615 | { |
648 | } | 616 | } |
@@ -730,7 +698,6 @@ static int iss_net_configure(int index, char *init) | |||
730 | dev->tx_timeout = iss_net_tx_timeout; | 698 | dev->tx_timeout = iss_net_tx_timeout; |
731 | dev->set_mac_address = iss_net_set_mac; | 699 | dev->set_mac_address = iss_net_set_mac; |
732 | dev->change_mtu = iss_net_change_mtu; | 700 | dev->change_mtu = iss_net_change_mtu; |
733 | dev->do_ioctl = iss_net_ioctl; | ||
734 | dev->watchdog_timeo = (HZ >> 1); | 701 | dev->watchdog_timeo = (HZ >> 1); |
735 | dev->irq = -1; | 702 | dev->irq = -1; |
736 | 703 | ||