Bluetooth: Fix L2CAP control bit field corruption
authorGustavo F. Padovan <padovan@profusion.mobi>
Fri, 18 Jun 2010 23:37:33 +0000 (20:37 -0300)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 21 Jul 2010 17:39:05 +0000 (10:39 -0700)
commit95ffa97827371ede501615d9bd048eb5b49e8fe1
tree0d20d43037c0430906673f9c36981eba4294c6b5
parentc13ffa620f15cb28d18268a773464cf51550fa9f
Bluetooth: Fix L2CAP control bit field corruption

When resending an I-frame, ERTM was reusing the control bits from the last
time it was sent, that was causing a corruption in the new control field
due to it dirty fields.

This patches extracts only the SAR bits from the old field and reuse it to
resend the packet, the others bits should be reset and receive the
updated value.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap.c