aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-11-08 12:57:21 -0500
committerDavid S. Miller <davem@davemloft.net>2005-11-08 12:57:21 -0500
commit1ebb92521d0bc2d4ef772730d29333c06b807191 (patch)
treed480ca68fd4c7f1185e189942feef8d85edbb659 /net
parent7ef934b3b73f74aea23aa0e98affe86d7ea816a3 (diff)
[Bluetooth]: Add endian annotations to the core
This patch adds the endian annotations to the Bluetooth core. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_core.c2
-rw-r--r--net/bluetooth/hci_event.c6
-rw-r--r--net/bluetooth/hci_sock.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index cf0df1c8c933..9106354c781e 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -183,7 +183,7 @@ static void hci_reset_req(struct hci_dev *hdev, unsigned long opt)
183static void hci_init_req(struct hci_dev *hdev, unsigned long opt) 183static void hci_init_req(struct hci_dev *hdev, unsigned long opt)
184{ 184{
185 struct sk_buff *skb; 185 struct sk_buff *skb;
186 __u16 param; 186 __le16 param;
187 187
188 BT_DBG("%s %ld", hdev->name, opt); 188 BT_DBG("%s %ld", hdev->name, opt);
189 189
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index b61b4e8e36fd..eb64555d1fb3 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -242,7 +242,7 @@ static void hci_cc_host_ctl(struct hci_dev *hdev, __u16 ocf, struct sk_buff *skb
242 break; 242 break;
243 243
244 status = *((__u8 *) skb->data); 244 status = *((__u8 *) skb->data);
245 setting = __le16_to_cpu(get_unaligned((__u16 *) sent)); 245 setting = __le16_to_cpu(get_unaligned((__le16 *) sent));
246 246
247 if (!status && hdev->voice_setting != setting) { 247 if (!status && hdev->voice_setting != setting) {
248 hdev->voice_setting = setting; 248 hdev->voice_setting = setting;
@@ -728,7 +728,7 @@ static inline void hci_disconn_complete_evt(struct hci_dev *hdev, struct sk_buff
728static inline void hci_num_comp_pkts_evt(struct hci_dev *hdev, struct sk_buff *skb) 728static inline void hci_num_comp_pkts_evt(struct hci_dev *hdev, struct sk_buff *skb)
729{ 729{
730 struct hci_ev_num_comp_pkts *ev = (struct hci_ev_num_comp_pkts *) skb->data; 730 struct hci_ev_num_comp_pkts *ev = (struct hci_ev_num_comp_pkts *) skb->data;
731 __u16 *ptr; 731 __le16 *ptr;
732 int i; 732 int i;
733 733
734 skb_pull(skb, sizeof(*ev)); 734 skb_pull(skb, sizeof(*ev));
@@ -742,7 +742,7 @@ static inline void hci_num_comp_pkts_evt(struct hci_dev *hdev, struct sk_buff *s
742 742
743 tasklet_disable(&hdev->tx_task); 743 tasklet_disable(&hdev->tx_task);
744 744
745 for (i = 0, ptr = (__u16 *) skb->data; i < ev->num_hndl; i++) { 745 for (i = 0, ptr = (__le16 *) skb->data; i < ev->num_hndl; i++) {
746 struct hci_conn *conn; 746 struct hci_conn *conn;
747 __u16 handle, count; 747 __u16 handle, count;
748 748
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 799e448750ad..1d6d0a15c099 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -416,7 +416,7 @@ static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
416 skb->dev = (void *) hdev; 416 skb->dev = (void *) hdev;
417 417
418 if (bt_cb(skb)->pkt_type == HCI_COMMAND_PKT) { 418 if (bt_cb(skb)->pkt_type == HCI_COMMAND_PKT) {
419 u16 opcode = __le16_to_cpu(get_unaligned((u16 *)skb->data)); 419 u16 opcode = __le16_to_cpu(get_unaligned((__le16 *) skb->data));
420 u16 ogf = hci_opcode_ogf(opcode); 420 u16 ogf = hci_opcode_ogf(opcode);
421 u16 ocf = hci_opcode_ocf(opcode); 421 u16 ocf = hci_opcode_ocf(opcode);
422 422