diff options
author | Ben Dooks <ben-netdev@fluff.org> | 2005-07-23 12:29:38 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-18 16:59:14 -0400 |
commit | 2ae2d77cfa424587014cb34a89eed0ff2149fd5c (patch) | |
tree | db587b806019155a84b7e1411f398863c5fdf81f /drivers | |
parent | 9ef9ac51cc5fa5f5811230b5fb242536b636ff47 (diff) |
[PATCH] DM9000 - incorrect ioctl() handling
The DM9000 driver is responding to ioctl() calls it should not be. This
can cause problems with the wireless tools incorrectly indentifying the
device as wireless capable, and crashing under certain operations.
This patch also moves the version printk() to the init call, so that
you only get it once for multiple devices, and to show it is loaded
if there are no defined dm9000s
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/dm9000.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 1d92ddd1ec35..6440a892bb81 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c | |||
@@ -152,7 +152,6 @@ static int dm9000_probe(struct device *); | |||
152 | static int dm9000_open(struct net_device *); | 152 | static int dm9000_open(struct net_device *); |
153 | static int dm9000_start_xmit(struct sk_buff *, struct net_device *); | 153 | static int dm9000_start_xmit(struct sk_buff *, struct net_device *); |
154 | static int dm9000_stop(struct net_device *); | 154 | static int dm9000_stop(struct net_device *); |
155 | static int dm9000_do_ioctl(struct net_device *, struct ifreq *, int); | ||
156 | 155 | ||
157 | 156 | ||
158 | static void dm9000_timer(unsigned long); | 157 | static void dm9000_timer(unsigned long); |
@@ -391,8 +390,6 @@ dm9000_probe(struct device *dev) | |||
391 | int i; | 390 | int i; |
392 | u32 id_val; | 391 | u32 id_val; |
393 | 392 | ||
394 | printk(KERN_INFO "%s Ethernet Driver\n", CARDNAME); | ||
395 | |||
396 | /* Init network device */ | 393 | /* Init network device */ |
397 | ndev = alloc_etherdev(sizeof (struct board_info)); | 394 | ndev = alloc_etherdev(sizeof (struct board_info)); |
398 | if (!ndev) { | 395 | if (!ndev) { |
@@ -547,7 +544,6 @@ dm9000_probe(struct device *dev) | |||
547 | ndev->stop = &dm9000_stop; | 544 | ndev->stop = &dm9000_stop; |
548 | ndev->get_stats = &dm9000_get_stats; | 545 | ndev->get_stats = &dm9000_get_stats; |
549 | ndev->set_multicast_list = &dm9000_hash_table; | 546 | ndev->set_multicast_list = &dm9000_hash_table; |
550 | ndev->do_ioctl = &dm9000_do_ioctl; | ||
551 | 547 | ||
552 | #ifdef DM9000_PROGRAM_EEPROM | 548 | #ifdef DM9000_PROGRAM_EEPROM |
553 | program_eeprom(db); | 549 | program_eeprom(db); |
@@ -851,15 +847,6 @@ dm9000_get_stats(struct net_device *dev) | |||
851 | return &db->stats; | 847 | return &db->stats; |
852 | } | 848 | } |
853 | 849 | ||
854 | /* | ||
855 | * Process the upper socket ioctl command | ||
856 | */ | ||
857 | static int | ||
858 | dm9000_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | ||
859 | { | ||
860 | PRINTK1("entering %s\n",__FUNCTION__); | ||
861 | return 0; | ||
862 | } | ||
863 | 850 | ||
864 | /* | 851 | /* |
865 | * A periodic timer routine | 852 | * A periodic timer routine |
@@ -1213,6 +1200,8 @@ static struct device_driver dm9000_driver = { | |||
1213 | static int __init | 1200 | static int __init |
1214 | dm9000_init(void) | 1201 | dm9000_init(void) |
1215 | { | 1202 | { |
1203 | printk(KERN_INFO "%s Ethernet Driver\n", CARDNAME); | ||
1204 | |||
1216 | return driver_register(&dm9000_driver); /* search board and register */ | 1205 | return driver_register(&dm9000_driver); /* search board and register */ |
1217 | } | 1206 | } |
1218 | 1207 | ||