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 <[EMAIL PROTECTED]> | dm9000-ioctl-print.patch | | Files affected: | drivers/net/dm9000.c | 15 2 + 13 - 0 ! | 1 files changed, 2 insertions(+), 13 deletions(-) | | Ben Dooks, Wed, 20 Jul 2005 01:13:47 +0100 --- linux-2.6.13-rc3-bjd1/drivers/net/dm9000.c 2005-07-20 00:23:50.000000000 +0100 +++ linux-2.6.13-rc3-bjd2/drivers/net/dm9000.c 2005-07-20 00:32:14.000000000 +0100 @@ -152,7 +152,6 @@ static int dm9000_open(struct net_device *); static int dm9000_start_xmit(struct sk_buff *, struct net_device *); static int dm9000_stop(struct net_device *); -static int dm9000_do_ioctl(struct net_device *, struct ifreq *, int); static void dm9000_timer(unsigned long); @@ -391,8 +390,6 @@ int i; u32 id_val; - printk(KERN_INFO "%s Ethernet Driver\n", CARDNAME); - /* Init network device */ ndev = alloc_etherdev(sizeof (struct board_info)); if (!ndev) { @@ -547,7 +544,6 @@ ndev->stop = &dm9000_stop; ndev->get_stats = &dm9000_get_stats; ndev->set_multicast_list = &dm9000_hash_table; - ndev->do_ioctl = &dm9000_do_ioctl; #ifdef DM9000_PROGRAM_EEPROM program_eeprom(db); @@ -851,15 +847,6 @@ return &db->stats; } -/* - * Process the upper socket ioctl command - */ -static int -dm9000_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) -{ - PRINTK1("entering %s\n",__FUNCTION__); - return 0; -} /* * A periodic timer routine @@ -1213,6 +1200,8 @@ static int __init dm9000_init(void) { + printk(KERN_INFO "%s Ethernet Driver\n", CARDNAME); + return driver_register(&dm9000_driver); /* search board and register */ }
| dm9000-ioctl-print.patch | | Files affected: | drivers/net/dm9000.c | 15 2 + 13 - 0 ! | 1 files changed, 2 insertions(+), 13 deletions(-) | | Ben Dooks, Wed, 20 Jul 2005 01:13:47 +0100 --- linux-2.6.13-rc3-bjd1/drivers/net/dm9000.c 2005-07-20 00:23:50.000000000 +0100 +++ linux-2.6.13-rc3-bjd2/drivers/net/dm9000.c 2005-07-20 00:32:14.000000000 +0100 @@ -152,7 +152,6 @@ static int dm9000_open(struct net_device *); static int dm9000_start_xmit(struct sk_buff *, struct net_device *); static int dm9000_stop(struct net_device *); -static int dm9000_do_ioctl(struct net_device *, struct ifreq *, int); static void dm9000_timer(unsigned long); @@ -391,8 +390,6 @@ int i; u32 id_val; - printk(KERN_INFO "%s Ethernet Driver\n", CARDNAME); - /* Init network device */ ndev = alloc_etherdev(sizeof (struct board_info)); if (!ndev) { @@ -547,7 +544,6 @@ ndev->stop = &dm9000_stop; ndev->get_stats = &dm9000_get_stats; ndev->set_multicast_list = &dm9000_hash_table; - ndev->do_ioctl = &dm9000_do_ioctl; #ifdef DM9000_PROGRAM_EEPROM program_eeprom(db); @@ -851,15 +847,6 @@ return &db->stats; } -/* - * Process the upper socket ioctl command - */ -static int -dm9000_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) -{ - PRINTK1("entering %s\n",__FUNCTION__); - return 0; -} /* * A periodic timer routine @@ -1213,6 +1200,8 @@ static int __init dm9000_init(void) { + printk(KERN_INFO "%s Ethernet Driver\n", CARDNAME); + return driver_register(&dm9000_driver); /* search board and register */ }