diff options
author | Alexander Aring <alex.aring@gmail.com> | 2015-06-24 11:36:34 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-07-23 17:10:49 +0200 |
commit | c4227c8a6246b30793bd7360113ddc7b66d526dc (patch) | |
tree | 734eb9edbe8c83e2f81c46420b7e2ce31f963950 /net/mac802154/util.c | |
parent | 927e031c7cb266e5f7fd600899f1603813ee7439 (diff) | |
download | linux-c4227c8a6246b30793bd7360113ddc7b66d526dc.tar.gz linux-c4227c8a6246b30793bd7360113ddc7b66d526dc.tar.bz2 linux-c4227c8a6246b30793bd7360113ddc7b66d526dc.zip |
mac802154: util: add stop_device utility function
This patch adds ieee802154_stop_device for preparing a utility function
to stop the ieee802154 device.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154/util.c')
-rw-r--r-- | net/mac802154/util.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mac802154/util.c b/net/mac802154/util.c index 583435f38930..f9fd0957ab67 100644 --- a/net/mac802154/util.c +++ b/net/mac802154/util.c @@ -14,6 +14,7 @@ */ #include "ieee802154_i.h" +#include "driver-ops.h" /* privid for wpan_phys to determine whether they belong to us or not */ const void *const mac802154_wpan_phy_privid = &mac802154_wpan_phy_privid; @@ -92,3 +93,10 @@ void ieee802154_xmit_complete(struct ieee802154_hw *hw, struct sk_buff *skb, dev_consume_skb_any(skb); } EXPORT_SYMBOL(ieee802154_xmit_complete); + +void ieee802154_stop_device(struct ieee802154_local *local) +{ + flush_workqueue(local->workqueue); + hrtimer_cancel(&local->ifs_timer); + drv_stop(local); +} |