Skip to content

Commit

Permalink
Bluetooth: Fix hci_cc_read_local_ext_features()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andre Guedes authored and Gustavo F. Padovan committed Jan 3, 2012
1 parent 59e2940 commit b5b32b6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b5b32b6

Please sign in to comment.