This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 72e97e1f4afa8244731067a50651ea4d62ab8d29
Author: raiden00pl <[email protected]>
AuthorDate: Fri Oct 16 14:05:59 2026 +0200

    arch/arm/nrf52: do not block the work queue waiting for an IOB
    
    nrf52_radioi8_work_rx() runs on the HP work queue and used the blocking
    iob_alloc(). When no IOB was free the whole HP work queue stopped, so
    the MAC stopped too. Drop the received frame instead.
    
    Assisted-by: Claude Code
    Signed-off-by: raiden00pl <[email protected]>
---
 arch/arm/src/nrf52/nrf52_ieee802154_radio.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/arch/arm/src/nrf52/nrf52_ieee802154_radio.c 
b/arch/arm/src/nrf52/nrf52_ieee802154_radio.c
index 3028efe9faf..7f66d00e1ab 100644
--- a/arch/arm/src/nrf52/nrf52_ieee802154_radio.c
+++ b/arch/arm/src/nrf52/nrf52_ieee802154_radio.c
@@ -1455,10 +1455,15 @@ static void nrf52_radioi8_work_rx(void *arg)
 
   prim->type = IEEE802154_PRIMITIVE_IND_DATA;
 
-  /* Allocate an IOB to put the frame into */
+  /* Allocate an IOB to put the frame into, never block the work queue */
 
-  ind->frame = iob_alloc(false);
-  DEBUGASSERT(ind->frame != NULL);
+  ind->frame = iob_tryalloc(false);
+  if (ind->frame == NULL)
+    {
+      wlerr("ERROR: Unable to allocate IOB. Discarding frame\n");
+      ieee802154_primitive_free(prim);
+      goto out;
+    }
 
   /* First byte is the PHR */
 

Reply via email to