Skip to content

Commit 380a800

Browse files
cvinayakcarlescufi
authored andcommitted
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 <[email protected]>
1 parent 0f9533e commit 380a800

File tree

1 file changed

+0
-12
lines changed
  • subsys/bluetooth/controller/hci

1 file changed

+0
-12
lines changed

subsys/bluetooth/controller/hci/hci.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5216,12 +5216,6 @@ static void le_ext_adv_report(struct pdu_data *pdu_data,
52165216
}
52175217

52185218
hdr_len = ptr - (uint8_t *)p;
5219-
if (hdr_len <= (PDU_AC_EXT_HEADER_SIZE_MIN +
5220-
sizeof(struct pdu_adv_ext_hdr))) {
5221-
hdr_len = PDU_AC_EXT_HEADER_SIZE_MIN;
5222-
ptr = (uint8_t *)h;
5223-
}
5224-
52255219
hdr_buf_len = PDU_AC_EXT_HEADER_SIZE_MIN + p->ext_hdr_len;
52265220
if (hdr_len > hdr_buf_len) {
52275221
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,
56395633
}
56405634

56415635
hdr_len = ptr - (uint8_t *)p;
5642-
if (hdr_len <= (PDU_AC_EXT_HEADER_SIZE_MIN +
5643-
sizeof(struct pdu_adv_ext_hdr))) {
5644-
hdr_len = PDU_AC_EXT_HEADER_SIZE_MIN;
5645-
ptr = (uint8_t *)h;
5646-
}
5647-
56485636
hdr_buf_len = PDU_AC_EXT_HEADER_SIZE_MIN + p->ext_hdr_len;
56495637
if (hdr_len > hdr_buf_len) {
56505638
BT_WARN(" Header length %u/%u, INVALID.", hdr_len,

0 commit comments

Comments
 (0)