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

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: Add new quirk for broken local ext features page 2

Some adapters (e.g. RTL8723CS) advertise that they have more than
2 pages for local ext features, but they don't support any features
declared in these pages. RTL8723CS reports max_page = 2 and declares
support for sync train and secure connection, but it responds with
either garbage or with error in status on corresponding commands.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Bastian Germann <bage@debian.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Vasily Khoruzhick and committed by
Luiz Augusto von Dentz
8194f1ef a88ea43b

+14 -2
+7
include/net/bluetooth/hci.h
··· 294 294 * during the hdev->setup vendor callback. 295 295 */ 296 296 HCI_QUIRK_BROKEN_MWS_TRANSPORT_CONFIG, 297 + 298 + /* When this quirk is set, max_page for local extended features 299 + * is set to 1, even if controller reports higher number. Some 300 + * controllers (e.g. RTL8723CS) report more pages, but they 301 + * don't actually support features declared there. 302 + */ 303 + HCI_QUIRK_BROKEN_LOCAL_EXT_FEATURES_PAGE_2, 297 304 }; 298 305 299 306 /* HCI device flags */
+7 -2
net/bluetooth/hci_event.c
··· 886 886 if (rp->status) 887 887 return rp->status; 888 888 889 - if (hdev->max_page < rp->max_page) 890 - hdev->max_page = rp->max_page; 889 + if (hdev->max_page < rp->max_page) { 890 + if (test_bit(HCI_QUIRK_BROKEN_LOCAL_EXT_FEATURES_PAGE_2, 891 + &hdev->quirks)) 892 + bt_dev_warn(hdev, "broken local ext features page 2"); 893 + else 894 + hdev->max_page = rp->max_page; 895 + } 891 896 892 897 if (rp->page < HCI_MAX_PAGES) 893 898 memcpy(hdev->features[rp->page], rp->features, 8);