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/07/08 20:44:44 UTC

[mynewt-nimble] 04/08: nimble/ll: Rename CONNECT_REQ to CONNECT_IND

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 5ed0130269bd5e5dba438e3f509527c90307057f
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Fri Jul 5 22:59:27 2019 +0200

    nimble/ll: Rename CONNECT_REQ to CONNECT_IND
    
    CONNECT_IND is used instead of CONNECT_REQ starting with Core 5.0.
---
 nimble/controller/include/controller/ble_ll.h | 4 ++--
 nimble/controller/src/ble_ll.c                | 4 ++--
 nimble/controller/src/ble_ll_adv.c            | 6 +++---
 nimble/controller/src/ble_ll_conn.c           | 2 +-
 nimble/controller/src/ble_ll_scan.c           | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/nimble/controller/include/controller/ble_ll.h b/nimble/controller/include/controller/ble_ll.h
index c1ced36..8f78b6f 100644
--- a/nimble/controller/include/controller/ble_ll.h
+++ b/nimble/controller/include/controller/ble_ll.h
@@ -312,14 +312,14 @@ struct ble_dev_addr
 #define BLE_ADV_PDU_TYPE_ADV_NONCONN_IND    (2)
 #define BLE_ADV_PDU_TYPE_SCAN_REQ           (3)
 #define BLE_ADV_PDU_TYPE_SCAN_RSP           (4)
-#define BLE_ADV_PDU_TYPE_CONNECT_REQ        (5)
+#define BLE_ADV_PDU_TYPE_CONNECT_IND        (5)
 #define BLE_ADV_PDU_TYPE_ADV_SCAN_IND       (6)
 #define BLE_ADV_PDU_TYPE_ADV_EXT_IND        (7)
 #define BLE_ADV_PDU_TYPE_AUX_ADV_IND        BLE_ADV_PDU_TYPE_ADV_EXT_IND
 #define BLE_ADV_PDU_TYPE_AUX_SCAN_RSP       BLE_ADV_PDU_TYPE_ADV_EXT_IND
 #define BLE_ADV_PDU_TYPE_AUX_SYNC_IND       BLE_ADV_PDU_TYPE_ADV_EXT_IND
 #define BLE_ADV_PDU_TYPE_AUX_CHAIN_IND      BLE_ADV_PDU_TYPE_ADV_EXT_IND
-#define BLE_ADV_PDU_TYPE_AUX_CONNECT_REQ    BLE_ADV_PDU_TYPE_CONNECT_REQ
+#define BLE_ADV_PDU_TYPE_AUX_CONNECT_REQ    BLE_ADV_PDU_TYPE_CONNECT_IND
 #define BLE_ADV_PDU_TYPE_AUX_SCAN_REQ       BLE_ADV_PDU_TYPE_SCAN_REQ
 #define BLE_ADV_PDU_TYPE_AUX_CONNECT_RSP    (8)
 
diff --git a/nimble/controller/src/ble_ll.c b/nimble/controller/src/ble_ll.c
index 1b9639f..7da4c38 100644
--- a/nimble/controller/src/ble_ll.c
+++ b/nimble/controller/src/ble_ll.c
@@ -296,7 +296,7 @@ ble_ll_count_rx_adv_pdus(uint8_t pdu_type)
     case BLE_ADV_PDU_TYPE_SCAN_RSP:
         STATS_INC(ble_ll_stats, rx_scan_rsps);
         break;
-    case BLE_ADV_PDU_TYPE_CONNECT_REQ:
+    case BLE_ADV_PDU_TYPE_CONNECT_IND:
         STATS_INC(ble_ll_stats, rx_connect_reqs);
         break;
     case BLE_ADV_PDU_TYPE_AUX_CONNECT_RSP:
@@ -1013,7 +1013,7 @@ ble_ll_rx_end(uint8_t *rxbuf, struct ble_mbuf_hdr *rxhdr)
             break;
         case BLE_ADV_PDU_TYPE_ADV_EXT_IND:
             break;
