blob: b90e67c5c629c72054cf3b5b93a123a52e01eea2 [file] [log] [blame]
Colin Cross07a58322022-02-08 19:45:27 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI__RFKILL_H
20#define _UAPI__RFKILL_H
21#include <linux/types.h>
22#define RFKILL_STATE_SOFT_BLOCKED 0
23#define RFKILL_STATE_UNBLOCKED 1
24#define RFKILL_STATE_HARD_BLOCKED 2
25enum rfkill_type {
26 RFKILL_TYPE_ALL = 0,
27 RFKILL_TYPE_WLAN,
28 RFKILL_TYPE_BLUETOOTH,
29 RFKILL_TYPE_UWB,
30 RFKILL_TYPE_WIMAX,
31 RFKILL_TYPE_WWAN,
32 RFKILL_TYPE_GPS,
33 RFKILL_TYPE_FM,
34 RFKILL_TYPE_NFC,
35 NUM_RFKILL_TYPES,
36};
37enum rfkill_operation {
38 RFKILL_OP_ADD = 0,
39 RFKILL_OP_DEL,
40 RFKILL_OP_CHANGE,
41 RFKILL_OP_CHANGE_ALL,
42};
43enum rfkill_hard_block_reasons {
44 RFKILL_HARD_BLOCK_SIGNAL = 1 << 0,
45 RFKILL_HARD_BLOCK_NOT_OWNER = 1 << 1,
46};
47struct rfkill_event {
48 __u32 idx;
49 __u8 type;
50 __u8 op;
51 __u8 soft;
52 __u8 hard;
53} __attribute__((packed));
54struct rfkill_event_ext {
55 __u32 idx;
56 __u8 type;
57 __u8 op;
58 __u8 soft;
59 __u8 hard;
60 __u8 hard_block_reasons;
61} __attribute__((packed));
62#define RFKILL_EVENT_SIZE_V1 sizeof(struct rfkill_event)
63#define RFKILL_IOC_MAGIC 'R'
64#define RFKILL_IOC_NOINPUT 1
65#define RFKILL_IOCTL_NOINPUT _IO(RFKILL_IOC_MAGIC, RFKILL_IOC_NOINPUT)
Jordan Demeulenaere2d505822022-08-11 17:20:14 +020066#define RFKILL_IOC_MAX_SIZE 2
67#define RFKILL_IOCTL_MAX_SIZE _IOW(RFKILL_IOC_MAGIC, RFKILL_IOC_MAX_SIZE, __u32)
Colin Cross07a58322022-02-08 19:45:27 -080068#endif