aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index db341a99c7c7..eb0f59977676 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -201,6 +201,8 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
201 sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid; 201 sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid;
202 else if (sdata->vif.type == NL80211_IFTYPE_AP) 202 else if (sdata->vif.type == NL80211_IFTYPE_AP)
203 sdata->vif.bss_conf.bssid = sdata->vif.addr; 203 sdata->vif.bss_conf.bssid = sdata->vif.addr;
204 else if (sdata->vif.type == NL80211_IFTYPE_WDS)
205 sdata->vif.bss_conf.bssid = NULL;
204 else if (ieee80211_vif_is_mesh(&sdata->vif)) { 206 else if (ieee80211_vif_is_mesh(&sdata->vif)) {
205 sdata->vif.bss_conf.bssid = zero; 207 sdata->vif.bss_conf.bssid = zero;
206 } else { 208 } else {
@@ -211,6 +213,7 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
211 switch (sdata->vif.type) { 213 switch (sdata->vif.type) {
212 case NL80211_IFTYPE_AP: 214 case NL80211_IFTYPE_AP:
213 case NL80211_IFTYPE_ADHOC: 215 case NL80211_IFTYPE_ADHOC:
216 case NL80211_IFTYPE_WDS:
214 case NL80211_IFTYPE_MESH_POINT: 217 case NL80211_IFTYPE_MESH_POINT:
215 break; 218 break;
216 default: 219 default:
@@ -295,7 +298,16 @@ static void ieee80211_restart_work(struct work_struct *work)
295 struct ieee80211_local *local = 298 struct ieee80211_local *local =
296 container_of(work, struct ieee80211_local, restart_work); 299 container_of(work, struct ieee80211_local, restart_work);
297 300
301 /* wait for scan work complete */
302 flush_workqueue(local->workqueue);
303
304 mutex_lock(&local->mtx);
305 WARN(test_bit(SCAN_HW_SCANNING, &local->scanning),
306 "%s called with hardware scan in progress\n", __func__);
307 mutex_unlock(&local->mtx);
308
298 rtnl_lock(); 309 rtnl_lock();
310 ieee80211_scan_cancel(local);
299 ieee80211_reconfig(local); 311 ieee80211_reconfig(local);
300 rtnl_unlock(); 312 rtnl_unlock();
301} 313}
@@ -306,15 +318,6 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw)
306 318
307 trace_api_restart_hw(local); 319 trace_api_restart_hw(local);
308 320
309 /* wait for scan work complete */
310 flush_workqueue(local->workqueue);
311
312 WARN(test_bit(SCAN_HW_SCANNING, &local->scanning),
313 "%s called with hardware scan in progress\n", __func__);
314
315 if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)))
316 ieee80211_scan_cancel(local);
317
318 /* use this reason, ieee80211_reconfig will unblock it */ 321 /* use this reason, ieee80211_reconfig will unblock it */
319 ieee80211_stop_queues_by_reason(hw, 322 ieee80211_stop_queues_by_reason(hw,
320 IEEE80211_QUEUE_STOP_REASON_SUSPEND); 323 IEEE80211_QUEUE_STOP_REASON_SUSPEND);
@@ -329,7 +332,7 @@ static void ieee80211_recalc_smps_work(struct work_struct *work)
329 container_of(work, struct ieee80211_local, recalc_smps); 332 container_of(work, struct ieee80211_local, recalc_smps);
330 333
331 mutex_lock(&local->iflist_mtx); 334 mutex_lock(&local->iflist_mtx);
332 ieee80211_recalc_smps(local, NULL); 335 ieee80211_recalc_smps(local);
333 mutex_unlock(&local->iflist_mtx); 336 mutex_unlock(&local->iflist_mtx);
334} 337}
335 338
@@ -533,6 +536,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
533 /* set up some defaults */ 536 /* set up some defaults */
534 local->hw.queues = 1; 537 local->hw.queues = 1;
535 local->hw.max_rates = 1; 538 local->hw.max_rates = 1;
539 local->hw.max_report_rates = 0;
536 local->hw.conf.long_frame_max_tx_count = wiphy->retry_long; 540 local->hw.conf.long_frame_max_tx_count = wiphy->retry_long;
537 local->hw.conf.short_frame_max_tx_count = wiphy->retry_short; 541 local->hw.conf.short_frame_max_tx_count = wiphy->retry_short;
538 local->user_power_level = -1; 542 local->user_power_level = -1;
@@ -608,6 +612,9 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
608 WLAN_CIPHER_SUITE_AES_CMAC 612 WLAN_CIPHER_SUITE_AES_CMAC
609 }; 613 };
610 614
615 if (hw->max_report_rates == 0)
616 hw->max_report_rates = hw->max_rates;
617
611 /* 618 /*
612 * generic code guarantees at least one band, 619 * generic code guarantees at least one band,
613 * set this very early because much code assumes 620 * set this very early because much code assumes