Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Andre Guedes <aguedespe-Re5JQEeQqe8AvxtiuMwx3w <at> public.gmane.org>
Subject: [PATCH 2/2] Bluetooh: Fix hci_cc_read_local_ext_features()
Newsgroups: gmane.linux.bluez.kernel
Date: Friday 30th December 2011 13:34:04 UTC (over 5 years ago)
Copy the Features value according to the Page number.

Signed-off-by: Andre Guedes

---
 net/bluetooth/hci_event.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 37c31c5..10152d2 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);
 }
-- 
1.7.8.1
 
CD: 4ms