diff options
| author | Loic Poulain <loic.poulain@intel.com> | 2014-08-08 19:07:16 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-30 09:35:12 -0700 |
| commit | 90f9a6a427abd19c8d304ecbac034deb39d0737c (patch) | |
| tree | 3a5fbf042dab21cc683646e44ce99a7d9cdab889 /include/linux | |
| parent | 28330aa4e0dc1232ecfb18c7456a5c456f5c6e97 (diff) | |
Bluetooth: Fix HCI H5 corrupted ack value
commit 4807b51895dce8aa650ebebc51fa4a795ed6b8b8 upstream.
In this expression: seq = (seq - 1) % 8
seq (u8) is implicitly converted to an int in the arithmetic operation.
So if seq value is 0, operation is ((0 - 1) % 8) => (-1 % 8) => -1.
The new seq value is 0xff which is an invalid ACK value, we expect 0x07.
It leads to frequent dropped ACK and retransmission.
Fix this by using '&' binary operator instead of '%'.
Signed-off-by: Loic Poulain <loic.poulain@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
