summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAndre Guedes <aguedespe@gmail.com>2011-12-30 10:34:04 -0300
committerGustavo F. Padovan <padovan@profusion.mobi>2012-01-02 22:29:51 -0200
commitb5b32b653dedb29eb95e57cbbaefc4abf7141cb2 (patch)
tree0fcef65dc75ca91a47614aed977eda85d0b3bcf5 /net
parent59e294065ddee7074af91e4f5e12e6095eb1135b (diff)
downloadlinux-stable-b5b32b653dedb29eb95e57cbbaefc4abf7141cb2.tar.gz
linux-stable-b5b32b653dedb29eb95e57cbbaefc4abf7141cb2.tar.bz2
linux-stable-b5b32b653dedb29eb95e57cbbaefc4abf7141cb2.zip
Bluetooth: Fix hci_cc_read_local_ext_features()
Copy the Features value according to the Page number. Signed-off-by: Andre Guedes <aguedespe@gmail.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_event.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 37c31c52880c..10152d23c987 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -711,7 +711,14 @@ static void hci_cc_read_local_ext_features(struct hci_dev *hdev,
if (rp->status)
return;
- memcpy(hdev->host_features, rp->features, 8);
+ switch (rp->page) {
+ case 0:
+ memcpy(hdev->features, rp->features, 8);
+ break;
+ case 1:
+ memcpy(hdev->host_features, rp->features, 8);
+ break;
+ }
hci_req_complete(hdev, HCI_OP_READ_LOCAL_EXT_FEATURES, rp->status);
}