Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] hci endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Al Viro and committed by
Linus Torvalds
905f3ed6 db71b7f1

+4 -4
+2 -2
include/net/bluetooth/hci.h
··· 739 739 struct hci_filter { 740 740 unsigned long type_mask; 741 741 unsigned long event_mask[2]; 742 - __u16 opcode; 742 + __le16 opcode; 743 743 }; 744 744 745 745 struct hci_ufilter { 746 746 __u32 type_mask; 747 747 __u32 event_mask[2]; 748 - __u16 opcode; 748 + __le16 opcode; 749 749 }; 750 750 751 751 #define HCI_FLT_TYPE_BITS 31
+2 -2
net/bluetooth/hci_sock.c
··· 123 123 if (flt->opcode && 124 124 ((evt == HCI_EV_CMD_COMPLETE && 125 125 flt->opcode != 126 - get_unaligned((__u16 *)(skb->data + 3))) || 126 + get_unaligned((__le16 *)(skb->data + 3))) || 127 127 (evt == HCI_EV_CMD_STATUS && 128 128 flt->opcode != 129 - get_unaligned((__u16 *)(skb->data + 4))))) 129 + get_unaligned((__le16 *)(skb->data + 4))))) 130 130 continue; 131 131 } 132 132