aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/driver-ops.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r--net/mac80211/driver-ops.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index d231c9323ad1..020a94a31106 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -12,7 +12,11 @@ static inline int drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
12 12
13static inline int drv_start(struct ieee80211_local *local) 13static inline int drv_start(struct ieee80211_local *local)
14{ 14{
15 int ret = local->ops->start(&local->hw); 15 int ret;
16
17 local->started = true;
18 smp_mb();
19 ret = local->ops->start(&local->hw);
16 trace_drv_start(local, ret); 20 trace_drv_start(local, ret);
17 return ret; 21 return ret;
18} 22}
@@ -21,6 +25,14 @@ static inline void drv_stop(struct ieee80211_local *local)
21{ 25{
22 local->ops->stop(&local->hw); 26 local->ops->stop(&local->hw);
23 trace_drv_stop(local); 27 trace_drv_stop(local);
28
29 /* sync away all work on the tasklet before clearing started */
30 tasklet_disable(&local->tasklet);
31 tasklet_enable(&local->tasklet);
32
33 barrier();
34
35 local->started = false;
24} 36}
25 37
26static inline int drv_add_interface(struct ieee80211_local *local, 38static inline int drv_add_interface(struct ieee80211_local *local,