Bluetooth: Remove unneeded parameter from L2CAP ATT channel handling
authorMarcel Holtmann <marcel@holtmann.org>
Tue, 23 Apr 2013 07:59:00 +0000 (00:59 -0700)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Tue, 23 Apr 2013 23:32:23 +0000 (20:32 -0300)
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>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/l2cap_core.c

index eae1d9f90b68adab6dc9cf3de035c86219be1309..a76d1ac0321b40f48f6de231f31ff14e2af363df 100644 (file)
@@ -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: