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 2019/12/17 15:57:45 UTC

[mynewt-nimble] 01/09: nimble/ll: Remove unused functions

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 e0ddae3dc3c240fcd51751362b1d474961b24285
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Tue Dec 10 18:15:59 2019 +0100

    nimble/ll: Remove unused functions
---
 nimble/controller/include/controller/ble_ll.h |  6 ------
 nimble/controller/src/ble_ll.c                | 23 -----------------------
 nimble/controller/src/ble_ll_adv.c            |  3 ---
 nimble/controller/src/ble_ll_conn.c           |  2 --
 nimble/controller/src/ble_ll_scan.c           |  4 ----
 nimble/controller/src/ble_ll_sched.c          |  1 -
 nimble/controller/src/ble_ll_sync.c           |  4 ----
 7 files changed, 43 deletions(-)

diff --git a/nimble/controller/include/controller/ble_ll.h b/nimble/controller/include/controller/ble_ll.h
index 4514815..a07f8c8 100644
--- a/nimble/controller/include/controller/ble_ll.h
+++ b/nimble/controller/include/controller/ble_ll.h
@@ -537,12 +537,6 @@ int ble_ll_set_public_addr(const uint8_t *addr);
 /* Set random address */
 int ble_ll_set_random_addr(const uint8_t *cmdbuf, uint8_t len, bool hci_adv_ext);
 
-/* Enable wait for response timer */
-void ble_ll_wfr_enable(uint32_t cputime);
-
-/* Disable wait for response timer */
-void ble_ll_wfr_disable(void);
-
 /* Wait for response timer expiration callback */
 void ble_ll_wfr_timer_exp(void *arg);
 
diff --git a/nimble/controller/src/ble_ll.c b/nimble/controller/src/ble_ll.c
index d44a778..68fffda 100644
--- a/nimble/controller/src/ble_ll.c
+++ b/nimble/controller/src/ble_ll.c
@@ -679,28 +679,6 @@ ble_ll_wfr_timer_exp(void *arg)
 }
 
 /**
- * Enable the wait for response timer.
- *
- * Context: Interrupt.
- *
- * @param cputime
- * @param wfr_cb
- * @param arg
- */
-void
-ble_ll_wfr_enable(uint32_t cputime)
-{
-}
-
-/**
- * Disable the wait for response timer
- */
-void
-ble_ll_wfr_disable(void)
-{
-}
-
-/**
  * ll tx pkt in proc
  *
  * Process ACL data packet input from host
@@ -1353,7 +1331,6 @@ ble_ll_reset(void)
 
     /* Stop any wait for response timer */
     OS_ENTER_CRITICAL(sr);
-    ble_ll_wfr_disable();
     ble_ll_sched_stop();
     OS_EXIT_CRITICAL(sr);
 
