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