diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 1 | ||||
-rw-r--r-- | net/mac80211/iface.c | 6 | ||||
-rw-r--r-- | net/mac80211/pm.c | 13 | ||||
-rw-r--r-- | net/mac80211/util.c | 10 |
4 files changed, 14 insertions, 16 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 455cc7ade9f..fa930e01295 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1086,6 +1086,7 @@ void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata, | |||
1086 | 1086 | ||
1087 | /* Suspend/resume and hw reconfiguration */ | 1087 | /* Suspend/resume and hw reconfiguration */ |
1088 | int ieee80211_reconfig(struct ieee80211_local *local); | 1088 | int ieee80211_reconfig(struct ieee80211_local *local); |
1089 | void ieee80211_stop_device(struct ieee80211_local *local); | ||
1089 | 1090 | ||
1090 | #ifdef CONFIG_PM | 1091 | #ifdef CONFIG_PM |
1091 | int __ieee80211_suspend(struct ieee80211_hw *hw); | 1092 | int __ieee80211_suspend(struct ieee80211_hw *hw); |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index b161301056d..5940e69fa33 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -552,11 +552,7 @@ static int ieee80211_stop(struct net_device *dev) | |||
552 | ieee80211_recalc_ps(local, -1); | 552 | ieee80211_recalc_ps(local, -1); |
553 | 553 | ||
554 | if (local->open_count == 0) { | 554 | if (local->open_count == 0) { |
555 | drv_stop(local); | 555 | ieee80211_stop_device(local); |
556 | |||
557 | ieee80211_led_radio(local, false); | ||
558 | |||
559 | flush_workqueue(local->workqueue); | ||
560 | 556 | ||
561 | tasklet_disable(&local->tx_pending_tasklet); | 557 | tasklet_disable(&local->tx_pending_tasklet); |
562 | tasklet_disable(&local->tasklet); | 558 | tasklet_disable(&local->tasklet); |
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index a5d2f1fb441..e535f1c988f 100644 --- a/net/mac80211/pm.c +++ b/net/mac80211/pm.c | |||
@@ -107,17 +107,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) | |||
107 | } | 107 | } |
108 | 108 | ||
109 | /* stop hardware - this must stop RX */ | 109 | /* stop hardware - this must stop RX */ |
110 | if (local->open_count) { | 110 | if (local->open_count) |
111 | ieee80211_led_radio(local, false); | 111 | ieee80211_stop_device(local); |
112 | drv_stop(local); | ||
113 | } | ||
114 | |||
115 | /* | ||
116 | * flush again, in case driver queued work -- it | ||
117 | * shouldn't be doing (or cancel everything in the | ||
118 | * stop callback) that but better safe than sorry. | ||
119 | */ | ||
120 | flush_workqueue(local->workqueue); | ||
121 | 112 | ||
122 | local->suspended = true; | 113 | local->suspended = true; |
123 | /* need suspended to be visible before quiescing is false */ | 114 | /* need suspended to be visible before quiescing is false */ |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 5eb306377c6..dd656432136 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -1007,6 +1007,16 @@ u32 ieee80211_sta_get_rates(struct ieee80211_local *local, | |||
1007 | return supp_rates; | 1007 | return supp_rates; |
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | void ieee80211_stop_device(struct ieee80211_local *local) | ||
1011 | { | ||
1012 | ieee80211_led_radio(local, false); | ||
1013 | |||
1014 | cancel_work_sync(&local->reconfig_filter); | ||
1015 | drv_stop(local); | ||
1016 | |||
1017 | flush_workqueue(local->workqueue); | ||
1018 | } | ||
1019 | |||
1010 | int ieee80211_reconfig(struct ieee80211_local *local) | 1020 | int ieee80211_reconfig(struct ieee80211_local *local) |
1011 | { | 1021 | { |
1012 | struct ieee80211_hw *hw = &local->hw; | 1022 | struct ieee80211_hw *hw = &local->hw; |