[NET]: move struct proto_ops to const
[pandora-kernel.git] / net / bluetooth / hci_sock.c
index eed9090..84e6c93 100644 (file)
@@ -66,20 +66,20 @@ static struct hci_sec_filter hci_sec_filter = {
        /* Packet types */
        0x10,
        /* Events */
-       { 0x1000d9fe, 0x0000300c },
+       { 0x1000d9fe, 0x0000b00c },
        /* Commands */
        {
                { 0x0 },
                /* OGF_LINK_CTL */
-               { 0xbe000006, 0x00000001, 0x0000, 0x00 },
+               { 0xbe000006, 0x00000001, 0x000000, 0x00 },
                /* OGF_LINK_POLICY */
-               { 0x00005200, 0x00000000, 0x0000, 0x00 },
+               { 0x00005200, 0x00000000, 0x000000, 0x00 },
                /* OGF_HOST_CTL */
-               { 0xaab00200, 0x2b402aaa, 0x0154, 0x00 },
+               { 0xaab00200, 0x2b402aaa, 0x020154, 0x00 },
                /* OGF_INFO_PARAM */
-               { 0x000002be, 0x00000000, 0x0000, 0x00 },
+               { 0x000002be, 0x00000000, 0x000000, 0x00 },
                /* OGF_STATUS_PARAM */
-               { 0x000000ea, 0x00000000, 0x0000, 0x00 }
+               { 0x000000ea, 0x00000000, 0x000000, 0x00 }
        }
 };
 
@@ -332,8 +332,12 @@ static inline void hci_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_
                put_cmsg(msg, SOL_HCI, HCI_CMSG_DIR, sizeof(incoming), &incoming);
        }
 
-       if (mask & HCI_CMSG_TSTAMP)
-               put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, sizeof(skb->stamp), &skb->stamp);
+       if (mask & HCI_CMSG_TSTAMP) {
+               struct timeval tv;
+
+               skb_get_timestamp(skb, &tv);
+               put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, sizeof(tv), &tv);
+       }
 }
  
 static int hci_sock_recvmsg(struct kiocb *iocb, struct socket *sock, 
@@ -412,7 +416,7 @@ static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
        skb->dev = (void *) hdev;
 
        if (bt_cb(skb)->pkt_type == HCI_COMMAND_PKT) {
-               u16 opcode = __le16_to_cpu(get_unaligned((u16 *)skb->data));
+               u16 opcode = __le16_to_cpu(get_unaligned((__le16 *) skb->data));
                u16 ogf = hci_opcode_ogf(opcode);
                u16 ocf = hci_opcode_ocf(opcode);
 
@@ -571,7 +575,7 @@ static int hci_sock_getsockopt(struct socket *sock, int level, int optname, char
        return 0;
 }
 
-static struct proto_ops hci_sock_ops = {
+static const struct proto_ops hci_sock_ops = {
        .family         = PF_BLUETOOTH,
        .owner          = THIS_MODULE,
        .release        = hci_sock_release,