Commit 861da2c1 authored by Kiran's avatar Kiran Committed by Luiz Augusto von Dentz

Bluetooth: btintel_pcie: Add support for ISO data

Add support for handling ISO RX and TX packets.
Signed-off-by: default avatarKiran <kiran.k@intel.com>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent 29aeb4e8
...@@ -46,6 +46,7 @@ MODULE_DEVICE_TABLE(pci, btintel_pcie_table); ...@@ -46,6 +46,7 @@ MODULE_DEVICE_TABLE(pci, btintel_pcie_table);
#define BTINTEL_PCIE_HCI_ACL_PKT 0x00000002 #define BTINTEL_PCIE_HCI_ACL_PKT 0x00000002
#define BTINTEL_PCIE_HCI_SCO_PKT 0x00000003 #define BTINTEL_PCIE_HCI_SCO_PKT 0x00000003
#define BTINTEL_PCIE_HCI_EVT_PKT 0x00000004 #define BTINTEL_PCIE_HCI_EVT_PKT 0x00000004
#define BTINTEL_PCIE_HCI_ISO_PKT 0x00000005
static inline void ipc_print_ia_ring(struct hci_dev *hdev, struct ia *ia, static inline void ipc_print_ia_ring(struct hci_dev *hdev, struct ia *ia,
u16 queue_num) u16 queue_num)
...@@ -423,6 +424,18 @@ static int btintel_pcie_recv_frame(struct btintel_pcie_data *data, ...@@ -423,6 +424,18 @@ static int btintel_pcie_recv_frame(struct btintel_pcie_data *data,
goto exit_error; goto exit_error;
} }
break; break;
case BTINTEL_PCIE_HCI_ISO_PKT:
if (skb->len >= HCI_ISO_HDR_SIZE) {
plen = HCI_ISO_HDR_SIZE + __le16_to_cpu(hci_iso_hdr(skb)->dlen);
pkt_type = HCI_ISODATA_PKT;
} else {
bt_dev_err(hdev, "ISO packet is too short");
ret = -EILSEQ;
goto exit_error;
}
break;
default: default:
bt_dev_err(hdev, "Invalid packet type received: 0x%4.4x", bt_dev_err(hdev, "Invalid packet type received: 0x%4.4x",
pcie_pkt_type); pcie_pkt_type);
...@@ -1082,6 +1095,9 @@ static int btintel_pcie_send_frame(struct hci_dev *hdev, ...@@ -1082,6 +1095,9 @@ static int btintel_pcie_send_frame(struct hci_dev *hdev,
type = BTINTEL_PCIE_HCI_SCO_PKT; type = BTINTEL_PCIE_HCI_SCO_PKT;
hdev->stat.sco_tx++; hdev->stat.sco_tx++;
break; break;
case HCI_ISODATA_PKT:
type = BTINTEL_PCIE_HCI_ISO_PKT;
break;
default: default:
bt_dev_err(hdev, "Unknown HCI packet type"); bt_dev_err(hdev, "Unknown HCI packet type");
return -EILSEQ; return -EILSEQ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment