* [PATCH] Bluetooth: mgmt: add mgmt_cmd_status in add_advertising
@ 2020-03-10 16:31 Manish Mandlik
2020-03-11 14:35 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Manish Mandlik @ 2020-03-10 16:31 UTC (permalink / raw)
To: marcel
Cc: Alain Michaud, linux-bluetooth, Miao-chen Chou, Joseph Hwang,
Yoni Shavit, Manish Mandlik, David S. Miller, Johan Hedberg,
netdev, linux-kernel, Jakub Kicinski
From: Joseph Hwang <josephsih@chromium.org>
From: Joseph Hwang <josephsih@chromium.org>
If an error occurs during request building in add_advertising(),
remember to send MGMT_STATUS_FAILED command status back to bluetoothd.
Signed-off-by: Joseph Hwang <josephsih@chromium.org>
Signed-off-by: Manish Mandlik <mmandlik@google.com>
---
net/bluetooth/mgmt.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 1002c657768a0..2398f57b7dc3c 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -6747,8 +6747,11 @@ static int add_advertising(struct sock *sk, struct hci_dev *hdev,
if (!err)
err = hci_req_run(&req, add_advertising_complete);
- if (err < 0)
+ if (err < 0) {
+ err = mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_ADVERTISING,
+ MGMT_STATUS_FAILED);
mgmt_pending_remove(cmd);
+ }
unlock:
hci_dev_unlock(hdev);
--
2.25.1.481.gfbce0eb801-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Bluetooth: mgmt: add mgmt_cmd_status in add_advertising
2020-03-10 16:31 [PATCH] Bluetooth: mgmt: add mgmt_cmd_status in add_advertising Manish Mandlik
@ 2020-03-11 14:35 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2020-03-11 14:35 UTC (permalink / raw)
To: Manish Mandlik
Cc: Alain Michaud, Bluez mailing list, Miao-chen Chou, Joseph Hwang,
Yoni Shavit, David S. Miller, Johan Hedberg, netdev,
linux-kernel, Jakub Kicinski
Hi Manish,
> If an error occurs during request building in add_advertising(),
> remember to send MGMT_STATUS_FAILED command status back to bluetoothd.
>
> Signed-off-by: Joseph Hwang <josephsih@chromium.org>
> Signed-off-by: Manish Mandlik <mmandlik@google.com>
> ---
>
> net/bluetooth/mgmt.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
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:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10 16:31 [PATCH] Bluetooth: mgmt: add mgmt_cmd_status in add_advertising Manish Mandlik
2020-03-11 14:35 ` 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).