diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-25 19:59:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-25 19:59:51 -0400 |
commit | b1cdc4670b9508fcd47a15fbd12f70d269880b37 (patch) | |
tree | fea9e2650170886d539488f8b1e064f6ca60ad36 /drivers/net/wireless/iwlwifi/iwl-scan.c | |
parent | ce7d0226198aac42ed311dd2783232adc16b296d (diff) | |
parent | f925b1303e0672effc78547353bd2ddfe11f5b5f (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (63 commits)
drivers/net/usb/asix.c: Fix pointer cast.
be2net: Bug fix to avoid disabling bottom half during firmware upgrade.
proc_dointvec: write a single value
hso: add support for new products
Phonet: fix potential use-after-free in pep_sock_close()
ath9k: remove VEOL support for ad-hoc
ath9k: change beacon allocation to prefer the first beacon slot
sock.h: fix kernel-doc warning
cls_cgroup: Fix build error when built-in
macvlan: do proper cleanup in macvlan_common_newlink() V2
be2net: Bug fix in init code in probe
net/dccp: expansion of error code size
ath9k: Fix rx of mcast/bcast frames in PS mode with auto sleep
wireless: fix sta_info.h kernel-doc warnings
wireless: fix mac80211.h kernel-doc warnings
iwlwifi: testing the wrong variable in iwl_add_bssid_station()
ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs()
ath9k_htc: dereferencing before check in hif_usb_tx_cb()
rt2x00: Fix rt2800usb TX descriptor writing.
rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
...
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-scan.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 107e173112f6..5d3f51ff2f0d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -376,6 +376,11 @@ void iwl_bg_start_internal_scan(struct work_struct *work) | |||
376 | 376 | ||
377 | mutex_lock(&priv->mutex); | 377 | mutex_lock(&priv->mutex); |
378 | 378 | ||
379 | if (priv->is_internal_short_scan == true) { | ||
380 | IWL_DEBUG_SCAN(priv, "Internal scan already in progress\n"); | ||
381 | goto unlock; | ||
382 | } | ||
383 | |||
379 | if (!iwl_is_ready_rf(priv)) { | 384 | if (!iwl_is_ready_rf(priv)) { |
380 | IWL_DEBUG_SCAN(priv, "not ready or exit pending\n"); | 385 | IWL_DEBUG_SCAN(priv, "not ready or exit pending\n"); |
381 | goto unlock; | 386 | goto unlock; |
@@ -497,17 +502,27 @@ void iwl_bg_scan_completed(struct work_struct *work) | |||
497 | { | 502 | { |
498 | struct iwl_priv *priv = | 503 | struct iwl_priv *priv = |
499 | container_of(work, struct iwl_priv, scan_completed); | 504 | container_of(work, struct iwl_priv, scan_completed); |
505 | bool internal = false; | ||
500 | 506 | ||
501 | IWL_DEBUG_SCAN(priv, "SCAN complete scan\n"); | 507 | IWL_DEBUG_SCAN(priv, "SCAN complete scan\n"); |
502 | 508 | ||
503 | cancel_delayed_work(&priv->scan_check); | 509 | cancel_delayed_work(&priv->scan_check); |
504 | 510 | ||
505 | if (!priv->is_internal_short_scan) | 511 | mutex_lock(&priv->mutex); |
506 | ieee80211_scan_completed(priv->hw, false); | 512 | if (priv->is_internal_short_scan) { |
507 | else { | ||
508 | priv->is_internal_short_scan = false; | 513 | priv->is_internal_short_scan = false; |
509 | IWL_DEBUG_SCAN(priv, "internal short scan completed\n"); | 514 | IWL_DEBUG_SCAN(priv, "internal short scan completed\n"); |
515 | internal = true; | ||
510 | } | 516 | } |
517 | mutex_unlock(&priv->mutex); | ||
518 | |||
519 | /* | ||
520 | * Do not hold mutex here since this will cause mac80211 to call | ||
521 | * into driver again into functions that will attempt to take | ||
522 | * mutex. | ||
523 | */ | ||
524 | if (!internal) | ||
525 | ieee80211_scan_completed(priv->hw, false); | ||
511 | 526 | ||
512 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 527 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
513 | return; | 528 | return; |