diff options
author | David S. Miller <davem@davemloft.net> | 2010-06-16 16:41:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-16 16:41:55 -0400 |
commit | d8d326dc7ae6bec2a999d674c5babb6bf490587a (patch) | |
tree | 0169a23e34712e4a34db9c3dd658c14a59ded5d9 /drivers/net/wireless | |
parent | fed396a585d8e1870b326f2e8e1888a72957abb8 (diff) | |
parent | 021570e55b7152843376b9d9f60624e3e05ac054 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_hw.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_wlan.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/libertas_tf/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/p54/p54pci.c | 2 |
10 files changed, 53 insertions, 8 deletions
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index db72461c486b..29b31a694b59 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -594,6 +594,7 @@ static int prism2_config(struct pcmcia_device *link) | |||
594 | local_info_t *local; | 594 | local_info_t *local; |
595 | int ret = 1; | 595 | int ret = 1; |
596 | struct hostap_cs_priv *hw_priv; | 596 | struct hostap_cs_priv *hw_priv; |
597 | unsigned long flags; | ||
597 | 598 | ||
598 | PDEBUG(DEBUG_FLOW, "prism2_config()\n"); | 599 | PDEBUG(DEBUG_FLOW, "prism2_config()\n"); |
599 | 600 | ||
@@ -625,9 +626,15 @@ static int prism2_config(struct pcmcia_device *link) | |||
625 | local->hw_priv = hw_priv; | 626 | local->hw_priv = hw_priv; |
626 | hw_priv->link = link; | 627 | hw_priv->link = link; |
627 | 628 | ||
629 | /* | ||
630 | * Make sure the IRQ handler cannot proceed until at least | ||
631 | * dev->base_addr is initialized. | ||
632 | */ | ||
633 | spin_lock_irqsave(&local->irq_init_lock, flags); | ||
634 | |||
628 | ret = pcmcia_request_irq(link, prism2_interrupt); | 635 | ret = pcmcia_request_irq(link, prism2_interrupt); |
629 | if (ret) | 636 | if (ret) |
630 | goto failed; | 637 | goto failed_unlock; |
631 | 638 | ||
632 | /* | 639 | /* |
633 | * This actually configures the PCMCIA socket -- setting up | 640 | * This actually configures the PCMCIA socket -- setting up |
@@ -636,11 +643,13 @@ static int prism2_config(struct pcmcia_device *link) | |||
636 | */ | 643 | */ |
637 | ret = pcmcia_request_configuration(link, &link->conf); | 644 | ret = pcmcia_request_configuration(link, &link->conf); |
638 | if (ret) | 645 | if (ret) |
639 | goto failed; | 646 | goto failed_unlock; |
640 | 647 | ||
641 | dev->irq = link->irq; | 648 | dev->irq = link->irq; |
642 | dev->base_addr = link->io.BasePort1; | 649 | dev->base_addr = link->io.BasePort1; |
643 | 650 | ||
651 | spin_unlock_irqrestore(&local->irq_init_lock, flags); | ||
652 | |||
644 | /* Finally, report what we've done */ | 653 | /* Finally, report what we've done */ |
645 | printk(KERN_INFO "%s: index 0x%02x: ", | 654 | printk(KERN_INFO "%s: index 0x%02x: ", |
646 | dev_info, link->conf.ConfigIndex); | 655 | dev_info, link->conf.ConfigIndex); |
@@ -667,6 +676,8 @@ static int prism2_config(struct pcmcia_device *link) | |||
667 | 676 | ||
668 | return ret; | 677 | return ret; |
669 | 678 | ||
679 | failed_unlock: | ||
680 | spin_unlock_irqrestore(&local->irq_init_lock, flags); | ||
670 | failed: | 681 | failed: |
671 | kfree(hw_priv); | 682 | kfree(hw_priv); |
672 | prism2_release((u_long)link); | 683 | prism2_release((u_long)link); |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index ff9b5c882184..2f999fc94f60 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -2621,6 +2621,18 @@ static irqreturn_t prism2_interrupt(int irq, void *dev_id) | |||
2621 | iface = netdev_priv(dev); | 2621 | iface = netdev_priv(dev); |
2622 | local = iface->local; | 2622 | local = iface->local; |
2623 | 2623 | ||
2624 | /* Detect early interrupt before driver is fully configued */ | ||
2625 | spin_lock(&local->irq_init_lock); | ||
2626 | if (!dev->base_addr) { | ||
2627 | if (net_ratelimit()) { | ||
2628 | printk(KERN_DEBUG "%s: Interrupt, but dev not configured\n", | ||
2629 | dev->name); | ||
2630 | } | ||
2631 | spin_unlock(&local->irq_init_lock); | ||
2632 | return IRQ_HANDLED; | ||
2633 | } | ||
2634 | spin_unlock(&local->irq_init_lock); | ||
2635 | |||
2624 | prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INTERRUPT, 0, 0); | 2636 | prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INTERRUPT, 0, 0); |
2625 | 2637 | ||
2626 | if (local->func->card_present && !local->func->card_present(local)) { | 2638 | if (local->func->card_present && !local->func->card_present(local)) { |
@@ -3138,6 +3150,7 @@ prism2_init_local_data(struct prism2_helper_functions *funcs, int card_idx, | |||
3138 | spin_lock_init(&local->cmdlock); | 3150 | spin_lock_init(&local->cmdlock); |
3139 | spin_lock_init(&local->baplock); | 3151 | spin_lock_init(&local->baplock); |
3140 | spin_lock_init(&local->lock); | 3152 | spin_lock_init(&local->lock); |
3153 | spin_lock_init(&local->irq_init_lock); | ||
3141 | mutex_init(&local->rid_bap_mtx); | 3154 | mutex_init(&local->rid_bap_mtx); |
3142 | 3155 | ||
3143 | if (card_idx < 0 || card_idx >= MAX_PARM_DEVICES) | 3156 | if (card_idx < 0 || card_idx >= MAX_PARM_DEVICES) |
diff --git a/drivers/net/wireless/hostap/hostap_wlan.h b/drivers/net/wireless/hostap/hostap_wlan.h index 3d238917af07..1ba33be98b25 100644 --- a/drivers/net/wireless/hostap/hostap_wlan.h +++ b/drivers/net/wireless/hostap/hostap_wlan.h | |||
@@ -654,7 +654,7 @@ struct local_info { | |||
654 | rwlock_t iface_lock; /* hostap_interfaces read lock; use write lock | 654 | rwlock_t iface_lock; /* hostap_interfaces read lock; use write lock |
655 | * when removing entries from the list. | 655 | * when removing entries from the list. |
656 | * TX and RX paths can use read lock. */ | 656 | * TX and RX paths can use read lock. */ |
657 | spinlock_t cmdlock, baplock, lock; | 657 | spinlock_t cmdlock, baplock, lock, irq_init_lock; |
658 | struct mutex rid_bap_mtx; | 658 | struct mutex rid_bap_mtx; |
659 | u16 infofid; /* MAC buffer id for info frame */ | 659 | u16 infofid; /* MAC buffer id for info frame */ |
660 | /* txfid, intransmitfid, next_txtid, and next_alloc are protected by | 660 | /* txfid, intransmitfid, next_txtid, and next_alloc are protected by |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index a732f1094e5d..7d614c4d3c62 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -1299,6 +1299,11 @@ void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv, | |||
1299 | sta_id = ba_resp->sta_id; | 1299 | sta_id = ba_resp->sta_id; |
1300 | tid = ba_resp->tid; | 1300 | tid = ba_resp->tid; |
1301 | agg = &priv->stations[sta_id].tid[tid].agg; | 1301 | agg = &priv->stations[sta_id].tid[tid].agg; |
1302 | if (unlikely(agg->txq_id != scd_flow)) { | ||
1303 | IWL_ERR(priv, "BA scd_flow %d does not match txq_id %d\n", | ||
1304 | scd_flow, agg->txq_id); | ||
1305 | return; | ||
1306 | } | ||
1302 | 1307 | ||
1303 | /* Find index just before block-ack window */ | 1308 | /* Find index just before block-ack window */ |
1304 | index = iwl_queue_dec_wrap(ba_resp_scd_ssn & 0xff, txq->q.n_bd); | 1309 | index = iwl_queue_dec_wrap(ba_resp_scd_ssn & 0xff, txq->q.n_bd); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 7726e67044c0..24aff654fa9c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3391,10 +3391,12 @@ static int iwlagn_mac_sta_add(struct ieee80211_hw *hw, | |||
3391 | int ret; | 3391 | int ret; |
3392 | u8 sta_id; | 3392 | u8 sta_id; |
3393 | 3393 | ||
3394 | sta_priv->common.sta_id = IWL_INVALID_STATION; | ||
3395 | |||
3396 | IWL_DEBUG_INFO(priv, "received request to add station %pM\n", | 3394 | IWL_DEBUG_INFO(priv, "received request to add station %pM\n", |
3397 | sta->addr); | 3395 | sta->addr); |
3396 | mutex_lock(&priv->mutex); | ||
3397 | IWL_DEBUG_INFO(priv, "proceeding to add station %pM\n", | ||
3398 | sta->addr); | ||
3399 | sta_priv->common.sta_id = IWL_INVALID_STATION; | ||
3398 | 3400 | ||
3399 | atomic_set(&sta_priv->pending_frames, 0); | 3401 | atomic_set(&sta_priv->pending_frames, 0); |
3400 | if (vif->type == NL80211_IFTYPE_AP) | 3402 | if (vif->type == NL80211_IFTYPE_AP) |
@@ -3406,6 +3408,7 @@ static int iwlagn_mac_sta_add(struct ieee80211_hw *hw, | |||
3406 | IWL_ERR(priv, "Unable to add station %pM (%d)\n", | 3408 | IWL_ERR(priv, "Unable to add station %pM (%d)\n", |
3407 | sta->addr, ret); | 3409 | sta->addr, ret); |
3408 | /* Should we return success if return code is EEXIST ? */ | 3410 | /* Should we return success if return code is EEXIST ? */ |
3411 | mutex_unlock(&priv->mutex); | ||
3409 | return ret; | 3412 | return ret; |
3410 | } | 3413 | } |
3411 | 3414 | ||
@@ -3415,6 +3418,7 @@ static int iwlagn_mac_sta_add(struct ieee80211_hw *hw, | |||
3415 | IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", | 3418 | IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", |
3416 | sta->addr); | 3419 | sta->addr); |
3417 | iwl_rs_rate_init(priv, sta, sta_id); | 3420 | iwl_rs_rate_init(priv, sta, sta_id); |
3421 | mutex_unlock(&priv->mutex); | ||
3418 | 3422 | ||
3419 | return 0; | 3423 | return 0; |
3420 | } | 3424 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 5d3f51ff2f0d..386c5f96eff8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -491,6 +491,7 @@ void iwl_bg_abort_scan(struct work_struct *work) | |||
491 | 491 | ||
492 | mutex_lock(&priv->mutex); | 492 | mutex_lock(&priv->mutex); |
493 | 493 | ||
494 | cancel_delayed_work_sync(&priv->scan_check); | ||
494 | set_bit(STATUS_SCAN_ABORTING, &priv->status); | 495 | set_bit(STATUS_SCAN_ABORTING, &priv->status); |
495 | iwl_send_scan_abort(priv); | 496 | iwl_send_scan_abort(priv); |
496 | 497 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 83a26361a9b5..c27c13fbb1ae 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -1373,10 +1373,14 @@ int iwl_mac_sta_remove(struct ieee80211_hw *hw, | |||
1373 | 1373 | ||
1374 | IWL_DEBUG_INFO(priv, "received request to remove station %pM\n", | 1374 | IWL_DEBUG_INFO(priv, "received request to remove station %pM\n", |
1375 | sta->addr); | 1375 | sta->addr); |
1376 | mutex_lock(&priv->mutex); | ||
1377 | IWL_DEBUG_INFO(priv, "proceeding to remove station %pM\n", | ||
1378 | sta->addr); | ||
1376 | ret = iwl_remove_station(priv, sta_common->sta_id, sta->addr); | 1379 | ret = iwl_remove_station(priv, sta_common->sta_id, sta->addr); |
1377 | if (ret) | 1380 | if (ret) |
1378 | IWL_ERR(priv, "Error removing station %pM\n", | 1381 | IWL_ERR(priv, "Error removing station %pM\n", |
1379 | sta->addr); | 1382 | sta->addr); |
1383 | mutex_unlock(&priv->mutex); | ||
1380 | return ret; | 1384 | return ret; |
1381 | } | 1385 | } |
1382 | EXPORT_SYMBOL(iwl_mac_sta_remove); | 1386 | EXPORT_SYMBOL(iwl_mac_sta_remove); |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 6c353cacc8d6..a27872de4106 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -3437,10 +3437,13 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw, | |||
3437 | bool is_ap = vif->type == NL80211_IFTYPE_STATION; | 3437 | bool is_ap = vif->type == NL80211_IFTYPE_STATION; |
3438 | u8 sta_id; | 3438 | u8 sta_id; |
3439 | 3439 | ||
3440 | sta_priv->common.sta_id = IWL_INVALID_STATION; | ||
3441 | |||
3442 | IWL_DEBUG_INFO(priv, "received request to add station %pM\n", | 3440 | IWL_DEBUG_INFO(priv, "received request to add station %pM\n", |
3443 | sta->addr); | 3441 | sta->addr); |
3442 | mutex_lock(&priv->mutex); | ||
3443 | IWL_DEBUG_INFO(priv, "proceeding to add station %pM\n", | ||
3444 | sta->addr); | ||
3445 | sta_priv->common.sta_id = IWL_INVALID_STATION; | ||
3446 | |||
3444 | 3447 | ||
3445 | ret = iwl_add_station_common(priv, sta->addr, is_ap, &sta->ht_cap, | 3448 | ret = iwl_add_station_common(priv, sta->addr, is_ap, &sta->ht_cap, |
3446 | &sta_id); | 3449 | &sta_id); |
@@ -3448,6 +3451,7 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw, | |||
3448 | IWL_ERR(priv, "Unable to add station %pM (%d)\n", | 3451 | IWL_ERR(priv, "Unable to add station %pM (%d)\n", |
3449 | sta->addr, ret); | 3452 | sta->addr, ret); |
3450 | /* Should we return success if return code is EEXIST ? */ | 3453 | /* Should we return success if return code is EEXIST ? */ |
3454 | mutex_unlock(&priv->mutex); | ||
3451 | return ret; | 3455 | return ret; |
3452 | } | 3456 | } |
3453 | 3457 | ||
@@ -3457,6 +3461,7 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw, | |||
3457 | IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", | 3461 | IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", |
3458 | sta->addr); | 3462 | sta->addr); |
3459 | iwl3945_rs_rate_init(priv, sta, sta_id); | 3463 | iwl3945_rs_rate_init(priv, sta, sta_id); |
3464 | mutex_unlock(&priv->mutex); | ||
3460 | 3465 | ||
3461 | return 0; | 3466 | return 0; |
3462 | } | 3467 | } |
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c index 6a04c2157f73..817fffc0de4b 100644 --- a/drivers/net/wireless/libertas_tf/main.c +++ b/drivers/net/wireless/libertas_tf/main.c | |||
@@ -549,7 +549,7 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb) | |||
549 | 549 | ||
550 | prxpd = (struct rxpd *) skb->data; | 550 | prxpd = (struct rxpd *) skb->data; |
551 | 551 | ||
552 | stats.flag = 0; | 552 | memset(&stats, 0, sizeof(stats)); |
553 | if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK))) | 553 | if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK))) |
554 | stats.flag |= RX_FLAG_FAILED_FCS_CRC; | 554 | stats.flag |= RX_FLAG_FAILED_FCS_CRC; |
555 | stats.freq = priv->cur_freq; | 555 | stats.freq = priv->cur_freq; |
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c index 07c4528f6e6b..a5ea89cde8c4 100644 --- a/drivers/net/wireless/p54/p54pci.c +++ b/drivers/net/wireless/p54/p54pci.c | |||
@@ -41,6 +41,8 @@ static DEFINE_PCI_DEVICE_TABLE(p54p_table) = { | |||
41 | { PCI_DEVICE(0x1260, 0x3877) }, | 41 | { PCI_DEVICE(0x1260, 0x3877) }, |
42 | /* Intersil PRISM Javelin/Xbow Wireless LAN adapter */ | 42 | /* Intersil PRISM Javelin/Xbow Wireless LAN adapter */ |
43 | { PCI_DEVICE(0x1260, 0x3886) }, | 43 | { PCI_DEVICE(0x1260, 0x3886) }, |
44 | /* Intersil PRISM Xbow Wireless LAN adapter (Symbol AP-300) */ | ||
45 | { PCI_DEVICE(0x1260, 0xffff) }, | ||
44 | { }, | 46 | { }, |
45 | }; | 47 | }; |
46 | 48 | ||