Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+4 -22
+1
drivers/bluetooth/Kconfig
··· 117 117 config BT_HCIUART_INTEL 118 118 bool "Intel protocol support" 119 119 depends on BT_HCIUART 120 + select BT_INTEL 120 121 help 121 122 The Intel protocol support enables Bluetooth HCI over serial 122 123 port interface for Intel Bluetooth controllers.
-17
drivers/bluetooth/hci_intel.c
··· 29 29 #include <net/bluetooth/hci_core.h> 30 30 31 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 - }
+3 -1
drivers/bluetooth/hci_ldisc.c
··· 44 44 #include <net/bluetooth/bluetooth.h> 45 45 #include <net/bluetooth/hci_core.h> 46 46 47 + #include "btintel.h" 47 48 #include "btbcm.h" 48 49 #include "hci_uart.h" 49 50 ··· 296 295 switch (le16_to_cpu(ver->manufacturer)) { 297 296 #ifdef CONFIG_BT_HCIUART_INTEL 298 297 case 2: 299 - hdev->set_bdaddr = intel_set_bdaddr; 298 + hdev->set_bdaddr = btintel_set_bdaddr; 299 + btintel_check_bdaddr(hdev); 300 300 break; 301 301 #endif 302 302 #ifdef CONFIG_BT_HCIUART_BCM
-4
drivers/bluetooth/hci_uart.h
··· 156 156 int h5_deinit(void); 157 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 159 #ifdef CONFIG_BT_HCIUART_BCM 164 160 int bcm_init(void); 165 161 int bcm_deinit(void);