Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 184445b8 authored by Rupesh Tatiya's avatar Rupesh Tatiya Committed by Gerrit - the friendly Code Review server
Browse files

Bluetooth: Use correct hci_recv_frame API



hci_recv_frame API was changed between 3.10 kernel and 3.18 kernel.
Use latest API.

Change-Id: I218030abdcaf8b52bbe6745b744dd52d29871c9e
Signed-off-by: default avatarRupesh Tatiya <rtatiya@codeaurora.org>
parent f81d0b1f
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -712,14 +712,15 @@ static int ibs_enqueue(struct hci_uart *hu, struct sk_buff *skb)
	return 0;
}

static inline int ibs_check_data_len(struct ibs_struct *ibs, int len)
static inline int ibs_check_data_len(struct hci_dev *hdev,
					struct ibs_struct *ibs, int len)
{
	register int room = skb_tailroom(ibs->rx_skb);

	BT_DBG("len %d room %d", len, room);

	if (!len) {
		hci_recv_frame(ibs->rx_skb);
		hci_recv_frame(hdev, ibs->rx_skb);
	} else if (len > room) {
		BT_ERR("Data length is too large");
		kfree_skb(ibs->rx_skb);
@@ -762,7 +763,7 @@ static int ibs_recv(struct hci_uart *hu, void *data, int count)
			switch (ibs->rx_state) {
			case HCI_IBS_W4_DATA:
				BT_DBG("Complete data");
				hci_recv_frame(ibs->rx_skb);
				hci_recv_frame(hu->hdev, ibs->rx_skb);

				ibs->rx_state = HCI_IBS_W4_PACKET_TYPE;
				ibs->rx_skb = NULL;
@@ -774,7 +775,7 @@ static int ibs_recv(struct hci_uart *hu, void *data, int count)
				BT_DBG("Event header: evt 0x%2.2x plen %d",
					eh->evt, eh->plen);

				ibs_check_data_len(ibs, eh->plen);
				ibs_check_data_len(hu->hdev, ibs, eh->plen);
				continue;

			case HCI_IBS_W4_ACL_HDR:
@@ -783,7 +784,7 @@ static int ibs_recv(struct hci_uart *hu, void *data, int count)

				BT_DBG("ACL header: dlen %d", dlen);

				ibs_check_data_len(ibs, dlen);
				ibs_check_data_len(hu->hdev, ibs, dlen);
				continue;

			case HCI_IBS_W4_SCO_HDR:
@@ -791,7 +792,7 @@ static int ibs_recv(struct hci_uart *hu, void *data, int count)

				BT_DBG("SCO header: dlen %d", sh->dlen);

				ibs_check_data_len(ibs, sh->dlen);
				ibs_check_data_len(hu->hdev, ibs, sh->dlen);
				continue;
			}
		}