Bluetooth: host level Support for Atheros AR300x device
Subsystems (2)
PATCH v4 1/1 Bluetooth: host level Support for Atheros AR300x device
Implements support for Atheros AR300x Bluetooth chip in hciattach application. Supports configuration download and power management configure feature.
--- Makefile.tools | 3 +- tools/hciattach.8 | 3 + tools/hciattach.c | 12 + tools/hciattach.h | 3 + tools/hciattach_ath3k.c | 953 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 973 insertions(+), 1 deletions(-) create mode 100644 tools/hciattach_ath3k.c
Makefile.tools +2 -1
@@ -23,7 +23,8 @@ tools_l2ping_LDADD = lib/libbluetooth.la tools_hciattach_SOURCES = tools/hciattach.c tools/hciattach.h \ tools/hciattach_st.c \ tools/hciattach_ti.c \ - tools/hciattach_tialt.c + tools/hciattach_tialt.c \ + tools/hciattach_ath3k.c tools_hciattach_LDADD = lib/libbluetooth.la tools_hciconfig_SOURCES = tools/hciconfig.c tools/csr.h tools/csr.c \
tools/hciattach.8 +3 -0
@@ -86,6 +86,9 @@ Silicon Wave kits .TP .B bcsp Serial adapters using CSR chips with BCSP serial protocol +.TP +.B ath3k +Atheros AR300x based serial Bluetooth device .RE Supported IDs are (manufacturer id, product id)
tools/hciattach.c +12 -0
@@ -302,6 +302,16 @@ static int texasalt(int fd, struct uart_t *u, struct termios *ti)return texasalt_init (fd, u->speed, ti); } +static int ath3k_ps (int fd,struct uart_t *u,struct termios *ti) +{ +return ath3k_init (fd, u->bdaddr, u->speed); +} + +static int ath3k_pm (int fd,struct uart_t *u,struct termios *ti) +{ +return ath3k_post (fd, u->pm); +} +static int read_check (int fd,void *buf,int count) {int res;
@@ -1104,6 +1114,8 @@ struct uart_t uart[] = { {"bcm2035" ,0x0A5C ,0x2035 ,HCI_UART_H4 ,115200 ,460800 , FLOW_CTL, DISABLE_PM, NULL, bcm2035 }, + { "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200, + FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm }, { NULL, 0 } };
tools/hciattach.h +3 -0
@@ -38,6 +38,7 @@#define HCI_UART_3WIRE 2#define HCI_UART_H4DS 3#define HCI_UART_LL 4 +#define HCI_UART_ATH3K 5#define HCI_UART_RAW_DEVICE 0
@@ -49,3 +50,5 @@ int texas_post(int fd, struct termios *ti);int texasalt_init (int fd,int speed,struct termios *ti);int stlc2500_init (int fd,bdaddr_t *bdaddr);int bgb2xx_init (int dd,bdaddr_t *bdaddr); +int ath3k_init (int fd,char *bdaddr,int speed); +int ath3k_post (int fd,int pm);
tools/hciattach_ath3k.c new file +953 -0
953 lines not on this page · raw message
Signature · 1 line
1.7.0.4
Hi Suraj,
Quoted 11 lines · Suraj Sumangala
Implements support for Atheros AR300x Bluetooth chip in hciattach application. Supports configuration download and power management configure feature.
--- Makefile.tools | 3 +- tools/hciattach.8 | 3 + tools/hciattach.c | 12 + tools/hciattach.h | 3 + tools/hciattach_ath3k.c | 953 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 973 insertions(+), 1 deletions(-) create mode 100644 tools/hciattach_ath3k.c
Thanks. The patch is now pushed upstream with a minor cleanup of the commit message as well as the following coding style issue:
tools/hciattach_ath3k.c line 331
Quoted 2 lines
tools/hciattach_ath3k.c new file +2
-0+static void update_tag_data (struct ps_cfg_entry *tag, +struct tag_info *info,const char *ptr)
The second line uses mixed tabs and spaces for indentation (it should only be tabs).
Johan