Bluetooth: Controller: revert to event callback inside radio ISR
In order that host can continue a connection event by enqueuing packets, the number of completed packets event needs to be generated as soon it arrives on air. Hence, the Controller now calls the radio_event_callback on every radio Rx complete ISR. The callback executes at the Radio ISR priority, take care to only do as little as necessary in the callback, say, just a semaphore give to wake up the hci_driver's thread. Change-id: If48afd0f1390d450bc1e7ec66f1c9fd45208d9a4 Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
This commit is contained in:
parent
e979d656cc
commit
2d064eef89
1 changed files with 8 additions and 0 deletions
|
@ -5964,12 +5964,20 @@ static struct radio_pdu_node_rx *packet_rx_reserve_get(uint8_t count)
|
|||
|
||||
static void packet_rx_callback(void)
|
||||
{
|
||||
/* Inline call of callback. If JOB configured as lower priority then
|
||||
* callback will tailchain at end of every radio ISR. If JOB configured
|
||||
* as same then call inline so as to have callback for every radio ISR.
|
||||
*/
|
||||
#if (RADIO_TICKER_USER_ID_WORKER_PRIO == RADIO_TICKER_USER_ID_JOB_PRIO)
|
||||
radio_event_callback();
|
||||
#else
|
||||
static void *s_link[2];
|
||||
static struct mayfly s_mfy_callback = {0, 0, s_link, 0,
|
||||
(void *)radio_event_callback};
|
||||
|
||||
mayfly_enqueue(RADIO_TICKER_USER_ID_WORKER, RADIO_TICKER_USER_ID_JOB, 1,
|
||||
&s_mfy_callback);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void packet_rx_enqueue(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue