Bluetooth: Fix mask for H5 header len
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Thu, 19 Nov 2015 09:29:11 +0000 (11:29 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 19 Nov 2015 16:50:33 +0000 (17:50 +0100)
Fixes mask when calculating three-wire (h5) length.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_h5.c

index ebefe5eb6b713ce2c083361df34c88cf9a14782d..012248efaf6f45867f427e615cf6bb788596e7ff 100644 (file)
@@ -51,7 +51,7 @@
 #define H5_HDR_CRC(hdr)                (((hdr)[0] >> 6) & 0x01)
 #define H5_HDR_RELIABLE(hdr)   (((hdr)[0] >> 7) & 0x01)
 #define H5_HDR_PKT_TYPE(hdr)   ((hdr)[1] & 0x0f)
-#define H5_HDR_LEN(hdr)                ((((hdr)[1] >> 4) & 0xff) + ((hdr)[2] << 4))
+#define H5_HDR_LEN(hdr)                ((((hdr)[1] >> 4) & 0x0f) + ((hdr)[2] << 4))
 
 #define SLIP_DELIMITER 0xc0
 #define SLIP_ESC       0xdb