Re: [PATCH] Bluetooth: Fix HCI H5 corrupted ack value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Loic,

> 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@xxxxxxxxx>
> ---
> drivers/bluetooth/hci_h5.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux