Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e1af8a3 authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Johan Hedberg
Browse files

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: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 8c3a4f00
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -740,6 +740,18 @@ static inline __u16 __next_seq(struct l2cap_chan *chan, __u16 seq)
	return (seq + 1) % (chan->tx_win_max + 1);
	return (seq + 1) % (chan->tx_win_max + 1);
}
}


static inline struct l2cap_chan *l2cap_chan_no_new_connection(struct l2cap_chan *chan)
{
	return NULL;
}

static inline void l2cap_chan_no_teardown(struct l2cap_chan *chan, int err)
{
}

static inline void l2cap_chan_no_ready(struct l2cap_chan *chan)
{
}


extern bool disable_ertm;
extern bool disable_ertm;


+3 −20
Original line number Original line Diff line number Diff line
@@ -440,23 +440,6 @@ static struct sk_buff *a2mp_chan_alloc_skb_cb(struct l2cap_chan *chan,
	return bt_skb_alloc(len, GFP_KERNEL);
	return bt_skb_alloc(len, GFP_KERNEL);
}
}


static struct l2cap_chan *a2mp_chan_no_new_conn_cb(struct l2cap_chan *chan)
{
	BT_ERR("new_connection for chan %p not implemented", chan);

	return NULL;
}

static void a2mp_chan_no_teardown_cb(struct l2cap_chan *chan, int err)
{
	BT_ERR("teardown for chan %p not implemented", chan);
}

static void a2mp_chan_no_ready(struct l2cap_chan *chan)
{
	BT_ERR("ready for chan %p not implemented", chan);
}

static struct l2cap_ops a2mp_chan_ops = {
static struct l2cap_ops a2mp_chan_ops = {
	.name = "L2CAP A2MP channel",
	.name = "L2CAP A2MP channel",
	.recv = a2mp_chan_recv_cb,
	.recv = a2mp_chan_recv_cb,
@@ -465,9 +448,9 @@ static struct l2cap_ops a2mp_chan_ops = {
	.alloc_skb = a2mp_chan_alloc_skb_cb,
	.alloc_skb = a2mp_chan_alloc_skb_cb,


	/* Not implemented for A2MP */
	/* Not implemented for A2MP */
	.new_connection = a2mp_chan_no_new_conn_cb,
	.new_connection = l2cap_chan_no_new_connection,
	.teardown = a2mp_chan_no_teardown_cb,
	.teardown = l2cap_chan_no_teardown,
	.ready = a2mp_chan_no_ready,
	.ready = l2cap_chan_no_ready,
};
};


static struct l2cap_chan *a2mp_chan_open(struct l2cap_conn *conn)
static struct l2cap_chan *a2mp_chan_open(struct l2cap_conn *conn)