Bluetooth: Initialize RX prio fiber before RX fiber

If bt_enable() is called from a preemptible context we need to make
sure the RX prio fiber is initialized by the time the HCI init runs
from the hci_rx_fiber function.

Change-Id: I91bb0c69d011944ee2a035b2a707618632a6b189
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2015-09-10 11:25:23 +03:00 committed by Anas Nashif
commit 1712baf9cd

View file

@ -1569,16 +1569,16 @@ int bt_enable(bt_ready_cb_t cb)
fiber_start(cmd_tx_fiber_stack, sizeof(cmd_tx_fiber_stack),
(nano_fiber_entry_t)hci_cmd_tx_fiber, 0, 0, 7, 0);
/* RX fiber */
nano_fifo_init(&bt_dev.rx_queue);
fiber_start(rx_fiber_stack, sizeof(rx_fiber_stack),
(nano_fiber_entry_t)hci_rx_fiber, (int)cb, 0, 7, 0);
/* RX prio fiber */
nano_fifo_init(&bt_dev.rx_prio_queue);
fiber_start(rx_prio_fiber_stack, sizeof(rx_prio_fiber_stack),
(nano_fiber_entry_t)rx_prio_fiber, 0, 0, 7, 0);
/* RX fiber */
nano_fifo_init(&bt_dev.rx_queue);
fiber_start(rx_fiber_stack, sizeof(rx_fiber_stack),
(nano_fiber_entry_t)hci_rx_fiber, (int)cb, 0, 7, 0);
if (!cb) {
return bt_init();
}