diff options
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_cs.c')
| -rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 40 | 
1 files changed, 15 insertions, 25 deletions
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index bd8a4134ede..b6ec51923b2 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c @@ -1,7 +1,6 @@  #define PRISM2_PCCARD  #include <linux/module.h> -#include <linux/init.h>  #include <linux/if.h>  #include <linux/slab.h>  #include <linux/wait.h> @@ -518,22 +517,21 @@ static int prism2_config(struct pcmcia_device *link)  	hw_priv->link = link;  	/* -	 * Make sure the IRQ handler cannot proceed until at least -	 * dev->base_addr is initialized. +	 * We enable IRQ here, but IRQ handler will not proceed +	 * until dev->base_addr is set below. This protect us from +	 * receive interrupts when driver is not initialized.  	 */ -	spin_lock_irqsave(&local->irq_init_lock, flags); -  	ret = pcmcia_request_irq(link, prism2_interrupt);  	if (ret) -		goto failed_unlock; +		goto failed;  	ret = pcmcia_enable_device(link);  	if (ret) -		goto failed_unlock; +		goto failed; +	spin_lock_irqsave(&local->irq_init_lock, flags);  	dev->irq = link->irq;  	dev->base_addr = link->resource[0]->start; -  	spin_unlock_irqrestore(&local->irq_init_lock, flags);  	local->shutdown = 0; @@ -546,8 +544,6 @@ static int prism2_config(struct pcmcia_device *link)  	return ret; - failed_unlock: -	spin_unlock_irqrestore(&local->irq_init_lock, flags);   failed:  	kfree(hw_priv);  	prism2_release((u_long)link); @@ -623,7 +619,7 @@ static int hostap_cs_resume(struct pcmcia_device *link)  	return 0;  } -static struct pcmcia_device_id hostap_cs_ids[] = { +static const struct pcmcia_device_id hostap_cs_ids[] = {  	PCMCIA_DEVICE_MANF_CARD(0x000b, 0x7100),  	PCMCIA_DEVICE_MANF_CARD(0x000b, 0x7300),  	PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0777), @@ -651,12 +647,17 @@ static struct pcmcia_device_id hostap_cs_ids[] = {  					 0x74c5e40d),  	PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0x0156, 0x0002, "Intersil",  					 0x4b801a17), +	PCMCIA_DEVICE_MANF_CARD_PROD_ID3(0x0156, 0x0002, "Version 01.02", +					 0x4b74baa0),  	PCMCIA_MFC_DEVICE_PROD_ID12(0, "SanDisk", "ConnectPlus",  				    0x7a954bd9, 0x74be00c6),  	PCMCIA_DEVICE_PROD_ID123(  		"Addtron", "AWP-100 Wireless PCMCIA", "Version 01.02",  		0xe6ec52ce, 0x08649af2, 0x4b74baa0),  	PCMCIA_DEVICE_PROD_ID123( +		"Canon", "Wireless LAN CF Card K30225", "Version 01.00", +		0x96ef6fe2, 0x263fcbab, 0xa57adb8c), +	PCMCIA_DEVICE_PROD_ID123(  		"D", "Link DWL-650 11Mbps WLAN Card", "Version 01.02",  		0x71b18589, 0xb6f1b0ab, 0x4b74baa0),  	PCMCIA_DEVICE_PROD_ID123( @@ -676,6 +677,8 @@ static struct pcmcia_device_id hostap_cs_ids[] = {  	PCMCIA_DEVICE_PROD_ID12(  		"ZoomAir 11Mbps High", "Rate wireless Networking",  		0x273fe3db, 0x32a1eaee), +	PCMCIA_DEVICE_PROD_ID12("NETGEAR MA401 Wireless PC", "Card", +		0xa37434e9, 0x9762e8f1),  	PCMCIA_DEVICE_PROD_ID123(  		"Pretec", "CompactWLAN Card 802.11b", "2.5",  		0x1cadd3e5, 0xe697636c, 0x7a5bfcf1), @@ -707,17 +710,4 @@ static struct pcmcia_driver hostap_driver = {  	.suspend	= hostap_cs_suspend,  	.resume		= hostap_cs_resume,  }; - -static int __init init_prism2_pccard(void) -{ -	return pcmcia_register_driver(&hostap_driver); -} - -static void __exit exit_prism2_pccard(void) -{ -	pcmcia_unregister_driver(&hostap_driver); -} - - -module_init(init_prism2_pccard); -module_exit(exit_prism2_pccard); +module_pcmcia_driver(hostap_driver);  | 
