drivers: modem: gsm: cancel rssi work only if GSM_MUX is enabled
There's no need to cancel rssi work when CONFIG_GSM_MUX isn't enabled, since it is not scheduled. Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This commit is contained in:
parent
62c383d062
commit
f505028280
1 changed files with 3 additions and 1 deletions
|
@ -1037,7 +1037,9 @@ void gsm_ppp_stop(const struct device *dev)
|
||||||
struct k_work_sync work_sync;
|
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->gsm_configure_work, &work_sync);
|
||||||
(void)k_work_cancel_delayable_sync(&gsm->rssi_work_handle, &work_sync);
|
if (IS_ENABLED(CONFIG_GSM_MUX)) {
|
||||||
|
(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