提交 029727a3 编写于 作者: J Johan Hedberg 提交者: Marcel Holtmann

Bluetooth: Fix suspending the L2CAP socket if we start with 0 credits

If the peer gives us zero credits in its connection request or response
we must call the suspend channel callback so the BT_SK_SUSPEND flag gets
set and user space is blocked from sending data to the socket.
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 595177f3
......@@ -1202,6 +1202,9 @@ static void l2cap_le_flowctl_start(struct l2cap_chan *chan)
chan->sdu_len = 0;
skb_queue_head_init(&chan->tx_q);
if (!chan->tx_credits)
chan->ops->suspend(chan);
}
static void l2cap_chan_ready(struct l2cap_chan *chan)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册