Bluetooth: btqca: Introduce generic QCA ROME support
Subsystems (2)
PATCH 1/2 Bluetooth: btqca: Introduce generic QCA ROME support
This is for supporting BT for QCA ROME with specific vendor specific HCI commands and initialization. This will have USB/UART implementation both, but for now, adding UART vendor specific commands to patch downloading and set BDaddress using VS command.
--- drivers/bluetooth/Kconfig | 4 + drivers/bluetooth/Makefile | 1 + drivers/bluetooth/btqca.c | 523 +++++++++++++++++++++++++++++++++++++++++++++ drivers/bluetooth/btqca.h | 156 ++++++++++++++ 4 files changed, 684 insertions(+) create mode 100644 drivers/bluetooth/btqca.c create mode 100644 drivers/bluetooth/btqca.h
drivers/bluetooth/Kconfig +4 -0
@@ -13,6 +13,10 @@ config BT_RTL tristate select FW_LOADER +config BT_QCA + tristate + select FW_LOADER + config BT_HCIBTUSB tristate "HCI USB driver" depends on USB
drivers/bluetooth/Makefile +1 -0
@@ -22,6 +22,7 @@ obj-$(CONFIG_BT_MRVL_SDIO) += btmrvl_sdio.o obj-$(CONFIG_BT_WILINK) += btwilink.o obj-$(CONFIG_BT_BCM) += btbcm.o obj-$(CONFIG_BT_RTL) += btrtl.o +obj-$(CONFIG_BT_QCA) += btqca.o btmrvl-y := btmrvl_main.o btmrvl-$(CONFIG_DEBUG_FS) += btmrvl_debugfs.o
drivers/bluetooth/btqca.c new file +523 -0
523 lines not on this page · raw message
drivers/bluetooth/btqca.h new file +156 -0
156 lines not on this page · raw message
Signature · 1 line
2.0.5
Marcel Holtmann
maintainerHi Ben,
Quoted 48 lines
This is for supporting BT for QCA ROME with specific vendor specific HCI commands and initialization. This will have USB/UART implementation both, but for now, adding UART vendor specific commands to patch downloading and set BDaddress using VS command.
Signed-off-by Ben Young Tae Kim <[email protected]>---
drivers/bluetooth/Kconfig | 4 + drivers/bluetooth/Makefile | 1 + drivers/bluetooth/btqca.c | 523 +++++++++++++++++++++++++++++++++++++++++++++ drivers/bluetooth/btqca.h | 156 ++++++++++++++ 4 files changed, 684 insertions(+)create mode 100644
drivers/bluetooth/btqca.c
create mode 100644drivers/bluetooth/btqca.hdrivers/bluetooth/Kconfig +4
-0@@ -13,6 +13,10 @@ config BT_RTL tristate select FW_LOADER +config BT_QCA + tristate + select FW_LOADER +config
BT_HCIBTUSB
tristate "HCI USB driver"
depends on USBdrivers/bluetooth/Makefile +0
-0@@ -22,6 +22,7 @@ obj-$(CONFIG_BT_MRVL_SDIO) += btmrvl_sdio.oobj-$(CONFIG_BT_WILINK) += btwilink.o
obj-$(CONFIG_BT_BCM) += btbcm.o
obj-$(CONFIG_BT_RTL) += btrtl.o
+obj-$(CONFIG_BT_QCA) += btqca.obtmrvl-y := btmrvl_main.o
btmrvl-$(CONFIG_DEBUG_FS) += btmrvl_debugfs.odrivers/bluetooth/btqca.c new file +0
-0
drivers/bluetooth/btqca.c line 4
Quoted 4 lines
drivers/bluetooth/btqca.c new file +4
-0@@ -0,0 +1,523 @@ +/* +* Bluetooth supports for Qualcomm Atheros chips +* +* Copyright (c) 2015 The Linux Foundation. All rights reserved.
copyright assigned to Linux Foundation is intentional?
Quoted 9 lines
drivers/bluetooth/btqca.c new file +9
-0+* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 +* as published by the Free Software Foundation +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details.
drivers/bluetooth/btqca.c line 23
Quoted 10 lines
drivers/bluetooth/btqca.c new file +10
-0+* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +*/ +#include <linux/module.h> +#include <linux/firmware.h> +#include <asm/unaligned.h> +#include <stdbool.h>
Why would you include stdbool.h here. That was never needed.
drivers/bluetooth/btqca.c line 28
Quoted 5 lines
drivers/bluetooth/btqca.c new file +5
-0+ +#include <net/bluetooth/bluetooth.h> +#include <net/bluetooth/hci_core.h> + +#include "hci_uart.h"
You should not need this include. Please do not include driver header files in the common modules.
drivers/bluetooth/btqca.c line 33
Quoted 5 lines
drivers/bluetooth/btqca.c new file +5
-0+#include "btqca.h" + +#define VERSION "0.1" + +static uint8_t g_qca_user_baud_rate =QCA_BAUDRATE_115200 ;
Please stop with the g_ for global variable. I am not even sure how this one would be useful anyway.
drivers/bluetooth/btqca.c line 41
Quoted 8 lines
drivers/bluetooth/btqca.c new file +8
-0+ +static int rome_patch_ver_req (struct hci_dev *hdev,u32 *rome_version) +{ +struct sk_buff *skb; +struct edl_event_hdr *edl; +struct rome_version *ver; +char cmd; +int ret =0 ;
Since the tabs vs spaces is completely messed up, I stopped going through the patch. Please make sure you do this correctly and that your email client/server does not mess this up.
Regards
Marcel
Hi Marcel,
Quoted 42 lines · Marcel Holtmann
Hi Ben,
Quoted 40 lines
This is for supporting BT for QCA ROME with specific vendor specific HCI commands and initialization. This will have USB/UART implementation both, but for now, adding UART vendor specific commands to patch downloading and set BDaddress using VS command.
Signed-off-by Ben Young Tae Kim <[email protected]>---
drivers/bluetooth/Kconfig | 4 + drivers/bluetooth/Makefile | 1 + drivers/bluetooth/btqca.c | 523 +++++++++++++++++++++++++++++++++++++++++++++ drivers/bluetooth/btqca.h | 156 ++++++++++++++ 4 files changed, 684 insertions(+)create mode 100644
drivers/bluetooth/btqca.c
create mode 100644drivers/bluetooth/btqca.hdrivers/bluetooth/Kconfig +4
-0@@ -13,6 +13,10 @@ config BT_RTL tristate select FW_LOADER +config BT_QCA + tristate + select FW_LOADER +config
BT_HCIBTUSB
tristate "HCI USB driver"
depends on USBdrivers/bluetooth/Makefile +0
-0@@ -22,6 +22,7 @@ obj-$(CONFIG_BT_MRVL_SDIO) += btmrvl_sdio.oobj-$(CONFIG_BT_WILINK) += btwilink.o
obj-$(CONFIG_BT_BCM) += btbcm.o
obj-$(CONFIG_BT_RTL) += btrtl.o
+obj-$(CONFIG_BT_QCA) += btqca.o
Quoted 13 lines
drivers/bluetooth/btqca.c line 4
Quoted 12 lines
btmrvl-y := btmrvl_main.o
btmrvl-$(CONFIG_DEBUG_FS) += btmrvl_debugfs.odrivers/bluetooth/btqca.c new file +4
-0@@ -0,0 +1,523 @@ +/* +* Bluetooth supports for Qualcomm Atheros chips +* +* Copyright (c) 2015 The Linux Foundation. All rights reserved. copyright assigned to Linux Foundation is intentional?
Yes
Quoted 35 lines
Quoted 9 lines
drivers/bluetooth/btqca.c new file +9
-0+* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 +* as published by the Free Software Foundation +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. drivers/bluetooth/btqca.c line 23
Quoted 10 lines
drivers/bluetooth/btqca.c new file +10
-0+* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +*/ +#include <linux/module.h> +#include <linux/firmware.h> +#include <asm/unaligned.h> +#include <stdbool.h> Why would you include
stdbool.hhere. That was never needed.drivers/bluetooth/btqca.c line 28
Quoted 5 lines
drivers/bluetooth/btqca.c new file +5
-0+ +#include <net/bluetooth/bluetooth.h> +#include <net/bluetooth/hci_core.h> + +#include "hci_uart.h" You should not need this include. Please do not include driver header files in the common modules.
drivers/bluetooth/btqca.c line 33
Quoted 5 lines
drivers/bluetooth/btqca.c new file +5
-0+#include "btqca.h" + +#define VERSION "0.1" + +static uint8_t g_qca_user_baud_rate =QCA_BAUDRATE_115200 ;Please stop with the g_ for global variable. I am not even sure how this one would be useful anyway.
Quoted 9 lines
drivers/bluetooth/btqca.c line 41
Quoted 8 lines
drivers/bluetooth/btqca.c new file +8
-0+ +static int rome_patch_ver_req (struct hci_dev *hdev,u32 *rome_version) +{ +struct sk_buff *skb; +struct edl_event_hdr *edl; +struct rome_version *ver; +char cmd; +int ret =0 ;Since the tabs vs spaces is completely messed up, I stopped going through the patch. Please make sure you do this correctly and that your email client/server does not mess this up.
Sorry, I didn't realize all tabs were converted to spaces accidentally on my email client. I'll send you next version to fix all review comments on my patch. Thanks for your review comments.
Quoted 4 lines
Regards
Marcel
Thanks
-- Ben Kim