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

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

commit 784a469e02c0d6e9910f04659efc090feb219f52
Author: wangchengdong <[email protected]>
AuthorDate: Mon Jan 19 09:55:53 2026 +0800

    drivers/net: remove nxsig_notification when signal support is disabled
    
    When all signals are disabled, nxsig_notification is not available and
    should not be invoked. Remove the call to avoid build and runtime issues
    in no-signal configurations.
    
    Signed-off-by: Chengdong Wang <[email protected]>
---
 drivers/net/phy_notify.c               | 2 ++
 wireless/ieee802154/mac802154_device.c | 6 ++++++
 wireless/ieee802154/mac802154_netdev.c | 6 ++++++
 3 files changed, 14 insertions(+)

diff --git a/drivers/net/phy_notify.c b/drivers/net/phy_notify.c
index 6276dddd290..6680b68b17f 100644
--- a/drivers/net/phy_notify.c
+++ b/drivers/net/phy_notify.c
@@ -226,12 +226,14 @@ static int phy_handler(int irq, FAR void *context, FAR 
void *arg)
 
   /* Signal the client that the PHY has something interesting to say to us */
 
+#ifndef CONFIG_DISABLE_ALL_SIGNALS
   ret = nxsig_notification(client->pid, &client->event,
                            SI_QUEUE, &client->work);
   if (ret < 0)
     {
       phyerr("ERROR: nxsig_notification failed: %d\n", ret);
     }
+#endif
 
   return OK;
 }
diff --git a/wireless/ieee802154/mac802154_device.c 
b/wireless/ieee802154/mac802154_device.c
index 5658023e9c5..0806607e2e3 100644
--- a/wireless/ieee802154/mac802154_device.c
+++ b/wireless/ieee802154/mac802154_device.c
@@ -110,10 +110,12 @@ struct mac802154_chardevice_s
 
   /* MAC Service notification information */
 
+#ifndef CONFIG_DISABLE_ALL_SIGNALS
   bool    md_notify_registered;
   pid_t   md_notify_pid;
   struct sigevent md_notify_event;
   struct sigwork_s md_notify_work;
+#endif
 };
 
 /****************************************************************************
@@ -575,6 +577,7 @@ static int mac802154dev_ioctl(FAR struct file *filep, int 
cmd,
        *              failure with the errno value set appropriately.
        */
 
+#ifndef CONFIG_DISABLE_ALL_SIGNALS
       case MAC802154IOC_NOTIFY_REGISTER:
         {
           /* Save the notification events */
@@ -586,6 +589,7 @@ static int mac802154dev_ioctl(FAR struct file *filep, int 
cmd,
           ret = OK;
         }
         break;
+#endif
 
       case MAC802154IOC_GET_EVENT:
         {
@@ -721,12 +725,14 @@ static int mac802154dev_notify(FAR struct 
mac802154_maccb_s *maccb,
           nxsem_post(&dev->geteventsem);
         }
 
+#ifndef CONFIG_DISABLE_ALL_SIGNALS
       if (dev->md_notify_registered)
         {
           dev->md_notify_event.sigev_value.sival_int = primitive->type;
           nxsig_notification(dev->md_notify_pid, &dev->md_notify_event,
                              SI_QUEUE, &dev->md_notify_work);
         }
+#endif
 
       nxmutex_unlock(&dev->md_lock);
       return OK;
diff --git a/wireless/ieee802154/mac802154_netdev.c 
b/wireless/ieee802154/mac802154_netdev.c
index beb2a6dd334..7777fcd408d 100644
--- a/wireless/ieee802154/mac802154_netdev.c
+++ b/wireless/ieee802154/mac802154_netdev.c
@@ -147,10 +147,12 @@ struct macnet_driver_s
 
   /* MAC Service notification information */
 
+#ifndef CONFIG_DISABLE_ALL_SIGNALS
   bool    md_notify_registered;
   pid_t   md_notify_pid;
   struct sigevent md_notify_event;
   struct sigwork_s md_notify_work;
+#endif
 
 #ifdef CONFIG_NET_6LOWPAN
   struct sixlowpan_reassbuf_s md_iobuffer;
@@ -378,12 +380,14 @@ static int macnet_notify(FAR struct mac802154_maccb_s 
*maccb,
           nxsem_post(&priv->md_eventsem);
         }
 
+#ifndef CONFIG_DISABLE_ALL_SIGNALS
       if (priv->md_notify_registered)
         {
           priv->md_notify_event.sigev_value.sival_int = primitive->type;
           nxsig_notification(priv->md_notify_pid, &priv->md_notify_event,
                              SI_QUEUE, &priv->md_notify_work);
         }
+#endif
 
       nxmutex_unlock(&priv->md_lock);
       return OK;
@@ -933,6 +937,7 @@ static int macnet_ioctl(FAR struct net_driver_s *dev, int 
cmd,
                *              errno value set appropriately.
                */
 
+#ifndef CONFIG_DISABLE_ALL_SIGNALS
               case MAC802154IOC_NOTIFY_REGISTER:
                 {
                   /* Save the notification events */
@@ -943,6 +948,7 @@ static int macnet_ioctl(FAR struct net_driver_s *dev, int 
cmd,
                   ret = OK;
                 }
                 break;
+#endif
 
               case MAC802154IOC_GET_EVENT:
                 {

Reply via email to