Bluetooth: controller: split: Pass scanner LLL context in event
Pass the scanner LLL context in the generated connection complete event with unknown connecion id for HCI Create Connection Cancel Command Response. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
13a3270096
commit
c9c65a9b9b
2 changed files with 8 additions and 4 deletions
|
@ -720,14 +720,13 @@ void ll_rx_mem_release(void **node_rx)
|
|||
|
||||
#if defined(CONFIG_BT_CENTRAL)
|
||||
} else if (cc->status == BT_HCI_ERR_UNKNOWN_CONN_ID) {
|
||||
struct node_rx_ftr *ftr = &rx_free->rx_ftr;
|
||||
struct ll_scan_set *scan =
|
||||
(void *)HDR_LLL2EVT(ftr->param);
|
||||
struct lll_conn *conn_lll;
|
||||
struct ll_scan_set *scan;
|
||||
struct ll_conn *conn;
|
||||
memq_link_t *link;
|
||||
|
||||
scan = ull_scan_is_enabled_get(0);
|
||||
LL_ASSERT(scan);
|
||||
|
||||
conn_lll = scan->lll.conn;
|
||||
LL_ASSERT(conn_lll);
|
||||
scan->lll.conn = NULL;
|
||||
|
|
|
@ -292,6 +292,7 @@ u8_t ll_connect_disable(void **rx)
|
|||
status = ull_scan_disable(0, scan);
|
||||
if (!status) {
|
||||
struct ll_conn *conn = (void *)HDR_LLL2EVT(conn_lll);
|
||||
struct node_rx_ftr *ftr;
|
||||
struct node_rx_pdu *cc;
|
||||
memq_link_t *link;
|
||||
|
||||
|
@ -305,6 +306,10 @@ u8_t ll_connect_disable(void **rx)
|
|||
cc->hdr.type = NODE_RX_TYPE_CONNECTION;
|
||||
cc->hdr.handle = 0xffff;
|
||||
*((u8_t *)cc->pdu) = BT_HCI_ERR_UNKNOWN_CONN_ID;
|
||||
|
||||
ftr = &(cc->hdr.rx_ftr);
|
||||
ftr->param = &scan->lll;
|
||||
|
||||
*rx = cc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue