Commit 3e0ac12a authored by Marcel Holtmann's avatar Marcel Holtmann

Bluetooth: hci_uart: Use generic functionality from Broadcom module

The new Broadcom Bluetooth support module provides generic functionality
for changing and checking the Bluetooth device address. Use these new
features instead of keeping a duplicate in the driver.
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 1df1f591
...@@ -111,6 +111,7 @@ config BT_HCIUART_INTEL ...@@ -111,6 +111,7 @@ config BT_HCIUART_INTEL
config BT_HCIUART_BCM config BT_HCIUART_BCM
bool "Broadcom protocol support" bool "Broadcom protocol support"
depends on BT_HCIUART depends on BT_HCIUART
select BT_BCM
help help
The Broadcom protocol support enables Bluetooth HCI over serial The Broadcom protocol support enables Bluetooth HCI over serial
port interface for Broadcom Bluetooth controllers. port interface for Broadcom Bluetooth controllers.
......
...@@ -29,20 +29,3 @@ ...@@ -29,20 +29,3 @@
#include <net/bluetooth/hci_core.h> #include <net/bluetooth/hci_core.h>
#include "hci_uart.h" #include "hci_uart.h"
int bcm_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
{
struct sk_buff *skb;
int err;
skb = __hci_cmd_sync(hdev, 0xfc01, 6, bdaddr, HCI_INIT_TIMEOUT);
if (IS_ERR(skb)) {
err = PTR_ERR(skb);
BT_ERR("%s: BCM: Change address command failed (%d)",
hdev->name, err);
return err;
}
kfree_skb(skb);
return 0;
}
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include <net/bluetooth/bluetooth.h> #include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h> #include <net/bluetooth/hci_core.h>
#include "btbcm.h"
#include "hci_uart.h" #include "hci_uart.h"
#define VERSION "2.3" #define VERSION "2.3"
...@@ -299,7 +300,8 @@ static int hci_uart_setup(struct hci_dev *hdev) ...@@ -299,7 +300,8 @@ static int hci_uart_setup(struct hci_dev *hdev)
#endif #endif
#ifdef CONFIG_BT_HCIUART_BCM #ifdef CONFIG_BT_HCIUART_BCM
case 15: case 15:
hdev->set_bdaddr = bcm_set_bdaddr; hdev->set_bdaddr = btbcm_set_bdaddr;
btbcm_check_bdaddr(hdev);
break; break;
#endif #endif
} }
......
...@@ -128,7 +128,3 @@ int h5_deinit(void); ...@@ -128,7 +128,3 @@ int h5_deinit(void);
#ifdef CONFIG_BT_HCIUART_INTEL #ifdef CONFIG_BT_HCIUART_INTEL
int intel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr); int intel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
#endif #endif
#ifdef CONFIG_BT_HCIUART_BCM
int bcm_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment