Bluetooth: L2CAP: Fix unrefing buffers that are queued

Processing of data received on dynamic channels is still done via syswq
so the buffer shall not be unrefed when they are queued.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2019-11-28 15:21:45 +02:00 committed by Johan Hedberg
commit 42c5b0a7fa

View file

@ -1676,6 +1676,7 @@ static void l2cap_chan_recv(struct bt_l2cap_chan *chan, struct net_buf *buf)
BT_DBG("chan %p len %u", chan, buf->len);
chan->ops->recv(chan, buf);
net_buf_unref(buf);
}
void bt_l2cap_recv(struct bt_conn *conn, struct net_buf *buf)
@ -1709,7 +1710,6 @@ void bt_l2cap_recv(struct bt_conn *conn, struct net_buf *buf)
}
l2cap_chan_recv(chan, buf);
net_buf_unref(buf);
}
int bt_l2cap_update_conn_param(struct bt_conn *conn,