Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315675
b: refs/heads/master
c: ad0ac6c
h: refs/heads/master
i:
  315673: 40a3565
  315671: 5c44b19
v: v3
  • Loading branch information
Andrei Emeltchenko authored and Gustavo Padovan committed Jul 10, 2012
1 parent 0fcedf9 commit 8c76fb9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b44006728d1e553dcebe114252ed8b617db3eace
refs/heads/master: ad0ac6ca5ffc959b7f8af2c76da4bf2f120aa0ee
35 changes: 20 additions & 15 deletions trunk/net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3949,7 +3949,7 @@ static inline int l2cap_create_channel_req(struct l2cap_conn *conn,
psm = le16_to_cpu(req->psm);
scid = le16_to_cpu(req->scid);

BT_DBG("psm %d, scid %d, amp_id %d", psm, scid, req->amp_id);
BT_DBG("psm 0x%2.2x, scid 0x%4.4x, amp_id %d", psm, scid, req->amp_id);

/* Placeholder: Always reject */
rsp.dcid = 0;
Expand All @@ -3972,11 +3972,11 @@ static inline int l2cap_create_channel_rsp(struct l2cap_conn *conn,
}

static void l2cap_send_move_chan_rsp(struct l2cap_conn *conn, u8 ident,
u16 icid, u16 result)
u16 icid, u16 result)
{
struct l2cap_move_chan_rsp rsp;

BT_DBG("icid %d, result %d", icid, result);
BT_DBG("icid 0x%4.4x, result 0x%4.4x", icid, result);

rsp.icid = cpu_to_le16(icid);
rsp.result = cpu_to_le16(result);
Expand All @@ -3985,12 +3985,13 @@ static void l2cap_send_move_chan_rsp(struct l2cap_conn *conn, u8 ident,
}

static void l2cap_send_move_chan_cfm(struct l2cap_conn *conn,
struct l2cap_chan *chan, u16 icid, u16 result)
struct l2cap_chan *chan,
u16 icid, u16 result)
{
struct l2cap_move_chan_cfm cfm;
u8 ident;

BT_DBG("icid %d, result %d", icid, result);
BT_DBG("icid 0x%4.4x, result 0x%4.4x", icid, result);

ident = l2cap_get_ident(conn);
if (chan)
Expand All @@ -4003,18 +4004,19 @@ static void l2cap_send_move_chan_cfm(struct l2cap_conn *conn,
}

static void l2cap_send_move_chan_cfm_rsp(struct l2cap_conn *conn, u8 ident,
u16 icid)
u16 icid)
{
struct l2cap_move_chan_cfm_rsp rsp;

BT_DBG("icid %d", icid);
BT_DBG("icid 0x%4.4x", icid);

rsp.icid = cpu_to_le16(icid);
l2cap_send_cmd(conn, ident, L2CAP_MOVE_CHAN_CFM_RSP, sizeof(rsp), &rsp);
}

static inline int l2cap_move_channel_req(struct l2cap_conn *conn,
struct l2cap_cmd_hdr *cmd, u16 cmd_len, void *data)
struct l2cap_cmd_hdr *cmd,
u16 cmd_len, void *data)
{
struct l2cap_move_chan_req *req = data;
u16 icid = 0;
Expand All @@ -4025,7 +4027,7 @@ static inline int l2cap_move_channel_req(struct l2cap_conn *conn,

icid = le16_to_cpu(req->icid);

BT_DBG("icid %d, dest_amp_id %d", icid, req->dest_amp_id);
BT_DBG("icid 0x%4.4x, dest_amp_id %d", icid, req->dest_amp_id);

if (!enable_hs)
return -EINVAL;
Expand All @@ -4037,7 +4039,8 @@ static inline int l2cap_move_channel_req(struct l2cap_conn *conn,
}

static inline int l2cap_move_channel_rsp(struct l2cap_conn *conn,
struct l2cap_cmd_hdr *cmd, u16 cmd_len, void *data)
struct l2cap_cmd_hdr *cmd,
u16 cmd_len, void *data)
{
struct l2cap_move_chan_rsp *rsp = data;
u16 icid, result;
Expand All @@ -4048,7 +4051,7 @@ static inline int l2cap_move_channel_rsp(struct l2cap_conn *conn,
icid = le16_to_cpu(rsp->icid);
result = le16_to_cpu(rsp->result);

BT_DBG("icid %d, result %d", icid, result);
BT_DBG("icid 0x%4.4x, result 0x%4.4x", icid, result);

/* Placeholder: Always unconfirmed */
l2cap_send_move_chan_cfm(conn, NULL, icid, L2CAP_MC_UNCONFIRMED);
Expand All @@ -4057,7 +4060,8 @@ static inline int l2cap_move_channel_rsp(struct l2cap_conn *conn,
}

static inline int l2cap_move_channel_confirm(struct l2cap_conn *conn,
struct l2cap_cmd_hdr *cmd, u16 cmd_len, void *data)
struct l2cap_cmd_hdr *cmd,
u16 cmd_len, void *data)
{
struct l2cap_move_chan_cfm *cfm = data;
u16 icid, result;
Expand All @@ -4068,15 +4072,16 @@ static inline int l2cap_move_channel_confirm(struct l2cap_conn *conn,
icid = le16_to_cpu(cfm->icid);
result = le16_to_cpu(cfm->result);

BT_DBG("icid %d, result %d", icid, result);
BT_DBG("icid 0x%4.4x, result 0x%4.4x", icid, result);

l2cap_send_move_chan_cfm_rsp(conn, cmd->ident, icid);

return 0;
}

static inline int l2cap_move_channel_confirm_rsp(struct l2cap_conn *conn,
struct l2cap_cmd_hdr *cmd, u16 cmd_len, void *data)
struct l2cap_cmd_hdr *cmd,
u16 cmd_len, void *data)
{
struct l2cap_move_chan_cfm_rsp *rsp = data;
u16 icid;
Expand All @@ -4086,7 +4091,7 @@ static inline int l2cap_move_channel_confirm_rsp(struct l2cap_conn *conn,

icid = le16_to_cpu(rsp->icid);

BT_DBG("icid %d", icid);
BT_DBG("icid 0x%4.4x", icid);

return 0;
}
Expand Down

0 comments on commit 8c76fb9

Please sign in to comment.