aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-07-10 08:27:50 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-07-10 14:41:50 -0400
commitad0ac6ca5ffc959b7f8af2c76da4bf2f120aa0ee (patch)
treefe9b633c1c746e0dd51578b29c486a0a61c102f1
parentb44006728d1e553dcebe114252ed8b617db3eace (diff)
Bluetooth: debug: Print CID and PSM in hex format
Correct places where CID and PSM were printed as int. For CID: 0x%4.4x is used and for PSM: 0x%2.2x. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
-rw-r--r--net/bluetooth/l2cap_core.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index e90dacda107..c2d6981bb97 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -3949,7 +3949,7 @@ static inline int l2cap_create_channel_req(struct l2cap_conn *conn,
3949 psm = le16_to_cpu(req->psm); 3949 psm = le16_to_cpu(req->psm);
3950 scid = le16_to_cpu(req->scid); 3950 scid = le16_to_cpu(req->scid);
3951 3951
3952 BT_DBG("psm %d, scid %d, amp_id %d", psm, scid, req->amp_id); 3952 BT_DBG("psm 0x%2.2x, scid 0x%4.4x, amp_id %d", psm, scid, req->amp_id);
3953 3953
3954 /* Placeholder: Always reject */ 3954 /* Placeholder: Always reject */
3955 rsp.dcid = 0; 3955 rsp.dcid = 0;
@@ -3972,11 +3972,11 @@ static inline int l2cap_create_channel_rsp(struct l2cap_conn *conn,
3972} 3972}
3973 3973
3974static void l2cap_send_move_chan_rsp(struct l2cap_conn *conn, u8 ident, 3974static void l2cap_send_move_chan_rsp(struct l2cap_conn *conn, u8 ident,
3975 u16 icid, u16 result) 3975 u16 icid, u16 result)
3976{ 3976{
3977 struct l2cap_move_chan_rsp rsp; 3977 struct l2cap_move_chan_rsp rsp;
3978 3978
3979 BT_DBG("icid %d, result %d", icid, result); 3979 BT_DBG("icid 0x%4.4x, result 0x%4.4x", icid, result);
3980 3980
3981 rsp.icid = cpu_to_le16(icid); 3981 rsp.icid = cpu_to_le16(icid);
3982 rsp.result = cpu_to_le16(result); 3982 rsp.result = cpu_to_le16(result);
@@ -3985,12 +3985,13 @@ static void l2cap_send_move_chan_rsp(struct l2cap_conn *conn, u8 ident,
3985} 3985}
3986 3986
3987static void l2cap_send_move_chan_cfm(struct l2cap_conn *conn, 3987static void l2cap_send_move_chan_cfm(struct l2cap_conn *conn,
3988 struct l2cap_chan *chan, u16 icid, u16 result) 3988 struct l2cap_chan *chan,
3989 u16 icid, u16 result)
3989{ 3990{
3990 struct l2cap_move_chan_cfm cfm; 3991 struct l2cap_move_chan_cfm cfm;
3991 u8 ident; 3992 u8 ident;
3992 3993
3993 BT_DBG("icid %d, result %d", icid, result); 3994 BT_DBG("icid 0x%4.4x, result 0x%4.4x", icid, result);
3994 3995
3995 ident = l2cap_get_ident(conn); 3996 ident = l2cap_get_ident(conn);
3996 if (chan) 3997 if (chan)
@@ -4003,18 +4004,19 @@ static void l2cap_send_move_chan_cfm(struct l2cap_conn *conn,
4003} 4004}
4004 4005
4005static void l2cap_send_move_chan_cfm_rsp(struct l2cap_conn *conn, u8 ident, 4006static void l2cap_send_move_chan_cfm_rsp(struct l2cap_conn *conn, u8 ident,
4006 u16 icid) 4007 u16 icid)
4007{ 4008{
4008 struct l2cap_move_chan_cfm_rsp rsp; 4009 struct l2cap_move_chan_cfm_rsp rsp;
4009 4010
4010 BT_DBG("icid %d", icid); 4011 BT_DBG("icid 0x%4.4x", icid);
4011 4012
4012 rsp.icid = cpu_to_le16(icid); 4013 rsp.icid = cpu_to_le16(icid);
4013 l2cap_send_cmd(conn, ident, L2CAP_MOVE_CHAN_CFM_RSP, sizeof(rsp), &rsp); 4014 l2cap_send_cmd(conn, ident, L2CAP_MOVE_CHAN_CFM_RSP, sizeof(rsp), &rsp);
4014} 4015}
4015 4016
4016static inline int l2cap_move_channel_req(struct l2cap_conn *conn, 4017static inline int l2cap_move_channel_req(struct l2cap_conn *conn,
4017 struct l2cap_cmd_hdr *cmd, u16 cmd_len, void *data) 4018 struct l2cap_cmd_hdr *cmd,
4019 u16 cmd_len, void *data)
4018{ 4020{
4019 struct l2cap_move_chan_req *req = data; 4021 struct l2cap_move_chan_req *req = data;
4020 u16 icid = 0; 4022 u16 icid = 0;
@@ -4025,7 +4027,7 @@ static inline int l2cap_move_channel_req(struct l2cap_conn *conn,
4025 4027
4026 icid = le16_to_cpu(req->icid); 4028 icid = le16_to_cpu(req->icid);
4027 4029
4028 BT_DBG("icid %d, dest_amp_id %d", icid, req->dest_amp_id); 4030 BT_DBG("icid 0x%4.4x, dest_amp_id %d", icid, req->dest_amp_id);
4029 4031
4030 if (!enable_hs) 4032 if (!enable_hs)
4031 return -EINVAL; 4033 return -EINVAL;
@@ -4037,7 +4039,8 @@ static inline int l2cap_move_channel_req(struct l2cap_conn *conn,
4037} 4039}
4038 4040
4039static inline int l2cap_move_channel_rsp(struct l2cap_conn *conn, 4041static inline int l2cap_move_channel_rsp(struct l2cap_conn *conn,
4040 struct l2cap_cmd_hdr *cmd, u16 cmd_len, void *data) 4042 struct l2cap_cmd_hdr *cmd,
4043 u16 cmd_len, void *data)
4041{ 4044{
4042 struct l2cap_move_chan_rsp *rsp = data; 4045 struct l2cap_move_chan_rsp *rsp = data;
4043 u16 icid, result; 4046 u16 icid, result;
@@ -4048,7 +4051,7 @@ static inline int l2cap_move_channel_rsp(struct l2cap_conn *conn,
4048 icid = le16_to_cpu(rsp->icid); 4051 icid = le16_to_cpu(rsp->icid);
4049 result = le16_to_cpu(rsp->result); 4052 result = le16_to_cpu(rsp->result);
4050 4053
4051 BT_DBG("icid %d, result %d", icid, result); 4054 BT_DBG("icid 0x%4.4x, result 0x%4.4x", icid, result);
4052 4055
4053 /* Placeholder: Always unconfirmed */ 4056 /* Placeholder: Always unconfirmed */
4054 l2cap_send_move_chan_cfm(conn, NULL, icid, L2CAP_MC_UNCONFIRMED); 4057 l2cap_send_move_chan_cfm(conn, NULL, icid, L2CAP_MC_UNCONFIRMED);
@@ -4057,7 +4060,8 @@ static inline int l2cap_move_channel_rsp(struct l2cap_conn *conn,
4057} 4060}
4058 4061
4059static inline int l2cap_move_channel_confirm(struct l2cap_conn *conn, 4062static inline int l2cap_move_channel_confirm(struct l2cap_conn *conn,
4060 struct l2cap_cmd_hdr *cmd, u16 cmd_len, void *data) 4063 struct l2cap_cmd_hdr *cmd,
4064 u16 cmd_len, void *data)
4061{ 4065{
4062 struct l2cap_move_chan_cfm *cfm = data; 4066 struct l2cap_move_chan_cfm *cfm = data;
4063 u16 icid, result; 4067 u16 icid, result;
@@ -4068,7 +4072,7 @@ static inline int l2cap_move_channel_confirm(struct l2cap_conn *conn,
4068 icid = le16_to_cpu(cfm->icid); 4072 icid = le16_to_cpu(cfm->icid);
4069 result = le16_to_cpu(cfm->result); 4073 result = le16_to_cpu(cfm->result);
4070 4074
4071 BT_DBG("icid %d, result %d", icid, result); 4075 BT_DBG("icid 0x%4.4x, result 0x%4.4x", icid, result);
4072 4076
4073 l2cap_send_move_chan_cfm_rsp(conn, cmd->ident, icid); 4077 l2cap_send_move_chan_cfm_rsp(conn, cmd->ident, icid);
4074 4078
@@ -4076,7 +4080,8 @@ static inline int l2cap_move_channel_confirm(struct l2cap_conn *conn,
4076} 4080}
4077 4081
4078static inline int l2cap_move_channel_confirm_rsp(struct l2cap_conn *conn, 4082static inline int l2cap_move_channel_confirm_rsp(struct l2cap_conn *conn,
4079 struct l2cap_cmd_hdr *cmd, u16 cmd_len, void *data) 4083 struct l2cap_cmd_hdr *cmd,
4084 u16 cmd_len, void *data)
4080{ 4085{
4081 struct l2cap_move_chan_cfm_rsp *rsp = data; 4086 struct l2cap_move_chan_cfm_rsp *rsp = data;
4082 u16 icid; 4087 u16 icid;
@@ -4086,7 +4091,7 @@ static inline int l2cap_move_channel_confirm_rsp(struct l2cap_conn *conn,
4086 4091
4087 icid = le16_to_cpu(rsp->icid); 4092 icid = le16_to_cpu(rsp->icid);
4088 4093
4089 BT_DBG("icid %d", icid); 4094 BT_DBG("icid 0x%4.4x", icid);
4090 4095
4091 return 0; 4096 return 0;
4092} 4097}