Bluetooth: Move hci_rx_fiber further down in hci_core.c
This is preparation for the next patch where we let the rx_fiber perform part of the initialization procedure. This procedure needs to make calls to functions that are defined after the old location of hci_rx_fiber(). Change-Id: I5e4366a90dac22846b8bf4ef1a9ee41bfe30d36c Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
55607e5e9a
commit
3ab32aa5f1
1 changed files with 28 additions and 28 deletions
|
@ -1005,34 +1005,6 @@ static void hci_cmd_tx_fiber(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void hci_rx_fiber(void)
|
||||
{
|
||||
struct bt_buf *buf;
|
||||
|
||||
BT_DBG("started\n");
|
||||
|
||||
while (1) {
|
||||
BT_DBG("calling fifo_get_wait\n");
|
||||
buf = nano_fifo_get_wait(&bt_dev.rx_queue);
|
||||
|
||||
BT_DBG("buf %p type %u len %u\n", buf, buf->type, buf->len);
|
||||
|
||||
switch (buf->type) {
|
||||
case BT_ACL_IN:
|
||||
hci_acl(buf);
|
||||
break;
|
||||
case BT_EVT:
|
||||
hci_event(buf);
|
||||
break;
|
||||
default:
|
||||
BT_ERR("Unknown buf type %u\n", buf->type);
|
||||
bt_buf_put(buf);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static void rx_prio_fiber(void)
|
||||
{
|
||||
struct bt_buf *buf;
|
||||
|
@ -1351,6 +1323,34 @@ void bt_driver_unregister(struct bt_driver *drv)
|
|||
bt_dev.drv = NULL;
|
||||
}
|
||||
|
||||
static void hci_rx_fiber(void)
|
||||
{
|
||||
struct bt_buf *buf;
|
||||
|
||||
BT_DBG("started\n");
|
||||
|
||||
while (1) {
|
||||
BT_DBG("calling fifo_get_wait\n");
|
||||
buf = nano_fifo_get_wait(&bt_dev.rx_queue);
|
||||
|
||||
BT_DBG("buf %p type %u len %u\n", buf, buf->type, buf->len);
|
||||
|
||||
switch (buf->type) {
|
||||
case BT_ACL_IN:
|
||||
hci_acl(buf);
|
||||
break;
|
||||
case BT_EVT:
|
||||
hci_event(buf);
|
||||
break;
|
||||
default:
|
||||
BT_ERR("Unknown buf type %u\n", buf->type);
|
||||
bt_buf_put(buf);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* fibers, fifos and semaphores initialization */
|
||||
|
||||
static void cmd_queue_init(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue