]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix endianness handling of cmd_status/complete opcodes
authorJohan Hedberg <johan.hedberg@intel.com>
Sat, 9 Mar 2013 07:53:50 +0000 (09:53 +0200)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Sat, 9 Mar 2013 20:19:09 +0000 (17:19 -0300)
commita8687bdb2c5749340af1c9bc29d803cf9ee7ca3d
tree1834b0afc4c719cf33e976a0874718777ef243fa
parent9413210d90c926fc78039618cd9632667d5deef5
Bluetooth: Fix endianness handling of cmd_status/complete opcodes

The opcode in cmd_complete and cmd_status events is 16 bits, so we
should only be comparing it after having converted it to the host
endianness. There's already an opcode variable in both functions which
is in host endiannes so the right fix is to just start using it instead
of ev->opcode.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/hci_event.c