Skip to contentSkip to conversation

Bluetooth: hci_ll: Convert to use h4_recv_buf helper

RFC Superseded Marcel Holtmann 3 participants 7 messages Mar 20, 2018 Bluetooth drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

RFC 1/1 Bluetooth: hci_ll: Convert to use h4_recv_buf helper

The HCILL or eHCILL protocol from TI is actually an H:4 protocol with a few extra events and thus can also use the h4_recv_buf helper. Instead of open coding the same funtionality add the extra events to the packet description table and use h4_recv_buf.

---
 drivers/bluetooth/Kconfig  |   1 +
 drivers/bluetooth/hci_ll.c | 214 +++++++++++++++------------------------------
 2 files changed, 70 insertions(+), 145 deletions(-)
drivers/bluetooth/Kconfig +1 -0
index d934a8b09946..8a0a5edb6a0a 100644
@@ -160,6 +160,7 @@ config BT_HCIUART_ATH3K
 config BT_HCIUART_LL
 	bool "HCILL protocol support"
 	depends on BT_HCIUART_SERDEV
+	select BT_HCIUART_H4
 	help
 	  HCILL (HCI Low Level) is a serial protocol for communication
 	  between Bluetooth device and host. This protocol is required for
drivers/bluetooth/hci_ll.c +69 -145

245 lines not on this page · raw message

Signature · 1 line
2.14.3
author maintainer
#1 lore raw

Hi,

Quoted 10 lines

The HCILL or eHCILL protocol from TI is actually an H:4 protocol with a few extra events and thus can also use the h4_recv_buf helper. Instead of open coding the same funtionality add the extra events to the packet description table and use h4_recv_buf.

---
drivers/bluetooth/Kconfig | 1 +
drivers/bluetooth/hci_ll.c | 214 +++++++++++++++------------------------------

2 files changed, 70 insertions(+), 145 deletions(-)

is anybody able to test this change for me and verify that it doesn’t break things.

Regards

Marcel

#2 lore raw

Hi,

Quoted 7 lines · Marcel Holtmann

Hi,

Quoted 5 lines

The HCILL or eHCILL protocol from TI is actually an H:4 protocol with a few extra events and thus can also use the h4_recv_buf helper. Instead of open coding the same funtionality add the extra events to the packet description table and use h4_recv_buf.

Quoted 7 lines
Quoted 5 lines

---
drivers/bluetooth/Kconfig | 1 +
drivers/bluetooth/hci_ll.c | 214 +++++++++++++++------------------------------

2 files changed, 70 insertions(+), 145 deletions(-)

is anybody able to test this change for me and verify that it doesn’t break things.

The diffstat looks nice :) I can give it a test on Motorola Droid 4 later this week. If you want feedback a bit earlier, maybe Tony can give it a try (added to cc).

-- Sebastian

#3 lore raw
Quoted 6 lines · Sebastian Reichel

Hi,
=20

Quoted 3 lines · Marcel Holtmann

Hi,
=20

Quoted 1 line

The HCILL or eHCILL protocol from TI is actually an H:4 protocol with=

a

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

few extra events and thus can also use the h4_recv_buf helper. Instead of open coding the same funtionality add the extra events to the pack=

et

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

description table and use h4_recv_buf.
=20

---
drivers/bluetooth/Kconfig | 1 +
drivers/bluetooth/hci_ll.c | 214 +++++++++++++++---------------------=

---------

Quoted 3 lines
Quoted 3 lines
Quoted 1 line
2 files changed, 70 insertions(+), 145 deletions(-)

=20
is anybody able to test this change for me and verify that it doesn=E2=

=80=99t break things.

Quoted 4 lines

=20
The diffstat looks nice :) I can give it a test on Motorola Droid 4 later this week. If you want feedback a bit earlier, maybe Tony can give it a try (added to cc).

I tried applying it from the mailing list archive against current Linux next and -rc6 but it failed:

