You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/10/26 12:20:38 UTC

[GitHub] [mynewt-nimble] sjanc commented on a change in pull request #1061: nimble/ll: Refactor and cleanup initiator code

sjanc commented on a change in pull request #1061:
URL: https://github.com/apache/mynewt-nimble/pull/1061#discussion_r736462937



##########
File path: nimble/controller/src/ble_ll_scan.c
##########
@@ -2519,7 +1937,26 @@ ble_ll_scan_rx_pkt_in(uint8_t ptype, struct os_mbuf *om, struct ble_mbuf_hdr *hd
     }
 #endif
 
-    ble_ll_scan_rx_pkt_in_on_legacy(ptype, om, hdr, &addrd);
+    scansm = &g_ble_ll_scan_sm;
+    rxinfo = &hdr->rxinfo;
+
+    if (scansm->scanp->scan_type == BLE_SCAN_TYPE_INITIATE) {
+        if (rxinfo->flags & BLE_MBUF_HDR_F_CONNECT_IND_TXD) {
+            /* We need to keep original TargetA in case it was resolved, so rl
+             * can be updated properly.
+             */
+            ble_ll_scan_get_addr_data_from_legacy(ptype, om->om_data, &addrd);
+            targeta = addrd.targeta;
+            ble_ll_scan_rx_pkt_in_restore_addr_data(hdr, &addrd);
+
+            ble_ll_scan_sm_stop(0);
+            ble_ll_conn_created_on_legacy(om, &addrd, targeta);
+            return;

Review comment:
       I guess this is not a big deal but this will result in not reporting advertising packet to which we sent conn_ind




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org