Bluetooth: Fix spurious error message
Subsystems (2)
RFC 1/1 Bluetooth: Fix spurious error message
This message was debug message before 2064ee332e4c1b7495cf68b. Looks like it was changed by accident in that patch. This is causing some error messages when doing BR/EDR discovery since Inquiry Command generates Command Status event, not Command Complete.
I'm sending this as RFC for now since while things seem to work fine despite this condition (and it was like that for quite some time) it feels like this is indeed case that should be handled by HCI request code.
--- net/bluetooth/hci_event.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
net/bluetooth/hci_event.c +1 -2
@@ -5207,8 +5207,7 @@ static bool hci_get_cmd_complete(struct hci_dev *hdev, u16 opcode, }if (hdr->evt !=HCI_EV_CMD_COMPLETE ) { -bt_dev_err (hdev,"last event is not cmd complete (0x%2.2x)" , - hdr->evt); +BT_DBG ("last event is not cmd complete (0x%2.2x)" , hdr->evt);return false; }
Signature · 1 line
2.14.3
Hi,
Quoted 20 lines · On Thursday, 29 March 2018 11:41:17 CEST Szymon Janc wrote:
This message was debug message before
2064ee332e4c1b7495cf68b. Looks like it was changed by accident in that patch. This is causing some error messages when doing BR/EDR discovery since Inquiry Command generates Command Status event, not Command Complete.I'm sending this as RFC for now since while things seem to work fine despite this condition (and it was like that for quite some time) it feels like this is indeed case that should be handled by HCI request code.
Signed-off-by Szymon Janc <[email protected]>--- net/bluetooth/hci_event.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)net/bluetooth/hci_event.c +0
-0
net/bluetooth/hci_event.c static bool hci_get_cmd_complete(struct hci_dev *hdev, · line 5212
Quoted 8 lines
net/bluetooth/hci_event.c +1
-2@@ -5207,8 +5207,7 @@ static bool hci_get_cmd_complete(struct hci_dev *hdev, u16 opcode, }if (hdr->evt !=HCI_EV_CMD_COMPLETE ) { -bt_dev_err (hdev,"last event is not cmd complete (0x%2.2x)" , - hdr->evt); +BT_DBG ("last event is not cmd complete (0x%2.2x)" , hdr->evt);return false; }
Any thoughts on this?
Signature · 2 lines
pozdrawiam Szymon Janc
Marcel Holtmann
maintainerHi Szymon,
Quoted 20 lines
This message was debug message before
2064ee332e4c1b7495cf68b. Looks like it was changed by accident in that patch. This is causing some error messages when doing BR/EDR discovery since Inquiry Command generates Command Status event, not Command Complete.I'm sending this as RFC for now since while things seem to work fine despite this condition (and it was like that for quite some time) it feels like this is indeed case that should be handled by HCI request code.
Signed-off-by Szymon Janc <[email protected]>---
net/bluetooth/hci_event.c| 3 +--1 file changed, 1 insertion(+), 2 deletions(-)net/bluetooth/hci_event.c +0
-0
net/bluetooth/hci_event.c static bool hci_get_cmd_complete(struct hci_dev *hdev, u16 opcode, · line 5212
Quoted 8 lines
net/bluetooth/hci_event.c +1
-2@@ -5207,8 +5207,7 @@ static bool hci_get_cmd_complete(struct hci_dev *hdev, u16 opcode, }if (hdr->evt !=HCI_EV_CMD_COMPLETE ) { -bt_dev_err (hdev,"last event is not cmd complete (0x%2.2x)" , - hdr->evt); +BT_DBG ("last event is not cmd complete (0x%2.2x)" , hdr->evt);return false; }
I changed this intentionally since it looked like an error to me. However Johan needs to have a look at this and we need to get a proper fix. Just hiding it behind a debug statement is not helping.
Regards
Marcel