diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2015-04-06 03:52:14 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-04-07 12:48:21 -0400 |
commit | bca03c959ab377010d87bef2679890a4a4e66e37 (patch) | |
tree | 2b56431b09bb0200c26a6912fad209b21801a0a1 | |
parent | 59a077c4792e2226b8a95430c0f17d1098939647 (diff) |
Bluetooth: hci_uart: Use generic Intel support for address setting
The Bluetooth address setting for Intel devices is provided by a generic
module now. Start using that module instead of relying it being included
in the driver.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r-- | drivers/bluetooth/Kconfig | 1 | ||||
-rw-r--r-- | drivers/bluetooth/hci_intel.c | 17 | ||||
-rw-r--r-- | drivers/bluetooth/hci_ldisc.c | 4 | ||||
-rw-r--r-- | drivers/bluetooth/hci_uart.h | 4 |
4 files changed, 4 insertions, 22 deletions
diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig index b50fe3361659..ed5c2738bea2 100644 --- a/drivers/bluetooth/Kconfig +++ b/drivers/bluetooth/Kconfig | |||
@@ -117,6 +117,7 @@ config BT_HCIUART_3WIRE | |||
117 | config BT_HCIUART_INTEL | 117 | config BT_HCIUART_INTEL |
118 | bool "Intel protocol support" | 118 | bool "Intel protocol support" |
119 | depends on BT_HCIUART | 119 | depends on BT_HCIUART |
120 | select BT_INTEL | ||
120 | help | 121 | help |
121 | The Intel protocol support enables Bluetooth HCI over serial | 122 | The Intel protocol support enables Bluetooth HCI over serial |
122 | port interface for Intel Bluetooth controllers. | 123 | port interface for Intel Bluetooth controllers. |
diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c index b7bd50a41080..5dd07bf05236 100644 --- a/drivers/bluetooth/hci_intel.c +++ b/drivers/bluetooth/hci_intel.c | |||
@@ -29,20 +29,3 @@ | |||
29 | #include <net/bluetooth/hci_core.h> | 29 | #include <net/bluetooth/hci_core.h> |
30 | 30 | ||
31 | #include "hci_uart.h" | 31 | #include "hci_uart.h" |
32 | |||
33 | int intel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr) | ||
34 | { | ||
35 | struct sk_buff *skb; | ||
36 | int err; | ||
37 | |||
38 | skb = __hci_cmd_sync(hdev, 0xfc31, 6, bdaddr, HCI_INIT_TIMEOUT); | ||
39 | if (IS_ERR(skb)) { | ||
40 | err = PTR_ERR(skb); | ||
41 | BT_ERR("%s: Changing Intel device address failed (%d)", | ||
42 | hdev->name, err); | ||
43 | return err; | ||
44 | } | ||
45 | kfree_skb(skb); | ||
46 | |||
47 | return 0; | ||
48 | } | ||
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index a106c3e201e3..5c9a73f02664 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <net/bluetooth/bluetooth.h> | 44 | #include <net/bluetooth/bluetooth.h> |
45 | #include <net/bluetooth/hci_core.h> | 45 | #include <net/bluetooth/hci_core.h> |
46 | 46 | ||
47 | #include "btintel.h" | ||
47 | #include "btbcm.h" | 48 | #include "btbcm.h" |
48 | #include "hci_uart.h" | 49 | #include "hci_uart.h" |
49 | 50 | ||
@@ -295,7 +296,8 @@ static int hci_uart_setup(struct hci_dev *hdev) | |||
295 | switch (le16_to_cpu(ver->manufacturer)) { | 296 | switch (le16_to_cpu(ver->manufacturer)) { |
296 | #ifdef CONFIG_BT_HCIUART_INTEL | 297 | #ifdef CONFIG_BT_HCIUART_INTEL |
297 | case 2: | 298 | case 2: |
298 | hdev->set_bdaddr = intel_set_bdaddr; | 299 | hdev->set_bdaddr = btintel_set_bdaddr; |
300 | btintel_check_bdaddr(hdev); | ||
299 | break; | 301 | break; |
300 | #endif | 302 | #endif |
301 | #ifdef CONFIG_BT_HCIUART_BCM | 303 | #ifdef CONFIG_BT_HCIUART_BCM |
diff --git a/drivers/bluetooth/hci_uart.h b/drivers/bluetooth/hci_uart.h index d1fa6263f7c2..72120a5ba13c 100644 --- a/drivers/bluetooth/hci_uart.h +++ b/drivers/bluetooth/hci_uart.h | |||
@@ -156,10 +156,6 @@ int h5_init(void); | |||
156 | int h5_deinit(void); | 156 | int h5_deinit(void); |
157 | #endif | 157 | #endif |
158 | 158 | ||
159 | #ifdef CONFIG_BT_HCIUART_INTEL | ||
160 | int intel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr); | ||
161 | #endif | ||
162 | |||
163 | #ifdef CONFIG_BT_HCIUART_BCM | 159 | #ifdef CONFIG_BT_HCIUART_BCM |
164 | int bcm_init(void); | 160 | int bcm_init(void); |
165 | int bcm_deinit(void); | 161 | int bcm_deinit(void); |