2012-01-02 19:50:53

by Andre Guedes

[permalink] [raw]
Subject: [PATCH] Bluetooth: Fix mgmt_stop_discovery_failed()

Stop Discovery Command Status Event should use mgmt status code.

Signed-off-by: Andre Guedes <[email protected]>
---
net/bluetooth/mgmt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 2540944..fb0b15e 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2756,7 +2756,7 @@ int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status)
if (!cmd)
return -ENOENT;

- err = cmd_status(cmd->sk, hdev->id, cmd->opcode, status);
+ err = cmd_status(cmd->sk, hdev->id, cmd->opcode, mgmt_status(status));
mgmt_pending_remove(cmd);

return err;
--
1.7.8.1



2012-01-03 00:44:31

by Gustavo Padovan

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Fix mgmt_stop_discovery_failed()

* Andre Guedes <[email protected]> [2012-01-02 16:50:53 -0300]:

> Stop Discovery Command Status Event should use mgmt status code.
>
> Signed-off-by: Andre Guedes <[email protected]>
> ---
> net/bluetooth/mgmt.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Gustavo

2012-01-02 22:48:22

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Fix mgmt_stop_discovery_failed()

On Mon, Jan 02, 2012, Marcel Holtmann wrote:
> > Stop Discovery Command Status Event should use mgmt status code.
> >
> > Signed-off-by: Andre Guedes <[email protected]>
> > ---
> > net/bluetooth/mgmt.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> > index 2540944..fb0b15e 100644
> > --- a/net/bluetooth/mgmt.c
> > +++ b/net/bluetooth/mgmt.c
> > @@ -2756,7 +2756,7 @@ int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status)
> > if (!cmd)
> > return -ENOENT;
> >
> > - err = cmd_status(cmd->sk, hdev->id, cmd->opcode, status);
> > + err = cmd_status(cmd->sk, hdev->id, cmd->opcode, mgmt_status(status));
> > mgmt_pending_remove(cmd);
>
> patch does look reasonable to me, but I am not this is the expected
> behavior. I leave this up to Johan to ACK or NAK.

Looks good to me.

Acked-by: Johan Hedberg <[email protected]>

Johan

2012-01-02 22:25:08

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Fix mgmt_stop_discovery_failed()

Hi Andre,

> Stop Discovery Command Status Event should use mgmt status code.
>
> Signed-off-by: Andre Guedes <[email protected]>
> ---
> net/bluetooth/mgmt.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index 2540944..fb0b15e 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -2756,7 +2756,7 @@ int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status)
> if (!cmd)
> return -ENOENT;
>
> - err = cmd_status(cmd->sk, hdev->id, cmd->opcode, status);
> + err = cmd_status(cmd->sk, hdev->id, cmd->opcode, mgmt_status(status));
> mgmt_pending_remove(cmd);

patch does look reasonable to me, but I am not this is the expected
behavior. I leave this up to Johan to ACK or NAK.

Regards

Marcel