Bluetooth: L2CAP: Detect if remote is not able to use the whole MPS
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 4 Sep 2018 10:39:22 +0000 (13:39 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 27 Sep 2018 10:52:08 +0000 (12:52 +0200)
commita5c3021bb62b970713550db3f7fd08aa70665d7e
tree812fde45f8a4a5892a1982f80474eafe5a56a2a4
parent96cd8eaa131f0ffd4cfae09e1b4bdfafb9570907
Bluetooth: L2CAP: Detect if remote is not able to use the whole MPS

If the remote is not able to fully utilize the MPS choosen recalculate
the credits based on the actual amount it is sending that way it can
still send packets of MTU size without credits dropping to 0.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap_core.c