* [PATCH v1] bluetooth: fix off by one in err_data_reporting cmd masks.
@ 2020-03-11 14:18 Alain Michaud
2020-03-11 14:25 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Alain Michaud @ 2020-03-11 14:18 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Alain Michaud
This change fixes the off by one error in the erroneous command bit
masks which can lead to the erroneous data commands being sent to a
controller that doesn't support them.
Signed-off-by: Alain Michaud <alainm@chromium.org>
---
net/bluetooth/hci_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 9ce98762559b..196edc039b8e 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -603,7 +603,7 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt)
if (hdev->commands[8] & 0x01)
hci_req_add(req, HCI_OP_READ_PAGE_SCAN_ACTIVITY, 0, NULL);
- if (hdev->commands[18] & 0x02)
+ if (hdev->commands[18] & 0x04)
hci_req_add(req, HCI_OP_READ_DEF_ERR_DATA_REPORTING, 0, NULL);
/* Some older Broadcom based Bluetooth 1.2 controllers do not
@@ -844,7 +844,7 @@ static int hci_init4_req(struct hci_request *req, unsigned long opt)
/* Set erroneous data reporting if supported to the wideband speech
* setting value
*/
- if (hdev->commands[18] & 0x04) {
+ if (hdev->commands[18] & 0x08) {
bool enabled = hci_dev_test_flag(hdev,
HCI_WIDEBAND_SPEECH_ENABLED);
--
2.25.1.481.gfbce0eb801-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] bluetooth: fix off by one in err_data_reporting cmd masks.
2020-03-11 14:18 [PATCH v1] bluetooth: fix off by one in err_data_reporting cmd masks Alain Michaud
@ 2020-03-11 14:25 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2020-03-11 14:25 UTC (permalink / raw)
To: Alain Michaud; +Cc: linux-bluetooth
Hi Alain,
> This change fixes the off by one error in the erroneous command bit
> masks which can lead to the erroneous data commands being sent to a
> controller that doesn't support them.
>
> Signed-off-by: Alain Michaud <alainm@chromium.org>
> ---
>
> net/bluetooth/hci_core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-11 14:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11 14:18 [PATCH v1] bluetooth: fix off by one in err_data_reporting cmd masks Alain Michaud
2020-03-11 14:25 ` Marcel Holtmann
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.