diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-07-01 18:53:48 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-03 11:42:55 -0400 |
commit | abbaf50e3bccbb6c254c530ff1478acb56a6fed7 (patch) | |
tree | c3f593206e9c64ca6a8ebdd0c489698131276327 | |
parent | 24c457e27076beb2a85b4213642a6388eb88f240 (diff) |
Bluetooth: Add public address configration for Broadcom USB devices
For the Broadcom based USB devices add support for configuration of
the public device address.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r-- | drivers/bluetooth/btusb.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 6250fc2fb93a..e0e39cc1af31 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -1530,6 +1530,23 @@ done: | |||
1530 | return ret; | 1530 | return ret; |
1531 | } | 1531 | } |
1532 | 1532 | ||
1533 | static int btusb_set_bdaddr_bcm(struct hci_dev *hdev, const bdaddr_t *bdaddr) | ||
1534 | { | ||
1535 | struct sk_buff *skb; | ||
1536 | long ret; | ||
1537 | |||
1538 | skb = __hci_cmd_sync(hdev, 0xfc01, 6, bdaddr, HCI_INIT_TIMEOUT); | ||
1539 | if (IS_ERR(skb)) { | ||
1540 | ret = PTR_ERR(skb); | ||
1541 | BT_ERR("%s: BCM: Change address command failed (%ld)", | ||
1542 | hdev->name, ret); | ||
1543 | return ret; | ||
1544 | } | ||
1545 | kfree_skb(skb); | ||
1546 | |||
1547 | return 0; | ||
1548 | } | ||
1549 | |||
1533 | static int btusb_probe(struct usb_interface *intf, | 1550 | static int btusb_probe(struct usb_interface *intf, |
1534 | const struct usb_device_id *id) | 1551 | const struct usb_device_id *id) |
1535 | { | 1552 | { |
@@ -1635,8 +1652,10 @@ static int btusb_probe(struct usb_interface *intf, | |||
1635 | if (id->driver_info & BTUSB_BCM92035) | 1652 | if (id->driver_info & BTUSB_BCM92035) |
1636 | hdev->setup = btusb_setup_bcm92035; | 1653 | hdev->setup = btusb_setup_bcm92035; |
1637 | 1654 | ||
1638 | if (id->driver_info & BTUSB_BCM_PATCHRAM) | 1655 | if (id->driver_info & BTUSB_BCM_PATCHRAM) { |
1639 | hdev->setup = btusb_setup_bcm_patchram; | 1656 | hdev->setup = btusb_setup_bcm_patchram; |
1657 | hdev->set_bdaddr = btusb_set_bdaddr_bcm; | ||
1658 | } | ||
1640 | 1659 | ||
1641 | if (id->driver_info & BTUSB_INTEL) | 1660 | if (id->driver_info & BTUSB_INTEL) |
1642 | hdev->setup = btusb_setup_intel; | 1661 | hdev->setup = btusb_setup_intel; |