]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Bluetooth: Fix hci_cc_read_local_ext_features()
authorAndre Guedes <aguedespe@gmail.com>
Fri, 30 Dec 2011 13:34:04 +0000 (10:34 -0300)
committerGustavo F. Padovan <padovan@profusion.mobi>
Tue, 3 Jan 2012 00:29:51 +0000 (22:29 -0200)
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>
net/bluetooth/hci_event.c

index 37c31c52880c17539376c4187fccb951125e136a..10152d23c987c4c2a69810c0a54407317535b1db 100644 (file)
@@ -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);
 }