Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
[deliverable/linux.git] / drivers / bluetooth / hci_h4.c
index a6fce48da0fb382df7e8600aea320e79ef05713c..635597b6e1681f25e8ed6004c6960369dcae3e1b 100644 (file)
@@ -108,7 +108,7 @@ static int h4_enqueue(struct hci_uart *hu, struct sk_buff *skb)
        BT_DBG("hu %p skb %p", hu, skb);
 
        /* Prepend skb with frame type */
-       memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1);
+       memcpy(skb_push(skb, 1), &hci_skb_pkt_type(skb), 1);
        skb_queue_tail(&h4->txq, skb);
 
        return 0;
@@ -184,8 +184,8 @@ struct sk_buff *h4_recv_buf(struct hci_dev *hdev, struct sk_buff *skb,
                                if (!skb)
                                        return ERR_PTR(-ENOMEM);
 
-                               bt_cb(skb)->pkt_type = (&pkts[i])->type;
-                               bt_cb(skb)->expect = (&pkts[i])->hlen;
+                               hci_skb_pkt_type(skb) = (&pkts[i])->type;
+                               hci_skb_expect(skb) = (&pkts[i])->hlen;
                                break;
                        }
 
@@ -197,18 +197,18 @@ struct sk_buff *h4_recv_buf(struct hci_dev *hdev, struct sk_buff *skb,
                        buffer += 1;
                }
 
-               len = min_t(uint, bt_cb(skb)->expect - skb->len, count);
+               len = min_t(uint, hci_skb_expect(skb) - skb->len, count);
                memcpy(skb_put(skb, len), buffer, len);
 
                count -= len;
                buffer += len;
 
                /* Check for partial packet */
-               if (skb->len < bt_cb(skb)->expect)
+               if (skb->len < hci_skb_expect(skb))
                        continue;
 
                for (i = 0; i < pkts_count; i++) {
-                       if (bt_cb(skb)->pkt_type == (&pkts[i])->type)
+                       if (hci_skb_pkt_type(skb) == (&pkts[i])->type)
                                break;
                }
 
@@ -228,7 +228,7 @@ struct sk_buff *h4_recv_buf(struct hci_dev *hdev, struct sk_buff *skb,
                        case 1:
                                /* Single octet variable length */
                                dlen = skb->data[(&pkts[i])->loff];
-                               bt_cb(skb)->expect += dlen;
+                               hci_skb_expect(skb) += dlen;
 
                                if (skb_tailroom(skb) < dlen) {
                                        kfree_skb(skb);
@@ -239,7 +239,7 @@ struct sk_buff *h4_recv_buf(struct hci_dev *hdev, struct sk_buff *skb,
                                /* Double octet variable length */
                                dlen = get_unaligned_le16(skb->data +
                                                          (&pkts[i])->loff);
-                               bt_cb(skb)->expect += dlen;
+                               hci_skb_expect(skb) += dlen;
 
                                if (skb_tailroom(skb) < dlen) {
                                        kfree_skb(skb);
This page took 0.032105 seconds and 5 git commands to generate.