Bluetooth: controller: split: Updated HCI BT_INFO of scanned PDU
Updated HCI BT_INFO of printing the parsed extended PDU. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
45231fd071
commit
e9bee3b070
1 changed files with 26 additions and 2 deletions
|
@ -3243,13 +3243,16 @@ static void le_adv_ext_report(struct pdu_data *pdu_data,
|
||||||
|
|
||||||
if (h->aux_ptr) {
|
if (h->aux_ptr) {
|
||||||
struct ext_adv_aux_ptr *aux;
|
struct ext_adv_aux_ptr *aux;
|
||||||
|
uint8_t aux_phy;
|
||||||
|
|
||||||
aux = (void *)ptr;
|
aux = (void *)ptr;
|
||||||
ptr += sizeof(*aux);
|
ptr += sizeof(*aux);
|
||||||
|
|
||||||
|
aux_phy = BIT(aux->phy);
|
||||||
|
|
||||||
BT_INFO(" AuxPtr chan_idx = %u, ca = %u, offs_units "
|
BT_INFO(" AuxPtr chan_idx = %u, ca = %u, offs_units "
|
||||||
"= %u offs = 0x%x, phy = 0x%x", aux->chan_idx,
|
"= %u offs = 0x%x, phy = 0x%x", aux->chan_idx,
|
||||||
aux->ca, aux->offs_units, aux->offs, aux->phy);
|
aux->ca, aux->offs_units, aux->offs, aux_phy);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (h->tx_pwr) {
|
if (h->tx_pwr) {
|
||||||
|
@ -3261,7 +3264,28 @@ static void le_adv_ext_report(struct pdu_data *pdu_data,
|
||||||
BT_INFO(" Tx pwr= %d dB", tx_pwr);
|
BT_INFO(" Tx pwr= %d dB", tx_pwr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: length check? */
|
uint8_t len = ptr - (uint8_t *)p;
|
||||||
|
uint8_t hdr_len = len - offsetof(struct pdu_adv_com_ext_adv,
|
||||||
|
ext_hdr_adi_adv_data);
|
||||||
|
if (hdr_len > p->ext_hdr_len) {
|
||||||
|
BT_WARN(" Header length %u/%u, INVALID.", hdr_len,
|
||||||
|
p->ext_hdr_len);
|
||||||
|
} else {
|
||||||
|
uint8_t acad_len = p->ext_hdr_len - hdr_len;
|
||||||
|
|
||||||
|
if (acad_len) {
|
||||||
|
ptr += acad_len;
|
||||||
|
len += acad_len;
|
||||||
|
|
||||||
|
BT_INFO("ACAD: <todo>");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (len < adv->len) {
|
||||||
|
uint8_t ad_len = adv->len - len;
|
||||||
|
|
||||||
|
BT_INFO(" AD Data (%u): <todo>", ad_len);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
le_ext_adv_legacy_report(pdu_data, node_rx, buf);
|
le_ext_adv_legacy_report(pdu_data, node_rx, buf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue