epan/dissectors/pidl/ C99 drsuapi
[wireshark-sm.git] / epan / dissectors / packet-bthci_vendor_broadcom.c
blob1ea56da74d31eba5d2a064739063d8fbea193f78
1 /* packet-bthci_vendor.c
2 * Routines for the Bluetooth HCI Vendors Commands/Events
4 * Copyright 2014, Michal Labedzki for Tieto Corporation
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
13 #include "config.h"
15 #include <epan/packet.h>
16 #include <epan/expert.h>
17 #include <epan/tap.h>
19 #include "packet-bluetooth.h"
20 #include "packet-bthci_cmd.h"
21 #include "packet-bthci_evt.h"
23 static int proto_bthci_vendor_broadcom;
25 static int hf_broadcom_opcode;
26 static int hf_broadcom_opcode_ogf;
27 static int hf_broadcom_opcode_ocf;
28 static int hf_broadcom_parameter_length;
29 static int hf_broadcom_number_of_allowed_command_packets;
30 static int hf_broadcom_event_code;
31 static int hf_broadcom_le_advertising_filter_subcode;
32 static int hf_broadcom_le_scan_condition;
33 static int hf_broadcom_le_filter_index;
34 static int hf_broadcom_le_number_of_available_filters;
35 static int hf_broadcom_mem_data;
36 static int hf_broadcom_mem_address;
37 static int hf_broadcom_mem_rdlen;
38 static int hf_broadcom_baudrate;
39 static int hf_broadcom_status;
40 static int hf_broadcom_bd_addr;
41 static int hf_broadcom_max_advertising_instance;
42 static int hf_broadcom_max_advertising_instance_reserved;
43 static int hf_broadcom_resolvable_private_address_offloading;
44 static int hf_broadcom_resolvable_private_address_offloading_reserved;
45 static int hf_broadcom_total_scan_results;
46 static int hf_broadcom_max_irk_list;
47 static int hf_broadcom_filter_support;
48 static int hf_broadcom_max_filter;
49 static int hf_broadcom_energy_support;
50 static int hf_broadcom_version_support;
51 static int hf_broadcom_total_num_of_advt_tracked;
52 static int hf_broadcom_extended_scan_support;
53 static int hf_broadcom_debug_logging_support;
54 static int hf_broadcom_le_address_generation_offloading_support;
55 static int hf_broadcom_le_address_generation_offloading_support_reserved;
56 static int hf_broadcom_a2dp_source_offload_capability_mask;
57 static int hf_broadcom_a2dp_source_offload_capability_mask_sbc;
58 static int hf_broadcom_a2dp_source_offload_capability_mask_aac;
59 static int hf_broadcom_a2dp_source_offload_capability_mask_aptx;
60 static int hf_broadcom_a2dp_source_offload_capability_mask_aptx_hd;
61 static int hf_broadcom_a2dp_source_offload_capability_mask_ldac;
62 static int hf_broadcom_a2dp_source_offload_capability_mask_reserved;
63 static int hf_broadcom_bluetooth_quality_report_support;
64 static int hf_broadcom_dynamic_audio_buffer_support_mask;
65 static int hf_broadcom_dynamic_audio_buffer_support_mask_sbc;
66 static int hf_broadcom_dynamic_audio_buffer_support_mask_aac;
67 static int hf_broadcom_dynamic_audio_buffer_support_mask_aptx;
68 static int hf_broadcom_dynamic_audio_buffer_support_mask_aptx_hd;
69 static int hf_broadcom_dynamic_audio_buffer_support_mask_ldac;
70 static int hf_broadcom_dynamic_audio_buffer_support_mask_reserved;
71 static int hf_broadcom_a2dp_offload_v2_support;
72 static int hf_broadcom_connection_handle;
73 static int hf_broadcom_connection_priority;
74 static int hf_broadcom_sleep_mode;
75 static int hf_broadcom_host_stack_idle_threshold;
76 static int hf_broadcom_host_controller_idle_threshold;
77 static int hf_broadcom_wake_polarity;
78 static int hf_broadcom_host_wake_polarity;
79 static int hf_broadcom_allow_host_sleep_during_sco;
80 static int hf_broadcom_combine_sleep_mode_and_lpm;
81 static int hf_broadcom_enable_uart_txd_tri_state;
82 static int hf_broadcom_sleep_guard_time;
83 static int hf_broadcom_wakeup_guard_time;
84 static int hf_broadcom_txd_config;
85 static int hf_broadcom_pulsed_host_wake;
86 static int hf_broadcom_uart_clock;
87 static int hf_broadcom_codec_state;
88 static int hf_broadcom_codec;
89 static int hf_broadcom_sco_pcm_routing;
90 static int hf_broadcom_sco_pcm_interface_clock_rate;
91 static int hf_broadcom_sco_pcm_interface_frame_type;
92 static int hf_broadcom_sco_pcm_interface_sync_mode;
93 static int hf_broadcom_sco_pcm_interface_clock_mode;
94 static int hf_broadcom_pcm_shift_mode;
95 static int hf_broadcom_pcm_fill_bits;
96 static int hf_broadcom_pcm_fill_method;
97 static int hf_broadcom_pcm_fill_number_of_bits;
98 static int hf_broadcom_pcm_justify_mode;
99 static int hf_broadcom_sco_i2s_pcm_interface_mode;
100 static int hf_broadcom_sco_i2s_pcm_interface_role;
101 static int hf_broadcom_sco_i2s_pcm_interface_sample_rate;
102 static int hf_broadcom_sco_i2s_pcm_interface_clock_rate;
103 static int hf_broadcom_le_energy_total_rx_time;
104 static int hf_broadcom_le_energy_total_tx_time;
105 static int hf_broadcom_le_energy_total_idle_time;
106 static int hf_broadcom_le_energy_total_energy_used;
107 static int hf_broadcom_le_batch_scan_subcode;
108 static int hf_broadcom_le_batch_scan_report_format;
109 static int hf_broadcom_le_batch_scan_number_of_records;
110 static int hf_broadcom_le_batch_scan_mode;
111 static int hf_broadcom_le_batch_scan_enable;
112 static int hf_broadcom_le_batch_scan_full_max;
113 static int hf_broadcom_le_batch_scan_truncate_max;
114 static int hf_broadcom_le_batch_scan_notify_threshold;
115 static int hf_broadcom_le_batch_scan_window;
116 static int hf_broadcom_le_batch_scan_interval;
117 static int hf_broadcom_le_batch_scan_address_type;
118 static int hf_broadcom_le_batch_scan_discard_rule;
119 static int hf_broadcom_le_multi_advertising_subcode;
120 static int hf_broadcom_le_multi_advertising_enable;
121 static int hf_broadcom_le_multi_advertising_instance_id;
122 static int hf_broadcom_le_multi_advertising_type;
123 static int hf_broadcom_le_multi_advertising_min_interval;
124 static int hf_broadcom_le_multi_advertising_max_interval;
125 static int hf_broadcom_le_multi_advertising_address_type;
126 static int hf_broadcom_le_multi_advertising_filter_policy;
127 static int hf_broadcom_le_multi_advertising_tx_power;
128 static int hf_broadcom_le_multi_advertising_channel_map;
129 static int hf_broadcom_le_multi_advertising_channel_map_reserved;
130 static int hf_broadcom_le_multi_advertising_channel_map_39;
131 static int hf_broadcom_le_multi_advertising_channel_map_38;
132 static int hf_broadcom_le_multi_advertising_channel_map_37;
133 static int hf_broadcom_hid_emulation_mode;
134 static int hf_broadcom_vid;
135 static int hf_broadcom_pid;
136 static int hf_broadcom_chip_id;
137 static int hf_broadcom_target_id;
138 static int hf_broadcom_build_base;
139 static int hf_broadcom_build_number;
140 static int hf_broadcom_data;
141 static int hf_broadcom_a2dp_hardware_offload_subcode;
142 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec;
143 static int hf_broadcom_a2dp_hardware_offload_start_legacy_max_latency;
144 static int hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_flag;
145 static int hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_value;
146 static int hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_value_reserved;
147 static int hf_broadcom_a2dp_hardware_offload_start_legacy_sampling_frequency;
148 static int hf_broadcom_a2dp_hardware_offload_start_legacy_bits_per_sample;
149 static int hf_broadcom_a2dp_hardware_offload_start_legacy_channel_mode;
150 static int hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate;
151 static int hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_unspecified;
152 static int hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_reserved;
153 static int hf_broadcom_a2dp_hardware_offload_start_legacy_connection_handle;
154 static int hf_broadcom_a2dp_hardware_offload_start_legacy_l2cap_cid;
155 static int hf_broadcom_a2dp_hardware_offload_start_legacy_l2cap_mtu_size;
156 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information;
157 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_block_length;
158 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_subbands;
159 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_allocation_method;
160 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_min_bitpool;
161 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_max_bitpool;
162 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_sampling_frequency;
163 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_channel_mode;
164 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_reserved;
165 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_object_type;
166 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_vbr;
167 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_reserved;
168 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_vendor_id;
169 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_codec_id;
170 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index;
171 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index_reserved;
172 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask;
173 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_stereo;
174 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_dual;
175 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_mono;
176 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_reserved;
177 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_reserved;
178 static int hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_reserved;
179 static int hf_broadcom_a2dp_hardware_offload_start_connection_handle;
180 static int hf_broadcom_a2dp_hardware_offload_start_l2cap_cid;
181 static int hf_broadcom_a2dp_hardware_offload_start_data_path_direction;
182 static int hf_broadcom_a2dp_hardware_offload_start_peer_mtu;
183 static int hf_broadcom_a2dp_hardware_offload_start_cp_enable_scmst;
184 static int hf_broadcom_a2dp_hardware_offload_start_cp_header_scmst;
185 static int hf_broadcom_a2dp_hardware_offload_start_cp_header_scmst_reserved;
186 static int hf_broadcom_a2dp_hardware_offload_start_vendor_specific_parameters_length;
187 static int hf_broadcom_a2dp_hardware_offload_start_vendor_specific_parameters;
188 static int hf_broadcom_a2dp_hardware_offload_stop_connection_handle;
189 static int hf_broadcom_a2dp_hardware_offload_stop_l2cap_cid;
190 static int hf_broadcom_a2dp_hardware_offload_stop_data_path_direction;
193 static int * const hfx_le_multi_advertising_channel_map[] = {
194 &hf_broadcom_le_multi_advertising_channel_map_reserved,
195 &hf_broadcom_le_multi_advertising_channel_map_39,
196 &hf_broadcom_le_multi_advertising_channel_map_38,
197 &hf_broadcom_le_multi_advertising_channel_map_37,
198 NULL
201 static int * const hfx_broadcom_a2dp_source_offload_capability[] = {
202 &hf_broadcom_a2dp_source_offload_capability_mask_reserved,
203 &hf_broadcom_a2dp_source_offload_capability_mask_ldac,
204 &hf_broadcom_a2dp_source_offload_capability_mask_aptx_hd,
205 &hf_broadcom_a2dp_source_offload_capability_mask_aptx,
206 &hf_broadcom_a2dp_source_offload_capability_mask_aac,
207 &hf_broadcom_a2dp_source_offload_capability_mask_sbc,
208 NULL
211 static int * const hfx_broadcom_dynamic_audio_buffer_support[] = {
212 &hf_broadcom_dynamic_audio_buffer_support_mask_reserved,
213 &hf_broadcom_dynamic_audio_buffer_support_mask_ldac,
214 &hf_broadcom_dynamic_audio_buffer_support_mask_aptx_hd,
215 &hf_broadcom_dynamic_audio_buffer_support_mask_aptx,
216 &hf_broadcom_dynamic_audio_buffer_support_mask_aac,
217 &hf_broadcom_dynamic_audio_buffer_support_mask_sbc,
218 NULL
221 static int * const hfx_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode[] = {
222 &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_reserved,
223 &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_mono,
224 &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_dual,
225 &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_stereo,
226 NULL
229 static int ett_broadcom;
230 static int ett_broadcom_opcode;
231 static int ett_broadcom_channel_map;
232 static int ett_broadcom_a2dp_source_offload_capability_mask;
233 static int ett_broadcom_dynamic_audio_buffer_support_mask;
234 static int ett_broadcom_a2dp_hardware_offload_start_legacy_codec_information;
235 static int ett_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask;
237 static expert_field ei_broadcom_undecoded;
238 static expert_field ei_broadcom_unexpected_parameter;
239 static expert_field ei_broadcom_unexpected_data;
241 static dissector_handle_t bthci_vendor_broadcom_handle;
242 static dissector_handle_t btcommon_ad_handle;
244 #define BROADCOM_OPCODE_VALS(base) \
245 /* Bluetooth Core 4.0 */ \
246 { (base) | 0x0001, "Write BD ADDR" }, \
247 { (base) | 0x0018, "Update Baudrate" }, \
248 { (base) | 0x001C, "Write SCO PCM INT Parameter" }, \
249 { (base) | 0x001E, "Write PCM Data Format Parameter" }, \
250 { (base) | 0x0027, "Write Sleep Mode" }, \
251 { (base) | 0x002E, "Download MiniDriver" }, \
252 { (base) | 0x003B, "Enable USB HID Emulation" }, \
253 { (base) | 0x0045, "Write UART Clock Setting" }, \
254 { (base) | 0x004C, "Write Memory" }, \
255 { (base) | 0x004D, "Read Memory" }, \
256 { (base) | 0x004E, "Launch RAM" }, \
257 { (base) | 0x0057, "Set ACL Priority" }, \
258 { (base) | 0x005A, "Read VID PID" }, \
259 { (base) | 0x006D, "Write I2S PCM Interface Parameter" }, \
260 { (base) | 0x0079, "Read Verbose Config Version Info" }, \
261 { (base) | 0x007E, "Enable WBS" }, \
262 { (base) | 0x0102, "Enable WBS Modified" }, \
263 { (base) | 0x0111, "Set ConnectionLess Broadcast Stream" }, \
264 { (base) | 0x0112, "Receive ConnectionLess Broadcast Stream" }, \
265 { (base) | 0x0113, "Write ConnectionLess Broadcast Stream Data" }, \
266 { (base) | 0x0114, "ConnectionLess Broadcast Stream Flush" }, \
267 { (base) | 0x0153, "LE Get Vendor Capabilities" }, \
268 { (base) | 0x0154, "LE Multi Advertising" }, \
269 { (base) | 0x0156, "LE Batch Scan" }, \
270 { (base) | 0x0157, "LE Advertising Filter" }, \
271 { (base) | 0x0158, "LE Tracking Advertising" }, \
272 { (base) | 0x0159, "LE Energy Info" }, \
273 { (base) | 0x015D, "A2DP Hardware Offload" }
275 static const value_string broadcom_opcode_ocf_vals[] = {
276 BROADCOM_OPCODE_VALS(0x0),
277 { 0, NULL }
280 static const value_string broadcom_opcode_vals[] = {
281 BROADCOM_OPCODE_VALS(0x3F << 10),
282 { 0, NULL }
285 static const value_string broadcom_le_subcode_advertising_filter_vals[] = {
286 { 0x00, "Enable" },
287 { 0x01, "Feature Select" },
288 { 0x02, "BDADDR" },
289 { 0x03, "UUID" },
290 { 0x04, "Solicitate UUID" },
291 { 0x05, "Local Name" },
292 { 0x06, "Manufacturer Data" },
293 { 0x07, "Service Data" },
294 { 0x08, "All" },
295 { 0, NULL }
298 static const value_string broadcom_le_scan_condition_vals[] = {
299 { 0x00, "Add" },
300 { 0x01, "Delete" },
301 { 0x02, "Clear" },
302 { 0, NULL }
305 static const value_string broadcom_uart_clock_vals[] = {
306 { 0x01, "48 MHz" },
307 { 0x02, "24 HHz" },
308 { 0, NULL }
311 static const value_string broadcom_sleep_mode_vals[] = {
312 { 0x01, "disable" },
313 { 0x02, "UART" },
314 { 0x09, "H5" },
315 { 0, NULL }
318 static const value_string broadcom_wake_polarity_vals[] = {
319 { 0x00, "Active Low" },
320 { 0x01, "Active High" },
321 { 0, NULL }
324 static const value_string broadcom_connection_priority_vals[] = {
325 { 0x00, "Normal" },
326 { 0xFF, "High" },
327 { 0, NULL }
330 static const value_string broadcom_codec_state_vals[] = {
331 { 0x00, "Disable" },
332 { 0x01, "Enable" },
333 { 0, NULL }
336 static const value_string broadcom_codec_vals[] = {
337 { 0x00, "None" },
338 { 0x01, "CVSD" },
339 { 0x02, "mSBC" },
340 { 0, NULL }
343 static const value_string broadcom_sco_pcm_routing_vals[] = {
344 { 0x00, "PCM" },
345 { 0x01, "Transport" },
346 { 0x02, "Codec" },
347 { 0x03, "I2S" },
348 { 0, NULL }
351 static const value_string broadcom_sco_pcm_interface_clock_rate_vals[] = {
352 { 0x00, "128k" },
353 { 0x01, "256k" },
354 { 0x02, "512k" },
355 { 0x03, "1024k" },
356 { 0x04, "2048k" },
357 { 0, NULL }
360 static const value_string broadcom_sco_pcm_interface_frame_type_vals[] = {
361 { 0x00, "Short" },
362 { 0x01, "Long" },
363 { 0, NULL }
366 static const value_string broadcom_mode_peripheral_central_vals[] = {
367 { 0x00, "Peripheral" },
368 { 0x01, "Central" },
369 { 0, NULL }
372 static const value_string broadcom_pcm_shift_mode_vals[] = {
373 { 0x00, "MSB" },
374 { 0x01, "LSB" },
375 { 0, NULL }
378 static const value_string broadcom_pcm_fill_method_vals[] = {
379 { 0x00, "0's" },
380 { 0x01, "1's" },
381 { 0x02, "Signed" },
382 { 0x03, "Programmable" },
383 { 0, NULL }
386 static const value_string broadcom_pcm_justify_mode_vals[] = {
387 { 0x00, "Left" },
388 { 0x01, "Right" },
389 { 0, NULL }
392 static const value_string broadcom_sco_i2s_pcm_interface_mode_vals[] = {
393 { 0x00, "Disable" },
394 { 0x01, "Enable" },
395 { 0, NULL }
398 static const value_string broadcom_sco_i2s_pcm_interface_sample_rate_vals[] = {
399 { 0x00, "8k" },
400 { 0x01, "16k" },
401 { 0x02, "4k" },
402 { 0, NULL }
405 static const value_string broadcom_sco_i2s_pcm_interface_clock_rate_vals[] = {
406 { 0x00, "128k" },
407 { 0x01, "256k" },
408 { 0x02, "512k" },
409 { 0x03, "1024k" },
410 { 0x04, "2048k" },
411 { 0, NULL }
414 static const value_string broadcom_le_subcode_batch_scan_vals[] = {
415 { 0x01, "Enable/Disable Customer Feature" },
416 { 0x02, "Set Storage Parameter" },
417 { 0x03, "Set Parameter" },
418 { 0x04, "Read Results" },
419 { 0, NULL }
422 static const value_string broadcom_batch_scan_mode_vals[] = {
423 { 0x00, "Disable" },
424 { 0x01, "Pass" },
425 { 0x02, "ACTI" },
426 { 0x03, "Pass ACTI" },
427 { 0, NULL }
430 static const value_string broadcom_batch_scan_discard_rule_vals[] = {
431 { 0x00, "Old Items" },
432 { 0x01, "Lower RSSI Items" },
433 { 0, NULL }
436 static const value_string broadcom_disable_enable_vals[] = {
437 { 0x00, "Disable" },
438 { 0x01, "Enable" },
439 { 0, NULL }
442 static const value_string broadcom_le_subcode_multi_advertising_vals[] = {
443 { 0x01, "Set Parameter" },
444 { 0x02, "Write Advertising Data" },
445 { 0x03, "Write Scan Response Data" },
446 { 0x04, "Set Random Address" },
447 { 0x05, "MultiAdvertising Enable/Disable Customer Feature" },
448 { 0, NULL }
451 static const value_string broadcom_le_filter_policy_vals[] = {
452 { 0x00, "All Connections" },
453 { 0x01, "Whitelist Connections All" },
454 { 0x02, "All Connections Whitelist" },
455 { 0x03, "Whitelist Connections" },
456 { 0, NULL }
459 static const value_string broadcom_hid_emulation_mode_vals[] = {
460 { 0x00, "Bluetooth" },
461 { 0x01, "HID" },
462 { 0, NULL }
465 static const value_string broadcom_target_id_vals[] = {
466 { 0xFE, "Invalid" },
467 { 0xFF, "Undefined" },
468 { 0, NULL }
471 static const value_string broadcom_a2dp_hardware_offload_vals[] = {
472 { 0x01, "Start A2DP offload (legacy)" },
473 { 0x02, "Stop A2DP offload (legacy)" },
474 { 0x03, "Start A2DP offload" },
475 { 0x04, "Stop A2DP offload" },
476 { 0, NULL }
479 static const value_string broadcom_a2dp_hardware_offload_start_legacy_codec_vals[] = {
480 { 0x01, "SBC" },
481 { 0x02, "AAC" },
482 { 0x04, "APTX" },
483 { 0x08, "APTX HD" },
484 { 0x10, "LDAC" },
485 { 0, NULL }
488 static const value_string broadcom_a2dp_hardware_offload_start_legacy_sampling_frequency_vals[] = {
489 { 0x00000001, "44100 Hz" },
490 { 0x00000002, "48000 Hz" },
491 { 0x00000004, "88200 Hz" },
492 { 0x00000008, "96000 Hz" },
493 { 0, NULL }
496 static const value_string broadcom_a2dp_hardware_offload_start_legacy_bits_per_sample_vals[] = {
497 { 0x01, "16 bits per sample" },
498 { 0x02, "24 bits per sample" },
499 { 0x04, "32 bits per sample" },
500 { 0, NULL }
503 static const value_string broadcom_a2dp_hardware_offload_start_legacy_channel_mode_vals[] = {
504 { 0x01, "Mono" },
505 { 0x02, "Stereo" },
506 { 0, NULL }
509 static const value_string broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_block_length_vals[] = {
510 { 0x01, "16" },
511 { 0x02, "12" },
512 { 0x04, "8" },
513 { 0x08, "4" },
514 { 0, NULL }
517 static const value_string broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_subbands_vals[] = {
518 { 0x01, "8" },
519 { 0x02, "4" },
520 { 0, NULL }
523 static const value_string broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_allocation_method_vals[] = {
524 { 0x01, "Loudness" },
525 { 0x02, "SNR" },
526 { 0, NULL }
529 static const value_string broadcom_a2dp_hardware_offload_start_legacy_sbc_sampling_frequency_vals[] = {
530 { 0x01, "48000 Hz" },
531 { 0x02, "44100 Hz" },
532 { 0x04, "32000 Hz" },
533 { 0x08, "16000 Hz" },
534 { 0, NULL }
537 static const value_string broadcom_a2dp_hardware_offload_start_legacy_sbc_channel_mode_vals[] = {
538 { 0x01, "Joint Stereo" },
539 { 0x02, "Stereo" },
540 { 0x04, "Dual Channel" },
541 { 0x08, "Mono" },
542 { 0, NULL }
545 static const value_string broadcom_a2dp_hardware_offload_data_path_direction_vals[] = {
546 { 0x00, "Output (AVDTP Source/Merge)" },
547 { 0x01, "Input (AVDTP Sink/Split)" },
548 { 0, NULL }
551 static const value_string broadcom_a2dp_hardware_offload_start_legacy_aac_object_type_vals[] = {
552 { 0x01, "RFA (b0)" },
553 { 0x02, "RFA (b1)" },
554 { 0x04, "RFA (b2)" },
555 { 0x08, "RFA (b3)" },
556 { 0x10, "MPEG-4 AAC scalable" },
557 { 0x20, "MPEG-4 AAC LTP" },
558 { 0x40, "MPEG-4 AAC LC" },
559 { 0x80, "MPEG-2 AAC LC" },
560 { 0, NULL }
563 static const value_string broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index_vals[] = {
564 { 0x00, "High" },
565 { 0x01, "Mid" },
566 { 0x02, "Low" },
567 { 0x7f, "ABR (Adaptive Bit Rate)" },
568 { 0, NULL }
571 void proto_register_bthci_vendor_broadcom(void);
572 void proto_reg_handoff_bthci_vendor_broadcom(void);
574 static int
575 dissect_bthci_vendor_broadcom(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
577 proto_item *main_item;
578 proto_tree *main_tree;
579 proto_item *opcode_item;
580 proto_tree *opcode_tree;
581 proto_item *sub_item;
582 bluetooth_data_t *bluetooth_data;
583 int offset = 0;
584 uint16_t opcode;
585 uint16_t ocf;
586 const char *description;
587 uint8_t length;
588 uint8_t event_code;
589 uint8_t bd_addr[6];
590 uint8_t status;
591 uint8_t subcode;
592 uint8_t condition;
593 uint32_t interface_id;
594 uint32_t adapter_id;
595 proto_item *codec_information_item;
596 proto_tree *codec_information_tree;
598 bluetooth_data = (bluetooth_data_t *) data;
599 if (bluetooth_data) {
600 interface_id = bluetooth_data->interface_id;
601 adapter_id = bluetooth_data->adapter_id;
602 } else {
603 interface_id = HCI_INTERFACE_DEFAULT;
604 adapter_id = HCI_ADAPTER_DEFAULT;
607 main_item = proto_tree_add_item(tree, proto_bthci_vendor_broadcom, tvb, 0, -1, ENC_NA);
608 main_tree = proto_item_add_subtree(main_item, ett_broadcom);
610 switch (pinfo->p2p_dir) {
612 case P2P_DIR_SENT:
613 col_set_str(pinfo->cinfo, COL_PROTOCOL, "HCI_CMD_BROADCOM");
614 col_set_str(pinfo->cinfo, COL_INFO, "Sent Broadcom ");
616 opcode_item = proto_tree_add_item(main_tree, hf_broadcom_opcode, tvb, offset, 2, ENC_LITTLE_ENDIAN);
617 opcode_tree = proto_item_add_subtree(opcode_item, ett_broadcom_opcode);
618 opcode = tvb_get_letohs(tvb, offset);
619 proto_tree_add_item(opcode_tree, hf_broadcom_opcode_ogf, tvb, offset, 2, ENC_LITTLE_ENDIAN);
621 proto_tree_add_item(opcode_tree, hf_broadcom_opcode_ocf, tvb, offset, 2, ENC_LITTLE_ENDIAN);
622 ocf = opcode & 0x03ff;
623 offset+=2;
625 description = val_to_str_const(ocf, broadcom_opcode_ocf_vals, "unknown");
626 if (g_strcmp0(description, "unknown") != 0)
627 col_append_str(pinfo->cinfo, COL_INFO, description);
628 else
629 col_append_fstr(pinfo->cinfo, COL_INFO, "Unknown Command 0x%04X (opcode 0x%04X)", ocf, opcode);
631 if (have_tap_listener(bluetooth_hci_summary_tap)) {
632 bluetooth_hci_summary_tap_t *tap_hci_summary;
634 tap_hci_summary = wmem_new(pinfo->pool, bluetooth_hci_summary_tap_t);
635 tap_hci_summary->interface_id = interface_id;
636 tap_hci_summary->adapter_id = adapter_id;
638 tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_VENDOR_OPCODE;
639 tap_hci_summary->ogf = opcode >> 10;
640 tap_hci_summary->ocf = ocf;
641 if (try_val_to_str(ocf, broadcom_opcode_ocf_vals))
642 tap_hci_summary->name = description;
643 else
644 tap_hci_summary->name = NULL;
645 tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary);
648 proto_tree_add_item(main_tree, hf_broadcom_parameter_length, tvb, offset, 1, ENC_NA);
649 length = tvb_get_uint8(tvb, offset);
650 offset += 1;
652 switch(ocf) {
653 case 0x0001: /* Write BDADDR */
654 offset = dissect_bd_addr(hf_broadcom_bd_addr, pinfo, main_tree, tvb, offset, true, interface_id, adapter_id, bd_addr);
656 /* TODO: This is command, but in respose (event Command Complete) there is a status for that,
657 so write bdaddr can fail, but we store bdaddr as valid for now... */
658 if (!pinfo->fd->visited && bluetooth_data) {
659 wmem_tree_key_t key[4];
660 uint32_t frame_number;
661 localhost_bdaddr_entry_t *localhost_bdaddr_entry;
663 frame_number = pinfo->num;
665 key[0].length = 1;
666 key[0].key = &interface_id;
667 key[1].length = 1;
668 key[1].key = &adapter_id;
669 key[2].length = 1;
670 key[2].key = &frame_number;
671 key[3].length = 0;
672 key[3].key = NULL;
674 localhost_bdaddr_entry = (localhost_bdaddr_entry_t *) wmem_new(wmem_file_scope(), localhost_bdaddr_entry_t);
675 localhost_bdaddr_entry->interface_id = interface_id;
676 localhost_bdaddr_entry->adapter_id = adapter_id;
677 memcpy(localhost_bdaddr_entry->bd_addr, bd_addr, 6);
678 wmem_tree_insert32_array(bluetooth_data->localhost_bdaddr, key, localhost_bdaddr_entry);
680 break;
681 case 0x0018: /* Update Baudrate */
682 /* TODO: Implement - two unknown parameters... */
683 sub_item = proto_tree_add_item(main_tree, hf_broadcom_data, tvb, offset, 1, ENC_NA);
684 expert_add_info(pinfo, sub_item, &ei_broadcom_undecoded);
685 offset += 1;
687 sub_item = proto_tree_add_item(main_tree, hf_broadcom_data, tvb, offset, 1, ENC_NA);
688 expert_add_info(pinfo, sub_item, &ei_broadcom_undecoded);
689 offset += 1;
691 proto_tree_add_item(main_tree, hf_broadcom_baudrate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
692 offset += 4;
694 break;
695 case 0x001C: /* Write SCO PCM INT Parameter */
696 proto_tree_add_item(main_tree, hf_broadcom_sco_pcm_routing, tvb, offset, 1, ENC_NA);
697 offset += 1;
699 proto_tree_add_item(main_tree, hf_broadcom_sco_pcm_interface_clock_rate, tvb, offset, 1, ENC_NA);
700 offset += 1;
702 proto_tree_add_item(main_tree, hf_broadcom_sco_pcm_interface_frame_type, tvb, offset, 1, ENC_NA);
703 offset += 1;
705 proto_tree_add_item(main_tree, hf_broadcom_sco_pcm_interface_sync_mode, tvb, offset, 1, ENC_NA);
706 offset += 1;
708 proto_tree_add_item(main_tree, hf_broadcom_sco_pcm_interface_clock_mode, tvb, offset, 1, ENC_NA);
709 offset += 1;
711 break;
712 case 0x001E: /* Write PCM Data Format Parameter */
713 proto_tree_add_item(main_tree, hf_broadcom_pcm_shift_mode, tvb, offset, 1, ENC_NA);
714 offset += 1;
716 proto_tree_add_item(main_tree, hf_broadcom_pcm_fill_bits, tvb, offset, 1, ENC_NA);
717 offset += 1;
719 proto_tree_add_item(main_tree, hf_broadcom_pcm_fill_method, tvb, offset, 1, ENC_NA);
720 offset += 1;
722 proto_tree_add_item(main_tree, hf_broadcom_pcm_fill_number_of_bits, tvb, offset, 1, ENC_NA);
723 offset += 1;
725 proto_tree_add_item(main_tree, hf_broadcom_pcm_justify_mode, tvb, offset, 1, ENC_NA);
726 offset += 1;
728 break;
729 case 0x0027: /* Write Sleep Mode */
730 proto_tree_add_item(main_tree, hf_broadcom_sleep_mode, tvb, offset, 1, ENC_NA);
731 offset += 1;
733 proto_tree_add_item(main_tree, hf_broadcom_host_stack_idle_threshold, tvb, offset, 1, ENC_NA);
734 offset += 1;
736 proto_tree_add_item(main_tree, hf_broadcom_host_controller_idle_threshold, tvb, offset, 1, ENC_NA);
737 offset += 1;
739 proto_tree_add_item(main_tree, hf_broadcom_wake_polarity, tvb, offset, 1, ENC_NA);
740 offset += 1;
742 proto_tree_add_item(main_tree, hf_broadcom_host_wake_polarity, tvb, offset, 1, ENC_NA);
743 offset += 1;
745 proto_tree_add_item(main_tree, hf_broadcom_allow_host_sleep_during_sco, tvb, offset, 1, ENC_NA);
746 offset += 1;
748 proto_tree_add_item(main_tree, hf_broadcom_combine_sleep_mode_and_lpm, tvb, offset, 1, ENC_NA);
749 offset += 1;
751 proto_tree_add_item(main_tree, hf_broadcom_enable_uart_txd_tri_state, tvb, offset, 1, ENC_NA);
752 offset += 1;
754 proto_tree_add_item(main_tree, hf_broadcom_sleep_guard_time, tvb, offset, 1, ENC_NA);
755 offset += 1;
757 proto_tree_add_item(main_tree, hf_broadcom_wakeup_guard_time, tvb, offset, 1, ENC_NA);
758 offset += 1;
760 proto_tree_add_item(main_tree, hf_broadcom_txd_config, tvb, offset, 1, ENC_NA);
761 offset += 1;
763 proto_tree_add_item(main_tree, hf_broadcom_pulsed_host_wake, tvb, offset, 1, ENC_NA);
764 offset += 1;
766 break;
767 case 0x003B: /* Enable USB HID Emulation */
768 proto_tree_add_item(main_tree, hf_broadcom_hid_emulation_mode, tvb, offset, 1, ENC_NA);
769 offset += 1;
771 break;
772 case 0x0045: /* Write UART Clock Setting */
773 proto_tree_add_item(main_tree, hf_broadcom_uart_clock, tvb, offset, 1, ENC_NA);
774 offset += 1;
776 break;
777 case 0x004C: /* Write Memory */
778 proto_tree_add_item(main_tree, hf_broadcom_mem_address, tvb, offset, 4, ENC_LITTLE_ENDIAN);
779 offset += 4;
781 proto_tree_add_item(main_tree, hf_broadcom_mem_data, tvb, offset, length - 4, ENC_NA);
782 offset += length - 4;
783 break;
784 case 0x004D: /* Read RAM */
785 proto_tree_add_item(main_tree, hf_broadcom_mem_address, tvb, offset, 4, ENC_LITTLE_ENDIAN);
786 offset += 4;
788 proto_tree_add_item(main_tree, hf_broadcom_mem_rdlen, tvb, offset, 1, ENC_NA);
789 offset += 1;
790 break;
791 case 0x004E: /* Launch RAM */
792 proto_tree_add_item(main_tree, hf_broadcom_mem_address, tvb, offset, 4, ENC_LITTLE_ENDIAN);
793 offset += 4;
795 break;
796 case 0x0057: /* Set ACL Priority */
797 proto_tree_add_item(main_tree, hf_broadcom_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
798 offset += 2;
800 proto_tree_add_item(main_tree, hf_broadcom_connection_priority, tvb, offset, 1, ENC_NA);
801 offset += 1;
803 break;
804 case 0x006D: /* Write I2S PCM Interface Parameter */
805 proto_tree_add_item(main_tree, hf_broadcom_sco_i2s_pcm_interface_mode, tvb, offset, 1, ENC_NA);
806 offset += 1;
808 proto_tree_add_item(main_tree, hf_broadcom_sco_i2s_pcm_interface_role, tvb, offset, 1, ENC_NA);
809 offset += 1;
811 proto_tree_add_item(main_tree, hf_broadcom_sco_i2s_pcm_interface_sample_rate, tvb, offset, 1, ENC_NA);
812 offset += 1;
814 proto_tree_add_item(main_tree, hf_broadcom_sco_i2s_pcm_interface_clock_rate, tvb, offset, 1, ENC_NA);
815 offset += 1;
817 break;
818 case 0x007E: /* Enable WBS */
819 proto_tree_add_item(main_tree, hf_broadcom_codec_state, tvb, offset, 1, ENC_NA);
820 status = tvb_get_uint8(tvb, offset);
821 offset += 1;
823 if (status == 0x01) { /* Enable */
824 proto_tree_add_item(main_tree, hf_broadcom_codec, tvb, offset, 2, ENC_LITTLE_ENDIAN);
825 offset += 2;
827 break;
828 case 0x0154: /* LE Multi Advertising */
829 proto_tree_add_item(main_tree, hf_broadcom_le_multi_advertising_subcode, tvb, offset, 1, ENC_NA);
830 subcode = tvb_get_uint8(tvb, offset);
831 offset += 1;
833 switch (subcode) {
834 case 0x01: /* Set Parameter */
835 proto_tree_add_item(main_tree, hf_broadcom_le_multi_advertising_min_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
836 offset += 2;
838 proto_tree_add_item(main_tree, hf_broadcom_le_multi_advertising_max_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
839 offset += 2;
841 proto_tree_add_item(main_tree, hf_broadcom_le_multi_advertising_type, tvb, offset, 1, ENC_NA);
842 offset += 1;
844 proto_tree_add_item(main_tree, hf_broadcom_le_multi_advertising_address_type, tvb, offset, 1, ENC_NA);
845 offset += 1;
847 offset = dissect_bd_addr(hf_broadcom_bd_addr, pinfo, main_tree, tvb, offset, false, interface_id, adapter_id, NULL);
849 proto_tree_add_item(main_tree, hf_broadcom_le_multi_advertising_address_type, tvb, offset, 1, ENC_NA);
850 offset += 1;
852 offset = dissect_bd_addr(hf_broadcom_bd_addr, pinfo, main_tree, tvb, offset, false, interface_id, adapter_id, NULL);
854 proto_tree_add_bitmask(main_tree, tvb, offset, hf_broadcom_le_multi_advertising_channel_map, ett_broadcom_channel_map, hfx_le_multi_advertising_channel_map, ENC_NA);
855 offset += 1;
857 proto_tree_add_item(main_tree, hf_broadcom_le_multi_advertising_filter_policy, tvb, offset, 1, ENC_NA);
858 offset += 1;
860 proto_tree_add_item(main_tree, hf_broadcom_le_multi_advertising_instance_id, tvb, offset, 1, ENC_NA);
861 offset += 1;
863 proto_tree_add_item(main_tree, hf_broadcom_le_multi_advertising_tx_power, tvb, offset, 1, ENC_NA);
864 offset += 1;
866 break;
867 case 0x02: /* Write Advertising Data */
868 case 0x03: /* Write Scan Response Data */
869 call_dissector_with_data(btcommon_ad_handle, tvb_new_subset_length(tvb, offset, 31), pinfo, tree, bluetooth_data);
870 save_local_device_name_from_eir_ad(tvb, offset, pinfo, 31, bluetooth_data);
871 offset += 31;
873 proto_tree_add_item(main_tree, hf_broadcom_le_multi_advertising_instance_id, tvb, offset, 1, ENC_NA);
874 offset += 1;
876 break;
877 case 0x04: /* Set Random Address */
878 offset = dissect_bd_addr(hf_broadcom_bd_addr, pinfo, main_tree, tvb, offset, false, interface_id, adapter_id, NULL);
880 proto_tree_add_item(main_tree, hf_broadcom_le_multi_advertising_instance_id, tvb, offset, 1, ENC_NA);
881 offset += 1;
883 break;
884 case 0x05: /* MultiAdvertising Enable/Disable Customer Feature */
885 proto_tree_add_item(main_tree, hf_broadcom_le_multi_advertising_enable, tvb, offset, 1, ENC_NA);
886 offset += 1;
888 proto_tree_add_item(main_tree, hf_broadcom_le_multi_advertising_instance_id, tvb, offset, 1, ENC_NA);
889 offset += 1;
891 break;
894 break;
895 case 0x0156: /* LE Batch Scan */
896 proto_tree_add_item(main_tree, hf_broadcom_le_batch_scan_subcode, tvb, offset, 1, ENC_NA);
897 subcode = tvb_get_uint8(tvb, offset);
898 offset += 1;
900 switch (subcode) {
901 case 0x01: /* Enable/Disable Customer Feature */
902 proto_tree_add_item(main_tree, hf_broadcom_le_batch_scan_enable, tvb, offset, 1, ENC_NA);
903 offset += 1;
905 break;
906 case 0x02: /* Set Storage Parameter */
907 proto_tree_add_item(main_tree, hf_broadcom_le_batch_scan_full_max, tvb, offset, 1, ENC_NA);
908 offset += 1;
910 proto_tree_add_item(main_tree, hf_broadcom_le_batch_scan_truncate_max, tvb, offset, 1, ENC_NA);
911 offset += 1;
913 proto_tree_add_item(main_tree, hf_broadcom_le_batch_scan_notify_threshold, tvb, offset, 1, ENC_NA);
914 offset += 1;
916 break;
917 case 0x03: /* Set Parameter */
918 proto_tree_add_item(main_tree, hf_broadcom_le_batch_scan_mode, tvb, offset, 1, ENC_NA);
919 offset += 1;
921 proto_tree_add_item(main_tree, hf_broadcom_le_batch_scan_window, tvb, offset, 4, ENC_LITTLE_ENDIAN);
922 offset += 4;
924 proto_tree_add_item(main_tree, hf_broadcom_le_batch_scan_interval, tvb, offset, 4, ENC_LITTLE_ENDIAN);
925 offset += 4;
927 proto_tree_add_item(main_tree, hf_broadcom_le_batch_scan_address_type, tvb, offset, 1, ENC_NA);
928 offset += 1;
930 proto_tree_add_item(main_tree, hf_broadcom_le_batch_scan_discard_rule, tvb, offset, 1, ENC_NA);
931 offset += 1;
933 break;
934 case 0x04: /* Read Results */
935 proto_tree_add_item(main_tree, hf_broadcom_le_batch_scan_mode, tvb, offset, 1, ENC_NA);
936 offset += 1;
938 break;
941 break;
942 case 0x0157: /* LE Advertising Filter */
943 proto_tree_add_item(main_tree, hf_broadcom_le_advertising_filter_subcode, tvb, offset, 1, ENC_NA);
944 subcode = tvb_get_uint8(tvb, offset);
945 offset += 1;
947 proto_tree_add_item(main_tree, hf_broadcom_le_scan_condition, tvb, offset, 1, ENC_NA);
948 condition = tvb_get_uint8(tvb, offset);
949 offset += 1;
951 proto_tree_add_item(main_tree, hf_broadcom_le_filter_index, tvb, offset, 1, ENC_NA);
952 offset += 1;
954 if (condition == 0x00) { /* Add */
955 switch (subcode) {
956 case 0x00: /* Enable */
957 case 0x01: /* Feature Select */
958 case 0x02: /* BDADDR */
959 case 0x03: /* UUID */
960 case 0x04: /* Solicitate UUID */
961 case 0x05: /* Local Name */
962 case 0x06: /* Manufacturer Data */
963 case 0x07: /* Service Data */
964 case 0x08: /* All */
965 /* TODO */
966 sub_item = proto_tree_add_item(main_tree, hf_broadcom_data, tvb, offset, length - 3, ENC_NA);
967 expert_add_info(pinfo, sub_item, &ei_broadcom_undecoded);
968 offset += length - 3;
970 break;
971 default:
972 sub_item = proto_tree_add_item(main_tree, hf_broadcom_data, tvb, offset, length - 3, ENC_NA);
973 expert_add_info(pinfo, sub_item, &ei_broadcom_unexpected_data);
974 offset += length - 3;
978 break;
979 case 0x0102: /* Enable WBS Modified */
980 case 0x0111: /* Set ConnectionLess Broadcast Stream */
981 case 0x0112: /* Receive ConnectionLess Broadcast Stream */
982 case 0x0113: /* Write ConnectionLess Broadcast Stream Data */
983 case 0x0114: /* ConnectionLess Broadcast Stream Flush */
984 case 0x0158: /* LE Tracking Advertising */
985 sub_item = proto_tree_add_item(main_tree, hf_broadcom_data, tvb, offset, length, ENC_NA);
986 expert_add_info(pinfo, sub_item, &ei_broadcom_undecoded);
987 offset += length;
989 break;
991 case 0x002E: /* Download MiniDriver */
992 case 0x005A: /* Read VID PID */
993 case 0x0079: /* Read Verbose Config Version Info */
994 case 0x0153: /* LE Get Vendor Capabilities */
995 case 0x0159: /* LE Energy Info */
996 if (tvb_captured_length_remaining(tvb, offset) > 0) {
997 sub_item = proto_tree_add_item(main_tree, hf_broadcom_data, tvb, offset, length, ENC_NA);
998 expert_add_info(pinfo, sub_item, &ei_broadcom_unexpected_parameter);
1000 break;
1001 case 0x015D: /* A2DP Hardware Offload */
1002 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_subcode, tvb, offset, 1, ENC_NA);
1003 subcode = tvb_get_uint8(tvb, offset);
1004 offset += 1;
1006 switch (subcode) {
1007 case 0x01: { /* Start A2DP offload (legacy) */
1008 int codec_id = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN);
1010 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1011 offset += 4;
1013 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_max_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1014 offset += 2;
1016 /* Flag is the LSB out of the two, read it first */
1017 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_flag, tvb, offset, 1, ENC_NA);
1018 offset += 1;
1020 bool scms_t_enabled = tvb_get_uint8(tvb, offset) == 0x01;
1021 if (scms_t_enabled) {
1022 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_value, tvb, offset, 1, ENC_NA);
1023 } else {
1024 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_value_reserved, tvb, offset, 1, ENC_NA);
1026 offset += 1;
1028 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_sampling_frequency, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1029 offset += 4;
1031 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_bits_per_sample, tvb, offset, 1, ENC_NA);
1032 offset += 1;
1034 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_channel_mode, tvb, offset, 1, ENC_NA);
1035 offset += 1;
1037 uint32_t encoded_audio_bitrate = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN);
1038 if (encoded_audio_bitrate == 0x00000000) {
1039 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_unspecified, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1040 } else if (encoded_audio_bitrate >= 0x01000000) {
1041 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_reserved, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1042 } else {
1043 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1045 offset += 4;
1047 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1048 offset += 2;
1050 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_l2cap_cid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1051 offset += 2;
1053 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_l2cap_mtu_size, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1054 offset += 2;
1056 codec_information_item = proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information, tvb, offset, 32, ENC_NA);
1057 codec_information_tree = proto_item_add_subtree(codec_information_item, ett_broadcom_a2dp_hardware_offload_start_legacy_codec_information);
1059 switch (codec_id) {
1060 case 0x00000001: /* SBC */
1061 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_block_length, tvb, offset, 1, ENC_NA);
1062 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_subbands, tvb, offset, 1, ENC_NA);
1063 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_allocation_method, tvb, offset, 1, ENC_NA);
1064 offset += 1;
1066 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_min_bitpool, tvb, offset, 1, ENC_NA);
1067 offset += 1;
1069 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_max_bitpool, tvb, offset, 1, ENC_NA);
1070 offset += 1;
1072 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_sampling_frequency, tvb, offset, 1, ENC_NA);
1073 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_channel_mode, tvb, offset, 1, ENC_NA);
1074 offset += 1;
1076 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_reserved, tvb, offset, 28, ENC_NA);
1077 offset += 28;
1078 break;
1079 case 0x00000002: /* AAC */
1080 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_object_type, tvb, offset, 1, ENC_NA);
1081 offset += 1;
1083 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_vbr, tvb, offset, 1, ENC_NA);
1084 offset += 1;
1086 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_reserved, tvb, offset, 30, ENC_NA);
1087 offset += 30;
1088 break;
1089 case 0x00000010: /* LDAC */
1090 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_vendor_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1091 offset += 4;
1093 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_codec_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1094 offset += 2;
1096 uint8_t bitrate_index = tvb_get_uint8(tvb, offset);
1097 if (bitrate_index >= 0x03 && bitrate_index != 0x7F) {
1098 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index_reserved, tvb, offset, 1, ENC_NA);
1099 } else {
1100 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index, tvb, offset, 1, ENC_NA);
1102 offset += 1;
1104 proto_tree_add_bitmask(main_tree, tvb, offset, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask,
1105 ett_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask, hfx_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode, ENC_NA);
1106 offset += 1;
1108 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_reserved, tvb, offset, 24, ENC_NA);
1109 offset += 24;
1110 break;
1111 default: /* All other codecs */
1112 proto_tree_add_item(codec_information_tree, hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_reserved, tvb, offset, 32, ENC_NA);
1113 offset += 32;
1114 break;
1117 break;
1119 case 0x02: { /* Stop A2DP offload (legacy) */
1120 if (tvb_captured_length_remaining(tvb, offset) > 0) {
1121 sub_item = proto_tree_add_item(main_tree, hf_broadcom_data, tvb, offset, length, ENC_NA);
1122 expert_add_info(pinfo, sub_item, &ei_broadcom_unexpected_parameter);
1123 offset += tvb_captured_length_remaining(tvb, offset);
1125 break;
1127 case 0x03: { /* Start A2DP offload */
1128 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1129 offset += 2;
1131 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_l2cap_cid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1132 offset += 2;
1134 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_data_path_direction, tvb, offset, 1, ENC_NA);
1135 offset += 1;
1137 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_peer_mtu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1138 offset += 2;
1140 bool cp_enable_scmst = tvb_get_uint8(tvb, offset) == 0x01;
1141 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_cp_enable_scmst, tvb, offset, 1, ENC_NA);
1142 offset += 1;
1144 if (cp_enable_scmst) {
1145 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_cp_header_scmst, tvb, offset, 1, ENC_NA);
1146 } else {
1147 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_cp_header_scmst_reserved, tvb, offset, 1, ENC_NA);
1149 offset += 1;
1151 uint8_t vendor_specific_parameters_length = tvb_get_uint8(tvb, offset);
1152 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_vendor_specific_parameters_length, tvb, offset, 1, ENC_NA);
1153 offset += 1;
1155 if (vendor_specific_parameters_length > 0 && vendor_specific_parameters_length <= 128) {
1156 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_start_vendor_specific_parameters, tvb, offset, vendor_specific_parameters_length, ENC_NA);
1157 offset += vendor_specific_parameters_length;
1159 break;
1161 case 0x04: { /* Stop A2DP offload */
1162 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_stop_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1163 offset += 2;
1165 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_stop_l2cap_cid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1166 offset += 2;
1168 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_stop_data_path_direction, tvb, offset, 1, ENC_NA);
1169 offset += 1;
1171 break;
1173 default:
1174 if (tvb_captured_length_remaining(tvb, offset) > 0) {
1175 sub_item = proto_tree_add_item(main_tree, hf_broadcom_data, tvb, offset, length, ENC_NA);
1176 expert_add_info(pinfo, sub_item, &ei_broadcom_unexpected_parameter);
1177 offset += tvb_captured_length_remaining(tvb, offset);
1179 break;
1182 break;
1183 default:
1184 if (length > 0) {
1185 sub_item = proto_tree_add_item(main_tree, hf_broadcom_data, tvb, offset, length, ENC_NA);
1186 expert_add_info(pinfo, sub_item, &ei_broadcom_undecoded);
1187 offset += length;
1191 break;
1192 case P2P_DIR_RECV:
1193 col_set_str(pinfo->cinfo, COL_PROTOCOL, "HCI_EVT_BROADCOM");
1194 col_set_str(pinfo->cinfo, COL_INFO, "Rcvd Broadcom ");
1196 event_code = tvb_get_uint8(tvb, offset);
1197 description = val_to_str_ext(event_code, &bthci_evt_evt_code_vals_ext, "Unknown 0x%08x");
1198 col_append_str(pinfo->cinfo, COL_INFO, description);
1199 proto_tree_add_item(main_tree, hf_broadcom_event_code, tvb, offset, 1, ENC_NA);
1200 offset += 1;
1202 if (have_tap_listener(bluetooth_hci_summary_tap)) {
1203 bluetooth_hci_summary_tap_t *tap_hci_summary;
1205 tap_hci_summary = wmem_new(pinfo->pool, bluetooth_hci_summary_tap_t);
1206 tap_hci_summary->interface_id = interface_id;
1207 tap_hci_summary->adapter_id = adapter_id;
1209 tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_VENDOR_EVENT;
1210 tap_hci_summary->event = event_code;
1211 if (try_val_to_str_ext(event_code, &bthci_evt_evt_code_vals_ext))
1212 tap_hci_summary->name = description;
1213 else
1214 tap_hci_summary->name = NULL;
1215 tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary);
1218 proto_tree_add_item(main_tree, hf_broadcom_parameter_length, tvb, offset, 1, ENC_NA);
1219 length = tvb_get_uint8(tvb, offset);
1220 offset += 1;
1222 switch (event_code) {
1223 case 0x0e: /* Command Complete */
1224 proto_tree_add_item(main_tree, hf_broadcom_number_of_allowed_command_packets, tvb, offset, 1, ENC_NA);
1225 offset += 1;
1227 opcode_item = proto_tree_add_item(main_tree, hf_broadcom_opcode, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1228 opcode_tree = proto_item_add_subtree(opcode_item, ett_broadcom_opcode);
1229 opcode = tvb_get_letohs(tvb, offset);
1230 proto_tree_add_item(opcode_tree, hf_broadcom_opcode_ogf, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1232 proto_tree_add_item(opcode_tree, hf_broadcom_opcode_ocf, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1233 ocf = opcode & 0x03ff;
1234 offset += 2;
1236 description = val_to_str_const(ocf, broadcom_opcode_ocf_vals, "unknown");
1237 if (g_strcmp0(description, "unknown") != 0)
1238 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", description);
1239 else
1240 col_append_fstr(pinfo->cinfo, COL_INFO, " (Unknown Command 0x%04X [opcode 0x%04X])", ocf, opcode);
1242 if (have_tap_listener(bluetooth_hci_summary_tap)) {
1243 bluetooth_hci_summary_tap_t *tap_hci_summary;
1245 tap_hci_summary = wmem_new(pinfo->pool, bluetooth_hci_summary_tap_t);
1246 tap_hci_summary->interface_id = interface_id;
1247 tap_hci_summary->adapter_id = adapter_id;
1249 tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_VENDOR_EVENT_OPCODE;
1250 tap_hci_summary->ogf = opcode >> 10;
1251 tap_hci_summary->ocf = ocf;
1252 if (try_val_to_str(ocf, broadcom_opcode_ocf_vals))
1253 tap_hci_summary->name = description;
1254 else
1255 tap_hci_summary->name = NULL;
1256 tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary);
1259 proto_tree_add_item(main_tree, hf_broadcom_status, tvb, offset, 1, ENC_NA);
1260 status = tvb_get_uint8(tvb, offset);
1261 offset += 1;
1263 switch (ocf) {
1264 case 0x004D: /* Read Memory */
1265 if (status == STATUS_SUCCESS) {
1266 proto_tree_add_item(main_tree, hf_broadcom_mem_data, tvb, offset, length, ENC_NA);
1267 offset += length;
1269 break;
1270 case 0x005A: /* Read VID PID */
1271 proto_tree_add_item(main_tree, hf_broadcom_vid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1272 offset += 2;
1274 proto_tree_add_item(main_tree, hf_broadcom_pid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1275 offset += 2;
1277 break;
1278 case 0x0079: /* Read Verbose Config Version Info */
1279 proto_tree_add_item(main_tree, hf_broadcom_chip_id, tvb, offset, 1, ENC_NA);
1280 offset += 1;
1282 proto_tree_add_item(main_tree, hf_broadcom_target_id, tvb, offset, 1, ENC_NA);
1283 offset += 1;
1285 proto_tree_add_item(main_tree, hf_broadcom_build_base, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1286 offset += 2;
1288 proto_tree_add_item(main_tree, hf_broadcom_build_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1289 offset += 2;
1291 break;
1292 case 0x0153: /* LE Get Vendor Capabilities */
1293 if (status != STATUS_SUCCESS)
1294 break;
1296 uint16_t google_feature_spec_version = tvb_get_uint16(tvb, offset + 8, ENC_LITTLE_ENDIAN);
1297 if (google_feature_spec_version < 0x0098) {
1298 proto_tree_add_item(main_tree, hf_broadcom_max_advertising_instance, tvb, offset, 1, ENC_NA);
1299 } else {
1300 proto_tree_add_item(main_tree, hf_broadcom_max_advertising_instance_reserved, tvb, offset, 1, ENC_NA);
1302 offset += 1;
1304 if (google_feature_spec_version < 0x0098) {
1305 proto_tree_add_item(main_tree, hf_broadcom_resolvable_private_address_offloading, tvb, offset, 1, ENC_NA);
1306 } else {
1307 proto_tree_add_item(main_tree, hf_broadcom_resolvable_private_address_offloading_reserved, tvb, offset, 1, ENC_NA);
1309 offset += 1;
1311 proto_tree_add_item(main_tree, hf_broadcom_total_scan_results, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1312 offset += 2;
1314 proto_tree_add_item(main_tree, hf_broadcom_max_irk_list, tvb, offset, 1, ENC_NA);
1315 offset += 1;
1317 proto_tree_add_item(main_tree, hf_broadcom_filter_support, tvb, offset, 1, ENC_NA);
1318 offset += 1;
1320 proto_tree_add_item(main_tree, hf_broadcom_max_filter, tvb, offset, 1, ENC_NA);
1321 offset += 1;
1323 proto_tree_add_item(main_tree, hf_broadcom_energy_support, tvb, offset, 1, ENC_NA);
1324 offset += 1;
1326 proto_tree_add_item(main_tree, hf_broadcom_version_support, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1327 offset += 2;
1329 proto_tree_add_item(main_tree, hf_broadcom_total_num_of_advt_tracked, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1330 offset += 2;
1332 proto_tree_add_item(main_tree, hf_broadcom_extended_scan_support, tvb, offset, 1, ENC_NA);
1333 offset += 1;
1335 proto_tree_add_item(main_tree, hf_broadcom_debug_logging_support, tvb, offset, 1, ENC_NA);
1336 offset += 1;
1338 if (google_feature_spec_version < 0x0098) {
1339 proto_tree_add_item(main_tree, hf_broadcom_le_address_generation_offloading_support, tvb, offset, 1, ENC_NA);
1340 } else {
1341 proto_tree_add_item(main_tree, hf_broadcom_le_address_generation_offloading_support_reserved, tvb, offset, 1, ENC_NA);
1343 offset += 1;
1345 proto_tree_add_bitmask(main_tree, tvb, offset, hf_broadcom_a2dp_source_offload_capability_mask, ett_broadcom_a2dp_source_offload_capability_mask, hfx_broadcom_a2dp_source_offload_capability, ENC_LITTLE_ENDIAN);
1346 offset += 4;
1348 proto_tree_add_item(main_tree, hf_broadcom_bluetooth_quality_report_support, tvb, offset, 1, ENC_NA);
1349 offset += 1;
1351 proto_tree_add_bitmask(main_tree, tvb, offset, hf_broadcom_dynamic_audio_buffer_support_mask, ett_broadcom_dynamic_audio_buffer_support_mask, hfx_broadcom_dynamic_audio_buffer_support, ENC_LITTLE_ENDIAN);
1352 offset += 4;
1354 if (tvb_captured_length_remaining(tvb, offset) > 0) {
1355 proto_tree_add_item(main_tree, hf_broadcom_a2dp_offload_v2_support, tvb, offset, 1, ENC_NA);
1356 offset += 1;
1359 break;
1360 case 0x0154: /* LE Multi Advertising */
1361 proto_tree_add_item(main_tree, hf_broadcom_le_multi_advertising_subcode, tvb, offset, 1, ENC_NA);
1362 offset += 1;
1364 break;
1365 case 0x0156: /* LE Batch Scan */
1366 proto_tree_add_item(main_tree, hf_broadcom_le_batch_scan_subcode, tvb, offset, 1, ENC_NA);
1367 subcode = tvb_get_uint8(tvb, offset);
1368 offset += 1;
1370 if (subcode == 0x04 && status == STATUS_SUCCESS) { /* Read Results*/
1371 proto_tree_add_item(main_tree, hf_broadcom_le_batch_scan_report_format, tvb, offset, 1, ENC_NA);
1372 offset += 1;
1374 proto_tree_add_item(main_tree, hf_broadcom_le_batch_scan_number_of_records, tvb, offset, 1, ENC_NA);
1375 offset += 1;
1379 break;
1380 case 0x0157: /* LE Advertising Filter */
1381 proto_tree_add_item(main_tree, hf_broadcom_le_advertising_filter_subcode, tvb, offset, 1, ENC_NA);
1382 offset += 1;
1384 if (status == STATUS_SUCCESS) {
1385 proto_tree_add_item(main_tree, hf_broadcom_le_scan_condition, tvb, offset, 1, ENC_NA);
1386 offset += 1;
1388 proto_tree_add_item(main_tree, hf_broadcom_le_number_of_available_filters, tvb, offset, 1, ENC_NA);
1389 offset += 1;
1392 break;
1393 case 0x0159: /* LE Energy Info */
1394 if (status == STATUS_SUCCESS) {
1395 proto_tree_add_item(main_tree, hf_broadcom_le_energy_total_rx_time, tvb, offset, 1, ENC_NA);
1396 offset += 1;
1398 proto_tree_add_item(main_tree, hf_broadcom_le_energy_total_tx_time, tvb, offset, 1, ENC_NA);
1399 offset += 1;
1401 proto_tree_add_item(main_tree, hf_broadcom_le_energy_total_idle_time, tvb, offset, 1, ENC_NA);
1402 offset += 1;
1404 proto_tree_add_item(main_tree, hf_broadcom_le_energy_total_energy_used, tvb, offset, 1, ENC_NA);
1405 offset += 1;
1408 break;
1409 case 0x015D: /* A2DP Hardware Offload */
1410 proto_tree_add_item(main_tree, hf_broadcom_a2dp_hardware_offload_subcode, tvb, offset, 1, ENC_NA);
1411 offset += 1;
1413 break;
1414 case 0x0102: /* Enable WBS Modified */
1415 case 0x0111: /* Set ConnectionLess Broadcast Stream */
1416 case 0x0112: /* Receive ConnectionLess Broadcast Stream */
1417 case 0x0113: /* Write ConnectionLess Broadcast Stream Data */
1418 case 0x0114: /* ConnectionLess Broadcast Stream Flush */
1419 case 0x0158: /* LE Tracking Advertising */
1420 /* TODO: Implement - parameters not known */
1421 sub_item = proto_tree_add_item(main_tree, hf_broadcom_data, tvb, offset, length, ENC_NA);
1422 expert_add_info(pinfo, sub_item, &ei_broadcom_undecoded);
1423 offset += length;
1425 break;
1426 case 0x0001: /* Write BDADDR */
1427 case 0x0018: /* Update Baudrate */
1428 case 0x001C: /* Write SCO PCM INT Parameter */
1429 case 0x001E: /* Write PCM Data Format Parameter */
1430 case 0x0027: /* Write Sleep Mode */
1431 case 0x002E: /* Download MiniDriver */
1432 case 0x003B: /* Enable USB HID Emulation */
1433 case 0x0045: /* Write UART Clock Setting */
1434 case 0x004C: /* Write Memory */
1435 case 0x004E: /* Launch RAM */
1436 case 0x0057: /* Set ACL Priority */
1437 case 0x006D: /* Write I2S PCM Interface Parameter */
1438 case 0x007E: /* Enable WBS */
1439 if (tvb_captured_length_remaining(tvb, offset) > 0) {
1440 sub_item = proto_tree_add_item(main_tree, hf_broadcom_data, tvb, offset, length, ENC_NA);
1441 expert_add_info(pinfo, sub_item, &ei_broadcom_unexpected_parameter);
1442 offset += tvb_captured_length_remaining(tvb, offset);
1444 break;
1445 default:
1446 if (length > 0) {
1447 sub_item = proto_tree_add_item(main_tree, hf_broadcom_data, tvb, offset, length, ENC_NA);
1448 expert_add_info(pinfo, sub_item, &ei_broadcom_undecoded);
1449 offset += length;
1453 break;
1454 default:
1455 if (length > 0) {
1456 sub_item = proto_tree_add_item(main_tree, hf_broadcom_data, tvb, offset, length, ENC_NA);
1457 expert_add_info(pinfo, sub_item, &ei_broadcom_undecoded);
1458 offset += length;
1463 break;
1465 case P2P_DIR_UNKNOWN:
1466 default:
1467 col_set_str(pinfo->cinfo, COL_PROTOCOL, "HCI_BROADCOM");
1468 col_set_str(pinfo->cinfo, COL_INFO, "UnknownDirection Broadcom ");
1470 if (tvb_captured_length_remaining(tvb, offset) > 0) {
1471 proto_tree_add_item(main_tree, hf_broadcom_data, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA);
1472 offset += tvb_captured_length_remaining(tvb, offset);
1474 break;
1477 if (tvb_captured_length_remaining(tvb, offset) > 0) {
1478 sub_item = proto_tree_add_item(main_tree, hf_broadcom_data, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA);
1479 expert_add_info(pinfo, sub_item, &ei_broadcom_unexpected_data);
1480 offset += tvb_captured_length_remaining(tvb, offset);
1483 return offset;
1486 void
1487 proto_register_bthci_vendor_broadcom(void)
1489 expert_module_t *expert_module;
1491 static hf_register_info hf[] = {
1492 { &hf_broadcom_opcode,
1493 { "Command Opcode", "bthci_vendor.broadcom.opcode",
1494 FT_UINT16, BASE_HEX, VALS(broadcom_opcode_vals), 0x0,
1495 "HCI Command Opcode", HFILL }
1497 { &hf_broadcom_opcode_ogf,
1498 { "Opcode Group Field", "bthci_vendor.broadcom.opcode.ogf",
1499 FT_UINT16, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_ogf_vals_ext, 0xfc00,
1500 NULL, HFILL }
1502 { &hf_broadcom_opcode_ocf,
1503 { "Opcode Command Field", "bthci_vendor.broadcom.opcode.ocf",
1504 FT_UINT16, BASE_HEX, VALS(broadcom_opcode_ocf_vals), 0x03ff,
1505 NULL, HFILL }
1507 { &hf_broadcom_parameter_length,
1508 { "Parameter Total Length", "bthci_vendor.broadcom.parameter_length",
1509 FT_UINT8, BASE_DEC, NULL, 0x0,
1510 NULL, HFILL }
1512 { &hf_broadcom_event_code,
1513 { "Event Code", "bthci_vendor.broadcom.event_code",
1514 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_evt_evt_code_vals_ext, 0x0,
1515 NULL, HFILL }
1517 { &hf_broadcom_number_of_allowed_command_packets,
1518 { "Number of Allowed Command Packets", "bthci_vendor.broadcom.number_of_allowed_command_packets",
1519 FT_UINT8, BASE_DEC, NULL, 0x0,
1520 NULL, HFILL }
1522 { &hf_broadcom_le_advertising_filter_subcode,
1523 { "Subcode", "bthci_vendor.broadcom.le.advertising_filter.subcode",
1524 FT_UINT8, BASE_HEX, VALS(broadcom_le_subcode_advertising_filter_vals), 0x0,
1525 NULL, HFILL }
1527 { &hf_broadcom_le_scan_condition,
1528 { "Scan Condition", "bthci_vendor.broadcom.le.scan_condition",
1529 FT_UINT8, BASE_HEX, VALS(broadcom_le_scan_condition_vals), 0x0,
1530 NULL, HFILL }
1532 { &hf_broadcom_le_filter_index,
1533 { "Filter Index", "bthci_vendor.broadcom.le.filter_index",
1534 FT_UINT8, BASE_DEC, NULL, 0x0,
1535 NULL, HFILL }
1537 { &hf_broadcom_le_number_of_available_filters,
1538 { "Number of Available Filters", "bthci_vendor.broadcom.le.number_of_available_filters",
1539 FT_UINT8, BASE_DEC, NULL, 0x0,
1540 NULL, HFILL }
1542 { &hf_broadcom_mem_address,
1543 { "Address", "bthci_vendor.broadcom.mem.address",
1544 FT_UINT32, BASE_HEX_DEC, NULL, 0x0,
1545 NULL, HFILL }
1547 { &hf_broadcom_mem_data,
1548 { "Firmware", "bthci_vendor.broadcom.mem.data",
1549 FT_NONE, BASE_NONE, NULL, 0x0,
1550 NULL, HFILL }
1552 { &hf_broadcom_mem_rdlen,
1553 { "Length", "bthci_vendor.broadcom.mem.rd_len",
1554 FT_UINT8, BASE_HEX_DEC, NULL, 0x0,
1555 NULL, HFILL }
1557 { &hf_broadcom_baudrate,
1558 { "Baudrate", "bthci_vendor.broadcom.baudrate",
1559 FT_UINT32, BASE_DEC, NULL, 0x0,
1560 NULL, HFILL }
1562 { &hf_broadcom_bd_addr,
1563 { "BD_ADDR", "bthci_vendor.broadcom.bd_addr",
1564 FT_ETHER, BASE_NONE, NULL, 0x0,
1565 "Bluetooth Device Address", HFILL}
1567 { &hf_broadcom_max_advertising_instance,
1568 { "Max Advertising Instance", "bthci_vendor.broadcom.max_advertising_instance",
1569 FT_UINT8, BASE_DEC, NULL, 0x0,
1570 NULL, HFILL }
1572 { &hf_broadcom_max_advertising_instance_reserved,
1573 { "Reserved", "bthci_vendor.broadcom.max_advertising_instance_reserved",
1574 FT_UINT8, BASE_HEX, NULL, 0x0,
1575 NULL, HFILL }
1577 { &hf_broadcom_resolvable_private_address_offloading,
1578 { "Resolvable Private Address Offloading", "bthci_vendor.broadcom.resolvable_private_address_offloading",
1579 FT_UINT8, BASE_DEC, NULL, 0x0,
1580 NULL, HFILL }
1582 { &hf_broadcom_resolvable_private_address_offloading_reserved,
1583 { "Reserved", "bthci_vendor.broadcom.resolvable_private_address_offloading_reserved",
1584 FT_UINT8, BASE_HEX, NULL, 0x0,
1585 NULL, HFILL }
1587 { &hf_broadcom_total_scan_results,
1588 { "Total Scan Results", "bthci_vendor.broadcom.total_scan_results",
1589 FT_UINT16, BASE_DEC, NULL, 0x0,
1590 NULL, HFILL }
1592 { &hf_broadcom_max_irk_list,
1593 { "Max IRK List", "bthci_vendor.broadcom.max_irk_list",
1594 FT_UINT8, BASE_DEC, NULL, 0x0,
1595 NULL, HFILL }
1597 { &hf_broadcom_filter_support,
1598 { "Filter Support", "bthci_vendor.broadcom.filter_support",
1599 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
1600 NULL, HFILL }
1602 { &hf_broadcom_max_filter,
1603 { "Max Filter", "bthci_vendor.broadcom.max_filter",
1604 FT_UINT8, BASE_DEC, NULL, 0x0,
1605 NULL, HFILL }
1607 { &hf_broadcom_energy_support,
1608 { "Energy Support", "bthci_vendor.broadcom.energy_support",
1609 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
1610 NULL, HFILL }
1612 { &hf_broadcom_version_support,
1613 { "Version Support", "bthci_vendor.broadcom.version_support",
1614 FT_UINT16, BASE_HEX, NULL, 0x0,
1615 NULL, HFILL }
1617 { &hf_broadcom_total_num_of_advt_tracked,
1618 { "Total Number of Advertisers Tracked", "bthci_vendor.broadcom.total_num_of_advt_tracked",
1619 FT_UINT16, BASE_DEC, NULL, 0x0,
1620 NULL, HFILL }
1622 { &hf_broadcom_extended_scan_support,
1623 { "Extended Scan Support", "bthci_vendor.broadcom.extended_scan_support",
1624 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
1625 NULL, HFILL }
1627 { &hf_broadcom_debug_logging_support,
1628 { "Debug Logging Support", "bthci_vendor.broadcom.debug_logging_support",
1629 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
1630 NULL, HFILL }
1632 { &hf_broadcom_le_address_generation_offloading_support,
1633 { "LE Address Generation Offloading Support", "bthci_vendor.broadcom.le_address_generation_offloading_support",
1634 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
1635 NULL, HFILL }
1637 { &hf_broadcom_le_address_generation_offloading_support_reserved,
1638 { "Reserved", "bthci_vendor.broadcom.le_address_generation_offloading_support_reserved",
1639 FT_UINT8, BASE_HEX, NULL, 0x0,
1640 NULL, HFILL }
1642 { &hf_broadcom_a2dp_source_offload_capability_mask,
1643 { "A2DP Source Offload Capability", "bthci_vendor.broadcom.a2dp_source_offload_capability_mask",
1644 FT_UINT32, BASE_HEX, NULL, 0x0,
1645 NULL, HFILL }
1647 { &hf_broadcom_a2dp_source_offload_capability_mask_sbc,
1648 { "SBC", "bthci_vendor.broadcom.a2dp_source_offload_capability_mask.sbc",
1649 FT_BOOLEAN, 32, NULL, 0x00000001,
1650 NULL, HFILL }
1652 { &hf_broadcom_a2dp_source_offload_capability_mask_aac,
1653 { "AAC", "bthci_vendor.broadcom.a2dp_source_offload_capability_mask.aac",
1654 FT_BOOLEAN, 32, NULL, 0x00000002,
1655 NULL, HFILL }
1657 { &hf_broadcom_a2dp_source_offload_capability_mask_aptx,
1658 { "APTX", "bthci_vendor.broadcom.a2dp_source_offload_capability_mask.aptx",
1659 FT_BOOLEAN, 32, NULL, 0x00000004,
1660 NULL, HFILL }
1662 { &hf_broadcom_a2dp_source_offload_capability_mask_aptx_hd,
1663 { "APTX HD", "bthci_vendor.broadcom.a2dp_source_offload_capability_mask.aptx_hd",
1664 FT_BOOLEAN, 32, NULL, 0x00000008,
1665 NULL, HFILL }
1667 { &hf_broadcom_a2dp_source_offload_capability_mask_ldac,
1668 { "LDAC", "bthci_vendor.broadcom.a2dp_source_offload_capability_mask.ldac",
1669 FT_BOOLEAN, 32, NULL, 0x00000010,
1670 NULL, HFILL }
1672 { &hf_broadcom_a2dp_source_offload_capability_mask_reserved,
1673 { "Reserved", "bthci_vendor.broadcom.a2dp_source_offload_capability_mask.reserved",
1674 FT_UINT32, BASE_HEX, NULL, UINT32_C(0xFFFFFFE0),
1675 NULL, HFILL }
1677 { &hf_broadcom_bluetooth_quality_report_support,
1678 { "Bluetooth Quality Report Support", "bthci_vendor.broadcom.bluetooth_quality_report_support",
1679 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
1680 NULL, HFILL }
1682 { &hf_broadcom_dynamic_audio_buffer_support_mask,
1683 { "Dynamic Audio Buffer Support", "bthci_vendor.broadcom.dynamic_audio_buffer_support_mask",
1684 FT_UINT32, BASE_HEX, NULL, 0x0,
1685 NULL, HFILL }
1687 { &hf_broadcom_dynamic_audio_buffer_support_mask_sbc,
1688 { "SBC", "bthci_vendor.broadcom.dynamic_audio_buffer_support_mask.sbc",
1689 FT_BOOLEAN, 32, NULL, 0x00000001,
1690 NULL, HFILL }
1692 { &hf_broadcom_dynamic_audio_buffer_support_mask_aac,
1693 { "AAC", "bthci_vendor.broadcom.dynamic_audio_buffer_support_mask.aac",
1694 FT_BOOLEAN, 32, NULL, 0x00000002,
1695 NULL, HFILL }
1697 { &hf_broadcom_dynamic_audio_buffer_support_mask_aptx,
1698 { "APTX", "bthci_vendor.broadcom.dynamic_audio_buffer_support_mask.aptx",
1699 FT_BOOLEAN, 32, NULL, 0x00000004,
1700 NULL, HFILL }
1702 { &hf_broadcom_dynamic_audio_buffer_support_mask_aptx_hd,
1703 { "APTX HD", "bthci_vendor.broadcom.dynamic_audio_buffer_support_mask.aptx_hd",
1704 FT_BOOLEAN, 32, NULL, 0x00000008,
1705 NULL, HFILL }
1707 { &hf_broadcom_dynamic_audio_buffer_support_mask_ldac,
1708 { "LDAC", "bthci_vendor.broadcom.dynamic_audio_buffer_support_mask.ldac",
1709 FT_BOOLEAN, 32, NULL, 0x00000010,
1710 NULL, HFILL }
1712 { &hf_broadcom_dynamic_audio_buffer_support_mask_reserved,
1713 { "Reserved", "bthci_vendor.broadcom.dynamic_audio_buffer_support_mask.reserved",
1714 FT_UINT32, BASE_HEX, NULL, UINT32_C(0xFFFFFFE0),
1715 NULL, HFILL }
1717 { &hf_broadcom_a2dp_offload_v2_support,
1718 { "A2DP Offload V2 Support", "bthci_vendor.broadcom.a2dp_offload_v2_support",
1719 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
1720 NULL, HFILL }
1722 { &hf_broadcom_uart_clock,
1723 { "UART Clock", "bthci_vendor.broadcom.uart_clock",
1724 FT_UINT8, BASE_HEX, VALS(broadcom_uart_clock_vals), 0x0,
1725 NULL, HFILL }
1727 { &hf_broadcom_connection_handle,
1728 { "Connection Handle", "bthci_vendor.broadcom.connection_handle",
1729 FT_UINT16, BASE_HEX, NULL, 0x0,
1730 NULL, HFILL }
1732 { &hf_broadcom_connection_priority,
1733 { "Connection Priority", "bthci_vendor.broadcom.connection_priority",
1734 FT_UINT8, BASE_HEX, VALS(broadcom_connection_priority_vals), 0x0,
1735 NULL, HFILL }
1737 { &hf_broadcom_sleep_mode,
1738 { "Sleep Mode", "bthci_vendor.broadcom.sleep_mode",
1739 FT_UINT8, BASE_HEX, VALS(broadcom_sleep_mode_vals), 0x0,
1740 NULL, HFILL }
1742 { &hf_broadcom_host_stack_idle_threshold,
1743 { "Host Stack Idle Threshold", "bthci_vendor.broadcom.host_stack_idle_threshold",
1744 FT_UINT8, BASE_HEX, NULL, 0x0,
1745 NULL, HFILL }
1747 { &hf_broadcom_host_controller_idle_threshold,
1748 { "Host Controller Idle Threshold", "bthci_vendor.broadcom.host_controller_idle_threshold",
1749 FT_UINT8, BASE_HEX, NULL, 0x0,
1750 NULL, HFILL }
1752 { &hf_broadcom_wake_polarity,
1753 { "Wake Polarity", "bthci_vendor.broadcom.wake_polarity",
1754 FT_UINT8, BASE_HEX, VALS(broadcom_wake_polarity_vals), 0x0,
1755 NULL, HFILL }
1757 { &hf_broadcom_host_wake_polarity,
1758 { "Host Wake Polarity", "bthci_vendor.broadcom.host_wake_polarity",
1759 FT_UINT8, BASE_HEX, VALS(broadcom_wake_polarity_vals), 0x0,
1760 NULL, HFILL }
1762 { &hf_broadcom_allow_host_sleep_during_sco,
1763 { "Allow Host Sleep During SCO", "bthci_vendor.broadcom.allow_host_sleep_during_sco",
1764 FT_UINT8, BASE_HEX, NULL, 0x0,
1765 NULL, HFILL }
1767 { &hf_broadcom_combine_sleep_mode_and_lpm,
1768 { "Combine Sleep Mode and LPM", "bthci_vendor.broadcom.combine_sleep_mode_and_lpm",
1769 FT_UINT8, BASE_HEX, NULL, 0x0,
1770 NULL, HFILL }
1772 { &hf_broadcom_enable_uart_txd_tri_state,
1773 { "Enable UART TXD Tri-state", "bthci_vendor.broadcom.enable_uart_txd_tri_state",
1774 FT_UINT8, BASE_HEX, NULL, 0x0,
1775 NULL, HFILL }
1777 { &hf_broadcom_sleep_guard_time,
1778 { "Sleep Guard Time", "bthci_vendor.broadcom.sleep_guard_time",
1779 FT_UINT8, BASE_HEX, NULL, 0x0,
1780 NULL, HFILL }
1782 { &hf_broadcom_wakeup_guard_time,
1783 { "Wakeup Guard Time", "bthci_vendor.broadcom.wakeup_guard_time",
1784 FT_UINT8, BASE_HEX, NULL, 0x0,
1785 NULL, HFILL }
1787 { &hf_broadcom_txd_config,
1788 { "TXD Config", "bthci_vendor.broadcom.txd_config",
1789 FT_UINT8, BASE_HEX, NULL, 0x0,
1790 NULL, HFILL }
1792 { &hf_broadcom_pulsed_host_wake,
1793 { "Pulsed Host Wake", "bthci_vendor.broadcom.pulsed_host_wake",
1794 FT_UINT8, BASE_HEX, NULL, 0x0,
1795 NULL, HFILL }
1797 { &hf_broadcom_codec_state,
1798 { "Codec State", "bthci_vendor.broadcom.codec_state",
1799 FT_UINT8, BASE_HEX, VALS(broadcom_codec_state_vals), 0x0,
1800 NULL, HFILL }
1802 { &hf_broadcom_codec,
1803 { "Codec", "bthci_vendor.broadcom.codec",
1804 FT_UINT16, BASE_HEX, VALS(broadcom_codec_vals), 0x0,
1805 NULL, HFILL }
1807 { &hf_broadcom_status,
1808 { "Status", "bthci_vendor.broadcom.status",
1809 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_status_vals_ext, 0x0,
1810 NULL, HFILL }
1812 { &hf_broadcom_sco_pcm_routing,
1813 { "SCO PCM Routing", "bthci_vendor.broadcom.sco.pcm_routing",
1814 FT_UINT8, BASE_HEX, VALS(broadcom_sco_pcm_routing_vals), 0x0,
1815 NULL, HFILL }
1817 { &hf_broadcom_sco_pcm_interface_clock_rate,
1818 { "SCO PCM Interface Clock Rate", "bthci_vendor.broadcom.sco.interface.clock_rate",
1819 FT_UINT8, BASE_HEX, VALS(broadcom_sco_pcm_interface_clock_rate_vals), 0x0,
1820 NULL, HFILL }
1822 { &hf_broadcom_sco_pcm_interface_frame_type,
1823 { "SCO PCM Interface Frame Type", "bthci_vendor.broadcom.sco.interface.frame_type",
1824 FT_UINT8, BASE_HEX, VALS(broadcom_sco_pcm_interface_frame_type_vals), 0x0,
1825 NULL, HFILL }
1827 { &hf_broadcom_sco_pcm_interface_sync_mode,
1828 { "SCO PCM Interface Sync Mode", "bthci_vendor.broadcom.sco.interface.sync_mode",
1829 FT_UINT8, BASE_HEX, VALS(broadcom_mode_peripheral_central_vals), 0x0,
1830 NULL, HFILL }
1832 { &hf_broadcom_sco_pcm_interface_clock_mode,
1833 { "SCO PCM Interface Clock Mode", "bthci_vendor.broadcom.sco.interface.clock_mode",
1834 FT_UINT8, BASE_HEX, VALS(broadcom_mode_peripheral_central_vals), 0x0,
1835 NULL, HFILL }
1837 { &hf_broadcom_pcm_shift_mode,
1838 { "PCM shift_mode", "bthci_vendor.broadcom.pcm.shift_mode",
1839 FT_UINT8, BASE_HEX, VALS(broadcom_pcm_shift_mode_vals), 0x0,
1840 NULL, HFILL }
1842 { &hf_broadcom_pcm_fill_bits,
1843 { "PCM Fill Bits", "bthci_vendor.broadcom.pcm.fill_bits",
1844 FT_UINT8, BASE_HEX, NULL, 0x0,
1845 NULL, HFILL }
1847 { &hf_broadcom_pcm_fill_method,
1848 { "PCM Fill Method", "bthci_vendor.broadcom.pcm.fill_method",
1849 FT_UINT8, BASE_HEX, VALS(broadcom_pcm_fill_method_vals), 0x0,
1850 NULL, HFILL }
1852 { &hf_broadcom_pcm_fill_number_of_bits,
1853 { "PCM fill_number_of_bits", "bthci_vendor.broadcom.pcm.fill_number_of_bits",
1854 FT_UINT8, BASE_DEC, NULL, 0x0,
1855 NULL, HFILL }
1857 { &hf_broadcom_pcm_justify_mode,
1858 { "PCM Justify Mode", "bthci_vendor.broadcom.pcm.justify_mode",
1859 FT_UINT8, BASE_HEX, VALS(broadcom_pcm_justify_mode_vals), 0x0,
1860 NULL, HFILL }
1862 { &hf_broadcom_sco_i2s_pcm_interface_mode,
1863 { "SCO I2S PCM Interface Mode", "bthci_vendor.broadcom.pcm.i2s_pcm_interface.mode",
1864 FT_UINT8, BASE_HEX, VALS(broadcom_sco_i2s_pcm_interface_mode_vals), 0x0,
1865 NULL, HFILL }
1867 { &hf_broadcom_sco_i2s_pcm_interface_role,
1868 { "SCO I2S PCM Interface Role", "bthci_vendor.broadcom.pcm.i2s_pcm_interface.role",
1869 FT_UINT8, BASE_HEX, VALS(broadcom_mode_peripheral_central_vals), 0x0,
1870 NULL, HFILL }
1872 { &hf_broadcom_sco_i2s_pcm_interface_sample_rate,
1873 { "SCO I2S PCM Interface Sample_Rate", "bthci_vendor.broadcom.sco.i2s_pcm_interface.sample_rate",
1874 FT_UINT8, BASE_HEX, VALS(broadcom_sco_i2s_pcm_interface_sample_rate_vals), 0x0,
1875 NULL, HFILL }
1877 { &hf_broadcom_sco_i2s_pcm_interface_clock_rate,
1878 { "SCO I2S PCM Interface Clock Rate", "bthci_vendor.broadcom.pcm.i2s_pcm_interface.clock_rate",
1879 FT_UINT8, BASE_HEX, VALS(broadcom_sco_i2s_pcm_interface_clock_rate_vals), 0x0,
1880 NULL, HFILL }
1882 { &hf_broadcom_le_energy_total_rx_time,
1883 { "Total RX Time", "bthci_vendor.broadcom.le.total_rx_time",
1884 FT_UINT32, BASE_DEC, NULL, 0x0,
1885 NULL, HFILL }
1887 { &hf_broadcom_le_energy_total_tx_time,
1888 { "Total TX Time", "bthci_vendor.broadcom.le.total_tx_time",
1889 FT_UINT32, BASE_DEC, NULL, 0x0,
1890 NULL, HFILL }
1892 { &hf_broadcom_le_energy_total_idle_time,
1893 { "Total Idle Time", "bthci_vendor.broadcom.le.total_idle_time",
1894 FT_UINT32, BASE_DEC, NULL, 0x0,
1895 NULL, HFILL }
1897 { &hf_broadcom_le_energy_total_energy_used,
1898 { "Total Energy Used Time", "bthci_vendor.broadcom.le.total_energy_used",
1899 FT_UINT32, BASE_DEC, NULL, 0x0,
1900 NULL, HFILL }
1902 { &hf_broadcom_le_batch_scan_subcode,
1903 { "Subcode", "bthci_vendor.broadcom.le.batch_scan.subcode",
1904 FT_UINT8, BASE_HEX, VALS(broadcom_le_subcode_batch_scan_vals), 0x0,
1905 NULL, HFILL }
1907 { &hf_broadcom_le_batch_scan_report_format,
1908 { "Report Format", "bthci_vendor.broadcom.le.batch_scan.report_format",
1909 FT_UINT8, BASE_DEC, NULL, 0x0,
1910 NULL, HFILL }
1912 { &hf_broadcom_le_batch_scan_number_of_records,
1913 { "Number of Records", "bthci_vendor.broadcom.le.batch_scan.number_of_records",
1914 FT_UINT8, BASE_DEC, NULL, 0x0,
1915 NULL, HFILL }
1917 { &hf_broadcom_le_batch_scan_mode,
1918 { "Mode", "bthci_vendor.broadcom.le.batch_scan.mode",
1919 FT_UINT8, BASE_HEX, VALS(broadcom_batch_scan_mode_vals), 0x0,
1920 NULL, HFILL }
1922 { &hf_broadcom_le_batch_scan_enable,
1923 { "Enable", "bthci_vendor.broadcom.le.batch_scan.enable",
1924 FT_UINT8, BASE_HEX, VALS(broadcom_disable_enable_vals), 0x0,
1925 NULL, HFILL }
1927 { &hf_broadcom_le_batch_scan_full_max,
1928 { "Full Max", "bthci_vendor.broadcom.le.batch_scan.full_max",
1929 FT_UINT8, BASE_DEC, NULL, 0x0,
1930 NULL, HFILL }
1932 { &hf_broadcom_le_batch_scan_truncate_max,
1933 { "Truncate Max", "bthci_vendor.broadcom.le.batch_scan.truncate_max",
1934 FT_UINT8, BASE_DEC, NULL, 0x0,
1935 NULL, HFILL }
1937 { &hf_broadcom_le_batch_scan_notify_threshold,
1938 { "notify_threshold", "bthci_vendor.broadcom.le.batch_scan.notify_threshold",
1939 FT_UINT8, BASE_DEC, NULL, 0x0,
1940 NULL, HFILL }
1942 { &hf_broadcom_le_batch_scan_window,
1943 { "Window", "bthci_vendor.broadcom.le.batch_scan.window",
1944 FT_UINT32, BASE_DEC, NULL, 0x0,
1945 NULL, HFILL }
1947 { &hf_broadcom_le_batch_scan_interval,
1948 { "Interval", "bthci_vendor.broadcom.le.batch_scan.interval",
1949 FT_UINT32, BASE_DEC, NULL, 0x0,
1950 NULL, HFILL }
1952 { &hf_broadcom_le_batch_scan_address_type,
1953 { "Address Type", "bthci_vendor.broadcom.le.batch_scan.address_type",
1954 FT_UINT8, BASE_HEX, VALS(bluetooth_address_type_vals), 0x0,
1955 NULL, HFILL }
1957 { &hf_broadcom_le_batch_scan_discard_rule,
1958 { "Discard Rule", "bthci_vendor.broadcom.le.batch_scan.discard_rule",
1959 FT_UINT8, BASE_HEX, VALS(broadcom_batch_scan_discard_rule_vals), 0x0,
1960 NULL, HFILL }
1962 { &hf_broadcom_le_multi_advertising_subcode,
1963 { "Subcode", "bthci_vendor.broadcom.le.multi_advertising.subcode",
1964 FT_UINT8, BASE_HEX, VALS(broadcom_le_subcode_multi_advertising_vals), 0x0,
1965 NULL, HFILL }
1967 { &hf_broadcom_le_multi_advertising_enable,
1968 { "Enable", "bthci_vendor.broadcom.le.multi_advertising.enable",
1969 FT_UINT8, BASE_HEX, VALS(broadcom_disable_enable_vals), 0x0,
1970 NULL, HFILL }
1972 { &hf_broadcom_le_multi_advertising_instance_id,
1973 { "Instance Id", "bthci_vendor.broadcom.le.multi_advertising.instance_id",
1974 FT_UINT8, BASE_DEC, NULL, 0x0,
1975 NULL, HFILL }
1977 { &hf_broadcom_le_multi_advertising_min_interval,
1978 { "Min Interval", "bthci_vendor.broadcom.le.multi_advertising.min_interval",
1979 FT_UINT16, BASE_DEC, NULL, 0x0,
1980 NULL, HFILL }
1982 { &hf_broadcom_le_multi_advertising_max_interval,
1983 { "Max Interval", "bthci_vendor.broadcom.le.multi_advertising.max_interval",
1984 FT_UINT16, BASE_DEC, NULL, 0x0,
1985 NULL, HFILL }
1987 { &hf_broadcom_le_multi_advertising_address_type,
1988 { "Address Type", "bthci_vendor.broadcom.le.multi_advertising.address_type",
1989 FT_UINT8, BASE_HEX, VALS(bluetooth_address_type_vals), 0x0,
1990 NULL, HFILL }
1992 { &hf_broadcom_le_multi_advertising_type,
1993 { "Type", "bthci_vendor.broadcom.le.multi_advertising.type",
1994 FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_eir_data_type_vals_ext, 0x0,
1995 NULL, HFILL }
1997 { &hf_broadcom_le_multi_advertising_channel_map,
1998 { "Channel Map", "bthci_vendor.broadcom.le.multi_advertising.channel_map",
1999 FT_UINT8, BASE_HEX, NULL, 0x0,
2000 NULL, HFILL }
2002 { &hf_broadcom_le_multi_advertising_channel_map_reserved,
2003 { "Reserved", "bthci_vendor.broadcom.le.multi_advertising.channel_map.reserved",
2004 FT_UINT8, BASE_HEX, NULL, 0xF8,
2005 NULL, HFILL }
2007 { &hf_broadcom_le_multi_advertising_channel_map_39,
2008 { "Channel 39", "bthci_vendor.broadcom.le.multi_advertising.channel_map.39",
2009 FT_UINT8, BASE_HEX, NULL, 0x04,
2010 NULL, HFILL }
2012 { &hf_broadcom_le_multi_advertising_channel_map_38,
2013 { "Channel 38", "bthci_vendor.broadcom.le.multi_advertising.channel_map.38",
2014 FT_UINT8, BASE_HEX, NULL, 0x02,
2015 NULL, HFILL }
2017 { &hf_broadcom_le_multi_advertising_channel_map_37,
2018 { "Channel 37", "bthci_vendor.broadcom.le.multi_advertising.channel_map.37",
2019 FT_UINT8, BASE_HEX, NULL, 0x01,
2020 NULL, HFILL }
2022 { &hf_broadcom_le_multi_advertising_filter_policy,
2023 { "Filter Policy", "bthci_vendor.broadcom.le.multi_advertising.filter_policy",
2024 FT_UINT8, BASE_HEX, VALS(broadcom_le_filter_policy_vals), 0x0,
2025 NULL, HFILL }
2027 { &hf_broadcom_le_multi_advertising_tx_power,
2028 { "Tx power", "bthci_vendor.broadcom.le.multi_advertising.tx_power",
2029 FT_UINT8, BASE_HEX, NULL, 0x0,
2030 NULL, HFILL }
2032 { &hf_broadcom_hid_emulation_mode,
2033 { "Emulation Mode", "bthci_vendor.broadcom.hid_emulation_mode",
2034 FT_UINT8, BASE_HEX, VALS(broadcom_hid_emulation_mode_vals), 0x0,
2035 NULL, HFILL }
2037 { &hf_broadcom_vid,
2038 { "VID", "bthci_vendor.broadcom.vid",
2039 FT_UINT16, BASE_HEX, NULL, 0x0,
2040 NULL, HFILL }
2042 { &hf_broadcom_pid,
2043 { "PID", "bthci_vendor.broadcom.pid",
2044 FT_UINT16, BASE_HEX, NULL, 0x0,
2045 NULL, HFILL }
2047 { &hf_broadcom_chip_id,
2048 { "Chip ID", "bthci_vendor.broadcom.chip_id",
2049 FT_UINT8, BASE_HEX, NULL, 0x0,
2050 NULL, HFILL }
2052 { &hf_broadcom_target_id,
2053 { "Target ID", "bthci_vendor.broadcom.target_id",
2054 FT_UINT8, BASE_HEX, VALS(broadcom_target_id_vals), 0x0,
2055 NULL, HFILL }
2057 { &hf_broadcom_build_base,
2058 { "Build Base", "bthci_vendor.broadcom.build_base",
2059 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
2060 NULL, HFILL }
2062 { &hf_broadcom_build_number,
2063 { "Build Number", "bthci_vendor.broadcom.build_number",
2064 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
2065 NULL, HFILL }
2067 { &hf_broadcom_data,
2068 { "Data", "bthci_vendor.broadcom.data",
2069 FT_NONE, BASE_NONE, NULL, 0x0,
2070 NULL, HFILL }
2072 { &hf_broadcom_a2dp_hardware_offload_subcode,
2073 { "Subcode", "bthci_vendor.broadcom.a2dp_hardware_offload.subcode",
2074 FT_UINT8, BASE_HEX, VALS(broadcom_a2dp_hardware_offload_vals), 0x0,
2075 NULL, HFILL }
2077 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec,
2078 { "Codec", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec",
2079 FT_UINT32, BASE_HEX, VALS(broadcom_a2dp_hardware_offload_start_legacy_codec_vals), 0x0,
2080 NULL, HFILL }
2082 { &hf_broadcom_a2dp_hardware_offload_start_legacy_max_latency,
2083 { "Max Latency", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.max_latency",
2084 FT_UINT16, BASE_DEC, NULL, 0x0,
2085 NULL, HFILL }
2087 { &hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_flag,
2088 { "SCMS-T Enable", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.scms_t_enable_flag",
2089 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
2090 NULL, HFILL }
2092 { &hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_value,
2093 { "SCMS-T Value", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.scms_t_enable_value",
2094 FT_UINT8, BASE_DEC, NULL, 0x0,
2095 NULL, HFILL }
2097 { &hf_broadcom_a2dp_hardware_offload_start_legacy_scms_t_enable_value_reserved,
2098 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.scms_t_enable_value_reserved",
2099 FT_UINT8, BASE_HEX, NULL, 0x0,
2100 NULL, HFILL }
2102 { &hf_broadcom_a2dp_hardware_offload_start_legacy_sampling_frequency,
2103 { "Sampling Frequency", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.sampling_frequency",
2104 FT_UINT32, BASE_HEX, VALS(broadcom_a2dp_hardware_offload_start_legacy_sampling_frequency_vals), 0x0,
2105 NULL, HFILL }
2107 { &hf_broadcom_a2dp_hardware_offload_start_legacy_bits_per_sample,
2108 { "Bits Per Sample", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.bits_per_sample",
2109 FT_UINT8, BASE_HEX, VALS(broadcom_a2dp_hardware_offload_start_legacy_bits_per_sample_vals), 0x0,
2110 NULL, HFILL }
2112 { &hf_broadcom_a2dp_hardware_offload_start_legacy_channel_mode,
2113 { "Channel Mode", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.channel_mode",
2114 FT_UINT8, BASE_HEX, VALS(broadcom_a2dp_hardware_offload_start_legacy_channel_mode_vals), 0x0,
2115 NULL, HFILL }
2117 { &hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate,
2118 { "Encoded Audio Bitrate", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.encoded_audio_bitrate",
2119 FT_UINT32, BASE_DEC, NULL, 0x0,
2120 NULL, HFILL }
2122 { &hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_unspecified,
2123 { "Encoded Audio Bitrate Unspecified/Unused", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.encoded_audio_bitrate_unspecified",
2124 FT_UINT32, BASE_DEC, NULL, 0x0,
2125 NULL, HFILL }
2127 { &hf_broadcom_a2dp_hardware_offload_start_legacy_encoded_audio_bitrate_reserved,
2128 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.encoded_audio_bitrate_reserved",
2129 FT_UINT32, BASE_HEX, NULL, 0x0,
2130 NULL, HFILL }
2132 { &hf_broadcom_a2dp_hardware_offload_start_legacy_connection_handle,
2133 { "Connection Handle", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.connection_handle",
2134 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
2135 NULL, HFILL }
2137 { &hf_broadcom_a2dp_hardware_offload_start_legacy_l2cap_cid,
2138 { "L2CAP CID", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.l2cap_cid",
2139 FT_UINT16, BASE_HEX, NULL, 0x0,
2140 NULL, HFILL }
2142 { &hf_broadcom_a2dp_hardware_offload_start_legacy_l2cap_mtu_size,
2143 { "L2CAP MTU Size", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.l2cap_mtu_size",
2144 FT_UINT16, BASE_DEC, NULL, 0x0,
2145 NULL, HFILL }
2147 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information,
2148 { "Codec Information", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information",
2149 FT_BYTES, BASE_NONE, NULL, 0x0,
2150 NULL, HFILL }
2152 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_block_length,
2153 { "Block Length", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.block_length",
2154 FT_UINT8, BASE_HEX, VALS(broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_block_length_vals), 0xf0,
2155 NULL, HFILL }
2157 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_subbands,
2158 { "Subbands", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.subbands",
2159 FT_UINT8, BASE_HEX, VALS(broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_subbands_vals), 0x0c,
2160 NULL, HFILL }
2162 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_allocation_method,
2163 { "Allocation Method", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.allocation_method",
2164 FT_UINT8, BASE_HEX, VALS(broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_allocation_method_vals), 0x03,
2165 NULL, HFILL }
2167 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_min_bitpool,
2168 { "Min Bitpool", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.min_bitpool",
2169 FT_UINT8, BASE_DEC, NULL, 0x0,
2170 NULL, HFILL }
2172 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_max_bitpool,
2173 { "Max Bitpool", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.max_bitpool",
2174 FT_UINT8, BASE_DEC, NULL, 0x0,
2175 NULL, HFILL }
2177 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_sampling_frequency,
2178 { "Sampling Frequency", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.sampling_frequency",
2179 FT_UINT8, BASE_HEX, VALS(broadcom_a2dp_hardware_offload_start_legacy_sbc_sampling_frequency_vals), 0xf0,
2180 NULL, HFILL }
2182 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_channel_mode,
2183 { "Channel Mode", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.channel_mode",
2184 FT_UINT8, BASE_HEX, VALS(broadcom_a2dp_hardware_offload_start_legacy_sbc_channel_mode_vals), 0x0f,
2185 NULL, HFILL }
2187 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_sbc_reserved,
2188 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.sbc.reserved",
2189 FT_BYTES, BASE_NONE, NULL, 0x0,
2190 NULL, HFILL }
2192 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_object_type,
2193 { "Object Type", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.aac.object_type",
2194 FT_UINT8, BASE_HEX, VALS(broadcom_a2dp_hardware_offload_start_legacy_aac_object_type_vals), 0x0,
2195 NULL, HFILL }
2197 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_vbr,
2198 { "VBR", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.aac.vbr",
2199 FT_BOOLEAN, 8, NULL, 0x80,
2200 NULL, HFILL }
2202 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_aac_reserved,
2203 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.aac.reserved",
2204 FT_BYTES, BASE_NONE, NULL, 0x0,
2205 NULL, HFILL }
2207 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_vendor_id,
2208 { "Vendor ID", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.vendor_id",
2209 FT_UINT32, BASE_HEX, NULL, 0x0,
2210 NULL, HFILL }
2212 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_codec_id,
2213 { "Codec ID", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.codec_id",
2214 FT_UINT16, BASE_HEX, NULL, 0x0,
2215 NULL, HFILL }
2217 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index,
2218 { "Bitrate Index", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.bitrate_index",
2219 FT_UINT8, BASE_HEX, VALS(broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index_vals), 0x0,
2220 NULL, HFILL }
2222 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_bitrate_index_reserved,
2223 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.bitrate_index.reserved",
2224 FT_UINT8, BASE_HEX, NULL, 0x0,
2225 NULL, HFILL }
2227 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask,
2228 { "Channel Mode", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.channel_mode_mask",
2229 FT_UINT8, BASE_HEX, NULL, 0x0,
2230 NULL, HFILL }
2232 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_stereo,
2233 { "Stereo", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.channel_mode_mask.stereo",
2234 FT_BOOLEAN, 8, NULL, 0x01,
2235 NULL, HFILL }
2237 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_dual,
2238 { "Dual", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.channel_mode_mask.dual",
2239 FT_BOOLEAN, 8, NULL, 0x02,
2240 NULL, HFILL }
2242 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_mono,
2243 { "Mono", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.channel_mode_mask.mono",
2244 FT_BOOLEAN, 8, NULL, 0x04,
2245 NULL, HFILL }
2247 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask_reserved,
2248 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.channel_mode_mask.reserved",
2249 FT_UINT8, BASE_HEX, NULL, UINT32_C(0xF8),
2250 NULL, HFILL }
2252 { &hf_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_reserved,
2253 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start_legacy.codec_information.ldac.reserved",
2254 FT_BYTES, BASE_NONE, NULL, 0x0,
2255 NULL, HFILL }
2257 { &hf_broadcom_a2dp_hardware_offload_start_connection_handle,
2258 { "Connection Handle", "bthci_vendor.broadcom.a2dp_hardware_offload.start.connection_handle",
2259 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
2260 NULL, HFILL }
2262 { &hf_broadcom_a2dp_hardware_offload_start_l2cap_cid,
2263 { "L2CAP CID", "bthci_vendor.broadcom.a2dp_hardware_offload.start.l2cap_cid",
2264 FT_UINT16, BASE_HEX, NULL, 0x0,
2265 NULL, HFILL }
2267 { &hf_broadcom_a2dp_hardware_offload_start_data_path_direction,
2268 { "Data Path Direction", "bthci_vendor.broadcom.a2dp_hardware_offload.start.data_path_direction",
2269 FT_UINT8, BASE_HEX, VALS(broadcom_a2dp_hardware_offload_data_path_direction_vals), 0x0,
2270 NULL, HFILL }
2272 { &hf_broadcom_a2dp_hardware_offload_start_peer_mtu,
2273 { "Peer MTU", "bthci_vendor.broadcom.a2dp_hardware_offload.start.peer_mtu",
2274 FT_UINT16, BASE_DEC, NULL, 0x0,
2275 NULL, HFILL }
2277 { &hf_broadcom_a2dp_hardware_offload_start_cp_enable_scmst,
2278 { "CP Enable SCMS-T", "bthci_vendor.broadcom.a2dp_hardware_offload.start.cp_enable_scmst",
2279 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
2280 NULL, HFILL }
2282 { &hf_broadcom_a2dp_hardware_offload_start_cp_header_scmst,
2283 { "CP Header SCMS-T", "bthci_vendor.broadcom.a2dp_hardware_offload.start.cp_header_scmst",
2284 FT_UINT8, BASE_HEX_DEC, NULL, 0x0,
2285 NULL, HFILL }
2287 { &hf_broadcom_a2dp_hardware_offload_start_cp_header_scmst_reserved,
2288 { "Reserved", "bthci_vendor.broadcom.a2dp_hardware_offload.start.cp_header_scmst_reserved",
2289 FT_UINT16, BASE_HEX, NULL, 0x0,
2290 NULL, HFILL }
2292 { &hf_broadcom_a2dp_hardware_offload_start_vendor_specific_parameters_length,
2293 { "Vendor Specific Parameters Length", "bthci_vendor.broadcom.a2dp_hardware_offload.start.vendor_specific_parameters_length",
2294 FT_UINT8, BASE_DEC, NULL, 0x0,
2295 NULL, HFILL }
2297 { &hf_broadcom_a2dp_hardware_offload_start_vendor_specific_parameters,
2298 { "Vendor Specific Parameters", "bthci_vendor.broadcom.a2dp_hardware_offload.start.vendor_specific_parameters",
2299 FT_BYTES, BASE_NONE, NULL, 0x0,
2300 NULL, HFILL }
2302 { &hf_broadcom_a2dp_hardware_offload_stop_connection_handle,
2303 { "Connection Handle", "bthci_vendor.broadcom.a2dp_hardware_offload.stop.connection_handle",
2304 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
2305 NULL, HFILL }
2307 { &hf_broadcom_a2dp_hardware_offload_stop_l2cap_cid,
2308 { "L2CAP CID", "bthci_vendor.broadcom.a2dp_hardware_offload.stop.l2cap_cid",
2309 FT_UINT16, BASE_HEX, NULL, 0x0,
2310 NULL, HFILL }
2312 { &hf_broadcom_a2dp_hardware_offload_stop_data_path_direction,
2313 { "Data Path Direction", "bthci_vendor.broadcom.a2dp_hardware_offload.stop.data_path_direction",
2314 FT_UINT8, BASE_HEX, VALS(broadcom_a2dp_hardware_offload_data_path_direction_vals), 0x0,
2315 NULL, HFILL }
2319 static int *ett[] = {
2320 &ett_broadcom,
2321 &ett_broadcom_opcode,
2322 &ett_broadcom_channel_map,
2323 &ett_broadcom_a2dp_source_offload_capability_mask,
2324 &ett_broadcom_dynamic_audio_buffer_support_mask,
2325 &ett_broadcom_a2dp_hardware_offload_start_legacy_codec_information,
2326 &ett_broadcom_a2dp_hardware_offload_start_legacy_codec_information_ldac_channel_mode_mask,
2329 static ei_register_info ei[] = {
2330 { &ei_broadcom_undecoded, { "bthci_vendor.broadcom.undecoded", PI_UNDECODED, PI_NOTE, "Undecoded", EXPFILL }},
2331 { &ei_broadcom_unexpected_parameter, { "bthci_vendor.broadcom.unexpected_parameter", PI_PROTOCOL, PI_WARN, "Unexpected parameter", EXPFILL }},
2332 { &ei_broadcom_unexpected_data, { "bthci_vendor.broadcom.unexpected_data", PI_PROTOCOL, PI_WARN, "Unexpected data", EXPFILL }},
2335 proto_bthci_vendor_broadcom = proto_register_protocol("Bluetooth Broadcom HCI",
2336 "HCI BROADCOM", "bthci_vendor.broadcom");
2338 bthci_vendor_broadcom_handle = register_dissector("bthci_vendor.broadcom", dissect_bthci_vendor_broadcom, proto_bthci_vendor_broadcom);
2340 proto_register_field_array(proto_bthci_vendor_broadcom, hf, array_length(hf));
2341 proto_register_subtree_array(ett, array_length(ett));
2343 expert_module = expert_register_protocol(proto_bthci_vendor_broadcom);
2344 expert_register_field_array(expert_module, ei, array_length(ei));
2347 void
2348 proto_reg_handoff_bthci_vendor_broadcom(void)
2350 btcommon_ad_handle = find_dissector_add_dependency("btcommon.eir_ad.ad", proto_bthci_vendor_broadcom);
2352 dissector_add_for_decode_as("bthci_cmd.vendor", bthci_vendor_broadcom_handle);
2354 dissector_add_uint("bluetooth.vendor", 0x000F, bthci_vendor_broadcom_handle);
2358 * Editor modelines - https://www.wireshark.org/tools/modelines.html
2360 * Local variables:
2361 * c-basic-offset: 4
2362 * tab-width: 8
2363 * indent-tabs-mode: nil
2364 * End:
2366 * vi: set shiftwidth=4 tabstop=8 expandtab:
2367 * :indentSize=4:tabSize=8:noTabs=true: