Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | /* * Copyright (c) 2018-2020 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ #include <stdint.h> #include <stddef.h> #include <sys/byteorder.h> #include <bluetooth/hci.h> #include <soc.h> #include "hal/cpu.h" #include "hal/ccm.h" #include "hal/radio.h" #include "hal/ticker.h" #include "util/util.h" #include "util/mem.h" #include "util/memq.h" #include "pdu.h" #include "lll.h" #include "lll_vendor.h" #include "lll_clock.h" #include "lll_chan.h" #include "lll_conn.h" #include "lll_adv_types.h" #include "lll_adv.h" #include "lll_adv_pdu.h" #include "lll_adv_aux.h" #include "lll_filter.h" #include "lll_internal.h" #include "lll_tim_internal.h" #include "lll_adv_internal.h" #include "lll_prof_internal.h" #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_DRIVER) #define LOG_MODULE_NAME bt_ctlr_lll_adv_aux #include "common/log.h" #include "hal/debug.h" static int init_reset(void); static int prepare_cb(struct lll_prepare_param *p); static void isr_done(void *param); static void isr_tx(void *param); static void isr_rx(void *param); static inline int isr_rx_pdu(struct lll_adv_aux *lll_aux, uint8_t devmatch_ok, uint8_t devmatch_id, uint8_t irkmatch_ok, uint8_t irkmatch_id, uint8_t rssi_ready); #if defined(CONFIG_BT_PERIPHERAL) static struct pdu_adv *init_connect_rsp_pdu(struct pdu_adv *pdu_ci); static void isr_tx_connect_rsp(void *param); #endif /* CONFIG_BT_PERIPHERAL */ int lll_adv_aux_init(void) { int err; err = init_reset(); if (err) { return err; } return 0; } int lll_adv_aux_reset(void) { int err; err = init_reset(); if (err) { return err; } return 0; } void lll_adv_aux_prepare(void *param) { int err; err = lll_hfclock_on(); LL_ASSERT(err >= 0); err = lll_prepare(lll_is_abort_cb, lll_abort_cb, prepare_cb, 0, param); LL_ASSERT(!err || err == -EINPROGRESS); } void lll_adv_aux_pback_prepare(void *param) { } static int init_reset(void) { return 0; } static int prepare_cb(struct lll_prepare_param *p) { struct pdu_adv_com_ext_adv *pri_com_hdr; uint32_t ticks_at_event, ticks_at_start; struct pdu_adv *pri_pdu, *sec_pdu; struct pdu_adv_aux_ptr *aux_ptr; struct pdu_adv_ext_hdr *pri_hdr; struct lll_adv_aux *lll; struct lll_adv *lll_adv; struct ull_hdr *ull; uint32_t remainder; uint32_t start_us; uint8_t *pri_dptr; uint8_t phy_s; uint8_t upd; uint32_t aa; DEBUG_RADIO_START_A(1); lll = p->param; /* FIXME: get latest only when primary PDU without Aux PDUs */ upd = 0U; sec_pdu = lll_adv_aux_data_latest_get(lll, &upd); LL_ASSERT(sec_pdu); /* Get reference to primary PDU */ lll_adv = lll->adv; pri_pdu = lll_adv_data_curr_get(lll_adv); LL_ASSERT(pri_pdu->type == PDU_ADV_TYPE_EXT_IND); /* Get reference to extended header */ pri_com_hdr = (void *)&pri_pdu->adv_ext_ind; pri_hdr = (void *)pri_com_hdr->ext_hdr_adv_data; pri_dptr = pri_hdr->data; /* NOTE: We shall be here in auxiliary PDU prepare due to * aux_ptr flag being set in the extended common header * flags. Hence, ext_hdr_len is non-zero, an explicit check * is not needed. */ LL_ASSERT(pri_com_hdr->ext_hdr_len); /* traverse through adv_addr, if present */ if (pri_hdr->adv_addr) { pri_dptr += BDADDR_SIZE; } /* traverse through adi, if present */ if (pri_hdr->adi) { pri_dptr += sizeof(struct pdu_adv_adi); } aux_ptr = (void *)pri_dptr; /* Abort if no aux_ptr filled */ if (unlikely(!pri_hdr->aux_ptr || !aux_ptr->offs)) { radio_isr_set(lll_isr_early_abort, lll); radio_disable(); return 0; } /* Increment counter used in ULL for channel index calculation */ lll->data_chan_counter++; /* Set up Radio H/W */ radio_reset(); #if defined(CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL) radio_tx_power_set(lll->tx_pwr_lvl); #else radio_tx_power_set(RADIO_TXP_DEFAULT); #endif /* CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL */ phy_s = lll_adv->phy_s; /* TODO: if coded we use S8? */ radio_phy_set(phy_s, lll_adv->phy_flags); radio_pkt_configure(8, PDU_AC_PAYLOAD_SIZE_MAX, (phy_s << 1)); /* Access address and CRC */ aa = sys_cpu_to_le32(PDU_AC_ACCESS_ADDR); radio_aa_set((uint8_t *)&aa); radio_crc_configure(((0x5bUL) | ((0x06UL) << 8) | ((0x00UL) << 16)), 0x555555); /* Use channel idx in aux_ptr */ lll_chan_set(aux_ptr->chan_idx); /* Set the Radio Tx Packet */ radio_pkt_tx_set(sec_pdu); /* Switch to Rx if connectable or scannable */ if (pri_com_hdr->adv_mode & (BT_HCI_LE_ADV_PROP_CONN | BT_HCI_LE_ADV_PROP_SCAN)) { struct pdu_adv *scan_pdu; scan_pdu = lll_adv_scan_rsp_latest_get(lll_adv, &upd); LL_ASSERT(scan_pdu); #if defined(CONFIG_BT_CTLR_PRIVACY) if (upd) { /* Copy the address from the adv packet we will send * into the scan response. */ memcpy(&scan_pdu->adv_ext_ind.ext_hdr.data[ADVA_OFFSET], &sec_pdu->adv_ext_ind.ext_hdr.data[ADVA_OFFSET], BDADDR_SIZE); } #else ARG_UNUSED(scan_pdu); ARG_UNUSED(upd); #endif /* !CONFIG_BT_CTLR_PRIVACY */ radio_isr_set(isr_tx, lll); radio_tmr_tifs_set(EVENT_IFS_US); radio_switch_complete_and_rx(phy_s); } else { radio_isr_set(isr_done, lll); radio_switch_complete_and_disable(); } ticks_at_event = p->ticks_at_expire; ull = HDR_LLL2ULL(lll); ticks_at_event += lll_event_offset_get(ull); ticks_at_start = ticks_at_event; ticks_at_start += HAL_TICKER_US_TO_TICKS(EVENT_OVERHEAD_START_US); remainder = p->remainder; start_us = radio_tmr_start(1, ticks_at_start, remainder); /* capture end of Tx-ed PDU, used to calculate HCTO. */ radio_tmr_end_capture(); #if defined(CONFIG_BT_CTLR_GPIO_PA_PIN) radio_gpio_pa_setup(); radio_gpio_pa_lna_enable(start_us + radio_tx_ready_delay_get(phy_s, 1) - CONFIG_BT_CTLR_GPIO_PA_OFFSET); #else /* !CONFIG_BT_CTLR_GPIO_PA_PIN */ ARG_UNUSED(start_us); #endif /* !CONFIG_BT_CTLR_GPIO_PA_PIN */ #if defined(CONFIG_BT_CTLR_XTAL_ADVANCED) && \ (EVENT_OVERHEAD_PREEMPT_US <= EVENT_OVERHEAD_PREEMPT_MIN_US) /* check if preempt to start has changed */ if (lll_preempt_calc(ull, (TICKER_ID_ADV_AUX_BASE + ull_adv_aux_lll_handle_get(lll)), ticks_at_event)) { radio_isr_set(lll_isr_abort, lll); radio_disable(); } else #endif /* CONFIG_BT_CTLR_XTAL_ADVANCED */ { uint32_t ret; ret = lll_prepare_done(lll); LL_ASSERT(!ret); } DEBUG_RADIO_START_A(1); return 0; } static void isr_done(void *param) { struct event_done_extra *extra; /* Clear radio status and events */ lll_isr_status_reset(); /* Generate auxiliary radio event done */ extra = ull_done_extra_type_set(EVENT_DONE_EXTRA_TYPE_ADV_AUX); LL_ASSERT(extra); /* Cleanup radio event and dispatch the done event */ lll_isr_cleanup(param); } static void isr_tx(void *param) { struct node_rx_pdu *node_rx_prof; struct node_rx_pdu *node_rx; struct lll_adv_aux *lll_aux; struct lll_adv *lll; uint32_t hcto; if (IS_ENABLED(CONFIG_BT_CTLR_PROFILE_ISR)) { lll_prof_latency_capture(); node_rx_prof = lll_prof_reserve(); } /* Clear radio tx status and events */ lll_isr_tx_status_reset(); lll_aux = param; lll = lll_aux->adv; /* setup tIFS switching */ radio_tmr_tifs_set(EVENT_IFS_US); radio_switch_complete_and_tx(lll->phy_s, 0, lll->phy_s, lll->phy_flags); /* setup Rx buffer */ node_rx = ull_pdu_rx_alloc_peek(1); LL_ASSERT(node_rx); radio_pkt_rx_set(node_rx->pdu); /* assert if radio packet ptr is not set and radio started rx */ LL_ASSERT(!radio_is_ready()); if (IS_ENABLED(CONFIG_BT_CTLR_PROFILE_ISR)) { lll_prof_cputime_capture(); } radio_isr_set(isr_rx, param); #if defined(CONFIG_BT_CTLR_PRIVACY) if (ull_filter_lll_rl_enabled()) { uint8_t count, *irks = ull_filter_lll_irks_get(&count); radio_ar_configure(count, irks, (lll->phy_s << 2) | BIT(0)); } #endif /* CONFIG_BT_CTLR_PRIVACY */ /* +/- 2us active clock jitter, +1 us hcto compensation */ hcto = radio_tmr_tifs_base_get() + EVENT_IFS_US + 4 + 1; hcto += radio_rx_chain_delay_get(lll->phy_s, 1); hcto += addr_us_get(lll->phy_s); hcto -= radio_tx_chain_delay_get(lll->phy_s, 1); radio_tmr_hcto_configure(hcto); /* capture end of CONNECT_IND PDU, used for calculating first * peripheral event. */ radio_tmr_end_capture(); if (IS_ENABLED(CONFIG_BT_CTLR_SCAN_REQ_RSSI) || IS_ENABLED(CONFIG_BT_CTLR_CONN_RSSI)) { radio_rssi_measure(); } #if defined(CONFIG_BT_CTLR_GPIO_LNA_PIN) if (IS_ENABLED(CONFIG_BT_CTLR_PROFILE_ISR)) { /* PA/LNA enable is overwriting packet end used in ISR * profiling, hence back it up for later use. */ lll_prof_radio_end_backup(); } radio_gpio_lna_setup(); radio_gpio_pa_lna_enable(radio_tmr_tifs_base_get() + EVENT_IFS_US - 4 - radio_tx_chain_delay_get(lll->phy_s, 1) - CONFIG_BT_CTLR_GPIO_LNA_OFFSET); #endif /* CONFIG_BT_CTLR_GPIO_LNA_PIN */ if (IS_ENABLED(CONFIG_BT_CTLR_PROFILE_ISR)) { lll_prof_reserve_send(node_rx_prof); } } static void isr_rx(void *param) { uint8_t devmatch_ok; uint8_t devmatch_id; uint8_t irkmatch_ok; uint8_t irkmatch_id; uint8_t rssi_ready; uint8_t trx_done; uint8_t crc_ok; if (IS_ENABLED(CONFIG_BT_CTLR_PROFILE_ISR)) { lll_prof_latency_capture(); } /* Read radio status and events */ trx_done = radio_is_done(); if (trx_done) { crc_ok = radio_crc_is_valid(); devmatch_ok = radio_filter_has_match(); devmatch_id = radio_filter_match_get(); irkmatch_ok = radio_ar_has_match(); irkmatch_id = radio_ar_match_get(); rssi_ready = radio_rssi_is_ready(); } else { crc_ok = devmatch_ok = irkmatch_ok = rssi_ready = 0U; devmatch_id = irkmatch_id = 0xFF; } /* Clear radio status and events */ lll_isr_status_reset(); /* No Rx */ if (!trx_done) { goto isr_rx_do_close; } if (crc_ok) { int err; err = isr_rx_pdu(param, devmatch_ok, devmatch_id, irkmatch_ok, irkmatch_id, rssi_ready); if (!err) { if (IS_ENABLED(CONFIG_BT_CTLR_PROFILE_ISR)) { lll_prof_send(); } return; } } isr_rx_do_close: radio_isr_set(isr_done, param); radio_disable(); } static inline int isr_rx_pdu(struct lll_adv_aux *lll_aux, uint8_t devmatch_ok, uint8_t devmatch_id, uint8_t irkmatch_ok, uint8_t irkmatch_id, uint8_t rssi_ready) { struct node_rx_pdu *node_rx; struct pdu_adv_ext_hdr *hdr; struct pdu_adv *pdu_adv; struct pdu_adv *pdu_aux; struct pdu_adv *pdu_rx; struct lll_adv *lll; uint8_t *tgt_addr; uint8_t tx_addr; uint8_t rx_addr; uint8_t *addr; uint8_t upd; #if defined(CONFIG_BT_CTLR_PRIVACY) /* An IRK match implies address resolution enabled */ uint8_t rl_idx = irkmatch_ok ? ull_filter_lll_rl_irk_idx(irkmatch_id) : FILTER_IDX_NONE; #else uint8_t rl_idx = FILTER_IDX_NONE; #endif /* CONFIG_BT_CTLR_PRIVACY */ lll = lll_aux->adv; node_rx = ull_pdu_rx_alloc_peek(1); LL_ASSERT(node_rx); pdu_rx = (void *)node_rx->pdu; pdu_adv = lll_adv_data_curr_get(lll); pdu_aux = lll_adv_aux_data_latest_get(lll_aux, &upd); LL_ASSERT(pdu_aux); hdr = &pdu_aux->adv_ext_ind.ext_hdr; addr = &pdu_aux->adv_ext_ind.ext_hdr.data[ADVA_OFFSET]; tx_addr = pdu_aux->tx_addr; if (hdr->tgt_addr) { tgt_addr = &pdu_aux->adv_ext_ind.ext_hdr.data[TGTA_OFFSET]; } else { tgt_addr = NULL; } rx_addr = pdu_aux->rx_addr; if ((pdu_rx->type == PDU_ADV_TYPE_AUX_SCAN_REQ) && (pdu_rx->len == sizeof(struct pdu_adv_scan_req)) && lll_adv_scan_req_check(lll, pdu_rx, tx_addr, addr, devmatch_ok, &rl_idx)) { radio_isr_set(isr_done, lll); radio_switch_complete_and_disable(); radio_pkt_tx_set(lll_adv_scan_rsp_curr_get(lll)); /* assert if radio packet ptr is not set and radio started tx */ LL_ASSERT(!radio_is_ready()); if (IS_ENABLED(CONFIG_BT_CTLR_PROFILE_ISR)) { lll_prof_cputime_capture(); } #if defined(CONFIG_BT_CTLR_SCAN_REQ_NOTIFY) if (lll->scan_req_notify) { uint32_t err; /* Generate the scan request event */ err = lll_adv_scan_req_report(lll, pdu_rx, rl_idx, rssi_ready); if (err) { /* Scan Response will not be transmitted */ return err; } } #endif /* CONFIG_BT_CTLR_SCAN_REQ_NOTIFY */ #if defined(CONFIG_BT_CTLR_GPIO_PA_PIN) if (IS_ENABLED(CONFIG_BT_CTLR_PROFILE_ISR)) { /* PA/LNA enable is overwriting packet end used in ISR * profiling, hence back it up for later use. */ lll_prof_radio_end_backup(); } radio_gpio_pa_setup(); radio_gpio_pa_lna_enable(radio_tmr_tifs_base_get() + EVENT_IFS_US - radio_rx_chain_delay_get(lll->phy_s, 1) - CONFIG_BT_CTLR_GPIO_PA_OFFSET); #endif /* CONFIG_BT_CTLR_GPIO_PA_PIN */ return 0; #if defined(CONFIG_BT_PERIPHERAL) } else if ((pdu_rx->type == PDU_ADV_TYPE_AUX_CONNECT_REQ) && (pdu_rx->len == sizeof(struct pdu_adv_connect_ind)) && lll_adv_connect_ind_check(lll, pdu_rx, tx_addr, addr, rx_addr, tgt_addr, devmatch_ok, &rl_idx) && lll->conn) { struct node_rx_ftr *ftr; struct node_rx_pdu *rx; struct pdu_adv *pdu_tx; if (IS_ENABLED(CONFIG_BT_CTLR_CHAN_SEL_2)) { rx = ull_pdu_rx_alloc_peek(4); } else { rx = ull_pdu_rx_alloc_peek(3); } if (!rx) { return -ENOBUFS; } /* rx is effectively allocated later, after critical isr steps * are done */ radio_isr_set(isr_tx_connect_rsp, rx); radio_switch_complete_and_disable(); pdu_tx = init_connect_rsp_pdu(pdu_rx); radio_pkt_tx_set(pdu_tx); /* assert if radio packet ptr is not set and radio started tx */ LL_ASSERT(!radio_is_ready()); if (IS_ENABLED(CONFIG_BT_CTLR_PROFILE_ISR)) { lll_prof_cputime_capture(); } #if defined(CONFIG_BT_CTLR_GPIO_PA_PIN) if (IS_ENABLED(CONFIG_BT_CTLR_PROFILE_ISR)) { /* PA/LNA enable is overwriting packet end used in ISR * profiling, hence back it up for later use. */ lll_prof_radio_end_backup(); } radio_gpio_pa_setup(); radio_gpio_pa_lna_enable(radio_tmr_tifs_base_get() + EVENT_IFS_US - radio_rx_chain_delay_get(lll->phy_s, 1) - CONFIG_BT_CTLR_GPIO_PA_OFFSET); #endif /* CONFIG_BT_CTLR_GPIO_PA_PIN */ /* Note: this is the same as previous result from alloc_peek */ rx = ull_pdu_rx_alloc(); rx->hdr.type = NODE_RX_TYPE_CONNECTION; rx->hdr.handle = 0xffff; ftr = &(rx->hdr.rx_ftr); ftr->param = lll; ftr->ticks_anchor = radio_tmr_start_get(); ftr->radio_end_us = radio_tmr_end_get() - radio_rx_chain_delay_get(lll->phy_s, 1); #if defined(CONFIG_BT_CTLR_PRIVACY) ftr->rl_idx = irkmatch_ok ? rl_idx : FILTER_IDX_NONE; #endif /* CONFIG_BT_CTLR_PRIVACY */ if (IS_ENABLED(CONFIG_BT_CTLR_CHAN_SEL_2)) { ftr->extra = ull_pdu_rx_alloc(); } return 0; #endif /* CONFIG_BT_PERIPHERAL */ } return -EINVAL; } #if defined(CONFIG_BT_PERIPHERAL) static struct pdu_adv *init_connect_rsp_pdu(struct pdu_adv *pdu_ci) { struct pdu_adv_com_ext_adv *cr_com_hdr; struct pdu_adv_ext_hdr *cr_hdr; struct pdu_adv *pdu_cr; uint8_t *cr_dptr; pdu_cr = radio_pkt_scratch_get(); pdu_cr->type = PDU_ADV_TYPE_AUX_CONNECT_RSP; pdu_cr->rfu = 0; pdu_cr->chan_sel = 0; pdu_cr->tx_addr = pdu_ci->rx_addr; pdu_cr->rx_addr = pdu_ci->tx_addr; /* Common Extended Header Format Advertising Mode */ cr_com_hdr = &pdu_cr->adv_ext_ind; cr_com_hdr->adv_mode = 0; /* Clear Flags */ cr_hdr = &cr_com_hdr->ext_hdr; cr_dptr = (void *)cr_hdr; *cr_dptr = 0; cr_dptr = cr_hdr->data; /* AdvA */ cr_hdr->adv_addr = 1; memcpy(cr_dptr, &pdu_ci->connect_ind.adv_addr, BDADDR_SIZE); cr_dptr += BDADDR_SIZE; /* InitA */ cr_hdr->tgt_addr = 1; memcpy(cr_dptr, &pdu_ci->connect_ind.init_addr, BDADDR_SIZE); cr_dptr += BDADDR_SIZE; /* Common Extended Header Length */ cr_com_hdr->ext_hdr_len = cr_dptr - (uint8_t *)&cr_com_hdr->ext_hdr; /* PDU length */ pdu_cr->len = cr_dptr - &pdu_cr->payload[0]; return pdu_cr; } static void isr_tx_connect_rsp(void *param) { struct node_rx_ftr *ftr; struct node_rx_pdu *rx; struct lll_adv *lll; bool is_done; rx = param; ftr = &(rx->hdr.rx_ftr); lll = ftr->param; is_done = radio_is_done(); if (!is_done) { /* AUX_CONNECT_RSP was not sent properly, need to release * allocated resources and keep advertising. */ rx->hdr.type = NODE_RX_TYPE_RELEASE; if (IS_ENABLED(CONFIG_BT_CTLR_CHAN_SEL_2)) { ull_rx_put(rx->hdr.link, rx); rx = ftr->extra; rx->hdr.type = NODE_RX_TYPE_RELEASE; } } ull_rx_put(rx->hdr.link, rx); ull_rx_sched(); if (is_done) { /* Stop further LLL radio events */ lll->conn->periph.initiated = 1; } /* Clear radio status and events */ lll_isr_status_reset(); lll_isr_cleanup(lll); } #endif /* CONFIG_BT_PERIPHERAL */ |