From: Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com>
To: Manoj Kumar Sharma <manojkr.sharma@stericsson.com>
Cc: linux-bluetooth@vger.kernel.org,
Anurag Gupta <anurag.gupta@stericsson.com>
Subject: Re: [PATCH] Bluetooth: Usage of HCI channels in L2CAP
Date: Tue, 24 Jul 2012 11:31:38 +0300 [thread overview]
Message-ID: <20120724083136.GA11981@aemeltch-MOBL1> (raw)
In-Reply-To: <1343117537-31501-1-git-send-email-manojkr.sharma@stericsson.com>
Hi Manoj,
On Tue, Jul 24, 2012 at 01:42:16PM +0530, Manoj Kumar Sharma wrote:
> This patch enables L2CAP to use HCI channel feature. This can be
> used to reflect L2CAP socket properties onto HCI channel.
the description is not good. This looks like
"Move HCI chan from l2cap_conn to l2cap_chan"
> Change-Id: Iac2b54a1b8204695162491d09161066d90495e06
> Signed-off-by: Manoj Kumar Sharma <manojkr.sharma@stericsson.com>
> ---
> include/net/bluetooth/l2cap.h | 1 +
> net/bluetooth/l2cap_core.c | 10 +++++++++-
> 2 files changed, 10 insertions(+), 1 deletions(-)
>
> diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
> index 9b242c6..f26a468 100644
> --- a/include/net/bluetooth/l2cap.h
> +++ b/include/net/bluetooth/l2cap.h
> @@ -410,6 +410,7 @@ struct l2cap_chan {
> struct sock *sk;
>
> struct l2cap_conn *conn;
> + struct hci_chan *hchan;
>
> __u8 state;
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index 6f9c25b..e487731 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -300,6 +300,8 @@ void l2cap_chan_destroy(struct l2cap_chan *chan)
>
> void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan)
> {
> + struct hci_chan *hchan;
> +
> BT_DBG("conn %p, psm 0x%2.2x, dcid 0x%4.4x", conn,
> chan->psm, chan->dcid);
>
> @@ -342,6 +344,10 @@ void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan)
> chan->local_acc_lat = L2CAP_DEFAULT_ACC_LAT;
> chan->local_flush_to = L2CAP_DEFAULT_FLUSH_TO;
>
> + hchan = hci_chan_create(conn->hcon);
> + chan->hchan = hchan;
> +
> +
extra new line
> l2cap_chan_hold(chan);
>
> list_add(&chan->list, &conn->chan_l);
> @@ -396,6 +402,8 @@ static void l2cap_chan_del(struct l2cap_chan *chan, int err)
>
> skb_queue_purge(&chan->tx_q);
>
> + hci_chan_del(chan->hchan);
> +
> if (chan->mode == L2CAP_MODE_ERTM) {
> struct srej_list *l, *tmp;
>
> @@ -596,7 +604,7 @@ static void l2cap_do_send(struct l2cap_chan *chan, struct sk_buff *skb)
> flags = ACL_START;
>
> bt_cb(skb)->force_active = test_bit(FLAG_FORCE_ACTIVE, &chan->flags);
> - hci_send_acl(chan->conn->hchan, skb, flags);
> + hci_send_acl(chan->hchan, skb, flags);
So what about hchan in l2cap_conn structure?
Best regards
Andrei Emeltchenko
next prev parent reply other threads:[~2012-07-24 8:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-24 8:12 [PATCH] Bluetooth: Usage of HCI channels in L2CAP Manoj Kumar Sharma
2012-07-24 8:12 ` [PATCH] Bluetooth: L2CAP socket option to reserve bandwidth Manoj Kumar Sharma
2012-07-24 8:31 ` Andrei Emeltchenko [this message]
2012-07-24 10:56 ` [PATCH] Bluetooth: Usage of HCI channels in L2CAP Manoj Sharma
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=20120724083136.GA11981@aemeltch-MOBL1 \
--to=andrei.emeltchenko.news@gmail.com \
--cc=anurag.gupta@stericsson.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=manojkr.sharma@stericsson.com \
/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