blob: 6020bafaf0460282f30dd826c2744b34f96995f4 [file] [log] [blame]
Nick Kralevicha67e4de2013-01-14 11:28:26 -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 ****************************************************************************/
Ben Cheng655a7c02013-10-16 16:09:24 -070019#ifndef _UAPI__RFKILL_H
20#define _UAPI__RFKILL_H
21#include <linux/types.h>
22#define RFKILL_STATE_SOFT_BLOCKED 0
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define RFKILL_STATE_UNBLOCKED 1
24#define RFKILL_STATE_HARD_BLOCKED 2
25enum rfkill_type {
Tao Baod7db5942015-01-28 10:07:51 -080026 RFKILL_TYPE_ALL = 0,
Tao Baod7db5942015-01-28 10:07:51 -080027 RFKILL_TYPE_WLAN,
28 RFKILL_TYPE_BLUETOOTH,
29 RFKILL_TYPE_UWB,
30 RFKILL_TYPE_WIMAX,
Tao Baod7db5942015-01-28 10:07:51 -080031 RFKILL_TYPE_WWAN,
32 RFKILL_TYPE_GPS,
33 RFKILL_TYPE_FM,
34 RFKILL_TYPE_NFC,
Tao Baod7db5942015-01-28 10:07:51 -080035 NUM_RFKILL_TYPES,
Ben Cheng655a7c02013-10-16 16:09:24 -070036};
37enum rfkill_operation {
Tao Baod7db5942015-01-28 10:07:51 -080038 RFKILL_OP_ADD = 0,
Tao Baod7db5942015-01-28 10:07:51 -080039 RFKILL_OP_DEL,
40 RFKILL_OP_CHANGE,
41 RFKILL_OP_CHANGE_ALL,
Ben Cheng655a7c02013-10-16 16:09:24 -070042};
Christopher Ferris05667cd2021-02-16 16:01:34 -080043enum rfkill_hard_block_reasons {
44 RFKILL_HARD_BLOCK_SIGNAL = 1 << 0,
45 RFKILL_HARD_BLOCK_NOT_OWNER = 1 << 1,
46};
Ben Cheng655a7c02013-10-16 16:09:24 -070047struct rfkill_event {
Tao Baod7db5942015-01-28 10:07:51 -080048 __u32 idx;
49 __u8 type;
50 __u8 op;
Christopher Ferris05667cd2021-02-16 16:01:34 -080051 __u8 soft;
52 __u8 hard;
Christopher Ferrisa9750ed2021-05-03 14:02:49 -070053} __attribute__((packed));
54struct rfkill_event_ext {
55 __u32 idx;
56 __u8 type;
57 __u8 op;
58 __u8 soft;
59 __u8 hard;
Christopher Ferris05667cd2021-02-16 16:01:34 -080060 __u8 hard_block_reasons;
Ben Cheng655a7c02013-10-16 16:09:24 -070061} __attribute__((packed));
Christopher Ferrisa9750ed2021-05-03 14:02:49 -070062#define RFKILL_EVENT_SIZE_V1 sizeof(struct rfkill_event)
Ben Cheng655a7c02013-10-16 16:09:24 -070063#define RFKILL_IOC_MAGIC 'R'
Ben Cheng655a7c02013-10-16 16:09:24 -070064#define RFKILL_IOC_NOINPUT 1
65#define RFKILL_IOCTL_NOINPUT _IO(RFKILL_IOC_MAGIC, RFKILL_IOC_NOINPUT)
Nick Kralevicha67e4de2013-01-14 11:28:26 -080066#endif