2 * Linux CAN-bus device driver.
3 * Written by Arnaud Westenberg email:arnaud@wanadoo.nl
4 * Rewritten for new CAN queues by Pavel Pisa - OCERA team member
5 * email:pisa@cmp.felk.cvut.cz
6 * This software is released under the GPL-License.
7 * Version lincan-0.3 17 Jun 2004
10 #include "../include/can.h"
11 #include "../include/can_sysdep.h"
12 #include "../include/main.h"
13 #include "../include/ioctl.h"
17 * can_ioctl_query - query for driver version and features
18 * @canuser: pointer to the user/client state structure
19 * @what: select which feature or version is queried
21 * Return Value: returns value for queried characteristic or -EINVAL
22 * if there is no reply to the query.
25 int can_ioctl_query(struct canuser_t *canuser, unsigned long what)
28 case CAN_DRV_QRY_BRANCH:
29 /* returns driver branch value - "LINC" for LinCAN driver */
30 return CAN_DRV_BRANCH;
32 case CAN_DRV_QRY_VERSION:
33 /* returns driver version as (major<<16) | (minor<<8) | patch */
36 case CAN_DRV_QRY_MSGFORMAT:
37 /* format of canmsg_t structure */
38 #ifdef CAN_MSG_VERSION_2
40 #else /*CAN_MSG_VERSION_2*/
42 #endif /*CAN_MSG_VERSION_2*/