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:
Gabriel Valcazar 2021-12-17 11:01:51 +01:00
parent 57df5295d6
commit 149cd34e98
6 changed files with 43 additions and 42 deletions

View File

@ -9,16 +9,16 @@ Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/test/test-discovery b/test/test-discovery
index cea77683d..852611c86 100755
index eccc7c7e3..9aeace414 100755
--- a/test/test-discovery
+++ b/test/test-discovery
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import absolute_import, print_function, unicode_literals
@@ -18,9 +18,9 @@ def print_compact(address, properties):
@@ -19,9 +19,9 @@ def print_compact(address, properties):
name = ""
address = "<unknown>"
@ -30,7 +30,7 @@ index cea77683d..852611c86 100755
if (key == "Name"):
name = value
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():
value = properties[key]
if type(value) is dbus.String:
@ -39,7 +39,7 @@ index cea77683d..852611c86 100755
if (key == "Class"):
print(" %s = 0x%06x" % (key, value))
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
def interfaces_added(path, interfaces):
@ -48,7 +48,7 @@ index cea77683d..852611c86 100755
properties = interfaces["org.bluez.Device1"]
if not properties:
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):
return
@ -57,7 +57,7 @@ index cea77683d..852611c86 100755
else:
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):
return
@ -66,7 +66,7 @@ index cea77683d..852611c86 100755
else:
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", "/"),
"org.freedesktop.DBus.ObjectManager")
objects = om.GetManagedObjects()

View File

@ -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>
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
support for its chip in bluez stack (hciattach rome).
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
---
Makefile.tools | 3 +-
profiles/audio/avrcp.c | 27 +-
tools/hciattach.c | 45 +-
tools/hciattach.h | 2 +
tools/hciattach_rome.c | 1941 ++++++++++++++++++++++++++++++++++++++++++++++++
tools/hciattach_rome.h | 390 ++++++++++
tools/hciattach_rome.c | 1941 ++++++++++++++++++++++++++++++++++++++++
tools/hciattach_rome.h | 390 ++++++++
6 files changed, 2400 insertions(+), 8 deletions(-)
create mode 100644 tools/hciattach_rome.c
create mode 100644 tools/hciattach_rome.h
diff --git a/Makefile.tools b/Makefile.tools
index 0fd6dec87078..f1a1def979e1 100644
index d5fdf2d..baafecf 100644
--- a/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_qualcomm.c \
tools/hciattach_intel.c \
@ -32,12 +33,12 @@ index 0fd6dec87078..f1a1def979e1 100644
+ tools/hciattach_rome.c tools/hciattach_rome.h
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
index 2c1434da26d0..99bb59d69053 100644
index c093dea..a6168b9 100644
--- a/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)
{
struct avrcp *session = user_data;
@ -59,7 +60,7 @@ index 2c1434da26d0..99bb59d69053 100644
if (pdu == NULL || code == AVC_CTYPE_REJECTED ||
ntohs(pdu->params_len) != 9)
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)
{
struct avrcp *session = user_data;
@ -80,7 +81,7 @@ index 2c1434da26d0..99bb59d69053 100644
if (pdu == NULL) {
media_player_set_setting(mp, "Error", "Timeout");
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)
{
struct avrcp *session = user_data;
@ -98,10 +99,10 @@ index 2c1434da26d0..99bb59d69053 100644
return FALSE;
diff --git a/tools/hciattach.c b/tools/hciattach.c
index fad176c9b804..dda639cabca3 100644
index 276a4e5..d535277 100644
--- a/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 DISABLE_PM 0
@ -110,7 +111,7 @@ index fad176c9b804..dda639cabca3 100644
static volatile sig_atomic_t __io_canceled = 0;
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 count = 0;
@ -146,7 +147,7 @@ index fad176c9b804..dda639cabca3 100644
if (buf[0] == 0x04)
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);
}
@ -159,7 +160,7 @@ index fad176c9b804..dda639cabca3 100644
static int qualcomm(int fd, struct uart_t *u, struct termios *ti)
{
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,
FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm },
@ -170,7 +171,7 @@ index fad176c9b804..dda639cabca3 100644
/* QUALCOMM BTS */
{ "qualcomm", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200,
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;
}
@ -178,7 +179,7 @@ index fad176c9b804..dda639cabca3 100644
/* Set TTY to N_HCI line discipline */
i = N_HCI;
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");
goto fail;
}
@ -186,7 +187,7 @@ index fad176c9b804..dda639cabca3 100644
if (u->post && u->post(fd, u, &ti) < 0)
goto fail;
@@ -1249,7 +1281,7 @@ int main(int argc, char *argv[])
@@ -1237,7 +1269,7 @@ int main(int argc, char *argv[])
printpid = 0;
raw = 0;
@ -195,7 +196,7 @@ index fad176c9b804..dda639cabca3 100644
switch(opt) {
case 'b':
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;
break;
@ -207,7 +208,7 @@ index fad176c9b804..dda639cabca3 100644
default:
usage();
exit(1);
@@ -1350,6 +1387,7 @@ int main(int argc, char *argv[])
@@ -1338,6 +1375,7 @@ int main(int argc, char *argv[])
case 5:
u->bdaddr = argv[optind];
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;
}
@ -232,10 +233,10 @@ index fad176c9b804..dda639cabca3 100644
return 0;
}
diff --git a/tools/hciattach.h b/tools/hciattach.h
index 249aab49e90d..5724b03bf2a6 100644
index 26c0d54..00721e1 100644
--- a/tools/hciattach.h
+++ b/tools/hciattach.h
@@ -45,6 +45,7 @@
@@ -32,6 +32,7 @@
#define HCI_UART_AG6XX 9
#define HCI_UART_NOKIA 10
#define HCI_UART_MRVL 11
@ -243,7 +244,7 @@ index 249aab49e90d..5724b03bf2a6 100644
#define HCI_UART_RAW_DEVICE 0
#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);
int ath3k_post(int fd, int pm);
int qualcomm_init(int fd, int speed, struct termios *ti, const char *bdaddr);
@ -253,7 +254,7 @@ index 249aab49e90d..5724b03bf2a6 100644
const char *bdaddr);
diff --git a/tools/hciattach_rome.c b/tools/hciattach_rome.c
new file mode 100644
index 000000000000..59bdc16e4e8f
index 0000000..59bdc16
--- /dev/null
+++ b/tools/hciattach_rome.c
@@ -0,0 +1,1941 @@
@ -2200,7 +2201,7 @@ index 000000000000..59bdc16e4e8f
+}
diff --git a/tools/hciattach_rome.h b/tools/hciattach_rome.h
new file mode 100644
index 000000000000..89f7db3bef86
index 0000000..89f7db3
--- /dev/null
+++ b/tools/hciattach_rome.h
@@ -0,0 +1,390 @@