diff options
Diffstat (limited to 'net/mac80211/scan.c')
| -rw-r--r-- | net/mac80211/scan.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index f1a4c7160300..bc17cf7d68db 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
| @@ -353,10 +353,10 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted) | |||
| 353 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { | 353 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { |
| 354 | if (sdata->u.mgd.associated) { | 354 | if (sdata->u.mgd.associated) { |
| 355 | ieee80211_scan_ps_disable(sdata); | 355 | ieee80211_scan_ps_disable(sdata); |
| 356 | netif_wake_queue(sdata->dev); | 356 | netif_tx_wake_all_queues(sdata->dev); |
| 357 | } | 357 | } |
| 358 | } else | 358 | } else |
| 359 | netif_wake_queue(sdata->dev); | 359 | netif_tx_wake_all_queues(sdata->dev); |
| 360 | 360 | ||
| 361 | /* re-enable beaconing */ | 361 | /* re-enable beaconing */ |
| 362 | if (sdata->vif.type == NL80211_IFTYPE_AP || | 362 | if (sdata->vif.type == NL80211_IFTYPE_AP || |
| @@ -411,7 +411,7 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local) | |||
| 411 | * are handled in the scan state machine | 411 | * are handled in the scan state machine |
| 412 | */ | 412 | */ |
| 413 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | 413 | if (sdata->vif.type != NL80211_IFTYPE_STATION) |
| 414 | netif_stop_queue(sdata->dev); | 414 | netif_tx_stop_all_queues(sdata->dev); |
| 415 | } | 415 | } |
| 416 | mutex_unlock(&local->iflist_mtx); | 416 | mutex_unlock(&local->iflist_mtx); |
| 417 | 417 | ||
| @@ -439,6 +439,16 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, | |||
| 439 | if (local->scan_req) | 439 | if (local->scan_req) |
| 440 | return -EBUSY; | 440 | return -EBUSY; |
| 441 | 441 | ||
| 442 | if (req != local->int_scan_req && | ||
| 443 | sdata->vif.type == NL80211_IFTYPE_STATION && | ||
| 444 | !list_empty(&ifmgd->work_list)) { | ||
| 445 | /* actually wait for the work it's doing to finish/time out */ | ||
| 446 | set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request); | ||
| 447 | local->scan_req = req; | ||
| 448 | local->scan_sdata = sdata; | ||
| 449 | return 0; | ||
| 450 | } | ||
| 451 | |||
| 442 | if (local->ops->hw_scan) { | 452 | if (local->ops->hw_scan) { |
| 443 | u8 *ies; | 453 | u8 *ies; |
| 444 | 454 | ||
| @@ -463,14 +473,6 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, | |||
| 463 | local->scan_req = req; | 473 | local->scan_req = req; |
| 464 | local->scan_sdata = sdata; | 474 | local->scan_sdata = sdata; |
| 465 | 475 | ||
| 466 | if (req != local->int_scan_req && | ||
| 467 | sdata->vif.type == NL80211_IFTYPE_STATION && | ||
| 468 | !list_empty(&ifmgd->work_list)) { | ||
| 469 | /* actually wait for the work it's doing to finish/time out */ | ||
| 470 | set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request); | ||
| 471 | return 0; | ||
| 472 | } | ||
| 473 | |||
| 474 | if (local->ops->hw_scan) | 476 | if (local->ops->hw_scan) |
| 475 | __set_bit(SCAN_HW_SCANNING, &local->scanning); | 477 | __set_bit(SCAN_HW_SCANNING, &local->scanning); |
| 476 | else | 478 | else |
| @@ -575,7 +577,7 @@ static void ieee80211_scan_state_leave_oper_channel(struct ieee80211_local *loca | |||
| 575 | continue; | 577 | continue; |
| 576 | 578 | ||
| 577 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { | 579 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { |
| 578 | netif_stop_queue(sdata->dev); | 580 | netif_tx_stop_all_queues(sdata->dev); |
| 579 | if (sdata->u.mgd.associated) | 581 | if (sdata->u.mgd.associated) |
| 580 | ieee80211_scan_ps_enable(sdata); | 582 | ieee80211_scan_ps_enable(sdata); |
| 581 | } | 583 | } |
| @@ -610,7 +612,7 @@ static void ieee80211_scan_state_enter_oper_channel(struct ieee80211_local *loca | |||
| 610 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { | 612 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { |
| 611 | if (sdata->u.mgd.associated) | 613 | if (sdata->u.mgd.associated) |
| 612 | ieee80211_scan_ps_disable(sdata); | 614 | ieee80211_scan_ps_disable(sdata); |
| 613 | netif_wake_queue(sdata->dev); | 615 | netif_tx_wake_all_queues(sdata->dev); |
| 614 | } | 616 | } |
| 615 | } | 617 | } |
| 616 | mutex_unlock(&local->iflist_mtx); | 618 | mutex_unlock(&local->iflist_mtx); |
