summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2013-10-18 21:04:47 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2013-10-19 15:22:52 +0200
commit57af75a8cfec8e3c338a8542e54fe26376ea14cf (patch)
treed43c42ee0a98a599205b2b2ba3fb0a1cf20428f6 /net/bluetooth/hci_event.c
parentBluetooth: Move HCI device features into hci_core.c (diff)
downloadlinux-57af75a8cfec8e3c338a8542e54fe26376ea14cf.tar.xz
linux-57af75a8cfec8e3c338a8542e54fe26376ea14cf.zip
Bluetooth: Add workaround for buggy max_page features page value
Some controllers list the max_page value from the extended features response as 0 when SSP has not yet been enabled. To workaround this issue, force the max_page value to 1 when SSP support has been detected. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to '')
-rw-r--r--net/bluetooth/hci_event.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index e43de9876aa0..c171c0798499 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -555,7 +555,8 @@ static void hci_cc_read_local_ext_features(struct hci_dev *hdev,
if (rp->status)
return;
- hdev->max_page = rp->max_page;
+ if (hdev->max_page < rp->max_page)
+ hdev->max_page = rp->max_page;
if (rp->page < HCI_MAX_PAGES)
memcpy(hdev->features[rp->page], rp->features, 8);