Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 538181a8 authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann
Browse files

mac802154: add synchronization handling



This patch adds synchronization handling in start and stop driver ops
calls. This patch is mostly grab from mac80211 which was introduced by
commit ea77f12f ("mac80211: remove
tasklet enable/disable"). This is to be sure that we don't run into same
issues.

Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent e363eca3
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -30,6 +30,7 @@ static inline int drv_start(struct ieee802154_local *local)
	might_sleep();
	might_sleep();


	local->started = true;
	local->started = true;
	smp_mb();


	return local->ops->start(&local->hw);
	return local->ops->start(&local->hw);
}
}
@@ -40,6 +41,12 @@ static inline void drv_stop(struct ieee802154_local *local)


	local->ops->stop(&local->hw);
	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;
	local->started = false;
}
}