Jackson-gjh commented on code in PR #21536:
URL: https://github.com/apache/nuttx/pull/21536#discussion_r4505965645


##########
wireless/bluetooth/bt_netdev.c:
##########
@@ -1288,6 +1288,13 @@ int bt_netdev_register(FAR struct bt_driver_s *btdev)
   ret = netdev_register(&priv->bd_dev.r_dev, NET_LL_BLUETOOTH);
   if (ret >= 0)
     {
+#ifndef CONFIG_WIRELESS_BLUETOOTH_HOST
+      /* A raw HCI interface is ready as soon as it is registered.  It has
+       * no network configuration step that would invoke btnet_ifup().
+       */
+
+      netdev_carrier_on(&priv->bd_dev.r_dev);

Review Comment:
   Thanks. I reworked the carrier lifecycle as suggested.
   
   A successful BTPROTO_HCI bind now enables the carrier for the selected
   controller. Closing the final independently bound HCI socket disables it.
   Duplicated socket references and additional HCI sockets keep the carrier
   enabled until the last attachment is closed.
   
   The registration-time carrier change has been removed. I also verified both
   external and built-in Host configurations, ran checkpatch, and completed an
   ESP32-C6 ELF link.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to