Lines Matching refs:evt

755 static void create_ext_adv_info(struct bt_hci_evt_le_ext_advertising_info const *const evt,  in create_ext_adv_info()  argument
758 scan_info->primary_phy = bt_get_phy(evt->prim_phy); in create_ext_adv_info()
759 scan_info->secondary_phy = bt_get_phy(evt->sec_phy); in create_ext_adv_info()
760 scan_info->tx_power = evt->tx_power; in create_ext_adv_info()
761 scan_info->rssi = evt->rssi; in create_ext_adv_info()
762 scan_info->sid = evt->sid; in create_ext_adv_info()
763 scan_info->interval = sys_le16_to_cpu(evt->interval); in create_ext_adv_info()
764 scan_info->adv_type = get_adv_type(sys_le16_to_cpu(evt->evt_type)); in create_ext_adv_info()
765 scan_info->adv_props = get_adv_props_extended(sys_le16_to_cpu(evt->evt_type)); in create_ext_adv_info()
775 struct bt_hci_evt_le_ext_advertising_info *evt; in bt_hci_le_adv_ext_report() local
798 if (buf->len < sizeof(*evt)) { in bt_hci_le_adv_ext_report()
803 evt = net_buf_pull_mem(buf, sizeof(*evt)); in bt_hci_le_adv_ext_report()
804 evt_type = sys_le16_to_cpu(evt->evt_type); in bt_hci_le_adv_ext_report()
809 if (evt->length > buf->len) { in bt_hci_le_adv_ext_report()
810 LOG_WRN("Adv report corrupted (wants %u out of %u)", evt->length, buf->len); in bt_hci_le_adv_ext_report()
831 create_ext_adv_info(evt, &scan_info); in bt_hci_le_adv_ext_report()
832 le_adv_recv(&evt->addr, &scan_info, &buf->b, evt->length); in bt_hci_le_adv_ext_report()
838 &evt->addr, evt->sid); in bt_hci_le_adv_ext_report()
844 create_ext_adv_info(evt, &scan_info); in bt_hci_le_adv_ext_report()
845 le_adv_recv(&evt->addr, &scan_info, &buf->b, evt->length); in bt_hci_le_adv_ext_report()
878 init_reassembling_advertiser(&evt->addr, evt->sid); in bt_hci_le_adv_ext_report()
881 if (evt->length + ext_scan_buf.len > ext_scan_buf.size) { in bt_hci_le_adv_ext_report()
898 net_buf_simple_add_mem(&ext_scan_buf, buf->data, evt->length); in bt_hci_le_adv_ext_report()
908 create_ext_adv_info(evt, &scan_info); in bt_hci_le_adv_ext_report()
909 le_adv_recv(&evt->addr, &scan_info, &ext_scan_buf, ext_scan_buf.len); in bt_hci_le_adv_ext_report()
915 net_buf_pull(buf, evt->length); in bt_hci_le_adv_ext_report()
1019 struct bt_hci_evt_le_per_advertising_report_v2 *evt; in bt_hci_le_per_adv_report_common() local
1021 struct bt_hci_evt_le_per_advertising_report *evt; in bt_hci_le_per_adv_report_common()
1027 if (buf->len < sizeof(*evt)) { in bt_hci_le_per_adv_report_common()
1032 evt = net_buf_pull_mem(buf, sizeof(*evt)); in bt_hci_le_per_adv_report_common()
1034 per_adv_sync = bt_hci_per_adv_sync_lookup_handle(sys_le16_to_cpu(evt->handle)); in bt_hci_le_per_adv_report_common()
1038 sys_le16_to_cpu(evt->handle)); in bt_hci_le_per_adv_report_common()
1048 info.tx_power = evt->tx_power; in bt_hci_le_per_adv_report_common()
1049 info.rssi = evt->rssi; in bt_hci_le_per_adv_report_common()
1050 info.cte_type = bt_get_df_cte_type(evt->cte_type); in bt_hci_le_per_adv_report_common()
1055 info.periodic_event_counter = sys_le16_to_cpu(evt->periodic_event_counter); in bt_hci_le_per_adv_report_common()
1056 info.subevent = evt->subevent; in bt_hci_le_per_adv_report_common()
1061 if (net_buf_simple_tailroom(&per_adv_sync->reassembly) < evt->length) { in bt_hci_le_per_adv_report_common()
1072 if (evt->data_status == BT_HCI_LE_ADV_EVT_TYPE_DATA_STATUS_COMPLETE) { in bt_hci_le_per_adv_report_common()
1080 buf->data, evt->length); in bt_hci_le_per_adv_report_common()
1085 } else if (evt->data_status == BT_HCI_LE_ADV_EVT_TYPE_DATA_STATUS_INCOMPLETE) { in bt_hci_le_per_adv_report_common()
1091 } else if (evt->data_status == BT_HCI_LE_ADV_EVT_TYPE_DATA_STATUS_PARTIAL) { in bt_hci_le_per_adv_report_common()
1092 net_buf_simple_add_mem(&per_adv_sync->reassembly, buf->data, evt->length); in bt_hci_le_per_adv_report_common()
1094 } else if (evt->data_status == BT_HCI_LE_ADV_EVT_TYPE_DATA_STATUS_RX_FAILED && in bt_hci_le_per_adv_report_common()
1099 __ASSERT(false, "Invalid data status 0x%02X", evt->data_status); in bt_hci_le_per_adv_report_common()
1102 if (evt->data_status == BT_HCI_LE_ADV_EVT_TYPE_DATA_STATUS_COMPLETE) { in bt_hci_le_per_adv_report_common()
1108 } else if (evt->data_status == BT_HCI_LE_ADV_EVT_TYPE_DATA_STATUS_COMPLETE) { in bt_hci_le_per_adv_report_common()
1170 struct bt_hci_evt_le_per_adv_sync_established_v2 *evt = in bt_hci_le_per_adv_sync_established_common() local
1173 struct bt_hci_evt_le_per_adv_sync_established *evt = in bt_hci_le_per_adv_sync_established_common()
1195 if (evt->status == BT_HCI_ERR_OP_CANCELLED_BY_HOST) { in bt_hci_le_per_adv_sync_established_common()
1206 if (bt_addr_le_is_resolved(&evt->adv_addr)) { in bt_hci_le_per_adv_sync_established_common()
1207 bt_addr_le_copy_resolved(&id_addr, &evt->adv_addr); in bt_hci_le_per_adv_sync_established_common()
1211 &evt->adv_addr)); in bt_hci_le_per_adv_sync_established_common()
1217 ((pending_per_adv_sync->sid != evt->sid) || in bt_hci_le_per_adv_sync_established_common()
1221 per_adv_sync_terminate(sys_le16_to_cpu(evt->handle)); in bt_hci_le_per_adv_sync_established_common()
1228 if (unexpected_evt || evt->status != BT_HCI_ERR_SUCCESS) { in bt_hci_le_per_adv_sync_established_common()
1231 : evt->status; in bt_hci_le_per_adv_sync_established_common()
1240 pending_per_adv_sync->sid = evt->sid; in bt_hci_le_per_adv_sync_established_common()
1252 pending_per_adv_sync->handle = sys_le16_to_cpu(evt->handle); in bt_hci_le_per_adv_sync_established_common()
1253 pending_per_adv_sync->interval = sys_le16_to_cpu(evt->interval); in bt_hci_le_per_adv_sync_established_common()
1255 sys_le16_to_cpu(evt->clock_accuracy); in bt_hci_le_per_adv_sync_established_common()
1256 pending_per_adv_sync->phy = bt_get_phy(evt->phy); in bt_hci_le_per_adv_sync_established_common()
1265 pending_per_adv_sync->sid = evt->sid; in bt_hci_le_per_adv_sync_established_common()
1278 sync_info.num_subevents = evt->num_subevents; in bt_hci_le_per_adv_sync_established_common()
1279 sync_info.subevent_interval = evt->subevent_interval; in bt_hci_le_per_adv_sync_established_common()
1280 sync_info.response_slot_delay = evt->response_slot_delay; in bt_hci_le_per_adv_sync_established_common()
1281 sync_info.response_slot_spacing = evt->response_slot_spacing; in bt_hci_le_per_adv_sync_established_common()
1283 pending_per_adv_sync->num_subevents = evt->num_subevents; in bt_hci_le_per_adv_sync_established_common()
1284 pending_per_adv_sync->subevent_interval = evt->subevent_interval; in bt_hci_le_per_adv_sync_established_common()
1285 pending_per_adv_sync->response_slot_delay = evt->response_slot_delay; in bt_hci_le_per_adv_sync_established_common()
1286 pending_per_adv_sync->response_slot_spacing = evt->response_slot_spacing; in bt_hci_le_per_adv_sync_established_common()
1386 struct bt_hci_evt_le_per_adv_sync_lost *evt = in bt_hci_le_per_adv_sync_lost() local
1390 per_adv_sync = bt_hci_per_adv_sync_lookup_handle(sys_le16_to_cpu(evt->handle)); in bt_hci_le_per_adv_sync_lost()
1394 sys_le16_to_cpu(evt->handle)); in bt_hci_le_per_adv_sync_lost()
1421 struct bt_hci_evt_le_past_received_v2 *evt = in bt_hci_le_past_received_common() local
1424 struct bt_hci_evt_le_past_received *evt = in bt_hci_le_past_received_common()
1433 if (evt->status) { in bt_hci_le_past_received_common()
1436 evt->status, bt_hci_err_to_str(evt->status)); in bt_hci_le_past_received_common()
1441 sys_le16_to_cpu(evt->conn_handle), in bt_hci_le_past_received_common()
1446 per_adv_sync_terminate(sys_le16_to_cpu(evt->sync_handle)); in bt_hci_le_past_received_common()
1453 per_adv_sync_terminate(sys_le16_to_cpu(evt->sync_handle)); in bt_hci_le_past_received_common()
1460 if (bt_addr_le_is_resolved(&evt->addr)) { in bt_hci_le_past_received_common()
1461 bt_addr_le_copy_resolved(&id_addr, &evt->addr); in bt_hci_le_past_received_common()
1464 bt_lookup_id_addr(BT_ID_DEFAULT, &evt->addr)); in bt_hci_le_past_received_common()
1467 per_adv_sync->handle = sys_le16_to_cpu(evt->sync_handle); in bt_hci_le_past_received_common()
1468 per_adv_sync->interval = sys_le16_to_cpu(evt->interval); in bt_hci_le_past_received_common()
1469 per_adv_sync->clock_accuracy = sys_le16_to_cpu(evt->clock_accuracy); in bt_hci_le_past_received_common()
1470 per_adv_sync->phy = bt_get_phy(evt->phy); in bt_hci_le_past_received_common()
1472 per_adv_sync->sid = evt->adv_sid; in bt_hci_le_past_received_common()
1475 per_adv_sync->num_subevents = evt->num_subevents; in bt_hci_le_past_received_common()
1476 per_adv_sync->subevent_interval = evt->subevent_interval; in bt_hci_le_past_received_common()
1477 per_adv_sync->response_slot_delay = evt->response_slot_delay; in bt_hci_le_past_received_common()
1478 per_adv_sync->response_slot_spacing = evt->response_slot_spacing; in bt_hci_le_past_received_common()
1485 sync_info.service_data = sys_le16_to_cpu(evt->service_data); in bt_hci_le_past_received_common()
1549 struct bt_hci_evt_le_biginfo_adv_report *evt; in bt_hci_le_biginfo_adv_report() local
1554 evt = net_buf_pull_mem(buf, sizeof(*evt)); in bt_hci_le_biginfo_adv_report()
1556 per_adv_sync = bt_hci_per_adv_sync_lookup_handle(sys_le16_to_cpu(evt->sync_handle)); in bt_hci_le_biginfo_adv_report()
1560 sys_le16_to_cpu(evt->sync_handle)); in bt_hci_le_biginfo_adv_report()
1566 biginfo.num_bis = evt->num_bis; in bt_hci_le_biginfo_adv_report()
1567 biginfo.sub_evt_count = evt->nse; in bt_hci_le_biginfo_adv_report()
1568 biginfo.iso_interval = sys_le16_to_cpu(evt->iso_interval); in bt_hci_le_biginfo_adv_report()
1569 biginfo.burst_number = evt->bn; in bt_hci_le_biginfo_adv_report()
1570 biginfo.offset = evt->pto; in bt_hci_le_biginfo_adv_report()
1571 biginfo.rep_count = evt->irc; in bt_hci_le_biginfo_adv_report()
1572 biginfo.max_pdu = sys_le16_to_cpu(evt->max_pdu); in bt_hci_le_biginfo_adv_report()
1573 biginfo.sdu_interval = sys_get_le24(evt->sdu_interval); in bt_hci_le_biginfo_adv_report()
1574 biginfo.max_sdu = sys_le16_to_cpu(evt->max_sdu); in bt_hci_le_biginfo_adv_report()
1575 biginfo.phy = bt_get_phy(evt->phy); in bt_hci_le_biginfo_adv_report()
1576 biginfo.framing = evt->framing; in bt_hci_le_biginfo_adv_report()
1577 biginfo.encryption = evt->encryption ? true : false; in bt_hci_le_biginfo_adv_report()
1639 struct bt_hci_evt_le_advertising_info *evt; in bt_hci_le_adv_report() local
1657 if (buf->len < sizeof(*evt)) { in bt_hci_le_adv_report()
1662 evt = net_buf_pull_mem(buf, sizeof(*evt)); in bt_hci_le_adv_report()
1664 if (buf->len < evt->length + sizeof(adv_info.rssi)) { in bt_hci_le_adv_report()
1672 adv_info.rssi = evt->data[evt->length]; in bt_hci_le_adv_report()
1676 adv_info.adv_type = evt->evt_type; in bt_hci_le_adv_report()
1677 adv_info.adv_props = get_adv_props_legacy(evt->evt_type); in bt_hci_le_adv_report()
1679 le_adv_recv(&evt->addr, &adv_info, &buf->b, evt->length); in bt_hci_le_adv_report()
1681 net_buf_pull(buf, evt->length + sizeof(adv_info.rssi)); in bt_hci_le_adv_report()