Skip to content

Commit

Permalink
Bluetooth: Correct CID endian notation
Browse files Browse the repository at this point in the history
L2CAP channel id is used in host format in internal L2CAP code.
Fix sparse warnings about wrong endian conversion.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
  • Loading branch information
Andrei Emeltchenko authored and Gustavo Padovan committed May 9, 2012
1 parent 61386cb commit d9b8870
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,8 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
/* Find socket with cid and source bdaddr.
* Returns closest match, locked.
*/
static struct l2cap_chan *l2cap_global_chan_by_scid(int state, __le16 cid, bdaddr_t *src)
static struct l2cap_chan *l2cap_global_chan_by_scid(int state, u16 cid,
bdaddr_t *src)
{
struct l2cap_chan *c, *c1 = NULL;

Expand Down Expand Up @@ -4396,7 +4397,8 @@ static inline int l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm, str
return 0;
}

static inline int l2cap_att_channel(struct l2cap_conn *conn, __le16 cid, struct sk_buff *skb)
static inline int l2cap_att_channel(struct l2cap_conn *conn, u16 cid,
struct sk_buff *skb)
{
struct l2cap_chan *chan;

Expand Down

0 comments on commit d9b8870

Please sign in to comment.