patching file drivers/bluetooth/Kconfig
Hunk #1 succeeded at 147 with fuzz 2 (offset -13 lines). patching file drivers/bluetooth/hci_ll.c
Hunk #2 succeeded at 88 (offset 4 lines).
Hunk #3 FAILED at 364.

Any ideas which patch(es) I might be missing?

Regards,

Tony

author maintainer
#4 lore raw

Hi Tony,

Quoted 20 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines

The HCILL or eHCILL protocol from TI is actually an H:4 protocol with a few extra events and thus can also use the h4_recv_buf helper. Instead of open coding the same funtionality add the extra events to the packet description table and use h4_recv_buf.

---
drivers/bluetooth/Kconfig | 1 +
drivers/bluetooth/hci_ll.c | 214 +++++++++++++++------------------------------

2 files changed, 70 insertions(+), 145 deletions(-)
Quoted 5 lines
Quoted 1 line

is anybody able to test this change for me and verify that it doesn’t break things.

The diffstat looks nice :) I can give it a test on Motorola Droid 4 later this week. If you want feedback a bit earlier, maybe Tony can give it a try (added to cc).

I tried applying it from the mailing list archive against current Linux next and -rc6 but it failed:

Quoted 7 lines

patching file drivers/bluetooth/Kconfig
Hunk #1 succeeded at 147 with fuzz 2 (offset -13 lines). patching file drivers/bluetooth/hci_ll.c
Hunk #2 succeeded at 88 (offset 4 lines).
Hunk #3 FAILED at 364.

Any ideas which patch(es) I might be missing?

that might be a git am issue and it being rather strict.

$ cat 0001-Bluetooth-hci_ll-Convert-to-use-h4_recv_buf-helper.patch | patch -p1 --dry-run
checking file drivers/bluetooth/Kconfig
Hunk #1 succeeded at 147 (offset -13 lines).
checking file drivers/bluetooth/hci_ll.c
Hunk #2 succeeded at 88 (offset 4 lines).
Hunk #3 succeeded at 370 (offset 6 lines).

Regards

Marcel

#5 lore raw
Quoted 28 lines · Marcel Holtmann

Hi Tony,

Quoted 26 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines

The HCILL or eHCILL protocol from TI is actually an H:4 protocol with a few extra events and thus can also use the h4_recv_buf helper. Instead of open coding the same funtionality add the extra events to the packet description table and use h4_recv_buf.

---
drivers/bluetooth/Kconfig | 1 +
drivers/bluetooth/hci_ll.c | 214 +++++++++++++++------------------------------

2 files changed, 70 insertions(+), 145 deletions(-)
Quoted 5 lines
Quoted 1 line

is anybody able to test this change for me and verify that it doesn’t break things.

The diffstat looks nice :) I can give it a test on Motorola Droid 4 later this week. If you want feedback a bit earlier, maybe Tony can give it a try (added to cc).

I tried applying it from the mailing list archive against current Linux next and -rc6 but it failed:

patching file drivers/bluetooth/Kconfig
Hunk #1 succeeded at 147 with fuzz 2 (offset -13 lines). patching file drivers/bluetooth/hci_ll.c
Hunk #2 succeeded at 88 (offset 4 lines).
Hunk #3 FAILED at 364.

Quoted 3 lines
Quoted 1 line

Any ideas which patch(es) I might be missing?

that might be a git am issue and it being rather strict.

Or the patch not being correct copied from the archive. Do you have a patchwork url for it or care to bounce the patch to me?

Regards,

Tony

Tested-by
#6 lore raw
Quoted 6 lines · Tony Lindgren
Quoted 1 line · Marcel Holtmann

that might be a git am issue and it being rather strict.

Or the patch not being correct copied from the archive. Do you have a patchwork url for it or care to bounce the patch to me?

Thanks got it applied now, works the same way as without it where hcitool scan finds some devices. Sorry don't have anything really configured beyond that right now, but: