haitomatic commented on code in PR #17172:
URL: https://github.com/apache/nuttx/pull/17172#discussion_r2426391548


##########
arch/arm64/src/imx9/imx9_flexcan.c:
##########
@@ -1645,6 +1656,35 @@ static int imx9_ioctl(struct net_driver_s *dev, int cmd,
         }
         break;
 #endif
+
+#ifdef CONFIG_NETDEV_CAN_FILTER_IOCTL
+      case SIOCACANSTDFILTER: /* Set STD ID CAN filter */
+        {
+          struct imx9_driver_s *priv = (struct imx9_driver_s *)dev;
+          struct can_ioctl_filter_s *req =
+            (struct can_ioctl_filter_s *)((uintptr_t)arg);
+          ret = imx9_add_filter(priv, req->ftype, 0, req->fid1, req->fid2);

Review Comment:
   thanks. i added the check instead



##########
arch/arm64/src/imx9/imx9_flexcan.c:
##########
@@ -1645,6 +1656,35 @@ static int imx9_ioctl(struct net_driver_s *dev, int cmd,
         }
         break;
 #endif
+
+#ifdef CONFIG_NETDEV_CAN_FILTER_IOCTL
+      case SIOCACANSTDFILTER: /* Set STD ID CAN filter */
+        {
+          struct imx9_driver_s *priv = (struct imx9_driver_s *)dev;
+          struct can_ioctl_filter_s *req =
+            (struct can_ioctl_filter_s *)((uintptr_t)arg);
+          ret = imx9_add_filter(priv, req->ftype, 0, req->fid1, req->fid2);
+        }
+        break;
+
+      case SIOCACANEXTFILTER: /* Set EXT ID CAN filter */
+        {
+          struct imx9_driver_s *priv = (struct imx9_driver_s *)dev;
+          struct can_ioctl_filter_s *req =
+            (struct can_ioctl_filter_s *)((uintptr_t)arg);
+          ret = imx9_add_filter(priv, req->ftype, 1, req->fid1, req->fid2);

Review Comment:
   thanks. i added the check instead



-- 
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