raiden00pl commented on code in PR #18428:
URL: https://github.com/apache/nuttx/pull/18428#discussion_r2846904087
##########
drivers/usbdev/rndis.c:
##########
@@ -2752,6 +2752,22 @@ static void usbclass_resetconfig(FAR struct rndis_dev_s
*priv)
}
}
+/****************************************************************************
+ * Name: rndis_carrier_on_work
+ *
+ * Description:
+ * Schedule to work queue because netdev_carrier_on API can't be used in
+ * interrupt context
+ *
+ ****************************************************************************/
+
+static void rndis_carrier_on_work(FAR void *arg)
+{
+ FAR struct rndis_dev_s *priv = (FAR struct rndis_dev_s *)arg;
Review Comment:
@anchao Isn't this solution more chaotic? netdev_carrier API was never
intended to run in interrupt context, and all other netdevs follow this
convention (or at least they should).
This PR is a bugfix for a previous PR that misused the API. The correct fix
is to use the API correctly, not to change the API behavior.
--
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]