drivers: modem: gsm: Cancel the work when stopped
gsm_ppp_stop should cancel possible running work items. Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com> Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
This commit is contained in:
parent
d9ea07b7bd
commit
19910666e0
1 changed files with 4 additions and 0 deletions
|
@ -1051,6 +1051,10 @@ void gsm_ppp_stop(const struct device *dev)
|
||||||
{
|
{
|
||||||
struct gsm_modem *gsm = dev->data;
|
struct gsm_modem *gsm = dev->data;
|
||||||
struct net_if *iface = gsm->iface;
|
struct net_if *iface = gsm->iface;
|
||||||
|
struct k_work_sync work_sync;
|
||||||
|
|
||||||
|
(void)k_work_cancel_delayable_sync(&gsm->gsm_configure_work, &work_sync);
|
||||||
|
(void)k_work_cancel_delayable_sync(&gsm->rssi_work_handle, &work_sync);
|
||||||
|
|
||||||
net_if_l2(iface)->enable(iface, false);
|
net_if_l2(iface)->enable(iface, false);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue