Re: [PATCH 4/7] Bluetooth: Add support for reusing the same hci_conn for LE links

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gustavo,

On 22:27 Wed 24 Aug, Gustavo Padovan wrote:
> Hi Vinicius,
> 
> * Vinicius Costa Gomes <vinicius.gomes@xxxxxxxxxxxxx> [2011-08-19 21:06:53 -0300]:
> 
> > As most LE devices leave advertising mode when they enter the connected
> > state, we may want to "pass" that connection to other users.
> > 
> > The first user will be the pairing procedure, the connection is
> > established without an associated socket, after the pairing is
> > complete, userspace may want to discover via GATT what services the
> > newly bonded device has.
> > 
> > If userspace establishes the connection while the timeout still
> > hasn't expired, the connection will be re-used.
> > 
> > Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@xxxxxxxxxxxxx>
> > ---
> >  net/bluetooth/hci_conn.c   |   31 ++++++++++++-----------
> >  net/bluetooth/l2cap_core.c |   56 ++++++++++++++++++++++++++++++-------------
> >  2 files changed, 55 insertions(+), 32 deletions(-)
> > 
[ ... ]

> > @@ -1128,6 +1144,12 @@ int l2cap_chan_connect(struct l2cap_chan *chan)
> >  		goto done;
> >  	}
> >  
> > +	if (hcon->type == LE_LINK && !l2cap_chan_empty(conn)) {
> > +		hci_conn_put(hcon);
>  
> The lock (in l2cap_chan_empty) have to be release after conn put. So just get
> rid of l2cap_chan_empty and do an inline locking here.

Sure. Will fix.

> 
> 	Gustavo

Cheers,
--
Vinicius

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux