瀏覽代碼

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>
Andre Guedes 13 年之前
父節點
當前提交
b5b32b653d
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      net/bluetooth/hci_event.c

+ 8 - 1
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);
 }