Skip to content

Commit 6e296fb

Browse files
Jędrzej Ciupisnordicjm
authored andcommitted
[nrf fromtree] modules: hal_nordic: nrf_802154: lengthen serialization ring buffer
This commit increases the length of ring buffer that holds serialized nRF 802.15.4 API calls so that it can simultaneously store all notifications the driver is capable of issuing. Currently that's not the case, which creates a possibility of the serialization buffers running out while the driver is issuing notifications. Signed-off-by: Jędrzej Ciupis <[email protected]> (cherry picked from commit 29d027a)
1 parent ae5914c commit 6e296fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/hal_nordic/nrf_802154/serialization/platform/nrf_802154_spinel_backend_ipc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,11 @@ nrf_802154_ser_err_t nrf_802154_backend_init(void)
7171
}
7272

7373
/* Send packet thread details */
74-
#define RING_BUFFER_LEN 16
7574
#define SEND_THREAD_STACK_SIZE 1024
7675

76+
/* Make the ring buffer long enough to hold all notifications that the driver can produce */
77+
#define RING_BUFFER_LEN (CONFIG_NRF_802154_RX_BUFFERS + 10)
78+
7779
static K_SEM_DEFINE(send_sem, 0, RING_BUFFER_LEN);
7880
K_THREAD_STACK_DEFINE(send_thread_stack, SEND_THREAD_STACK_SIZE);
7981
struct k_thread send_thread_data;

0 commit comments

Comments
 (0)