Bluetooth: bpa10x: Use h4_recv_buf helper for frame reassembly
Marcel Holtmann
maintainerPATCH 1/1 Bluetooth: bpa10x: Use h4_recv_buf helper for frame reassembly
The manually coded frame reassembly is actually broken. The h4_recv_buf helper from the UART driver is a perfect fit for frame reassembly for this driver. So just export that function and use it here as well.
--- drivers/bluetooth/Kconfig | 1 + drivers/bluetooth/bpa10x.c | 136 +++++++++------------------------------------ drivers/bluetooth/hci_h4.c | 1 + 3 files changed, 29 insertions(+), 109 deletions(-)
drivers/bluetooth/Kconfig +1 -0
@@ -184,6 +184,7 @@ config BT_HCIBCM203X config BT_HCIBPA10X tristate "HCI BPA10x USB driver" depends on USB + select BT_HCIUART_H4 help Bluetooth HCI BPA10x USB driver. This driver provides support for the Digianswer BPA 100/105 Bluetooth
drivers/bluetooth/bpa10x.c +27 -109
163 lines not on this page · raw message
drivers/bluetooth/hci_h4.c +1 -0
@@ -266,3 +266,4 @@ struct sk_buff *h4_recv_buf(struct hci_dev *hdev, struct sk_buff *skb,return skb; } +EXPORT_SYMBOL_GPL (h4_recv_buf);
Signature · 1 line
2.4.3
kbuild test robot
build botconfig: i386-allmodconfig (attached as .config) reproduce:
Hi Marcel,
[auto build test ERROR on v4.3-rc4 -- if it's inappropriate base, please ignore]
config: i386-allmodconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 All errors (new ones prefixed by >>):
>> drivers/bluetooth/bpa10x.c:96:29: error: 'hci_recv_diag' undeclared here (not in a function)
{ HCI_RECV_VENDOR, .recv = hci_recv_diag },
^
vim +/hci_recv_diag +96 drivers/bluetooth/bpa10x.c
90 .maxlen = HCI_MAX_FRAME_SIZE
91
92 static const struct h4_recv_pkt bpa10x_recv_pkts[] = {
93 { H4_RECV_ACL, .recv = hci_recv_frame },
94 { H4_RECV_SCO, .recv = hci_recv_frame },
95 { H4_RECV_EVENT, .recv = hci_recv_frame },
> 96 { HCI_RECV_VENDOR, .recv = hci_recv_diag },
97 };
98
99 static void bpa10x_rx_complete(struct urb *urb)---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
kbuild test robot
build botconfig: x86_64-randconfig-x006-201540 (attached as .config) reproduce:
Hi Marcel,
[auto build test WARNING on v4.3-rc4 -- if it's inappropriate base, please ignore]
config: x86_64-randconfig-x006-201540 (attached as .config) reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 All warnings (new ones prefixed by >>):
warning: (BT_HCIBPA10X) selects BT_HCIUART_H4 which has unmet direct dependencies (NET && BT && BT_HCIUART)
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Johan Hedberg
AppliedHi Marcel,
Quoted 10 lines · Marcel Holtmann
The manually coded frame reassembly is actually broken. The
h4_recv_bufhelper from the UART driver is a perfect fit for frame reassembly for this driver. So just export that function and use it here as well.Signed-off-by Marcel Holtmann <[email protected]>--- drivers/bluetooth/Kconfig | 1 + drivers/bluetooth/bpa10x.c | 136 +++++++++------------------------------------ drivers/bluetooth/hci_h4.c | 1 + 3 files changed, 29 insertions(+), 109 deletions(-)
Applied to bluetooth-next. Thanks.
Johan