From: Al Viro Date: Wed, 13 Dec 2006 08:35:01 +0000 (-0800) Subject: [PATCH] hci endianness annotations X-Git-Tag: v2.6.20-rc1~77 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=905f3ed62515f233fea09dc5ad68bbcff4903520;p=linux-2.6 [PATCH] hci endianness annotations Signed-off-by: Al Viro Acked-by: Marcel Holtmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 10a3eec191..41456c1488 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -739,13 +739,13 @@ struct sockaddr_hci { struct hci_filter { unsigned long type_mask; unsigned long event_mask[2]; - __u16 opcode; + __le16 opcode; }; struct hci_ufilter { __u32 type_mask; __u32 event_mask[2]; - __u16 opcode; + __le16 opcode; }; #define HCI_FLT_TYPE_BITS 31 diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 711a085eca..dbf98c49db 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c @@ -123,10 +123,10 @@ void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb) if (flt->opcode && ((evt == HCI_EV_CMD_COMPLETE && flt->opcode != - get_unaligned((__u16 *)(skb->data + 3))) || + get_unaligned((__le16 *)(skb->data + 3))) || (evt == HCI_EV_CMD_STATUS && flt->opcode != - get_unaligned((__u16 *)(skb->data + 4))))) + get_unaligned((__le16 *)(skb->data + 4))))) continue; }