Bluetooth: Remove magic value in disconnect mgmt handler
authorAndre Guedes <andre.guedes@openbossa.org>
Mon, 11 Jun 2012 21:41:12 +0000 (18:41 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Wed, 13 Jun 2012 02:26:03 +0000 (23:26 -0300)
This patch replaces the magic value of variable 'reason' by the
proper macro.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/mgmt.c

index b481663..5aa5592 100644 (file)
@@ -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)