You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ry...@apache.org on 2019/07/22 20:20:16 UTC
[mynewt-nimble] branch master updated: nimble/ll: Enlarge critical
section when stoping scanning
This is an automated email from the ASF dual-hosted git repository.
rymek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new 2a27eb2 nimble/ll: Enlarge critical section when stoping scanning
2a27eb2 is described below
commit 2a27eb23ca2860d0a9b462f6cadcca28001f17dc
Author: Ćukasz Rymanowski <lu...@codecoup.pl>
AuthorDate: Tue Jun 4 21:05:07 2019 +0200
nimble/ll: Enlarge critical section when stoping scanning
---
nimble/controller/src/ble_ll_scan.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/nimble/controller/src/ble_ll_scan.c b/nimble/controller/src/ble_ll_scan.c
index 06d33ae..71be964 100644
--- a/nimble/controller/src/ble_ll_scan.c
+++ b/nimble/controller/src/ble_ll_scan.c
@@ -1187,20 +1187,19 @@ ble_ll_scan_sm_stop(int chk_disable)
scansm = &g_ble_ll_scan_sm;
os_cputime_timer_stop(&scansm->scan_timer);
+ OS_ENTER_CRITICAL(sr);
/* Disable scanning state machine */
scansm->scan_enabled = 0;
scansm->restart_timer_needed = 0;
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV)
if (scansm->ext_scanning) {
- OS_ENTER_CRITICAL(sr);
ble_ll_scan_clean_cur_aux_data();
- OS_EXIT_CRITICAL(sr);
-
ble_ll_sched_rmv_elem_type(BLE_LL_SCHED_TYPE_AUX_SCAN, ble_ll_scan_sched_remove);
scansm->ext_scanning = 0;
}
#endif
+ OS_EXIT_CRITICAL(sr);
/* Count # of times stopped */
STATS_INC(ble_ll_stats, scan_stops);