diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-10-21 11:44:35 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2021-10-22 06:46:16 +0200 |
commit | f33b0068cdaf2b9998fa3662585858ef30bc4b9e (patch) | |
tree | c6e5b399f71b36890bd42f4fb58e4c2a35ecc454 /drivers/bluetooth/hci_vhci.c | |
parent | 7a517ac9c00bab519770c0790b47845b8f5ecebb (diff) |
Bluetooth: vhci: Fix checking of msft_opcode
msft_opcode shall be use a vendor ogf (0x3f) but the check was
swifting the bits in the wrong order due to a missing parantesis
over val & 0xffff, but since the code already checks for values over
0xffff it shall not be necessary to perform that operation it now just
removes which makes it work properly when setting opcodes like 0xfce1.
Fixes: b8f5482c9638 ("Bluetooth: vhci: Add support for setting msft_opcode and aosp_capable")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_vhci.c')
-rw-r--r-- | drivers/bluetooth/hci_vhci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index 9cb7c8fafbf9..49ac884d996e 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c @@ -200,7 +200,7 @@ static int msft_opcode_set(void *data, u64 val) { struct vhci_data *vhci = data; - if (val > 0xffff || (val & 0xffff >> 10) != 0x3f) + if (val > 0xffff || hci_opcode_ogf(val) != 0x3f) return -EINVAL; if (vhci->msft_opcode) |