aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/wireless/hostap
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/wireless/hostap')
-rw-r--r--drivers/net/wireless/hostap/Kconfig3
-rw-r--r--drivers/net/wireless/hostap/hostap_80211_rx.c1
-rw-r--r--drivers/net/wireless/hostap/hostap_80211_tx.c2
-rw-r--r--drivers/net/wireless/hostap/hostap_ap.c1
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c69
-rw-r--r--drivers/net/wireless/hostap/hostap_hw.c9
-rw-r--r--drivers/net/wireless/hostap/hostap_info.c1
-rw-r--r--drivers/net/wireless/hostap/hostap_ioctl.c1
-rw-r--r--drivers/net/wireless/hostap/hostap_pci.c3
-rw-r--r--drivers/net/wireless/hostap/hostap_plx.c3
10 files changed, 37 insertions, 56 deletions
diff --git a/drivers/net/wireless/hostap/Kconfig b/drivers/net/wireless/hostap/Kconfig
index c15db2293515..287d82728bc3 100644
--- a/drivers/net/wireless/hostap/Kconfig
+++ b/drivers/net/wireless/hostap/Kconfig
@@ -1,7 +1,8 @@
1config HOSTAP 1config HOSTAP
2 tristate "IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP)" 2 tristate "IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP)"
3 depends on WLAN_80211
4 select WIRELESS_EXT 3 select WIRELESS_EXT
4 select WEXT_SPY
5 select WEXT_PRIV
5 select CRYPTO 6 select CRYPTO
6 select CRYPTO_ARC4 7 select CRYPTO_ARC4
7 select CRYPTO_ECB 8 select CRYPTO_ECB
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c
index 3816df96a663..f4c56121d387 100644
--- a/drivers/net/wireless/hostap/hostap_80211_rx.c
+++ b/drivers/net/wireless/hostap/hostap_80211_rx.c
@@ -1,4 +1,5 @@
1#include <linux/etherdevice.h> 1#include <linux/etherdevice.h>
2#include <linux/slab.h>
2#include <net/lib80211.h> 3#include <net/lib80211.h>
3#include <linux/if_arp.h> 4#include <linux/if_arp.h>
4 5
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c
index 90108b698f11..c34a3b7f1292 100644
--- a/drivers/net/wireless/hostap/hostap_80211_tx.c
+++ b/drivers/net/wireless/hostap/hostap_80211_tx.c
@@ -1,3 +1,5 @@
1#include <linux/slab.h>
2
1#include "hostap_80211.h" 3#include "hostap_80211.h"
2#include "hostap_common.h" 4#include "hostap_common.h"
3#include "hostap_wlan.h" 5#include "hostap_wlan.h"
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c
index a2a203c90ba3..7e72ac1de49b 100644
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -20,6 +20,7 @@
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/random.h> 21#include <linux/random.h>
22#include <linux/if_arp.h> 22#include <linux/if_arp.h>
23#include <linux/slab.h>
23 24
24#include "hostap_wlan.h" 25#include "hostap_wlan.h"
25#include "hostap.h" 26#include "hostap.h"
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index ad8eab4a639b..a36501dbbe02 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -3,6 +3,7 @@
3#include <linux/module.h> 3#include <linux/module.h>
4#include <linux/init.h> 4#include <linux/init.h>
5#include <linux/if.h> 5#include <linux/if.h>
6#include <linux/slab.h>
6#include <linux/wait.h> 7#include <linux/wait.h>
7#include <linux/timer.h> 8#include <linux/timer.h>
8#include <linux/skbuff.h> 9#include <linux/skbuff.h>
@@ -274,9 +275,6 @@ static int sandisk_enable_wireless(struct net_device *dev)
274 conf_reg_t reg; 275 conf_reg_t reg;
275 struct hostap_interface *iface = netdev_priv(dev); 276 struct hostap_interface *iface = netdev_priv(dev);
276 local_info_t *local = iface->local; 277 local_info_t *local = iface->local;
277 tuple_t tuple;
278 cisparse_t *parse = NULL;
279 u_char buf[64];
280 struct hostap_cs_priv *hw_priv = local->hw_priv; 278 struct hostap_cs_priv *hw_priv = local->hw_priv;
281 279
282 if (hw_priv->link->io.NumPorts1 < 0x42) { 280 if (hw_priv->link->io.NumPorts1 < 0x42) {
@@ -285,28 +283,13 @@ static int sandisk_enable_wireless(struct net_device *dev)
285 goto done; 283 goto done;
286 } 284 }
287 285
288 parse = kmalloc(sizeof(cisparse_t), GFP_KERNEL);
289 if (parse == NULL) {
290 ret = -ENOMEM;
291 goto done;
292 }
293
294 tuple.Attributes = TUPLE_RETURN_COMMON;
295 tuple.TupleData = buf;
296 tuple.TupleDataMax = sizeof(buf);
297 tuple.TupleOffset = 0;
298
299 if (hw_priv->link->manf_id != 0xd601 || hw_priv->link->card_id != 0x0101) { 286 if (hw_priv->link->manf_id != 0xd601 || hw_priv->link->card_id != 0x0101) {
300 /* No SanDisk manfid found */ 287 /* No SanDisk manfid found */
301 ret = -ENODEV; 288 ret = -ENODEV;
302 goto done; 289 goto done;
303 } 290 }
304 291
305 tuple.DesiredTuple = CISTPL_LONGLINK_MFC; 292 if (hw_priv->link->socket->functions < 2) {
306 if (pcmcia_get_first_tuple(hw_priv->link, &tuple) ||
307 pcmcia_get_tuple_data(hw_priv->link, &tuple) ||
308 pcmcia_parse_tuple(&tuple, parse) ||
309 parse->longlink_mfc.nfn < 2) {
310 /* No multi-function links found */ 293 /* No multi-function links found */
311 ret = -ENODEV; 294 ret = -ENODEV;
312 goto done; 295 goto done;
@@ -354,7 +337,6 @@ static int sandisk_enable_wireless(struct net_device *dev)
354 udelay(10); 337 udelay(10);
355 338
356done: 339done:
357 kfree(parse);
358 return ret; 340 return ret;
359} 341}
360 342
@@ -529,10 +511,6 @@ static void prism2_detach(struct pcmcia_device *link)
529} 511}
530 512
531 513
532#define CS_CHECK(fn, ret) \
533do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
534
535
536/* run after a CARD_INSERTION event is received to configure the PCMCIA 514/* run after a CARD_INSERTION event is received to configure the PCMCIA
537 * socket and make the device available to the system */ 515 * socket and make the device available to the system */
538 516
@@ -624,7 +602,6 @@ static int prism2_config(struct pcmcia_device *link)
624 struct hostap_interface *iface; 602 struct hostap_interface *iface;
625 local_info_t *local; 603 local_info_t *local;
626 int ret = 1; 604 int ret = 1;
627 int last_fn, last_ret;
628 struct hostap_cs_priv *hw_priv; 605 struct hostap_cs_priv *hw_priv;
629 606
630 PDEBUG(DEBUG_FLOW, "prism2_config()\n"); 607 PDEBUG(DEBUG_FLOW, "prism2_config()\n");
@@ -636,19 +613,18 @@ static int prism2_config(struct pcmcia_device *link)
636 } 613 }
637 614
638 /* Look for an appropriate configuration table entry in the CIS */ 615 /* Look for an appropriate configuration table entry in the CIS */
639 last_ret = pcmcia_loop_config(link, prism2_config_check, NULL); 616 ret = pcmcia_loop_config(link, prism2_config_check, NULL);
640 if (last_ret) { 617 if (ret) {
641 if (!ignore_cis_vcc) 618 if (!ignore_cis_vcc)
642 printk(KERN_ERR "GetNextTuple(): No matching " 619 printk(KERN_ERR "GetNextTuple(): No matching "
643 "CIS configuration. Maybe you need the " 620 "CIS configuration. Maybe you need the "
644 "ignore_cis_vcc=1 parameter.\n"); 621 "ignore_cis_vcc=1 parameter.\n");
645 cs_error(link, RequestIO, last_ret);
646 goto failed; 622 goto failed;
647 } 623 }
648 624
649 /* Need to allocate net_device before requesting IRQ handler */ 625 /* Need to allocate net_device before requesting IRQ handler */
650 dev = prism2_init_local_data(&prism2_pccard_funcs, 0, 626 dev = prism2_init_local_data(&prism2_pccard_funcs, 0,
651 &handle_to_dev(link)); 627 &link->dev);
652 if (dev == NULL) 628 if (dev == NULL)
653 goto failed; 629 goto failed;
654 link->priv = dev; 630 link->priv = dev;
@@ -666,13 +642,11 @@ static int prism2_config(struct pcmcia_device *link)
666 * irq structure is initialized. 642 * irq structure is initialized.
667 */ 643 */
668 if (link->conf.Attributes & CONF_ENABLE_IRQ) { 644 if (link->conf.Attributes & CONF_ENABLE_IRQ) {
669 link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | 645 link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
670 IRQ_HANDLE_PRESENT;
671 link->irq.IRQInfo1 = IRQ_LEVEL_ID;
672 link->irq.Handler = prism2_interrupt; 646 link->irq.Handler = prism2_interrupt;
673 link->irq.Instance = dev; 647 ret = pcmcia_request_irq(link, &link->irq);
674 CS_CHECK(RequestIRQ, 648 if (ret)
675 pcmcia_request_irq(link, &link->irq)); 649 goto failed;
676 } 650 }
677 651
678 /* 652 /*
@@ -680,8 +654,9 @@ static int prism2_config(struct pcmcia_device *link)
680 * the I/O windows and the interrupt mapping, and putting the 654 * the I/O windows and the interrupt mapping, and putting the
681 * card and host interface into "Memory and IO" mode. 655 * card and host interface into "Memory and IO" mode.
682 */ 656 */
683 CS_CHECK(RequestConfiguration, 657 ret = pcmcia_request_configuration(link, &link->conf);
684 pcmcia_request_configuration(link, &link->conf)); 658 if (ret)
659 goto failed;
685 660
686 dev->irq = link->irq.AssignedIRQ; 661 dev->irq = link->irq.AssignedIRQ;
687 dev->base_addr = link->io.BasePort1; 662 dev->base_addr = link->io.BasePort1;
@@ -714,9 +689,6 @@ static int prism2_config(struct pcmcia_device *link)
714 } 689 }
715 return ret; 690 return ret;
716 691
717 cs_failed:
718 cs_error(link, last_fn, last_ret);
719
720 failed: 692 failed:
721 kfree(hw_priv); 693 kfree(hw_priv);
722 prism2_release((u_long)link); 694 prism2_release((u_long)link);
@@ -823,13 +795,6 @@ static struct pcmcia_device_id hostap_cs_ids[] = {
823 PCMCIA_MFC_DEVICE_PROD_ID12(0, "SanDisk", "ConnectPlus", 795 PCMCIA_MFC_DEVICE_PROD_ID12(0, "SanDisk", "ConnectPlus",
824 0x7a954bd9, 0x74be00c6), 796 0x7a954bd9, 0x74be00c6),
825 PCMCIA_DEVICE_PROD_ID123( 797 PCMCIA_DEVICE_PROD_ID123(
826 "Intersil", "PRISM 2_5 PCMCIA ADAPTER", "ISL37300P",
827 0x4b801a17, 0x6345a0bf, 0xc9049a39),
828 /* D-Link DWL-650 Rev. P1; manfid 0x000b, 0x7110 */
829 PCMCIA_DEVICE_PROD_ID123(
830 "D-Link", "DWL-650 Wireless PC Card RevP", "ISL37101P-10",
831 0x1a424a1c, 0x6ea57632, 0xdd97a26b),
832 PCMCIA_DEVICE_PROD_ID123(
833 "Addtron", "AWP-100 Wireless PCMCIA", "Version 01.02", 798 "Addtron", "AWP-100 Wireless PCMCIA", "Version 01.02",
834 0xe6ec52ce, 0x08649af2, 0x4b74baa0), 799 0xe6ec52ce, 0x08649af2, 0x4b74baa0),
835 PCMCIA_DEVICE_PROD_ID123( 800 PCMCIA_DEVICE_PROD_ID123(
@@ -863,14 +828,12 @@ static struct pcmcia_device_id hostap_cs_ids[] = {
863 "Ver. 1.00", 828 "Ver. 1.00",
864 0x5cd01705, 0x4271660f, 0x9d08ee12), 829 0x5cd01705, 0x4271660f, 0x9d08ee12),
865 PCMCIA_DEVICE_PROD_ID123( 830 PCMCIA_DEVICE_PROD_ID123(
866 "corega", "WL PCCL-11", "ISL37300P",
867 0xa21501a, 0x59868926, 0xc9049a39),
868 PCMCIA_DEVICE_PROD_ID123(
869 "The Linksys Group, Inc.", "Wireless Network CF Card", "ISL37300P",
870 0xa5f472c2, 0x9c05598d, 0xc9049a39),
871 PCMCIA_DEVICE_PROD_ID123(
872 "Wireless LAN" , "11Mbps PC Card", "Version 01.02", 831 "Wireless LAN" , "11Mbps PC Card", "Version 01.02",
873 0x4b8870ff, 0x70e946d1, 0x4b74baa0), 832 0x4b8870ff, 0x70e946d1, 0x4b74baa0),
833 PCMCIA_DEVICE_PROD_ID3("HFA3863", 0x355cb092),
834 PCMCIA_DEVICE_PROD_ID3("ISL37100P", 0x630d52b2),
835 PCMCIA_DEVICE_PROD_ID3("ISL37101P-10", 0xdd97a26b),
836 PCMCIA_DEVICE_PROD_ID3("ISL37300P", 0xc9049a39),
874 PCMCIA_DEVICE_NULL 837 PCMCIA_DEVICE_NULL
875}; 838};
876MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids); 839MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids);
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index ff9b5c882184..d70732819423 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -2618,6 +2618,15 @@ static irqreturn_t prism2_interrupt(int irq, void *dev_id)
2618 int events = 0; 2618 int events = 0;
2619 u16 ev; 2619 u16 ev;
2620 2620
2621 /* Detect early interrupt before driver is fully configued */
2622 if (!dev->base_addr) {
2623 if (net_ratelimit()) {
2624 printk(KERN_DEBUG "%s: Interrupt, but dev not configured\n",
2625 dev->name);
2626 }
2627 return IRQ_HANDLED;
2628 }
2629
2621 iface = netdev_priv(dev); 2630 iface = netdev_priv(dev);
2622 local = iface->local; 2631 local = iface->local;
2623 2632
diff --git a/drivers/net/wireless/hostap/hostap_info.c b/drivers/net/wireless/hostap/hostap_info.c
index 4dfb40a84c96..d737091cf6ac 100644
--- a/drivers/net/wireless/hostap/hostap_info.c
+++ b/drivers/net/wireless/hostap/hostap_info.c
@@ -2,6 +2,7 @@
2 2
3#include <linux/if_arp.h> 3#include <linux/if_arp.h>
4#include <linux/sched.h> 4#include <linux/sched.h>
5#include <linux/slab.h>
5#include "hostap_wlan.h" 6#include "hostap_wlan.h"
6#include "hostap.h" 7#include "hostap.h"
7#include "hostap_ap.h" 8#include "hostap_ap.h"
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index 9419cebca8a5..9a082308a9d4 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -1,5 +1,6 @@
1/* ioctl() (mostly Linux Wireless Extensions) routines for Host AP driver */ 1/* ioctl() (mostly Linux Wireless Extensions) routines for Host AP driver */
2 2
3#include <linux/slab.h>
3#include <linux/types.h> 4#include <linux/types.h>
4#include <linux/sched.h> 5#include <linux/sched.h>
5#include <linux/ethtool.h> 6#include <linux/ethtool.h>
diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c
index 8fdd41f4b4f2..d24dc7dc0723 100644
--- a/drivers/net/wireless/hostap/hostap_pci.c
+++ b/drivers/net/wireless/hostap/hostap_pci.c
@@ -9,6 +9,7 @@
9#include <linux/if.h> 9#include <linux/if.h>
10#include <linux/skbuff.h> 10#include <linux/skbuff.h>
11#include <linux/netdevice.h> 11#include <linux/netdevice.h>
12#include <linux/slab.h>
12#include <linux/workqueue.h> 13#include <linux/workqueue.h>
13#include <linux/wireless.h> 14#include <linux/wireless.h>
14#include <net/iw_handler.h> 15#include <net/iw_handler.h>
@@ -39,7 +40,7 @@ struct hostap_pci_priv {
39/* FIX: do we need mb/wmb/rmb with memory operations? */ 40/* FIX: do we need mb/wmb/rmb with memory operations? */
40 41
41 42
42static struct pci_device_id prism2_pci_id_table[] __devinitdata = { 43static DEFINE_PCI_DEVICE_TABLE(prism2_pci_id_table) = {
43 /* Intersil Prism3 ISL3872 11Mb/s WLAN Controller */ 44 /* Intersil Prism3 ISL3872 11Mb/s WLAN Controller */
44 { 0x1260, 0x3872, PCI_ANY_ID, PCI_ANY_ID }, 45 { 0x1260, 0x3872, PCI_ANY_ID, PCI_ANY_ID },
45 /* Intersil Prism2.5 ISL3874 11Mb/s WLAN Controller */ 46 /* Intersil Prism2.5 ISL3874 11Mb/s WLAN Controller */
diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c
index 0e5d51086a44..33e79037770b 100644
--- a/drivers/net/wireless/hostap/hostap_plx.c
+++ b/drivers/net/wireless/hostap/hostap_plx.c
@@ -12,6 +12,7 @@
12#include <linux/if.h> 12#include <linux/if.h>
13#include <linux/skbuff.h> 13#include <linux/skbuff.h>
14#include <linux/netdevice.h> 14#include <linux/netdevice.h>
15#include <linux/slab.h>
15#include <linux/workqueue.h> 16#include <linux/workqueue.h>
16#include <linux/wireless.h> 17#include <linux/wireless.h>
17#include <net/iw_handler.h> 18#include <net/iw_handler.h>
@@ -60,7 +61,7 @@ struct hostap_plx_priv {
60 61
61#define PLXDEV(vendor,dev,str) { vendor, dev, PCI_ANY_ID, PCI_ANY_ID } 62#define PLXDEV(vendor,dev,str) { vendor, dev, PCI_ANY_ID, PCI_ANY_ID }
62 63
63static struct pci_device_id prism2_plx_id_table[] __devinitdata = { 64static DEFINE_PCI_DEVICE_TABLE(prism2_plx_id_table) = {
64 PLXDEV(0x10b7, 0x7770, "3Com AirConnect PCI 777A"), 65 PLXDEV(0x10b7, 0x7770, "3Com AirConnect PCI 777A"),
65 PLXDEV(0x111a, 0x1023, "Siemens SpeedStream SS1023"), 66 PLXDEV(0x111a, 0x1023, "Siemens SpeedStream SS1023"),
66 PLXDEV(0x126c, 0x8030, "Nortel emobility"), 67 PLXDEV(0x126c, 0x8030, "Nortel emobility"),