diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-07-02 05:25:25 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-03 11:42:56 -0400 |
commit | cb8d65973b57edeec53cd219ddbcb646cfd73452 (patch) | |
tree | 21aabd6b9e6a9e685be8c5a28b37dbc32e67f4b5 /drivers/bluetooth/btusb.c | |
parent | 837d502efc3fe9a088b943aa1a7279cee4d0e118 (diff) |
Bluetooth: Add public address configration for Intel USB devices
For the Intel 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>
Diffstat (limited to 'drivers/bluetooth/btusb.c')
-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 e0e39cc1af31..66966b9c4244 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -1382,6 +1382,23 @@ exit_mfg_deactivate: | |||
1382 | return 0; | 1382 | return 0; |
1383 | } | 1383 | } |
1384 | 1384 | ||
1385 | static int btusb_set_bdaddr_intel(struct hci_dev *hdev, const bdaddr_t *bdaddr) | ||
1386 | { | ||
1387 | struct sk_buff *skb; | ||
1388 | long ret; | ||
1389 | |||
1390 | skb = __hci_cmd_sync(hdev, 0xfc31, 6, bdaddr, HCI_INIT_TIMEOUT); | ||
1391 | if (IS_ERR(skb)) { | ||
1392 | ret = PTR_ERR(skb); | ||
1393 | BT_ERR("%s: changing Intel device address failed (%ld)", | ||
1394 | hdev->name, ret); | ||
1395 | return ret; | ||
1396 | } | ||
1397 | kfree_skb(skb); | ||
1398 | |||
1399 | return 0; | ||
1400 | } | ||
1401 | |||
1385 | static int btusb_setup_bcm_patchram(struct hci_dev *hdev) | 1402 | static int btusb_setup_bcm_patchram(struct hci_dev *hdev) |
1386 | { | 1403 | { |
1387 | struct btusb_data *data = hci_get_drvdata(hdev); | 1404 | struct btusb_data *data = hci_get_drvdata(hdev); |
@@ -1657,8 +1674,10 @@ static int btusb_probe(struct usb_interface *intf, | |||
1657 | hdev->set_bdaddr = btusb_set_bdaddr_bcm; | 1674 | hdev->set_bdaddr = btusb_set_bdaddr_bcm; |
1658 | } | 1675 | } |
1659 | 1676 | ||
1660 | if (id->driver_info & BTUSB_INTEL) | 1677 | if (id->driver_info & BTUSB_INTEL) { |
1661 | hdev->setup = btusb_setup_intel; | 1678 | hdev->setup = btusb_setup_intel; |
1679 | hdev->set_bdaddr = btusb_set_bdaddr_intel; | ||
1680 | } | ||
1662 | 1681 | ||
1663 | /* Interface numbers are hardcoded in the specification */ | 1682 | /* Interface numbers are hardcoded in the specification */ |
1664 | data->isoc = usb_ifnum_to_if(data->udev, 1); | 1683 | data->isoc = usb_ifnum_to_if(data->udev, 1); |