diff --git a/nimble/controller/src/ble_ll_adv.c b/nimble/controller/src/ble_ll_adv.c
index 136b45e..dd98609 100644
--- a/nimble/controller/src/ble_ll_adv.c
+++ b/nimble/controller/src/ble_ll_adv.c
@@ -1867,7 +1867,6 @@ ble_ll_adv_sm_stop(struct ble_ll_adv_sm *advsm)
         if ((g_ble_ll_cur_adv_sm == advsm) &&
                !(advsm->flags & BLE_LL_ADV_SM_FLAG_PERIODIC_SYNC_SENDING)) {
             ble_phy_disable();
-            ble_ll_wfr_disable();
             ble_ll_state_set(BLE_LL_STATE_STANDBY);
             g_ble_ll_cur_adv_sm = NULL;
             ble_ll_scan_chk_resume();
@@ -1875,7 +1874,6 @@ ble_ll_adv_sm_stop(struct ble_ll_adv_sm *advsm)
 #else
         if (ble_ll_state_get() == BLE_LL_STATE_ADV) {
             ble_phy_disable();
-            ble_ll_wfr_disable();
             ble_ll_state_set(BLE_LL_STATE_STANDBY);
             g_ble_ll_cur_adv_sm = NULL;
             ble_ll_scan_chk_resume();
@@ -2531,7 +2529,6 @@ ble_ll_adv_sm_stop_periodic(struct ble_ll_adv_sm *advsm)
     if ((g_ble_ll_cur_adv_sm == advsm) &&
             (advsm->flags & BLE_LL_ADV_SM_FLAG_PERIODIC_SYNC_SENDING)) {
         ble_phy_disable();
-        ble_ll_wfr_disable();
         ble_ll_state_set(BLE_LL_STATE_STANDBY);
         g_ble_ll_cur_adv_sm = NULL;
         ble_ll_scan_chk_resume();
diff --git a/nimble/controller/src/ble_ll_conn.c b/nimble/controller/src/ble_ll_conn.c
index 2a98c13..ffb3995 100644
--- a/nimble/controller/src/ble_ll_conn.c
+++ b/nimble/controller/src/ble_ll_conn.c
@@ -375,7 +375,6 @@ static void
 ble_ll_conn_halt(void)
 {
     ble_phy_disable();
-    ble_ll_wfr_disable();
     ble_ll_state_set(BLE_LL_STATE_STANDBY);
     g_ble_ll_conn_cur_sm = NULL;
 }
@@ -3408,7 +3407,6 @@ ble_ll_conn_rx_isr_start(struct ble_mbuf_hdr *rxhdr, uint32_t aa)
      * called at receive end will deal with ending the connection event
      * if needed
      */
-    ble_ll_wfr_disable();
     connsm = g_ble_ll_conn_cur_sm;
     if (connsm) {
         /* Double check access address. Better match connection state machine */
diff --git a/nimble/controller/src/ble_ll_scan.c b/nimble/controller/src/ble_ll_scan.c
index 75d674a..27c1033 100644
--- a/nimble/controller/src/ble_ll_scan.c
+++ b/nimble/controller/src/ble_ll_scan.c
@@ -197,7 +197,6 @@ ble_ll_aux_scan_cb(struct ble_ll_sched_item *sch)
      */
     if (lls != BLE_LL_STATE_STANDBY) {
         ble_phy_disable();
-        ble_ll_wfr_disable();
         ble_ll_state_set(BLE_LL_STATE_STANDBY);
     }
 
@@ -1714,9 +1713,6 @@ ble_ll_scan_rx_isr_start(uint8_t pdu_type, uint16_t *rxflags)
 #endif
             }
         }
-
-        /* Disable wfr if running */
-        ble_ll_wfr_disable();
         break;
     case BLE_SCAN_TYPE_PASSIVE:
 #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV)
diff --git a/nimble/controller/src/ble_ll_sched.c b/nimble/controller/src/ble_ll_sched.c
index 626f939..40a75e8 100644
--- a/nimble/controller/src/ble_ll_sched.c
+++ b/nimble/controller/src/ble_ll_sched.c
@@ -1482,7 +1482,6 @@ ble_ll_sched_execute_item(struct ble_ll_sched_item *sch)
 
     /* We have to disable the PHY no matter what */
     ble_phy_disable();
-    ble_ll_wfr_disable();
 
     if (lls == BLE_LL_STATE_SCANNING) {
         ble_ll_state_set(BLE_LL_STATE_STANDBY);
diff --git a/nimble/controller/src/ble_ll_sync.c b/nimble/controller/src/ble_ll_sync.c
index f73d90e..f5d22fc 100644
--- a/nimble/controller/src/ble_ll_sync.c
+++ b/nimble/controller/src/ble_ll_sync.c
@@ -196,7 +196,6 @@ ble_ll_sync_sm_clear(struct ble_ll_sync_sm *sm)
 
     if (g_ble_ll_sync_sm_current == sm) {
         ble_phy_disable();
-        ble_ll_wfr_disable();
         ble_ll_state_set(BLE_LL_STATE_STANDBY);
         g_ble_ll_sync_sm_current = NULL;
         ble_ll_scan_chk_resume();
@@ -405,9 +404,6 @@ ble_ll_sync_current_sm_over(void)
     /* Disable the PHY */
     ble_phy_disable();
 
-    /* Disable the wfr timer */
-    ble_ll_wfr_disable();
-
     /* Link-layer is in standby state now */
     ble_ll_state_set(BLE_LL_STATE_STANDBY);