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