* [PATCH 1/2] Bluetooth: Rename extfeatures
@ 2011-12-30 13:34 Andre Guedes
2011-12-30 13:34 ` [PATCH 2/2] Bluetooh: Fix hci_cc_read_local_ext_features() Andre Guedes
2011-12-30 19:15 ` [PATCH 1/2] Bluetooth: Rename extfeatures Marcel Holtmann
0 siblings, 2 replies; 5+ messages in thread
From: Andre Guedes @ 2011-12-30 13:34 UTC (permalink / raw)
To: linux-bluetooth; +Cc: andre.guedes
This patch renames hdev->extfeatures to hdev->host_features since it
holds the extended features Page 1 (aka host features).
Signed-off-by: Andre Guedes <aguedespe@gmail.com>
---
include/net/bluetooth/hci_core.h | 4 ++--
net/bluetooth/hci_event.c | 2 +-
net/bluetooth/mgmt.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 5e2e984..ea9231f 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -127,7 +127,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;
@@ -676,7 +676,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 ----- */
static inline int hci_proto_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr,
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 919e3c0..37c31c5 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -711,7 +711,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);
}
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 2540944..38ec8ca 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -291,7 +291,7 @@ static u32 get_current_settings(struct hci_dev *hdev)
if (!(hdev->features[4] & LMP_NO_BREDR))
settings |= MGMT_SETTING_BREDR;
- if (hdev->extfeatures[0] & LMP_HOST_LE)
+ if (hdev->host_features[0] & LMP_HOST_LE)
settings |= MGMT_SETTING_LE;
if (test_bit(HCI_AUTH, &hdev->flags))
--
1.7.8.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] Bluetooh: Fix hci_cc_read_local_ext_features()
2011-12-30 13:34 [PATCH 1/2] Bluetooth: Rename extfeatures Andre Guedes
@ 2011-12-30 13:34 ` Andre Guedes
2011-12-30 19:17 ` Marcel Holtmann
2012-01-03 0:23 ` Gustavo Padovan
2011-12-30 19:15 ` [PATCH 1/2] Bluetooth: Rename extfeatures Marcel Holtmann
1 sibling, 2 replies; 5+ messages in thread
From: Andre Guedes @ 2011-12-30 13:34 UTC (permalink / raw)
To: linux-bluetooth; +Cc: andre.guedes
Copy the Features value according to the Page number.
Signed-off-by: Andre Guedes <aguedespe@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Bluetooth: Rename extfeatures
2011-12-30 13:34 [PATCH 1/2] Bluetooth: Rename extfeatures Andre Guedes
2011-12-30 13:34 ` [PATCH 2/2] Bluetooh: Fix hci_cc_read_local_ext_features() Andre Guedes
@ 2011-12-30 19:15 ` Marcel Holtmann
1 sibling, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2011-12-30 19:15 UTC (permalink / raw)
To: Andre Guedes; +Cc: linux-bluetooth, andre.guedes
Hi Andre,
> This patch renames hdev->extfeatures to hdev->host_features since it
> holds the extended features Page 1 (aka host features).
>
> Signed-off-by: Andre Guedes <aguedespe@gmail.com>
> ---
> include/net/bluetooth/hci_core.h | 4 ++--
> net/bluetooth/hci_event.c | 2 +-
> net/bluetooth/mgmt.c | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Regards
Marcel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] Bluetooh: Fix hci_cc_read_local_ext_features()
2011-12-30 13:34 ` [PATCH 2/2] Bluetooh: Fix hci_cc_read_local_ext_features() Andre Guedes
@ 2011-12-30 19:17 ` Marcel Holtmann
2012-01-03 0:23 ` Gustavo Padovan
1 sibling, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2011-12-30 19:17 UTC (permalink / raw)
To: Andre Guedes; +Cc: linux-bluetooth, andre.guedes
Hi Andre,
> Copy the Features value according to the Page number.
>
> Signed-off-by: Andre Guedes <aguedespe@gmail.com>
> ---
> 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);
> }
I was fine with just handling page 1 properly since we do not use
read_local_ext_features for page 0 in the first place. However this is
also fine with me.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Regards
Marcel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] Bluetooh: Fix hci_cc_read_local_ext_features()
2011-12-30 13:34 ` [PATCH 2/2] Bluetooh: Fix hci_cc_read_local_ext_features() Andre Guedes
2011-12-30 19:17 ` Marcel Holtmann
@ 2012-01-03 0:23 ` Gustavo Padovan
1 sibling, 0 replies; 5+ messages in thread
From: Gustavo Padovan @ 2012-01-03 0:23 UTC (permalink / raw)
To: Andre Guedes; +Cc: linux-bluetooth, andre.guedes
Hi Andre,
* Andre Guedes <aguedespe@gmail.com> [2011-12-30 10:34:04 -0300]:
> Copy the Features value according to the Page number.
>
> Signed-off-by: Andre Guedes <aguedespe@gmail.com>
> ---
> net/bluetooth/hci_event.c | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
Both patches have been applied, thanks.
Gustavo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-03 0:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-30 13:34 [PATCH 1/2] Bluetooth: Rename extfeatures Andre Guedes
2011-12-30 13:34 ` [PATCH 2/2] Bluetooh: Fix hci_cc_read_local_ext_features() Andre Guedes
2011-12-30 19:17 ` Marcel Holtmann
2012-01-03 0:23 ` Gustavo Padovan
2011-12-30 19:15 ` [PATCH 1/2] Bluetooth: Rename extfeatures Marcel Holtmann
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).