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
The following commit(s) were added to refs/heads/master by this push:
new 18820ef07d3 net/can: allow errmask to be set to CAN_ERR_FLAG;
18820ef07d3 is described below
commit 18820ef07d3b9b901aa3e5d1459c311f605f3ca7
Author: wangjinjing1 <[email protected]>
AuthorDate: Fri May 23 10:25:48 2025 +0800
net/can: allow errmask to be set to CAN_ERR_FLAG;
For the LIN protocol, the error frame ID can be 0. This change is to ensure
that all LIN error frames can pass the filter.
Signed-off-by: wangjinjing1 <[email protected]>
---
net/can/can_setsockopt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/can/can_setsockopt.c b/net/can/can_setsockopt.c
index b6f4066dba9..8808340398b 100644
--- a/net/can/can_setsockopt.c
+++ b/net/can/can_setsockopt.c
@@ -133,7 +133,7 @@ int can_setsockopt(FAR struct socket *psock, int level, int
option,
return -EINVAL;
}
- conn->err_mask = *(FAR can_err_mask_t *)value & CAN_ERR_MASK;
+ conn->err_mask = *(FAR can_err_mask_t *)value;
break;
#endif