1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPI__RFKILL_H
8 #define _UAPI__RFKILL_H
9 #include <linux/types.h>
10 #define RFKILL_STATE_SOFT_BLOCKED 0
11 #define RFKILL_STATE_UNBLOCKED 1
12 #define RFKILL_STATE_HARD_BLOCKED 2
13 enum rfkill_type {
14   RFKILL_TYPE_ALL = 0,
15   RFKILL_TYPE_WLAN,
16   RFKILL_TYPE_BLUETOOTH,
17   RFKILL_TYPE_UWB,
18   RFKILL_TYPE_WIMAX,
19   RFKILL_TYPE_WWAN,
20   RFKILL_TYPE_GPS,
21   RFKILL_TYPE_FM,
22   RFKILL_TYPE_NFC,
23   NUM_RFKILL_TYPES,
24 };
25 enum rfkill_operation {
26   RFKILL_OP_ADD = 0,
27   RFKILL_OP_DEL,
28   RFKILL_OP_CHANGE,
29   RFKILL_OP_CHANGE_ALL,
30 };
31 enum rfkill_hard_block_reasons {
32   RFKILL_HARD_BLOCK_SIGNAL = 1 << 0,
33   RFKILL_HARD_BLOCK_NOT_OWNER = 1 << 1,
34 };
35 struct rfkill_event {
36   __u32 idx;
37   __u8 type;
38   __u8 op;
39   __u8 soft;
40   __u8 hard;
41 } __attribute__((packed));
42 struct rfkill_event_ext {
43   __u32 idx;
44   __u8 type;
45   __u8 op;
46   __u8 soft;
47   __u8 hard;
48   __u8 hard_block_reasons;
49 } __attribute__((packed));
50 #define RFKILL_EVENT_SIZE_V1 sizeof(struct rfkill_event)
51 #define RFKILL_IOC_MAGIC 'R'
52 #define RFKILL_IOC_NOINPUT 1
53 #define RFKILL_IOCTL_NOINPUT _IO(RFKILL_IOC_MAGIC, RFKILL_IOC_NOINPUT)
54 #define RFKILL_IOC_MAX_SIZE 2
55 #define RFKILL_IOCTL_MAX_SIZE _IOW(RFKILL_IOC_MAGIC, RFKILL_IOC_MAX_SIZE, __u32)
56 #endif
57