Re: [PATCHv1 17/17] Bluetooth: A2MP: Manage incoming connections

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

 




Andrei -

On Tue, 22 May 2012, Andrei Emeltchenko wrote:

Hi Mat,

On Mon, May 21, 2012 at 03:45:38PM -0700, Mat Martineau wrote:
...
@@ -4652,10 +4653,15 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk

	chan = l2cap_get_chan_by_scid(conn, cid);
	if (!chan) {
-		BT_DBG("unknown cid 0x%4.4x", cid);
-		/* Drop packet and return */
-		kfree_skb(skb);
-		return 0;
+		if (cid == L2CAP_CID_A2MP) {
+			chan = a2mp_channel_create(conn, skb);

This allocates a new AMP manager for each incoming command, doesn't
it?  I'd expect the manager to be created once when it is first
needed, then remain active until the ACL is closed.

No. If AMP channel exist it will be returned with l2cap_get_chan_by_scid.
Channel exist while ACL connection exist.

Oh, ok - I see that it is added to the channel list in l2cap_chan_add.


Thanks,
--
Mat Martineau
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum

--
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