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>
This commit is contained in:

committed by
Marcel Holtmann

parent
927e031c7c
commit
c4227c8a62
@@ -314,11 +314,8 @@ static int mac802154_slave_close(struct net_device *dev)
|
||||
|
||||
clear_bit(SDATA_STATE_RUNNING, &sdata->state);
|
||||
|
||||
if (!local->open_count) {
|
||||
flush_workqueue(local->workqueue);
|
||||
hrtimer_cancel(&local->ifs_timer);
|
||||
drv_stop(local);
|
||||
}
|
||||
if (!local->open_count)
|
||||
ieee802154_stop_device(local);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user