SHARE
TWEET

Untitled

a guest Nov 5th, 2017 411 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. From 1442414576426b81d31be9fa37fb1f0da634ca6b Mon Sep 17 00:00:00 2001
  2. From: Szymon Janc <szymon.janc@codecoup.pl>
  3. Date: Sun, 5 Nov 2017 20:20:57 +0100
  4. Subject: [PATCH] Bluetooth: btusb: Mark F8T013 devices to have broken link key
  5.  commands
  6.  
  7. Belkin F8T013 seems to have a problem with the stored link key
  8. commands so just mark it as broken.
  9.  
  10. < HCI Command: Read Local Suppor.. (0x04|0x0003) plen 0  #3 [hci0] 264.545788
  11. > HCI Event: Command Complete (0x0e) plen 12             #4 [hci0] 264.547252
  12.       Read Local Supported Features (0x04|0x0003) ncmd 1
  13.         Status: Success (0x00)
  14.         Features: 0xff 0xfb 0x8d 0xfe 0x9f 0xf9 0x00 0x80
  15. < HCI Command: Read Local Versio.. (0x04|0x0001) plen 0  #5 [hci0] 264.547270
  16. > HCI Event: Command Complete (0x0e) plen 12             #6 [hci0] 264.548251
  17.       Read Local Version Information (0x04|0x0001) ncmd 1
  18.         Status: Success (0x00)
  19.         HCI version: Bluetooth 2.0 (0x03) - Revision 8307 (0x2073)
  20.         LMP version: Bluetooth 2.0 (0x03) - Subversion 16654 (0x410e)
  21.         Manufacturer: Broadcom Corporation (15)
  22.           Firmware: 002.001.014 (BCM20702B0)
  23.           Build: 0115
  24. ....
  25. < HCI Command: Read Local Suppo.. (0x04|0x0002) plen 0  #25 [hci0] 264.574258
  26. > HCI Event: Command Complete (0x0e) plen 68            #26 [hci0] 264.580248
  27.       Read Local Supported Commands (0x04|0x0002) ncmd 1
  28.         Status: Success (0x00)
  29.         Commands: 105 entries
  30.         ....
  31.           Write Stored Link Key (Octet 6 - Bit 6)
  32.           Delete Stored Link Key (Octet 6 - Bit 7)
  33.         ....
  34. ....
  35. < HCI Command: Delete Stored Li.. (0x03|0x0012) plen 7  #37 [hci0] 264.585265
  36.         Address: 00:00:00:00:00:00 (OUI 00-00-00)
  37.         Delete all: 0x01
  38. > HCI Event: Command Complete (0x0e) plen 4             #38 [hci0] 264.586249
  39.       Delete Stored Link Key (0x03|0x0012) ncmd 1
  40.         Status: Unsupported Feature or Parameter Value (0x11)
  41. = Close Index: 00:0A:3A:66:3D:B9                            [hci0] 264.586262
  42.  
  43. Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
  44. ---
  45.  drivers/bluetooth/btusb.c | 7 ++++++-
  46.  1 file changed, 6 insertions(+), 1 deletion(-)
  47.  
  48. diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
  49. index f7120c9eb9bd..32a10d7be0c3 100644
  50. --- a/drivers/bluetooth/btusb.c
  51. +++ b/drivers/bluetooth/btusb.c
  52. @@ -66,6 +66,7 @@ static struct usb_driver btusb_driver;
  53.  #define BTUSB_BCM2045      0x40000
  54.  #define BTUSB_IFNUM_2      0x80000
  55.  #define BTUSB_CW6622       0x100000
  56. +#define BTUSB_F8T013       0x200000
  57.  
  58.  static const struct usb_device_id btusb_table[] = {
  59.     /* Generic Bluetooth USB device */
  60. @@ -297,7 +298,8 @@ static const struct usb_device_id blacklist_table[] = {
  61.  
  62.     /* Belkin F8T012 and F8T013 devices */
  63.     { USB_DEVICE(0x050d, 0x0012), .driver_info = BTUSB_WRONG_SCO_MTU },
  64. -   { USB_DEVICE(0x050d, 0x0013), .driver_info = BTUSB_WRONG_SCO_MTU },
  65. +   { USB_DEVICE(0x050d, 0x0013),
  66. +     .driver_info = BTUSB_WRONG_SCO_MTU | BTUSB_F8T013},
  67.  
  68.     /* Asus WL-BTD202 device */
  69.     { USB_DEVICE(0x0b05, 0x1715), .driver_info = BTUSB_WRONG_SCO_MTU },
  70. @@ -3043,6 +3045,9 @@ static int btusb_probe(struct usb_interface *intf,
  71.             goto out_free_dev;
  72.     }
  73.  #endif
  74. +   if (id->driver_info & BTUSB_F8T013)
  75. +       set_bit(HCI_QUIRK_BROKEN_STORED_LINK_KEY, &hdev->quirks);
  76. +
  77.     if (id->driver_info & BTUSB_CW6622)
  78.         set_bit(HCI_QUIRK_BROKEN_STORED_LINK_KEY, &hdev->quirks);
  79.  
  80. --
  81. 2.14.2
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top