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

Commit 76bca880 authored by Marcel Holtmann's avatar Marcel Holtmann
Browse files

Bluetooth: Turn hci_recv_frame into an exported function



For future simplification it is important that the hci_recv_frame
function is no longer an inline function. So move it into the module
itself and export it.

Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 7e21addc
Loading
Loading
Loading
Loading
+1 −22
Original line number Diff line number Diff line
@@ -437,28 +437,7 @@ int hci_inquiry(void __user *arg);

void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb);

/* Receive frame from HCI drivers */
static inline int hci_recv_frame(struct sk_buff *skb)
{
	struct hci_dev *hdev = (struct hci_dev *) skb->dev;
	if (!hdev || (!test_bit(HCI_UP, &hdev->flags) 
			&& !test_bit(HCI_INIT, &hdev->flags))) {
		kfree_skb(skb);
		return -ENXIO;
	}

	/* Incomming skb */
	bt_cb(skb)->incoming = 1;

	/* Time stamp */
	__net_timestamp(skb);

	/* Queue frame for rx task */
	skb_queue_tail(&hdev->rx_q, skb);
	hci_sched_rx(hdev);
	return 0;
}

int hci_recv_frame(struct sk_buff *skb);
int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count);

int hci_register_sysfs(struct hci_dev *hdev);
+23 −0
Original line number Diff line number Diff line
@@ -987,6 +987,29 @@ int hci_resume_dev(struct hci_dev *hdev)
}
EXPORT_SYMBOL(hci_resume_dev);

/* Receive frame from HCI drivers */
int hci_recv_frame(struct sk_buff *skb)
{
	struct hci_dev *hdev = (struct hci_dev *) skb->dev;
	if (!hdev || (!test_bit(HCI_UP, &hdev->flags)
				&& !test_bit(HCI_INIT, &hdev->flags))) {
		kfree_skb(skb);
		return -ENXIO;
	}

	/* Incomming skb */
	bt_cb(skb)->incoming = 1;

	/* Time stamp */
	__net_timestamp(skb);

	/* Queue frame for rx task */
	skb_queue_tail(&hdev->rx_q, skb);
	hci_sched_rx(hdev);
	return 0;
}
EXPORT_SYMBOL(hci_recv_frame);

/* Receive packet type fragment */
#define __reassembly(hdev, type)  ((hdev)->reassembly[(type) - 2])