-        case BLE_ADV_PDU_TYPE_CONNECT_REQ:
+        case BLE_ADV_PDU_TYPE_CONNECT_IND:
             if (len != BLE_CONNECT_REQ_LEN) {
                 badpkt = 1;
             }
diff --git a/nimble/controller/src/ble_ll_adv.c b/nimble/controller/src/ble_ll_adv.c
index eecab15..4192917 100644
--- a/nimble/controller/src/ble_ll_adv.c
+++ b/nimble/controller/src/ble_ll_adv.c
@@ -4078,7 +4078,7 @@ ble_ll_adv_rx_isr_end(uint8_t pdu_type, struct os_mbuf *rxpdu, int crcok)
 #endif
         if (crcok) {
             if ((pdu_type == BLE_ADV_PDU_TYPE_SCAN_REQ) ||
-                (pdu_type == BLE_ADV_PDU_TYPE_CONNECT_REQ)) {
+                (pdu_type == BLE_ADV_PDU_TYPE_CONNECT_IND)) {
                 /* Process request */
                 rc = ble_ll_adv_rx_req(pdu_type, rxpdu);
             }
@@ -4140,7 +4140,7 @@ ble_ll_adv_rx_pkt_in(uint8_t ptype, uint8_t *rxbuf, struct ble_mbuf_hdr *hdr)
      */
     adv_event_over = 1;
     if (BLE_MBUF_HDR_CRC_OK(hdr)) {
-        if (ptype == BLE_ADV_PDU_TYPE_CONNECT_REQ) {
+        if (ptype == BLE_ADV_PDU_TYPE_CONNECT_IND) {
             if (ble_ll_adv_conn_req_rxd(rxbuf, hdr, advsm)) {
                 adv_event_over = 0;
             }
@@ -4188,7 +4188,7 @@ ble_ll_adv_rx_isr_start(uint8_t pdu_type)
         }
     } else {
         /* Only accept connect requests if connectable advertising event */
-        if (pdu_type == BLE_ADV_PDU_TYPE_CONNECT_REQ) {
+        if (pdu_type == BLE_ADV_PDU_TYPE_CONNECT_IND) {
             if (advsm->props & BLE_HCI_LE_SET_EXT_ADV_PROP_CONNECTABLE) {
                 rc = 0;
             }
diff --git a/nimble/controller/src/ble_ll_conn.c b/nimble/controller/src/ble_ll_conn.c
index 554454d..61f8a66 100644
--- a/nimble/controller/src/ble_ll_conn.c
+++ b/nimble/controller/src/ble_ll_conn.c
@@ -2429,7 +2429,7 @@ ble_ll_conn_connect_ind_prepare(struct ble_ll_conn_sm *connsm,
     struct ble_ll_resolv_entry *rl;
 #endif
 
-    hdr = BLE_ADV_PDU_TYPE_CONNECT_REQ;
+    hdr = BLE_ADV_PDU_TYPE_CONNECT_IND;
 
 #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_CSA2)
     /* We need CSA2 bit only for legacy connect */
diff --git a/nimble/controller/src/ble_ll_scan.c b/nimble/controller/src/ble_ll_scan.c
index 8f8e6fc..59f6ec4 100644
--- a/nimble/controller/src/ble_ll_scan.c
+++ b/nimble/controller/src/ble_ll_scan.c
@@ -2951,7 +2951,7 @@ ble_ll_scan_rx_pkt_in(uint8_t ptype, struct os_mbuf *om, struct ble_mbuf_hdr *hd
     }
 #endif
 
-    if ((ptype == BLE_ADV_PDU_TYPE_SCAN_REQ) || (ptype == BLE_ADV_PDU_TYPE_CONNECT_REQ)) {
+    if ((ptype == BLE_ADV_PDU_TYPE_SCAN_REQ) || (ptype == BLE_ADV_PDU_TYPE_CONNECT_IND)) {
         goto scan_continue;
     }