Bluetooth: Controller: Fix incorrect common header length calc
Fix incorrect calculation of received common extended header length. Due to this a zero length advertising data is reported in Extended Advertising and Periodic Advertising report as one byte AD data. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
0f9533e3d5
commit
380a800b88
1 changed files with 0 additions and 12 deletions
|
@ -5216,12 +5216,6 @@ static void le_ext_adv_report(struct pdu_data *pdu_data,
|
|||
}
|
||||
|
||||
hdr_len = ptr - (uint8_t *)p;
|
||||
if (hdr_len <= (PDU_AC_EXT_HEADER_SIZE_MIN +
|
||||
sizeof(struct pdu_adv_ext_hdr))) {
|
||||
hdr_len = PDU_AC_EXT_HEADER_SIZE_MIN;
|
||||
ptr = (uint8_t *)h;
|
||||
}
|
||||
|
||||
hdr_buf_len = PDU_AC_EXT_HEADER_SIZE_MIN + p->ext_hdr_len;
|
||||
if (hdr_len > hdr_buf_len) {
|
||||
BT_WARN(" Header length %u/%u, INVALID.", hdr_len,
|
||||
|
@ -5639,12 +5633,6 @@ static void le_per_adv_sync_report(struct pdu_data *pdu_data,
|
|||
}
|
||||
|
||||
hdr_len = ptr - (uint8_t *)p;
|
||||
if (hdr_len <= (PDU_AC_EXT_HEADER_SIZE_MIN +
|
||||
sizeof(struct pdu_adv_ext_hdr))) {
|
||||
hdr_len = PDU_AC_EXT_HEADER_SIZE_MIN;
|
||||
ptr = (uint8_t *)h;
|
||||
}
|
||||
|
||||
hdr_buf_len = PDU_AC_EXT_HEADER_SIZE_MIN + p->ext_hdr_len;
|
||||
if (hdr_len > hdr_buf_len) {
|
||||
BT_WARN(" Header length %u/%u, INVALID.", hdr_len,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue