diff options
Diffstat (limited to 'include/linux/rfkill.h')
-rw-r--r-- | include/linux/rfkill.h | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 278777fa8a3a..3392c59d2706 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
@@ -6,20 +6,17 @@ | |||
6 | * Copyright (C) 2007 Dmitry Torokhov | 6 | * Copyright (C) 2007 Dmitry Torokhov |
7 | * Copyright 2009 Johannes Berg <johannes@sipsolutions.net> | 7 | * Copyright 2009 Johannes Berg <johannes@sipsolutions.net> |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * Permission to use, copy, modify, and/or distribute this software for any |
10 | * it under the terms of the GNU General Public License as published by | 10 | * purpose with or without fee is hereby granted, provided that the above |
11 | * the Free Software Foundation; either version 2 of the License, or | 11 | * copyright notice and this permission notice appear in all copies. |
12 | * (at your option) any later version. | ||
13 | * | 12 | * |
14 | * This program is distributed in the hope that it will be useful, | 13 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
17 | * GNU General Public License for more details. | 16 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
18 | * | 17 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
19 | * You should have received a copy of the GNU General Public License | 18 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
20 | * along with this program; if not, write to the | 19 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
21 | * Free Software Foundation, Inc., | ||
22 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
23 | */ | 20 | */ |
24 | 21 | ||
25 | #include <linux/types.h> | 22 | #include <linux/types.h> |
@@ -47,6 +44,7 @@ enum rfkill_type { | |||
47 | RFKILL_TYPE_UWB, | 44 | RFKILL_TYPE_UWB, |
48 | RFKILL_TYPE_WIMAX, | 45 | RFKILL_TYPE_WIMAX, |
49 | RFKILL_TYPE_WWAN, | 46 | RFKILL_TYPE_WWAN, |
47 | RFKILL_TYPE_GPS, | ||
50 | NUM_RFKILL_TYPES, | 48 | NUM_RFKILL_TYPES, |
51 | }; | 49 | }; |
52 | 50 | ||
@@ -82,6 +80,20 @@ struct rfkill_event { | |||
82 | __u8 soft, hard; | 80 | __u8 soft, hard; |
83 | } __packed; | 81 | } __packed; |
84 | 82 | ||
83 | /* | ||
84 | * We are planning to be backward and forward compatible with changes | ||
85 | * to the event struct, by adding new, optional, members at the end. | ||
86 | * When reading an event (whether the kernel from userspace or vice | ||
87 | * versa) we need to accept anything that's at least as large as the | ||
88 | * version 1 event size, but might be able to accept other sizes in | ||
89 | * the future. | ||
90 | * | ||
91 | * One exception is the kernel -- we already have two event sizes in | ||
92 | * that we've made the 'hard' member optional since our only option | ||
93 | * is to ignore it anyway. | ||
94 | */ | ||
95 | #define RFKILL_EVENT_SIZE_V1 8 | ||
96 | |||
85 | /* ioctl for turning off rfkill-input (if present) */ | 97 | /* ioctl for turning off rfkill-input (if present) */ |
86 | #define RFKILL_IOC_MAGIC 'R' | 98 | #define RFKILL_IOC_MAGIC 'R' |
87 | #define RFKILL_IOC_NOINPUT 1 | 99 | #define RFKILL_IOC_NOINPUT 1 |