hardknott: bluez5: update to v5.56
Adapt patches so they apply correctly Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
parent
57df5295d6
commit
149cd34e98
|
|
@ -9,19 +9,19 @@ Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||||
1 file changed, 9 insertions(+), 7 deletions(-)
|
1 file changed, 9 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
diff --git a/test/test-discovery b/test/test-discovery
|
diff --git a/test/test-discovery b/test/test-discovery
|
||||||
index cea77683d..852611c86 100755
|
index eccc7c7e3..9aeace414 100755
|
||||||
--- a/test/test-discovery
|
--- a/test/test-discovery
|
||||||
+++ b/test/test-discovery
|
+++ b/test/test-discovery
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
-#!/usr/bin/python
|
-#!/usr/bin/python
|
||||||
+#!/usr/bin/python3
|
+#!/usr/bin/python3
|
||||||
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
from __future__ import absolute_import, print_function, unicode_literals
|
from __future__ import absolute_import, print_function, unicode_literals
|
||||||
|
@@ -19,9 +19,9 @@ def print_compact(address, properties):
|
||||||
@@ -18,9 +18,9 @@ def print_compact(address, properties):
|
|
||||||
name = ""
|
name = ""
|
||||||
address = "<unknown>"
|
address = "<unknown>"
|
||||||
|
|
||||||
- for key, value in properties.iteritems():
|
- for key, value in properties.iteritems():
|
||||||
+ for key, value in properties.items():
|
+ for key, value in properties.items():
|
||||||
if type(value) is dbus.String:
|
if type(value) is dbus.String:
|
||||||
|
|
@ -30,7 +30,7 @@ index cea77683d..852611c86 100755
|
||||||
if (key == "Name"):
|
if (key == "Name"):
|
||||||
name = value
|
name = value
|
||||||
elif (key == "Address"):
|
elif (key == "Address"):
|
||||||
@@ -41,7 +41,7 @@ def print_normal(address, properties):
|
@@ -42,7 +42,7 @@ def print_normal(address, properties):
|
||||||
for key in properties.keys():
|
for key in properties.keys():
|
||||||
value = properties[key]
|
value = properties[key]
|
||||||
if type(value) is dbus.String:
|
if type(value) is dbus.String:
|
||||||
|
|
@ -39,34 +39,34 @@ index cea77683d..852611c86 100755
|
||||||
if (key == "Class"):
|
if (key == "Class"):
|
||||||
print(" %s = 0x%06x" % (key, value))
|
print(" %s = 0x%06x" % (key, value))
|
||||||
else:
|
else:
|
||||||
@@ -61,6 +61,8 @@ def skip_dev(old_dev, new_dev):
|
@@ -62,6 +62,8 @@ def skip_dev(old_dev, new_dev):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def interfaces_added(path, interfaces):
|
def interfaces_added(path, interfaces):
|
||||||
+ if "org.bluez.Device1" not in interfaces.keys():
|
+ if "org.bluez.Device1" not in interfaces.keys():
|
||||||
+ return
|
+ return
|
||||||
properties = interfaces["org.bluez.Device1"]
|
properties = interfaces["org.bluez.Device1"]
|
||||||
if not properties:
|
if not properties:
|
||||||
return
|
return
|
||||||
@@ -70,7 +72,7 @@ def interfaces_added(path, interfaces):
|
@@ -71,7 +73,7 @@ def interfaces_added(path, interfaces):
|
||||||
|
|
||||||
if compact and skip_dev(dev, properties):
|
if compact and skip_dev(dev, properties):
|
||||||
return
|
return
|
||||||
- devices[path] = dict(devices[path].items() + properties.items())
|
- devices[path] = dict(devices[path].items() + properties.items())
|
||||||
+ devices[path] = dict(list(devices[path].items()) + list(properties.items()))
|
+ devices[path] = dict(list(devices[path].items()) + list(properties.items()))
|
||||||
else:
|
else:
|
||||||
devices[path] = properties
|
devices[path] = properties
|
||||||
|
|
||||||
@@ -93,7 +95,7 @@ def properties_changed(interface, changed, invalidated, path):
|
@@ -94,7 +96,7 @@ def properties_changed(interface, changed, invalidated, path):
|
||||||
|
|
||||||
if compact and skip_dev(dev, changed):
|
if compact and skip_dev(dev, changed):
|
||||||
return
|
return
|
||||||
- devices[path] = dict(devices[path].items() + changed.items())
|
- devices[path] = dict(devices[path].items() + changed.items())
|
||||||
+ devices[path] = dict(list(devices[path].items()) + list(changed.items()))
|
+ devices[path] = dict(list(devices[path].items()) + list(changed.items()))
|
||||||
else:
|
else:
|
||||||
devices[path] = changed
|
devices[path] = changed
|
||||||
|
|
||||||
@@ -152,7 +154,7 @@ if __name__ == '__main__':
|
@@ -153,7 +155,7 @@ if __name__ == '__main__':
|
||||||
om = dbus.Interface(bus.get_object("org.bluez", "/"),
|
om = dbus.Interface(bus.get_object("org.bluez", "/"),
|
||||||
"org.freedesktop.DBus.ObjectManager")
|
"org.freedesktop.DBus.ObjectManager")
|
||||||
objects = om.GetManagedObjects()
|
objects = om.GetManagedObjects()
|
||||||
|
|
@ -1,29 +1,30 @@
|
||||||
From 8e337d77edfbc4f69d326e3abbd8f4f1ca65bffb Mon Sep 17 00:00:00 2001
|
From 36dceaad707ca0dbed2fdad59e4730c08caddf14 Mon Sep 17 00:00:00 2001
|
||||||
From: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
|
From: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
|
||||||
Date: Mon, 8 Jan 2018 10:29:51 +0100
|
Date: Mon, 8 Jan 2018 10:29:51 +0100
|
||||||
Subject: [PATCH 1/4] Add hciattach rome support for Qualcomm chip QCA6564
|
Subject: [PATCH] Add hciattach rome support for Qualcomm chip QCA6564
|
||||||
|
|
||||||
This is a multiple patch including all the specific qualcomm commits to add
|
This is a multiple patch including all the specific qualcomm commits to add
|
||||||
support for its chip in bluez stack (hciattach rome).
|
support for its chip in bluez stack (hciattach rome).
|
||||||
|
|
||||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||||
Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
|
Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
|
||||||
|
|
||||||
---
|
---
|
||||||
Makefile.tools | 3 +-
|
Makefile.tools | 3 +-
|
||||||
profiles/audio/avrcp.c | 27 +-
|
profiles/audio/avrcp.c | 27 +-
|
||||||
tools/hciattach.c | 45 +-
|
tools/hciattach.c | 45 +-
|
||||||
tools/hciattach.h | 2 +
|
tools/hciattach.h | 2 +
|
||||||
tools/hciattach_rome.c | 1941 ++++++++++++++++++++++++++++++++++++++++++++++++
|
tools/hciattach_rome.c | 1941 ++++++++++++++++++++++++++++++++++++++++
|
||||||
tools/hciattach_rome.h | 390 ++++++++++
|
tools/hciattach_rome.h | 390 ++++++++
|
||||||
6 files changed, 2400 insertions(+), 8 deletions(-)
|
6 files changed, 2400 insertions(+), 8 deletions(-)
|
||||||
create mode 100644 tools/hciattach_rome.c
|
create mode 100644 tools/hciattach_rome.c
|
||||||
create mode 100644 tools/hciattach_rome.h
|
create mode 100644 tools/hciattach_rome.h
|
||||||
|
|
||||||
diff --git a/Makefile.tools b/Makefile.tools
|
diff --git a/Makefile.tools b/Makefile.tools
|
||||||
index 0fd6dec87078..f1a1def979e1 100644
|
index d5fdf2d..baafecf 100644
|
||||||
--- a/Makefile.tools
|
--- a/Makefile.tools
|
||||||
+++ b/Makefile.tools
|
+++ b/Makefile.tools
|
||||||
@@ -283,7 +283,8 @@ tools_hciattach_SOURCES = tools/hciattach.c tools/hciattach.h \
|
@@ -350,7 +350,8 @@ tools_hciattach_SOURCES = tools/hciattach.c tools/hciattach.h \
|
||||||
tools/hciattach_ath3k.c \
|
tools/hciattach_ath3k.c \
|
||||||
tools/hciattach_qualcomm.c \
|
tools/hciattach_qualcomm.c \
|
||||||
tools/hciattach_intel.c \
|
tools/hciattach_intel.c \
|
||||||
|
|
@ -32,12 +33,12 @@ index 0fd6dec87078..f1a1def979e1 100644
|
||||||
+ tools/hciattach_rome.c tools/hciattach_rome.h
|
+ tools/hciattach_rome.c tools/hciattach_rome.h
|
||||||
tools_hciattach_LDADD = lib/libbluetooth-internal.la
|
tools_hciattach_LDADD = lib/libbluetooth-internal.la
|
||||||
|
|
||||||
tools_hciconfig_SOURCES = tools/hciconfig.c tools/csr.h tools/csr.c
|
tools_hciconfig_SOURCES = tools/hciconfig.c
|
||||||
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
|
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
|
||||||
index 2c1434da26d0..99bb59d69053 100644
|
index c093dea..a6168b9 100644
|
||||||
--- a/profiles/audio/avrcp.c
|
--- a/profiles/audio/avrcp.c
|
||||||
+++ b/profiles/audio/avrcp.c
|
+++ b/profiles/audio/avrcp.c
|
||||||
@@ -2084,13 +2084,19 @@ static gboolean avrcp_get_play_status_rsp(struct avctp *conn, uint8_t code,
|
@@ -2203,13 +2203,19 @@ static gboolean avrcp_get_play_status_rsp(struct avctp *conn, uint8_t code,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
{
|
{
|
||||||
struct avrcp *session = user_data;
|
struct avrcp *session = user_data;
|
||||||
|
|
@ -59,7 +60,7 @@ index 2c1434da26d0..99bb59d69053 100644
|
||||||
if (pdu == NULL || code == AVC_CTYPE_REJECTED ||
|
if (pdu == NULL || code == AVC_CTYPE_REJECTED ||
|
||||||
ntohs(pdu->params_len) != 9)
|
ntohs(pdu->params_len) != 9)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -2148,12 +2154,18 @@ static gboolean avrcp_player_value_rsp(struct avctp *conn, uint8_t code,
|
@@ -2267,12 +2273,18 @@ static gboolean avrcp_player_value_rsp(struct avctp *conn, uint8_t code,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
{
|
{
|
||||||
struct avrcp *session = user_data;
|
struct avrcp *session = user_data;
|
||||||
|
|
@ -80,7 +81,7 @@ index 2c1434da26d0..99bb59d69053 100644
|
||||||
if (pdu == NULL) {
|
if (pdu == NULL) {
|
||||||
media_player_set_setting(mp, "Error", "Timeout");
|
media_player_set_setting(mp, "Error", "Timeout");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -2305,10 +2317,15 @@ static gboolean avrcp_get_element_attributes_rsp(struct avctp *conn,
|
@@ -2424,10 +2436,15 @@ static gboolean avrcp_get_element_attributes_rsp(struct avctp *conn,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
{
|
{
|
||||||
struct avrcp *session = user_data;
|
struct avrcp *session = user_data;
|
||||||
|
|
@ -98,10 +99,10 @@ index 2c1434da26d0..99bb59d69053 100644
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
diff --git a/tools/hciattach.c b/tools/hciattach.c
|
diff --git a/tools/hciattach.c b/tools/hciattach.c
|
||||||
index fad176c9b804..dda639cabca3 100644
|
index 276a4e5..d535277 100644
|
||||||
--- a/tools/hciattach.c
|
--- a/tools/hciattach.c
|
||||||
+++ b/tools/hciattach.c
|
+++ b/tools/hciattach.c
|
||||||
@@ -69,6 +69,8 @@ struct uart_t {
|
@@ -57,6 +57,8 @@ struct uart_t {
|
||||||
#define ENABLE_PM 1
|
#define ENABLE_PM 1
|
||||||
#define DISABLE_PM 0
|
#define DISABLE_PM 0
|
||||||
|
|
||||||
|
|
@ -110,7 +111,7 @@ index fad176c9b804..dda639cabca3 100644
|
||||||
static volatile sig_atomic_t __io_canceled = 0;
|
static volatile sig_atomic_t __io_canceled = 0;
|
||||||
|
|
||||||
static void sig_hup(int sig)
|
static void sig_hup(int sig)
|
||||||
@@ -107,16 +109,34 @@ int read_hci_event(int fd, unsigned char* buf, int size)
|
@@ -95,16 +97,34 @@ int read_hci_event(int fd, unsigned char* buf, int size)
|
||||||
{
|
{
|
||||||
int remain, r;
|
int remain, r;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
@ -146,7 +147,7 @@ index fad176c9b804..dda639cabca3 100644
|
||||||
if (buf[0] == 0x04)
|
if (buf[0] == 0x04)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -263,6 +283,12 @@ static int ath3k_pm(int fd, struct uart_t *u, struct termios *ti)
|
@@ -251,6 +271,12 @@ static int ath3k_pm(int fd, struct uart_t *u, struct termios *ti)
|
||||||
return ath3k_post(fd, u->pm);
|
return ath3k_post(fd, u->pm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -159,7 +160,7 @@ index fad176c9b804..dda639cabca3 100644
|
||||||
static int qualcomm(int fd, struct uart_t *u, struct termios *ti)
|
static int qualcomm(int fd, struct uart_t *u, struct termios *ti)
|
||||||
{
|
{
|
||||||
return qualcomm_init(fd, u->speed, ti, u->bdaddr);
|
return qualcomm_init(fd, u->speed, ti, u->bdaddr);
|
||||||
@@ -1093,6 +1119,10 @@ struct uart_t uart[] = {
|
@@ -1081,6 +1107,10 @@ struct uart_t uart[] = {
|
||||||
{ "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200,
|
{ "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200,
|
||||||
FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm },
|
FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm },
|
||||||
|
|
||||||
|
|
@ -170,7 +171,7 @@ index fad176c9b804..dda639cabca3 100644
|
||||||
/* QUALCOMM BTS */
|
/* QUALCOMM BTS */
|
||||||
{ "qualcomm", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200,
|
{ "qualcomm", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200,
|
||||||
FLOW_CTL, DISABLE_PM, NULL, qualcomm, NULL },
|
FLOW_CTL, DISABLE_PM, NULL, qualcomm, NULL },
|
||||||
@@ -1195,6 +1225,7 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw)
|
@@ -1183,6 +1213,7 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -178,7 +179,7 @@ index fad176c9b804..dda639cabca3 100644
|
||||||
/* Set TTY to N_HCI line discipline */
|
/* Set TTY to N_HCI line discipline */
|
||||||
i = N_HCI;
|
i = N_HCI;
|
||||||
if (ioctl(fd, TIOCSETD, &i) < 0) {
|
if (ioctl(fd, TIOCSETD, &i) < 0) {
|
||||||
@@ -1211,6 +1242,7 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw)
|
@@ -1199,6 +1230,7 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw)
|
||||||
perror("Can't set device");
|
perror("Can't set device");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
@ -186,7 +187,7 @@ index fad176c9b804..dda639cabca3 100644
|
||||||
|
|
||||||
if (u->post && u->post(fd, u, &ti) < 0)
|
if (u->post && u->post(fd, u, &ti) < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
@@ -1249,7 +1281,7 @@ int main(int argc, char *argv[])
|
@@ -1237,7 +1269,7 @@ int main(int argc, char *argv[])
|
||||||
printpid = 0;
|
printpid = 0;
|
||||||
raw = 0;
|
raw = 0;
|
||||||
|
|
||||||
|
|
@ -195,7 +196,7 @@ index fad176c9b804..dda639cabca3 100644
|
||||||
switch(opt) {
|
switch(opt) {
|
||||||
case 'b':
|
case 'b':
|
||||||
send_break = 1;
|
send_break = 1;
|
||||||
@@ -1282,6 +1314,11 @@ int main(int argc, char *argv[])
|
@@ -1270,6 +1302,11 @@ int main(int argc, char *argv[])
|
||||||
raw = 1;
|
raw = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -207,7 +208,7 @@ index fad176c9b804..dda639cabca3 100644
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
exit(1);
|
exit(1);
|
||||||
@@ -1350,6 +1387,7 @@ int main(int argc, char *argv[])
|
@@ -1338,6 +1375,7 @@ int main(int argc, char *argv[])
|
||||||
case 5:
|
case 5:
|
||||||
u->bdaddr = argv[optind];
|
u->bdaddr = argv[optind];
|
||||||
break;
|
break;
|
||||||
|
|
@ -215,7 +216,7 @@ index fad176c9b804..dda639cabca3 100644
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1426,12 +1464,15 @@ int main(int argc, char *argv[])
|
@@ -1414,12 +1452,15 @@ int main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -232,10 +233,10 @@ index fad176c9b804..dda639cabca3 100644
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
diff --git a/tools/hciattach.h b/tools/hciattach.h
|
diff --git a/tools/hciattach.h b/tools/hciattach.h
|
||||||
index 249aab49e90d..5724b03bf2a6 100644
|
index 26c0d54..00721e1 100644
|
||||||
--- a/tools/hciattach.h
|
--- a/tools/hciattach.h
|
||||||
+++ b/tools/hciattach.h
|
+++ b/tools/hciattach.h
|
||||||
@@ -45,6 +45,7 @@
|
@@ -32,6 +32,7 @@
|
||||||
#define HCI_UART_AG6XX 9
|
#define HCI_UART_AG6XX 9
|
||||||
#define HCI_UART_NOKIA 10
|
#define HCI_UART_NOKIA 10
|
||||||
#define HCI_UART_MRVL 11
|
#define HCI_UART_MRVL 11
|
||||||
|
|
@ -243,7 +244,7 @@ index 249aab49e90d..5724b03bf2a6 100644
|
||||||
|
|
||||||
#define HCI_UART_RAW_DEVICE 0
|
#define HCI_UART_RAW_DEVICE 0
|
||||||
#define HCI_UART_RESET_ON_INIT 1
|
#define HCI_UART_RESET_ON_INIT 1
|
||||||
@@ -66,6 +67,7 @@ int ath3k_init(int fd, int speed, int init_speed, char *bdaddr,
|
@@ -53,6 +54,7 @@ int ath3k_init(int fd, int speed, int init_speed, char *bdaddr,
|
||||||
struct termios *ti);
|
struct termios *ti);
|
||||||
int ath3k_post(int fd, int pm);
|
int ath3k_post(int fd, int pm);
|
||||||
int qualcomm_init(int fd, int speed, struct termios *ti, const char *bdaddr);
|
int qualcomm_init(int fd, int speed, struct termios *ti, const char *bdaddr);
|
||||||
|
|
@ -253,7 +254,7 @@ index 249aab49e90d..5724b03bf2a6 100644
|
||||||
const char *bdaddr);
|
const char *bdaddr);
|
||||||
diff --git a/tools/hciattach_rome.c b/tools/hciattach_rome.c
|
diff --git a/tools/hciattach_rome.c b/tools/hciattach_rome.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..59bdc16e4e8f
|
index 0000000..59bdc16
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/tools/hciattach_rome.c
|
+++ b/tools/hciattach_rome.c
|
||||||
@@ -0,0 +1,1941 @@
|
@@ -0,0 +1,1941 @@
|
||||||
|
|
@ -2200,7 +2201,7 @@ index 000000000000..59bdc16e4e8f
|
||||||
+}
|
+}
|
||||||
diff --git a/tools/hciattach_rome.h b/tools/hciattach_rome.h
|
diff --git a/tools/hciattach_rome.h b/tools/hciattach_rome.h
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..89f7db3bef86
|
index 0000000..89f7db3
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/tools/hciattach_rome.h
|
+++ b/tools/hciattach_rome.h
|
||||||
@@ -0,0 +1,390 @@
|
@@ -0,0 +1,390 @@
|
||||||
Loading…
Reference in New Issue