Skip to content

Commit 175e9d9

Browse files
ppryga-nordicnashif
authored andcommitted
Bluetooth: controller: hci: Enable reporting of CTE reception
Enable reporting CTE in periodic advertising reports send to host. Signed-off-by: Piotr Pryga <[email protected]>
1 parent 3c59b6a commit 175e9d9

File tree

1 file changed

+10
-1
lines changed
  • subsys/bluetooth/controller/hci

1 file changed

+10
-1
lines changed

subsys/bluetooth/controller/hci/hci.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5025,6 +5025,7 @@ static void le_per_adv_sync_report(struct pdu_data *pdu_data,
50255025
uint8_t data_len = 0U;
50265026
uint8_t *data = NULL;
50275027
int8_t rssi;
5028+
uint8_t cte_type = 0U;
50285029

50295030
if (!(event_mask & BT_EVT_MASK_LE_META_EVENT) ||
50305031
!(le_event_mask & BT_EVT_MASK_LE_PER_ADVERTISING_REPORT)) {
@@ -5065,6 +5066,14 @@ static void le_per_adv_sync_report(struct pdu_data *pdu_data,
50655066

50665067
/* No AdvA */
50675068
/* No TargetA */
5069+
5070+
if (h->cte_info) {
5071+
cte_type = *(int8_t *)ptr;
5072+
ptr++;
5073+
5074+
BT_DBG(" CTE type= %d", cte_type);
5075+
}
5076+
50685077
/* No ADI */
50695078

50705079
/* AuxPtr */
@@ -5202,7 +5211,7 @@ static void le_per_adv_sync_report(struct pdu_data *pdu_data,
52025211
sep->handle = sys_cpu_to_le16(node_rx->hdr.handle);
52035212
sep->tx_power = tx_pwr;
52045213
sep->rssi = rssi;
5205-
sep->cte_type = 0U; /* TODO */
5214+
sep->cte_type = cte_type;
52065215
sep->data_status = data_status;
52075216
sep->length = data_len;
52085217
memcpy(&sep->data[0], data, data_len);

0 commit comments

Comments
 (0)