summaryrefslogtreecommitdiffstats
path: root/net/mac802154/driver-ops.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac802154/driver-ops.h')
-rw-r--r--net/mac802154/driver-ops.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/mac802154/driver-ops.h b/net/mac802154/driver-ops.h
index bb3ee03c1669..4b820cfeb538 100644
--- a/net/mac802154/driver-ops.h
+++ b/net/mac802154/driver-ops.h
@@ -30,6 +30,7 @@ static inline int drv_start(struct ieee802154_local *local)
might_sleep();
local->started = true;
+ smp_mb();
return local->ops->start(&local->hw);
}
@@ -40,6 +41,12 @@ static inline void drv_stop(struct ieee802154_local *local)
local->ops->stop(&local->hw);
+ /* sync away all work on the tasklet before clearing started */
+ tasklet_disable(&local->tasklet);
+ tasklet_enable(&local->tasklet);
+
+ barrier();
+
local->started = false;
}