[PATCH 06/10] send VSC over packet type 01 instead of packet type 14

From: Mark P . Mendelsohn
Date: Mon Sep 12 2011 - 14:05:15 EST


---
drivers/bluetooth/hci_h5.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index 88ad715..a661ff3 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -197,6 +197,7 @@ static struct sk_buff *h5_prepare_pkt(struct h5_struct *h5, u8 *data,
u16 H5_CRC_INIT(h5_txmsg_crc);
int rel, i;

+ printk("%s pkt_type %d\n", __func__, pkt_type);
print_hex_dump_bytes("h5_prepare_pkt ", DUMP_PREFIX_NONE, data, len);

switch (pkt_type) {
@@ -225,11 +226,13 @@ static struct sk_buff *h5_prepare_pkt(struct h5_struct *h5, u8 *data,
return NULL;
}

- if (h5extn && chan == 14) {
+ if (h5extn && chan == 1) {
__le16 opcode = ((struct hci_command_hdr *)data)->opcode;

/* Vendor specific commands */
if (hci_opcode_ogf(__le16_to_cpu(opcode)) == 0x3f) {
+ chan = 1;
+
u8 desc = *(data + HCI_COMMAND_HDR_SIZE);
if ((desc & 0xf0) == 0xc0) {
data += HCI_COMMAND_HDR_SIZE + 1;
@@ -608,6 +611,8 @@ static int h5_recv(struct hci_uart *hu, void *data, int count)
ptr = data;

while (count) {
+ // printk("while count %d rx_count %d\n", count, h5->rx_count);
+
if (h5->rx_count) {
if (*ptr == 0xc0) {
BT_ERR("Short H5 packet");
@@ -621,6 +626,8 @@ static int h5_recv(struct hci_uart *hu, void *data, int count)
continue;
}

+ // printk("switch state %d\n", h5->rx_state);
+
switch (h5->rx_state) {
case H5_W4_H5_HDR:
if ((0xff & (u8) ~ (h5->rx_skb->data[0] + h5->rx_skb->data[1] +
--
1.7.1