* [PATCH] Bluetooth: Do not send SET_EVENT_MASK for 1.1 and earlier devices
@ 2011-05-27 8:16 Ville Tervo
2011-05-30 21:04 ` Gustavo F. Padovan
0 siblings, 1 reply; 2+ messages in thread
From: Ville Tervo @ 2011-05-27 8:16 UTC (permalink / raw)
To: linux-bluetooth; +Cc: padovan, Ville Tervo
Some old hci controllers do not accept any mask so leave the
default mask on for these devices.
< HCI Command: Set Event Mask (0x03|0x0001) plen 8
Mask: 0xfffffbff00000000
> HCI Event: Command Complete (0x0e) plen 4
Set Event Mask (0x03|0x0001) ncmd 1
status 0x12
Error: Invalid HCI Command Parameters
Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
---
net/bluetooth/hci_event.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index f13ddbf..77930aa 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -477,14 +477,16 @@ static void hci_setup_event_mask(struct hci_dev *hdev)
* command otherwise */
u8 events[8] = { 0xff, 0xff, 0xfb, 0xff, 0x00, 0x00, 0x00, 0x00 };
- /* Events for 1.2 and newer controllers */
- if (hdev->lmp_ver > 1) {
- events[4] |= 0x01; /* Flow Specification Complete */
- events[4] |= 0x02; /* Inquiry Result with RSSI */
- events[4] |= 0x04; /* Read Remote Extended Features Complete */
- events[5] |= 0x08; /* Synchronous Connection Complete */
- events[5] |= 0x10; /* Synchronous Connection Changed */
- }
+ /* CSR 1.1 dongles does not accept any bitfield so don't try to set
+ * any event mask for pre 1.2 devices */
+ if (hdev->lmp_ver <= 1)
+ return;
+
+ events[4] |= 0x01; /* Flow Specification Complete */
+ events[4] |= 0x02; /* Inquiry Result with RSSI */
+ events[4] |= 0x04; /* Read Remote Extended Features Complete */
+ events[5] |= 0x08; /* Synchronous Connection Complete */
+ events[5] |= 0x10; /* Synchronous Connection Changed */
if (hdev->features[3] & LMP_RSSI_INQ)
events[4] |= 0x04; /* Inquiry Result with RSSI */
--
1.7.4.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Bluetooth: Do not send SET_EVENT_MASK for 1.1 and earlier devices
2011-05-27 8:16 [PATCH] Bluetooth: Do not send SET_EVENT_MASK for 1.1 and earlier devices Ville Tervo
@ 2011-05-30 21:04 ` Gustavo F. Padovan
0 siblings, 0 replies; 2+ messages in thread
From: Gustavo F. Padovan @ 2011-05-30 21:04 UTC (permalink / raw)
To: Ville Tervo; +Cc: linux-bluetooth
* Ville Tervo <ville.tervo@nokia.com> [2011-05-27 11:16:21 +0300]:
> Some old hci controllers do not accept any mask so leave the
> default mask on for these devices.
>
> < HCI Command: Set Event Mask (0x03|0x0001) plen 8
> Mask: 0xfffffbff00000000
> > HCI Event: Command Complete (0x0e) plen 4
> Set Event Mask (0x03|0x0001) ncmd 1
> status 0x12
> Error: Invalid HCI Command Parameters
>
> Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
> ---
> net/bluetooth/hci_event.c | 18 ++++++++++--------
> 1 files changed, 10 insertions(+), 8 deletions(-)
Applied to bluetooth-2.6. Thanks all.
--
Gustavo F. Padovan
http://profusion.mobi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-30 21:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-27 8:16 [PATCH] Bluetooth: Do not send SET_EVENT_MASK for 1.1 and earlier devices Ville Tervo
2011-05-30 21:04 ` Gustavo F. Padovan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.