aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-05-29 12:19:26 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2012-06-04 23:34:16 -0400
commit7e1af8a3a51dbf5dc7392fb294a0830f7e853aa8 (patch)
tree5f495e6078044694b1b70e068288b1645e3370f7
parent8c3a4f004e706fd7e681c68c6de4946c8c76b976 (diff)
Bluetooth: Create empty l2cap ops function
A2MP doesn't use part of the L2CAP chan ops API so we just create general empty function instead of the A2MP specific one. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r--include/net/bluetooth/l2cap.h12
-rw-r--r--net/bluetooth/a2mp.c23
2 files changed, 15 insertions, 20 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index ce99c5683d9e..d80e3f0691b4 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -740,6 +740,18 @@ static inline __u16 __next_seq(struct l2cap_chan *chan, __u16 seq)
740 return (seq + 1) % (chan->tx_win_max + 1); 740 return (seq + 1) % (chan->tx_win_max + 1);
741} 741}
742 742
743static inline struct l2cap_chan *l2cap_chan_no_new_connection(struct l2cap_chan *chan)
744{
745 return NULL;
746}
747
748static inline void l2cap_chan_no_teardown(struct l2cap_chan *chan, int err)
749{
750}
751
752static inline void l2cap_chan_no_ready(struct l2cap_chan *chan)
753{
754}
743 755
744extern bool disable_ertm; 756extern bool disable_ertm;
745 757
diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c
index 0772c680abe6..fb93250b3938 100644
--- a/net/bluetooth/a2mp.c
+++ b/net/bluetooth/a2mp.c
@@ -440,23 +440,6 @@ static struct sk_buff *a2mp_chan_alloc_skb_cb(struct l2cap_chan *chan,
440 return bt_skb_alloc(len, GFP_KERNEL); 440 return bt_skb_alloc(len, GFP_KERNEL);
441} 441}
442 442
443static struct l2cap_chan *a2mp_chan_no_new_conn_cb(struct l2cap_chan *chan)
444{
445 BT_ERR("new_connection for chan %p not implemented", chan);
446
447 return NULL;
448}
449
450static void a2mp_chan_no_teardown_cb(struct l2cap_chan *chan, int err)
451{
452 BT_ERR("teardown for chan %p not implemented", chan);
453}
454
455static void a2mp_chan_no_ready(struct l2cap_chan *chan)
456{
457 BT_ERR("ready for chan %p not implemented", chan);
458}
459
460static struct l2cap_ops a2mp_chan_ops = { 443static struct l2cap_ops a2mp_chan_ops = {
461 .name = "L2CAP A2MP channel", 444 .name = "L2CAP A2MP channel",
462 .recv = a2mp_chan_recv_cb, 445 .recv = a2mp_chan_recv_cb,
@@ -465,9 +448,9 @@ static struct l2cap_ops a2mp_chan_ops = {
465 .alloc_skb = a2mp_chan_alloc_skb_cb, 448 .alloc_skb = a2mp_chan_alloc_skb_cb,
466 449
467 /* Not implemented for A2MP */ 450 /* Not implemented for A2MP */
468 .new_connection = a2mp_chan_no_new_conn_cb, 451 .new_connection = l2cap_chan_no_new_connection,
469 .teardown = a2mp_chan_no_teardown_cb, 452 .teardown = l2cap_chan_no_teardown,
470 .ready = a2mp_chan_no_ready, 453 .ready = l2cap_chan_no_ready,
471}; 454};
472 455
473static struct l2cap_chan *a2mp_chan_open(struct l2cap_conn *conn) 456static struct l2cap_chan *a2mp_chan_open(struct l2cap_conn *conn)