From: Matthieu CASTET Date: Thu, 1 Dec 2005 07:35:26 +0000 (-0500) Subject: [wireless airo] reset card in init X-Git-Tag: v2.6.15-rc5~20^2~2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1d97f384486a697ed227ef4609a26f18a8ea9a11;p=linux-2.6-omap-h63xx.git [wireless airo] reset card in init without this patch after an rmmod, modprobe the card won't work anymore until the next reboot. This patch seem safe to apply for all cards as the bsd driver already do that. I had to add a timeout because strange things happen (issuecommand will fail) if the card is already reseted (after a reboot). PS : it seems there are missing reset when leaving monitor mode... Signed-off-by: Matthieu CASTET --- diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 340ab4ee4b6..7a92b1cbd6a 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -2755,8 +2755,8 @@ static struct net_device *_init_airo_card( unsigned short irq, int port, SET_NETDEV_DEV(dev, dmdev); - if (test_bit(FLAG_MPI,&ai->flags)) - reset_card (dev, 1); + reset_card (dev, 1); + msleep(400); rc = request_irq( dev->irq, airo_interrupt, SA_SHIRQ, dev->name, dev ); if (rc) {