Bluetooth: Convert error codes to le16
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Mon, 12 Mar 2012 10:13:09 +0000 (12:13 +0200)
committerGustavo Padovan <gustavo@padovan.org>
Wed, 9 May 2012 03:41:31 +0000 (00:41 -0300)
Create Chan Rsp shall put result and status in le format.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/l2cap_core.c

index 1a2f54b8f30cc599d45ff18ee8762270002b4615..aaab65515098d3ef72c4b08d412b71f35495a229 100644 (file)
@@ -3266,8 +3266,8 @@ static inline int l2cap_create_channel_req(struct l2cap_conn *conn,
        /* Placeholder: Always reject */
        rsp.dcid = 0;
        rsp.scid = cpu_to_le16(scid);
-       rsp.result = L2CAP_CR_NO_MEM;
-       rsp.status = L2CAP_CS_NO_INFO;
+       rsp.result = __constant_cpu_to_le16(L2CAP_CR_NO_MEM);
+       rsp.status = __constant_cpu_to_le16(L2CAP_CS_NO_INFO);
 
        l2cap_send_cmd(conn, cmd->ident, L2CAP_CREATE_CHAN_RSP,
                       sizeof(rsp), &rsp);