linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rene Herman <rene.herman@gmail.com>
To: Andre Guedes <andre.guedes@openbossa.org>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	Gustavo Padovan <padovan@profusion.mobi>,
	linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org
Subject: Re: [bluetooth] linux-3.x regression (bisected)
Date: Wed, 04 Jan 2012 16:12:16 +0100	[thread overview]
Message-ID: <4F046C50.9010201@gmail.com> (raw)
In-Reply-To: <CACJA=fU4QerTS0EEz_Q+16_nPH73WEPadVM53-ZEV8vkEgQD8Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 416 bytes --]

On 04-01-12 15:16, Andre Guedes wrote:

>> Any word on a final fix for this?
>
> Yes,this couple of patches fixes this issue:
> http://article.gmane.org/gmane.linux.bluez.kernel/19950/
> http://article.gmane.org/gmane.linux.bluez.kernel/19951/
>
> They were already pushed to bluetooth-next tree.

Thank you. Just in case anyone cares, versions against 3.1.7 re-attached 
(and confirmed, of course).

Regards,
Rene


[-- Attachment #2: bluetooth-3.1.7_1-2.diff --]
[-- Type: text/x-patch, Size: 1447 bytes --]

[PATCH 1/2] Bluetooth: Rename extfeatures
    
From: Andre Guedes <aguedespe@gmail.com>
    
This patch renames hdev->extfeatures to hdev->host_features since it
holds the extended features Page 1 (aka host features).

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 8f441b8..61deef8 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -130,7 +130,7 @@ struct hci_dev {
 	__u8		major_class;
 	__u8		minor_class;
 	__u8		features[8];
-	__u8		extfeatures[8];
+	__u8		host_features[8];
 	__u8		commands[64];
 	__u8		ssp_mode;
 	__u8		hci_ver;
@@ -601,7 +601,7 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
 #define lmp_le_capable(dev)        ((dev)->features[4] & LMP_LE)
 
 /* ----- Extended LMP capabilities ----- */
-#define lmp_host_le_capable(dev)   ((dev)->extfeatures[0] & LMP_HOST_LE)
+#define lmp_host_le_capable(dev)   ((dev)->host_features[0] & LMP_HOST_LE)
 
 /* ----- HCI protocols ----- */
 struct hci_proto {
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 7ef4eb4..6a09143 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -695,7 +695,7 @@ static void hci_cc_read_local_ext_features(struct hci_dev *hdev,
 	if (rp->status)
 		return;
 
-	memcpy(hdev->extfeatures, rp->features, 8);
+	memcpy(hdev->host_features, rp->features, 8);
 
 	hci_req_complete(hdev, HCI_OP_READ_LOCAL_EXT_FEATURES, rp->status);
 }

[-- Attachment #3: bluetooth-3.1.7_2-2.diff --]
[-- Type: text/x-patch, Size: 725 bytes --]

[PATCH 2/2] Bluetooh: Fix hci_cc_read_local_ext_features()
    
From: Andre Guedes <aguedespe@gmail.com>
    
Copy the Features value according to the Page number.

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 6a09143..9ef6012 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -695,7 +695,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);
 }

  reply	other threads:[~2012-01-04 15:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4EF3BACA.1080405@gmail.com>
2011-12-27 17:22 ` [bluetooth] linux-3.x regression (bisected) Andre Guedes
2011-12-27 19:38   ` Rene Herman
2011-12-27 20:30     ` Gustavo Padovan
2011-12-27 22:19       ` Rene Herman
2011-12-28  1:22         ` Gustavo Padovan
2011-12-28  1:28           ` Gustavo Padovan
2011-12-28  1:53             ` Rene Herman
2011-12-28  1:57               ` Rene Herman
2011-12-28 15:52               ` Gustavo Padovan
2011-12-28 16:04                 ` David Herrmann
2011-12-28 16:16                   ` Gustavo Padovan
2011-12-28 16:48                 ` Marcel Holtmann
2011-12-28 17:24                   ` Rene Herman
2011-12-28 22:17                   ` Rene Herman
2011-12-28 23:07                     ` Marcel Holtmann
2011-12-29  0:22                       ` Rene Herman
2012-01-04 12:04                   ` Rene Herman
2012-01-04 14:16                     ` Andre Guedes
2012-01-04 15:12                       ` Rene Herman [this message]
2011-12-28 16:54                 ` Rene Herman
2011-12-28 17:12                   ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F046C50.9010201@gmail.com \
    --to=rene.herman@gmail.com \
    --cc=andre.guedes@openbossa.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=padovan@profusion.mobi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).