Skip to contentSkip to conversation

Bluetooth: Use command status event for Set IO Capability errors

PATCH Applied Marcel Holtmann 2 participants 2 messages Aug 29, 2016

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Use command status event for Set IO Capability errors

In case of failure, the Set IO Capability command is suppose to return command status and not command complete.

---
 net/bluetooth/mgmt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/bluetooth/mgmt.c +2 -2
index 7a7a8be3f2e4..c5345c814e49 100644
@@ -2513,8 +2513,8 @@ static int set_io_capability(struct sock *sk, struct hci_dev *hdev, void *data,
 	BT_DBG("");
 
 	if (cp->io_capability > SMP_IO_KEYBOARD_DISPLAY)
-		return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_SET_IO_CAPABILITY,
-					 MGMT_STATUS_INVALID_PARAMS, NULL, 0);
+		return mgmt_cmd_status(sk, hdev->id, MGMT_OP_SET_IO_CAPABILITY,
+				       MGMT_STATUS_INVALID_PARAMS);
 
 	hci_dev_lock(hdev);
 
Signature · 1 line
2.7.4
#1 lore raw

Hi Marcel,

Quoted 7 lines · Marcel Holtmann

In case of failure, the Set IO Capability command is suppose to return command status and not command complete.

---
 net/bluetooth/mgmt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to bluetooth-next. Thanks.

Johan