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

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

commit 133b3f9ed434cce5e105e29efd73867126f2cc07
Author: raiden00pl <[email protected]>
AuthorDate: Tue Oct 27 11:11:13 2026 +0100

    wireless/ieee802154: release the receiver of a POLL or ASSOC a data request 
ends
    
    A failed or empty data request ended the POLL or ASSOC with the receiver
    still held, and each data request of a beacon-enabled PAN took the
    receiver again.  Release it when the data request ends the operation and
    take it only once.
    
    Assisted-by: Claude Code
    Signed-off-by: raiden00pl <[email protected]>
---
 wireless/ieee802154/mac802154_assoc.c    | 1 +
 wireless/ieee802154/mac802154_internal.h | 7 +++++--
 wireless/ieee802154/mac802154_poll.c     | 1 +
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/wireless/ieee802154/mac802154_assoc.c 
b/wireless/ieee802154/mac802154_assoc.c
index 3f1d05003ac..fc5c1a145b3 100644
--- a/wireless/ieee802154/mac802154_assoc.c
+++ b/wireless/ieee802154/mac802154_assoc.c
@@ -614,6 +614,7 @@ void mac802154_txdone_datareq_assoc(FAR struct 
ieee802154_privmac_s *priv,
 
       /* We are now done the operation, and can release the command */
 
+      mac802154_oprxdisable(priv);
       priv->curr_op = MAC802154_OP_NONE;
       nxsem_post(&priv->opsem);
 
diff --git a/wireless/ieee802154/mac802154_internal.h 
b/wireless/ieee802154/mac802154_internal.h
index eeb430716b4..2d1c64648df 100644
--- a/wireless/ieee802154/mac802154_internal.h
+++ b/wireless/ieee802154/mac802154_internal.h
@@ -681,8 +681,11 @@ mac802154_rxdisable(FAR struct ieee802154_privmac_s *priv)
 static inline void
 mac802154_oprxenable(FAR struct ieee802154_privmac_s *priv)
 {
-  priv->oprx = true;
-  mac802154_rxenable(priv);
+  if (!priv->oprx)
+    {
+      priv->oprx = true;
+      mac802154_rxenable(priv);
+    }
 }
 
 static inline void
diff --git a/wireless/ieee802154/mac802154_poll.c 
b/wireless/ieee802154/mac802154_poll.c
index fbfe880133c..ed934a833ef 100644
--- a/wireless/ieee802154/mac802154_poll.c
+++ b/wireless/ieee802154/mac802154_poll.c
@@ -204,6 +204,7 @@ void mac802154_txdone_datareq_poll(FAR struct 
ieee802154_privmac_s *priv,
 
       /* We are now done the operation, and can release the command */
 
+      mac802154_oprxdisable(priv);
       priv->curr_op = MAC802154_OP_NONE;
       nxsem_post(&priv->opsem);
 

Reply via email to