aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/hci_vhci.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-08-09 23:30:28 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:55:13 -0400
commit0d48d93947dd9ea21c5cdc76a8581b06a4a39281 (patch)
tree96a1cbfe83a02e27fed3d30f1ac9f2fe05c17506 /drivers/bluetooth/hci_vhci.c
parent2eb25a6c34504254760e67172f7518d6bfdd7676 (diff)
[Bluetooth]: Move packet type into the SKB control buffer
This patch moves the usage of packet type into the SKB control buffer. After this patch it is now possible to shrink the sk_buff structure and redefine its pkt_type. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/bluetooth/hci_vhci.c')
-rw-r--r--drivers/bluetooth/hci_vhci.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
index 4aa5dfff12b..52cbd45c308 100644
--- a/drivers/bluetooth/hci_vhci.c
+++ b/drivers/bluetooth/hci_vhci.c
@@ -107,7 +107,7 @@ static int vhci_send_frame(struct sk_buff *skb)
107 107
108 vhci = hdev->driver_data; 108 vhci = hdev->driver_data;
109 109
110 memcpy(skb_push(skb, 1), &skb->pkt_type, 1); 110 memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1);
111 skb_queue_tail(&vhci->readq, skb); 111 skb_queue_tail(&vhci->readq, skb);
112 112
113 if (vhci->flags & VHCI_FASYNC) 113 if (vhci->flags & VHCI_FASYNC)
@@ -141,7 +141,7 @@ static inline ssize_t vhci_get_user(struct vhci_data *vhci,
141 } 141 }
142 142
143 skb->dev = (void *) vhci->hdev; 143 skb->dev = (void *) vhci->hdev;
144 skb->pkt_type = *((__u8 *) skb->data); 144 bt_cb(skb)->pkt_type = *((__u8 *) skb->data);
145 skb_pull(skb, 1); 145 skb_pull(skb, 1);
146 146
147 hci_recv_frame(skb); 147 hci_recv_frame(skb);
@@ -164,18 +164,18 @@ static inline ssize_t vhci_put_user(struct vhci_data *vhci,
164 164
165 vhci->hdev->stat.byte_tx += len; 165 vhci->hdev->stat.byte_tx += len;
166 166
167 switch (skb->pkt_type) { 167 switch (bt_cb(skb)->pkt_type) {
168 case HCI_COMMAND_PKT: 168 case HCI_COMMAND_PKT:
169 vhci->hdev->stat.cmd_tx++; 169 vhci->hdev->stat.cmd_tx++;
170 break; 170 break;
171 171
172 case HCI_ACLDATA_PKT: 172 case HCI_ACLDATA_PKT:
173 vhci->hdev->stat.acl_tx++; 173 vhci->hdev->stat.acl_tx++;
174 break; 174 break;
175 175
176 case HCI_SCODATA_PKT: 176 case HCI_SCODATA_PKT:
177 vhci->hdev->stat.cmd_tx++; 177 vhci->hdev->stat.cmd_tx++;
178 break; 178 break;
179 }; 179 };
180 180
181 return total; 181 return total;