From: "Gustavo F. Padovan" <padovan@profusion.mobi>
To: haijun liu <liuhaijun.er@gmail.com>
Cc: linux-bluetooth@vger.kernel.org,
Mat Martineau <mathewm@codeaurora.org>,
"dantian.ip" <dantian.ip@gmail.com>
Subject: Re: [PATCH] Bluetooth: Replace hard code of fixed channels bit mask
Date: Thu, 16 Sep 2010 11:16:54 -0300 [thread overview]
Message-ID: <20100916141654.GB15000@vigoh> (raw)
In-Reply-To: <AANLkTi=86t=osr8YUfUfU3QLHiHXgp8SCuwqOE_GoPgp@mail.gmail.com>
Hi Haijun,
* haijun liu <liuhaijun.er@gmail.com> [2010-09-16 15:15:18 +0800]:
> This patch add fixed channels bit mask definition for
> L2CAP_FIXCHAN_NULLID
> L2CAP_FIXCHAN_SIGNAL
> L2CAP_FIXCHAN_CONNLESS
> L2CAP_FIXCHAN_A2MP
> And replace hard code in source file with the macro.
>
> Signed-off-by: Haijun.Liu <Haijun.Liu@Atheros.com>
> ---
> include/net/bluetooth/l2cap.h | 6 ++++++
> net/bluetooth/l2cap.c | 2 +-
> 2 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
> index 6c24144..e4fe2c7 100644
> --- a/include/net/bluetooth/l2cap.h
> +++ b/include/net/bluetooth/l2cap.h
> @@ -97,6 +97,12 @@ struct l2cap_conninfo {
> #define L2CAP_FEAT_FCS 0x00000020
> #define L2CAP_FEAT_FIXED_CHAN 0x00000080
>
> +/* L2CAP fixed channel bitmask */
> +#define L2CAP_FIXCHAN_NULLID 0x00
> +#define L2CAP_FIXCHAN_SIGNAL 0x02
> +#define L2CAP_FIXCHAN_CONNLESS 0x04
> +#define L2CAP_FIXCHAN_A2MP 0x08
That's wrong, signaling channel is 0x01, connless is 0x02 and A2MP is
0x03. And if you haven't noted we already have macros for the signaling
and connectionless channels:
#define L2CAP_CID_SIGNALING 0x0001
#define L2CAP_CID_CONN_LESS 0x0002
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
next prev parent reply other threads:[~2010-09-16 14:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-16 7:15 [PATCH] Bluetooth: Replace hard code of fixed channels bit mask haijun liu
2010-09-16 14:16 ` Gustavo F. Padovan [this message]
[not found] ` <AANLkTik244A2zNFL-yL7CvBKdf3UZDDKq1Ap7HR5+aCR@mail.gmail.com>
2010-09-17 1:08 ` Fwd: " haijun liu
2010-09-17 8:50 ` Ville Tervo
2010-09-17 11:39 ` haijun liu
2010-09-20 9:19 ` Ville Tervo
2010-09-17 18:07 ` Gustavo F. Padovan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100916141654.GB15000@vigoh \
--to=padovan@profusion.mobi \
--cc=dantian.ip@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=liuhaijun.er@gmail.com \
--cc=mathewm@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox