You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2021/10/04 10:35:49 UTC

[mynewt-nimble] branch master updated (74e1217 -> c0ef83b)

This is an automated email from the ASF dual-hosted git repository.

andk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git.


    from 74e1217  nimble/ll: Fix build with past and without privacy
     new 94039bc  nimble/ll: Remove unused code
     new c0ef83b  nimble/ll: Add clarification comment

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../controller/include/controller/ble_ll_sched.h   |  2 -
 nimble/controller/src/ble_ll_scan.c                |  3 ++
 nimble/controller/src/ble_ll_sched.c               | 47 ----------------------
 3 files changed, 3 insertions(+), 49 deletions(-)

[mynewt-nimble] 02/02: nimble/ll: Add clarification comment

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit c0ef83b072542da7a47f53dc6af20bd108843281
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Thu Sep 30 23:14:14 2021 +0200

    nimble/ll: Add clarification comment
    
    Just clarify why we should return here instead of 'break'.
---
 nimble/controller/src/ble_ll_scan.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/nimble/controller/src/ble_ll_scan.c b/nimble/controller/src/ble_ll_scan.c
index cf264b0..399ce22 100644
--- a/nimble/controller/src/ble_ll_scan.c
+++ b/nimble/controller/src/ble_ll_scan.c
@@ -2133,6 +2133,9 @@ ble_ll_scan_rx_isr_end(struct os_mbuf *rxpdu, uint8_t crcok)
             rxinfo->flags |= BLE_MBUF_HDR_F_IGNORED;
         }
         ble_ll_state_set(BLE_LL_STATE_STANDBY);
+        /* Return here, we do not want any further processing since it's all
+         * handled in scan_aux.
+         */
         return -1;
 #endif
     default:

[mynewt-nimble] 01/02: nimble/ll: Remove unused code

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit 94039bc18e4173f5e058483d763c23aaea147853
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Mon Sep 27 23:20:25 2021 +0200

    nimble/ll: Remove unused code
    
    Not used anymore.
---
 .../controller/include/controller/ble_ll_sched.h   |  2 -
 nimble/controller/src/ble_ll_sched.c               | 47 ----------------------
 2 files changed, 49 deletions(-)

diff --git a/nimble/controller/include/controller/ble_ll_sched.h b/nimble/controller/include/controller/ble_ll_sched.h
index 96834bb..bed8640 100644
--- a/nimble/controller/include/controller/ble_ll_sched.h
+++ b/nimble/controller/include/controller/ble_ll_sched.h
@@ -200,8 +200,6 @@ int ble_ll_sched_aux_scan(struct ble_mbuf_hdr *ble_hdr,
                           struct ble_ll_scan_sm *scansm,
                           struct ble_ll_aux_data *aux_scan);
 
-int ble_ll_sched_scan_req_over_aux_ptr(uint32_t chan, uint8_t phy_mode);
-
 int ble_ll_sched_scan_aux(struct ble_ll_sched_item *sch, uint32_t pdu_time,
                           uint8_t pdu_time_rem, uint32_t offset_us);
 #endif
diff --git a/nimble/controller/src/ble_ll_sched.c b/nimble/controller/src/ble_ll_sched.c
index c41ad3f..b0fc4f5 100644
--- a/nimble/controller/src/ble_ll_sched.c
+++ b/nimble/controller/src/ble_ll_sched.c
@@ -1563,53 +1563,6 @@ ble_ll_sched_next_time(uint32_t *next_event_time)
 
 #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV)
 /**
- * Called to check if there is place for a planned scan req.
- *
- * @param chan
- * @param phy_mode
- *
- * @return int 0: Clear for scan req 1: there is an upcoming event
- */
-int
-ble_ll_sched_scan_req_over_aux_ptr(uint32_t chan, uint8_t phy_mode)
-{
-    struct ble_ll_sched_item *sch;
-    uint32_t usec_dur;
-    uint32_t now = os_cputime_get32();
-
-    /* Lets calculate roughly how much time we need for scan req and scan rsp */
-    usec_dur = ble_ll_pdu_tx_time_get(BLE_SCAN_REQ_LEN, phy_mode);
-    if (chan >=  BLE_PHY_NUM_DATA_CHANS) {
-        usec_dur += ble_ll_pdu_tx_time_get(BLE_SCAN_RSP_MAX_LEN, phy_mode);
-    } else {
-        usec_dur += ble_ll_pdu_tx_time_get(BLE_SCAN_RSP_MAX_EXT_LEN, phy_mode);
-    }
-
-    sch = TAILQ_FIRST(&g_ble_ll_sched_q);
-    while (sch) {
-        /* Let's check if there is no scheduled item which want to start within
-         * given usecs.*/
-        if (CPUTIME_GT(sch->start_time, now + os_cputime_usecs_to_ticks(usec_dur))) {
-            /* We are fine. Have time for scan req */
-            return 0;
-        }
-
-        /* There is something in the scheduler. If it is not aux ptr we assume
-         * it is more important that scan req
-         */
-        if (sch->sched_type != BLE_LL_SCHED_TYPE_AUX_SCAN) {
-            return 1;
-        }
-
-        ble_ll_scan_end_adv_evt((struct ble_ll_aux_data *)sch->cb_arg);
-        TAILQ_REMOVE(&g_ble_ll_sched_q, sch, link);
-        sch->enqueued = 0;
-        sch = TAILQ_FIRST(&g_ble_ll_sched_q);
-    }
-    return 0;
-}
-
-/**
  * Called to schedule a aux scan.
  *
  * Context: Interrupt