Bluetooth: controller: split: Fill bdaddr in aux packet
Fill the bdaddr on advertising enable in the aux packet. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
0b99773037
commit
5ebbac32d9
1 changed files with 29 additions and 0 deletions
|
@ -517,6 +517,35 @@ uint8_t ll_adv_enable(uint8_t enable)
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(ptr, tx_addr, BDADDR_SIZE);
|
memcpy(ptr, tx_addr, BDADDR_SIZE);
|
||||||
|
} else if (h->aux_ptr) {
|
||||||
|
struct pdu_adv_com_ext_adv *s;
|
||||||
|
struct pdu_adv *pdu_aux;
|
||||||
|
struct ext_adv_hdr *hs;
|
||||||
|
uint8_t *ps;
|
||||||
|
|
||||||
|
pdu_aux = lll_adv_aux_data_peek(lll);
|
||||||
|
|
||||||
|
s = (void *)&pdu_aux->adv_ext_ind;
|
||||||
|
hs = (void *)s->ext_hdr_adi_adv_data;
|
||||||
|
ps = (uint8_t *)hs + sizeof(*hs);
|
||||||
|
|
||||||
|
if (hs->adv_addr) {
|
||||||
|
uint8_t *tx_addr = ll_addr_get(pdu_aux->tx_addr,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
/* TODO: Privacy check */
|
||||||
|
if (pdu_aux->tx_addr &&
|
||||||
|
!mem_nz(tx_addr, BDADDR_SIZE)) {
|
||||||
|
return BT_HCI_ERR_INVALID_PARAM;
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(ps, tx_addr, BDADDR_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (h->sync_info) {
|
||||||
|
/* TODO: allocate periodic advertising context
|
||||||
|
*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: TargetA, fill here at enable */
|
/* TODO: TargetA, fill here at enable */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue