• Vinicius Peixoto's avatar
    Bluetooth: Add new quirk for broken read key length on ATS2851 · 48201a3b
    Vinicius Peixoto authored
    The ATS2851 controller erroneously reports support for the "Read
    Encryption Key Length" HCI command. This makes it unable to connect
    to any devices, since this command is issued by the kernel during the
    connection process in response to an "Encryption Change" HCI event.
    
    Add a new quirk (HCI_QUIRK_BROKEN_ENC_KEY_SIZE) to hint that the command
    is unsupported, preventing it from interrupting the connection process.
    
    This is the error log from btmon before this patch:
    
    > HCI Event: Encryption Change (0x08) plen 4
            Status: Success (0x00)
            Handle: 2048 Address: ...
            Encryption: Enabled with E0 (0x01)
    < HCI Command: Read Encryption Key Size (0x05|0x0008) plen 2
            Handle: 2048 Address: ...
    > HCI Event: Command Status (0x0f) plen 4
          Read Encryption Key Size (0x05|0x0008) ncmd 1
            Status: Unknown HCI Command (0x01)
    Signed-off-by: default avatarVinicius Peixoto <nukelet64@gmail.com>
    Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
    48201a3b
btusb.c 131 KB