Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Remove unneeded parameter from L2CAP ATT channel handling
@ 2013-04-23  7:59 Marcel Holtmann
  2013-04-23  9:27 ` Johan Hedberg
  2013-04-23 23:33 ` Gustavo Padovan
  0 siblings, 2 replies; 3+ messages in thread
From: Marcel Holtmann @ 2013-04-23  7:59 UTC (permalink / raw)
  To: linux-bluetooth

The CID is fixed to L2CAP ATT channel and so there is no need to hand it
down to the handling function. Just use a constant instead.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/l2cap_core.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index eae1d9f..a76d1ac 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -6314,12 +6314,13 @@ drop:
 	kfree_skb(skb);
 }
 
-static void l2cap_att_channel(struct l2cap_conn *conn, u16 cid,
+static void l2cap_att_channel(struct l2cap_conn *conn,
 			      struct sk_buff *skb)
 {
 	struct l2cap_chan *chan;
 
-	chan = l2cap_global_chan_by_scid(0, cid, conn->src, conn->dst);
+	chan = l2cap_global_chan_by_scid(0, L2CAP_CID_LE_DATA,
+					 conn->src, conn->dst);
 	if (!chan)
 		goto drop;
 
@@ -6368,7 +6369,7 @@ static void l2cap_recv_frame(struct l2cap_conn *conn, struct sk_buff *skb)
 		break;
 
 	case L2CAP_CID_LE_DATA:
-		l2cap_att_channel(conn, cid, skb);
+		l2cap_att_channel(conn, skb);
 		break;
 
 	case L2CAP_CID_SMP:
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: Remove unneeded parameter from L2CAP ATT channel handling
  2013-04-23  7:59 [PATCH] Bluetooth: Remove unneeded parameter from L2CAP ATT channel handling Marcel Holtmann
@ 2013-04-23  9:27 ` Johan Hedberg
  2013-04-23 23:33 ` Gustavo Padovan
  1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2013-04-23  9:27 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

Hi Marcel,

On Tue, Apr 23, 2013, Marcel Holtmann wrote:
> The CID is fixed to L2CAP ATT channel and so there is no need to hand it
> down to the handling function. Just use a constant instead.
> 
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> ---
>  net/bluetooth/l2cap_core.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Looks good to me.

Acked-by: Johan Hedberg <johan.hedberg@intel.com>

Johan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: Remove unneeded parameter from L2CAP ATT channel handling
  2013-04-23  7:59 [PATCH] Bluetooth: Remove unneeded parameter from L2CAP ATT channel handling Marcel Holtmann
  2013-04-23  9:27 ` Johan Hedberg
@ 2013-04-23 23:33 ` Gustavo Padovan
  1 sibling, 0 replies; 3+ messages in thread
From: Gustavo Padovan @ 2013-04-23 23:33 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

Hi Marcel,

* Marcel Holtmann <marcel@holtmann.org> [2013-04-23 00:59:00 -0700]:

> The CID is fixed to L2CAP ATT channel and so there is no need to hand it
> down to the handling function. Just use a constant instead.
> 
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> ---
>  net/bluetooth/l2cap_core.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Patch has been applied to bluetooth-next. Thanks.

	Gustavo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-23 23:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-23  7:59 [PATCH] Bluetooth: Remove unneeded parameter from L2CAP ATT channel handling Marcel Holtmann
2013-04-23  9:27 ` Johan Hedberg
2013-04-23 23:33 ` Gustavo Padovan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox