From: Andre Guedes Date: Fri, 30 Dec 2011 13:34:04 +0000 (-0300) Subject: Bluetooth: Fix hci_cc_read_local_ext_features() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b5b32b653dedb29eb95e57cbbaefc4abf7141cb2;p=mv-sheeva.git Bluetooth: Fix hci_cc_read_local_ext_features() Copy the Features value according to the Page number. Signed-off-by: Andre Guedes Acked-by: Marcel Holtmann Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 37c31c52880..10152d23c98 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); }