* [PATCH] Bluetooth: Remove magic value in disconnect mgmt handler
@ 2012-06-11 21:41 Andre Guedes
2012-06-13 2:26 ` Gustavo Padovan
0 siblings, 1 reply; 4+ messages in thread
From: Andre Guedes @ 2012-06-11 21:41 UTC (permalink / raw)
To: linux-bluetooth
This patch replaces the magic value of variable 'reason' by the
proper macro.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
---
net/bluetooth/mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 958f764..38bb7d5 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1611,7 +1611,7 @@ static int disconnect(struct sock *sk, struct hci_dev *hdev, void *data,
}
dc.handle = cpu_to_le16(conn->handle);
- dc.reason = 0x13; /* Remote User Terminated Connection */
+ dc.reason = HCI_ERROR_REMOTE_USER_TERM;
err = hci_send_cmd(hdev, HCI_OP_DISCONNECT, sizeof(dc), &dc);
if (err < 0)
--
1.7.10.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] Bluetooth: Remove magic value in disconnect mgmt handler
@ 2012-06-12 1:13 Paulo Alcantara
2012-06-12 1:20 ` pcacjr
0 siblings, 1 reply; 4+ messages in thread
From: Paulo Alcantara @ 2012-06-12 1:13 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Paulo Alcantara
This patch replaces the magic value of variable 'reason' by the
proper macro.
Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>
---
net/bluetooth/mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 5903d3b..00c9ec1 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1557,7 +1557,7 @@ static int unpair_device(struct sock *sk, struct hci_dev *hdev, void *data,
}
dc.handle = cpu_to_le16(conn->handle);
- dc.reason = 0x13; /* Remote User Terminated Connection */
+ dc.reason = HCI_ERROR_REMOTE_USER_TERM;
err = hci_send_cmd(hdev, HCI_OP_DISCONNECT, sizeof(dc), &dc);
if (err < 0)
mgmt_pending_remove(cmd);
--
1.7.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Bluetooth: Remove magic value in disconnect mgmt handler
2012-06-12 1:13 Paulo Alcantara
@ 2012-06-12 1:20 ` pcacjr
0 siblings, 0 replies; 4+ messages in thread
From: pcacjr @ 2012-06-12 1:20 UTC (permalink / raw)
To: paulo.alcantara; +Cc: linux-bluetooth
From: Paulo Alcantara <paulo.alcantara@openbossa.org>
Date: Mon, 11 Jun 2012 22:13:38 -0300
> This patch replaces the magic value of variable 'reason' by the
> proper macro.
>
> Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>
> ---
> net/bluetooth/mgmt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Ignore this patch. The commit message is wrong.
The correct one is: "[PATCH v2] Bluetooth: Remove magic value in unpair_device
handler".
Thanks,
Paulo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-06-13 2:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-11 21:41 [PATCH] Bluetooth: Remove magic value in disconnect mgmt handler Andre Guedes
2012-06-13 2:26 ` Gustavo Padovan
-- strict thread matches above, loose matches on Subject: below --
2012-06-12 1:13 Paulo Alcantara
2012-06-12 1:20 ` pcacjr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox