diff options
Diffstat (limited to 'net/mac80211/scan.c')
| -rw-r--r-- | net/mac80211/scan.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 416bb41099f3..f5c7c3371929 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
| @@ -159,7 +159,7 @@ ieee80211_rx_mesh_bss_add(struct ieee80211_local *local, u8 *mesh_id, int mesh_i | |||
| 159 | { | 159 | { |
| 160 | struct ieee80211_bss *bss; | 160 | struct ieee80211_bss *bss; |
| 161 | 161 | ||
| 162 | if (mesh_config_len != MESH_CFG_LEN) | 162 | if (mesh_config_len != IEEE80211_MESH_CONFIG_LEN) |
| 163 | return NULL; | 163 | return NULL; |
| 164 | 164 | ||
| 165 | bss = kzalloc(sizeof(*bss), GFP_ATOMIC); | 165 | bss = kzalloc(sizeof(*bss), GFP_ATOMIC); |
| @@ -448,18 +448,17 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw) | |||
| 448 | 448 | ||
| 449 | if (local->hw_scanning) { | 449 | if (local->hw_scanning) { |
| 450 | local->hw_scanning = false; | 450 | local->hw_scanning = false; |
| 451 | if (ieee80211_hw_config(local)) | 451 | /* |
| 452 | printk(KERN_DEBUG "%s: failed to restore operational " | 452 | * Somebody might have requested channel change during scan |
| 453 | "channel after scan\n", wiphy_name(local->hw.wiphy)); | 453 | * that we won't have acted upon, try now. ieee80211_hw_config |
| 454 | 454 | * will set the flag based on actual changes. | |
| 455 | */ | ||
| 456 | ieee80211_hw_config(local, 0); | ||
| 455 | goto done; | 457 | goto done; |
| 456 | } | 458 | } |
| 457 | 459 | ||
| 458 | local->sw_scanning = false; | 460 | local->sw_scanning = false; |
| 459 | if (ieee80211_hw_config(local)) | 461 | ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); |
| 460 | printk(KERN_DEBUG "%s: failed to restore operational " | ||
| 461 | "channel after scan\n", wiphy_name(local->hw.wiphy)); | ||
| 462 | |||
| 463 | 462 | ||
| 464 | netif_tx_lock_bh(local->mdev); | 463 | netif_tx_lock_bh(local->mdev); |
| 465 | netif_addr_lock(local->mdev); | 464 | netif_addr_lock(local->mdev); |
| @@ -546,12 +545,9 @@ void ieee80211_scan_work(struct work_struct *work) | |||
| 546 | 545 | ||
| 547 | if (!skip) { | 546 | if (!skip) { |
| 548 | local->scan_channel = chan; | 547 | local->scan_channel = chan; |
| 549 | if (ieee80211_hw_config(local)) { | 548 | if (ieee80211_hw_config(local, |
| 550 | printk(KERN_DEBUG "%s: failed to set freq to " | 549 | IEEE80211_CONF_CHANGE_CHANNEL)) |
| 551 | "%d MHz for scan\n", wiphy_name(local->hw.wiphy), | ||
| 552 | chan->center_freq); | ||
| 553 | skip = 1; | 550 | skip = 1; |
| 554 | } | ||
| 555 | } | 551 | } |
| 556 | 552 | ||
| 557 | /* advance state machine to next channel/band */ | 553 | /* advance state machine to next channel/band */ |
