* [PATCH] Bluetooth: Replace hard code of configuration continuous flag
[not found] <1285943147-2546-1-git-send-email-haijun.liu@atheros.com>
@ 2010-10-01 14:43 ` haijun liu
2010-10-04 21:00 ` Gustavo F. Padovan
0 siblings, 1 reply; 2+ messages in thread
From: haijun liu @ 2010-10-01 14:43 UTC (permalink / raw)
To: Gustavo F. Padovan, linux-bluetooth@vger.kernel.org
Cc: dan.tian, suraj, Ville Tervo
Replace hard code of configuration continuous flag with
self-commented macro L2CAP_CONF_FLAG_CONT in functions
l2cap_config_req() and l2cap_config_rsp().
Signed-off-by: Haijun.Liu <haijun.liu@atheros.com>
---
include/net/bluetooth/l2cap.h | 2 ++
net/bluetooth/l2cap_core.c | 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index df599dc..2b114ca 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -193,6 +193,8 @@ struct l2cap_conf_rsp {
#define L2CAP_CONF_REJECT 0x0002
#define L2CAP_CONF_UNKNOWN 0x0003
+#define L2CAP_CONF_FLAG_CONT 0x0001
+
struct l2cap_conf_opt {
__u8 type;
__u8 len;
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 07b55c1..9e788c2 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -2985,11 +2985,11 @@ static inline int l2cap_config_req(struct
l2cap_conn *conn, struct l2cap_cmd_hdr
memcpy(l2cap_pi(sk)->conf_req + l2cap_pi(sk)->conf_len, req->data, len);
l2cap_pi(sk)->conf_len += len;
- if (flags & 0x0001) {
+ if (flags & L2CAP_CONF_FLAG_CONT) {
/* Incomplete config. Send empty response. */
l2cap_send_cmd(conn, cmd->ident, L2CAP_CONF_RSP,
l2cap_build_conf_rsp(sk, rsp,
- L2CAP_CONF_SUCCESS, 0x0001), rsp);
+ L2CAP_CONF_SUCCESS,
L2CAP_CONF_FLAG_CONT), rsp);
goto unlock;
}
@@ -3093,7 +3093,7 @@ static inline int l2cap_config_rsp(struct
l2cap_conn *conn, struct l2cap_cmd_hdr
goto done;
}
- if (flags & 0x01)
+ if (flags & L2CAP_CONF_FLAG_CONT)
goto done;
l2cap_pi(sk)->conf_state |= L2CAP_CONF_INPUT_DONE;
--
1.6.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Bluetooth: Replace hard code of configuration continuous flag
2010-10-01 14:43 ` [PATCH] Bluetooth: Replace hard code of configuration continuous flag haijun liu
@ 2010-10-04 21:00 ` Gustavo F. Padovan
0 siblings, 0 replies; 2+ messages in thread
From: Gustavo F. Padovan @ 2010-10-04 21:00 UTC (permalink / raw)
To: haijun liu; +Cc: linux-bluetooth@vger.kernel.org, dan.tian, suraj, Ville Tervo
Hi Haijun,
* haijun liu <liuhaijun.er@gmail.com> [2010-10-01 22:43:52 +0800]:
> Replace hard code of configuration continuous flag with
> self-commented macro L2CAP_CONF_FLAG_CONT in functions
> l2cap_config_req() and l2cap_config_rsp().
>
> Signed-off-by: Haijun.Liu <haijun.liu@atheros.com>
Put a ' ' instead of '.' to separate your surname.
> ---
> include/net/bluetooth/l2cap.h | 2 ++
> net/bluetooth/l2cap_core.c | 6 +++---
> 2 files changed, 5 insertions(+), 3 deletions(-)
Patch is corrupted again, please check where you are screwing up on
sending patches to the mailing list, then we can save my time and your
time. ;)
Applying: Bluetooth: Replace hard code of configuration continuous flag
fatal: corrupt patch at line 11
Patch failed at 0001 Bluetooth: Replace hard code of configuration
continuous flag
Regards,
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-04 21:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1285943147-2546-1-git-send-email-haijun.liu@atheros.com>
2010-10-01 14:43 ` [PATCH] Bluetooth: Replace hard code of configuration continuous flag haijun liu
2010-10-04 21:00 ` Gustavo F. Padovan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).