hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/can/core.h
....@@ -1,8 +1,8 @@
1
-/* SPDX-License-Identifier: GPL-2.0 */
1
+/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
22 /*
33 * linux/can/core.h
44 *
5
- * Protoypes and definitions for CAN protocol modules using the PF_CAN core
5
+ * Prototypes and definitions for CAN protocol modules using the PF_CAN core
66 *
77 * Authors: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
88 * Urs Thuermann <urs.thuermann@volkswagen.de>
....@@ -17,13 +17,6 @@
1717 #include <linux/can.h>
1818 #include <linux/skbuff.h>
1919 #include <linux/netdevice.h>
20
-
21
-#define CAN_VERSION "20170425"
22
-
23
-/* increment this number each time you change some user-space interface */
24
-#define CAN_ABI_VERSION "9"
25
-
26
-#define CAN_VERSION_STRING "rev " CAN_VERSION " abi " CAN_ABI_VERSION
2720
2821 #define DNAME(dev) ((dev) ? (dev)->name : "any")
2922
....@@ -41,6 +34,14 @@
4134 struct proto *prot;
4235 };
4336
37
+/* required_size
38
+ * macro to find the minimum size of a struct
39
+ * that includes a requested member
40
+ */
41
+#define CAN_REQUIRED_SIZE(struct_type, member) \
42
+ (offsetof(typeof(struct_type), member) + \
43
+ sizeof(((typeof(struct_type) *)(NULL))->member))
44
+
4445 /* function prototypes for the CAN networklayer core (af_can.c) */
4546
4647 extern int can_proto_register(const struct can_proto *cp);
....@@ -57,6 +58,6 @@
5758 void *data);
5859
5960 extern int can_send(struct sk_buff *skb, int loop);
60
-extern int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
61
+void can_sock_destruct(struct sock *sk);
6162
6263 #endif /* !_CAN_CORE_H */