Skip to content

Commit

Permalink
lib: nrf_modem: trace: cancel work items on deinit
Browse files Browse the repository at this point in the history
Cancel work items on deinit.

Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
  • Loading branch information
eivindj-nordic authored and rlubos committed Jul 17, 2023
1 parent 4fbf2fc commit 2fc84af
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,9 @@ Modem libraries

* :ref:`nrf_modem_lib_readme`:

Updated:
* Added CEREG event tracking to ``lte_connectivity``.

* Updated:

* The :c:func:`nrf_modem_lib_shutdown` function to allow the modem to be in flight mode (``CFUN=4``) when shutting down the modem.
* The trace backends can now return ``-EAGAIN`` if the write operation can be retried.
Expand All @@ -438,10 +440,9 @@ Modem libraries

* Updated the library to allow a ``PDP_type``-only configuration in the :c:func:`pdn_ctx_configure` function.

* :ref:`nrf_modem_lib_readme`:
* :ref:`modem_key_mgmt`:

* Updated the :c:func:`modem_key_mgmt_cmp` function to return ``1`` if the buffer length does not match the certificate length.
* Added CEREG event tracking to ``lte_connectivity``.

Libraries for networking
------------------------
Expand Down
13 changes: 13 additions & 0 deletions lib/nrf_modem_lib/nrf_modem_lib_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,19 @@ static int trace_deinit(void)
return err;
}


#if CONFIG_NRF_MODEM_LIB_TRACE_BACKEND_BITRATE
k_work_cancel(&backend_bps_avg_update_work);
#endif

#if CONFIG_NRF_MODEM_LIB_TRACE_BACKEND_BITRATE_LOG
k_work_cancel(&backend_bps_log_work);
#endif

#if CONFIG_NRF_MODEM_LIB_TRACE_BITRATE_LOG
k_work_cancel(&bps_log_work);
#endif

k_sem_give(&trace_done_sem);

return 0;
Expand Down

0 comments on commit 2fc84af

Please sign in to comment.