Bluetooth: Fix not initializing L2CAP tx_credits
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 14 Mar 2019 13:43:37 +0000 (15:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 May 2019 05:49:55 +0000 (07:49 +0200)
commita324fa50549a0a30676cd4e0aa7d1d0c11a503a1
tree6fc8971de947cc2b16cf116c8bd21d1ec6549ec7
parent07e38998a19d72b916c39a983c19134522ae806b
Bluetooth: Fix not initializing L2CAP tx_credits

commit ba8f5289f706aed94cc95b15cc5b89e22062f61f upstream.

l2cap_le_flowctl_init was reseting the tx_credits which works only for
outgoing connection since that set the tx_credits on the response, for
incoming connections that was not the case which leaves the channel
without any credits causing it to be suspended.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org # 4.20+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/l2cap_core.c