summaryrefslogtreecommitdiff
path: root/monitor/broadcom.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-10-18 00:22:06 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-10-18 00:28:22 +0200
commit8651e6486c478e143d00de02b602ec468f509789 (patch)
tree2841d1ad6226d5e4223e761a3f63b2b9ea57454d /monitor/broadcom.c
parent2c52c338671988d43bc38898e7aa628baef5cc03 (diff)
downloadbluez-8651e6486c478e143d00de02b602ec468f509789.tar.gz
monitor: Add support for handling Broadcom vendor commands
Diffstat (limited to 'monitor/broadcom.c')
-rw-r--r--monitor/broadcom.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/monitor/broadcom.c b/monitor/broadcom.c
index b9c70b4bb..7c76b97a9 100644
--- a/monitor/broadcom.c
+++ b/monitor/broadcom.c
@@ -33,8 +33,35 @@
#include "packet.h"
#include "lmp.h"
#include "ll.h"
+#include "vendor.h"
#include "broadcom.h"
+static const struct vendor_ocf vendor_ocf_table[] = {
+ { 0x001, "Write BD ADDR" },
+ { 0x018, "Update UART Baud Rate" },
+ { 0x027, "Set Sleepmode Param" },
+ { 0x02e, "Download Minidriver" },
+ { 0x03b, "Enable USB HID Emulation" },
+ { 0x045, "Write UART Clock Setting" },
+ { 0x04c, "Write RAM" },
+ { 0x04e, "Launch RAM" },
+ { 0x05a, "Read VID PID" },
+ { 0x079, "Read Verbose Config Version Info" },
+ { }
+};
+
+const struct vendor_ocf *broadcom_vendor_ocf(uint16_t ocf)
+{
+ int i;
+
+ for (i = 0; vendor_ocf_table[i].str; i++) {
+ if (vendor_ocf_table[i].ocf == ocf)
+ return &vendor_ocf_table[i];
+ }
+
+ return NULL;
+}
+
void broadcom_lm_diag(const void *data, uint8_t size)
{
uint8_t type;