Skip to contentSkip to conversation

hci endianness annotations

PATCH In review Al Viro 2 participants 2 messages Dec 8, 2006 Bluetooth

lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 1/1 hci endianness annotations

---
 include/net/bluetooth/hci.h |    4 ++--
 net/bluetooth/hci_sock.c    |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
include/net/bluetooth/hci.h +2 -2
index 10a3eec..41456c1 100644
@@ -739,13 +739,13 @@ #define HCI_DEV_NONE	0xffff
 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
net/bluetooth/hci_sock.c +2 -2
index 711a085..dbf98c4 100644
@@ -123,10 +123,10 @@ void hci_send_to_sock(struct hci_dev *hd
 			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;
 		}
 
Signature · 1 line
1.4.2.GIT
maintainer
#1 lore raw
Quoted 2 lines
Quoted 42 lines
---
 include/net/bluetooth/hci.h |    4 ++--
 net/bluetooth/hci_sock.c    |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
include/net/bluetooth/hci.h +2 -2
index 10a3eec..41456c1 100644
@@ -739,13 +739,13 @@ #define HCI_DEV_NONE	0xffff
 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
net/bluetooth/hci_sock.c +2 -2
index 711a085..dbf98c4 100644
@@ -123,10 +123,10 @@ void hci_send_to_sock(struct hci_dev *hd
 			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;
 		}