aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJean Tourrilhes <jt@hpl.hp.com>2005-09-02 14:32:28 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-06 22:40:24 -0400
commit6582c164f2b3b6e58d1f13c1c031b19ee691eb14 (patch)
tree492043111300ee6e1341a6e679a13983893c438c /include/linux
parent054034dbf5b1a6aef800af4eb22d421d1c7d4b6d (diff)
[PATCH] WE-19 for kernel 2.6.13
Hi Jeff, This is version 19 of the Wireless Extensions. It was supposed to be the fallback of the WPA API changes, but people seem quite happy about it (especially Jouni), so the patch is rather small. The patch has been fully tested with 2.6.13 and various wireless drivers, and is in its final version. Would you mind pushing that into Linus's kernel so that the driver and the apps can take advantage ot it ? It includes : o iwstat improvement (explicit dBm). This is the result of long discussions with Dan Williams, the authors of NetworkManager. Thanks to him for all the fruitful feedback. o remove pointer from event stream. I was not totally sure if this pointer was 32-64 bits clean, so I'd rather remove it and be at peace with it. o remove linux header from wireless.h. This has long been requested by people writting user space apps, now it's done, and it was not even painful. o final deprecation of spy_offset. You did not like it, it's now gone for good. o Start deprecating dev->get_wireless_stats -> debloat netdev o Add "check" version of event macros for ieee802.11 stack. Jiri Benc doesn't like the current macros, we aim to please ;-) All those changes, except the last one, have been bit-roting on my web pages for a while... Patches for most kernel drivers will follow. Patches for the Orinoco and the HostAP drivers have been sent to their respective maintainers. Have fun... Jean Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/wireless.h47
1 files changed, 33 insertions, 14 deletions
diff --git a/include/linux/wireless.h b/include/linux/wireless.h
index ae485f9c916e..dab5afdaf71c 100644
--- a/include/linux/wireless.h
+++ b/include/linux/wireless.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * This file define a set of standard wireless extensions 2 * This file define a set of standard wireless extensions
3 * 3 *
4 * Version : 18 12.3.05 4 * Version : 19 18.3.05
5 * 5 *
6 * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com> 6 * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
7 * Copyright (c) 1997-2005 Jean Tourrilhes, All Rights Reserved. 7 * Copyright (c) 1997-2005 Jean Tourrilhes, All Rights Reserved.
@@ -69,11 +69,12 @@
69 69
70/***************************** INCLUDES *****************************/ 70/***************************** INCLUDES *****************************/
71 71
72/* To minimise problems in user space, I might remove those headers 72/* Do not put any header in this file, this creates a mess when
73 * at some point. Jean II */ 73 * exported to user space. Most users have included all the
74#include <linux/types.h> /* for "caddr_t" et al */ 74 * relevant headers anyway... Jean II */
75#include <linux/socket.h> /* for "struct sockaddr" et al */ 75/*#include <linux/types.h>*/ /* for "caddr_t" et al */
76#include <linux/if.h> /* for IFNAMSIZ and co... */ 76/*#include <linux/socket.h>*/ /* for "struct sockaddr" et al */
77/*#include <linux/if.h>*/ /* for IFNAMSIZ and co... */
77 78
78/***************************** VERSION *****************************/ 79/***************************** VERSION *****************************/
79/* 80/*
@@ -82,7 +83,7 @@
82 * (there is some stuff that will be added in the future...) 83 * (there is some stuff that will be added in the future...)
83 * I just plan to increment with each new version. 84 * I just plan to increment with each new version.
84 */ 85 */
85#define WIRELESS_EXT 18 86#define WIRELESS_EXT 19
86 87
87/* 88/*
88 * Changes : 89 * Changes :
@@ -197,6 +198,15 @@
197 * related parameters (extensible up to 4096 parameter values) 198 * related parameters (extensible up to 4096 parameter values)
198 * - Add wireless events: IWEVGENIE, IWEVMICHAELMICFAILURE, 199 * - Add wireless events: IWEVGENIE, IWEVMICHAELMICFAILURE,
199 * IWEVASSOCREQIE, IWEVASSOCRESPIE, IWEVPMKIDCAND 200 * IWEVASSOCREQIE, IWEVASSOCRESPIE, IWEVPMKIDCAND
201 *
202 * V18 to V19
203 * ----------
204 * - Remove (struct iw_point *)->pointer from events and streams
205 * - Remove header includes to help user space
206 * - Increase IW_ENCODING_TOKEN_MAX from 32 to 64
207 * - Add IW_QUAL_ALL_UPDATED and IW_QUAL_ALL_INVALID macros
208 * - Add explicit flag to tell stats are in dBm : IW_QUAL_DBM
209 * - Add IW_IOCTL_IDX() and IW_EVENT_IDX() macros
200 */ 210 */
201 211
202/**************************** CONSTANTS ****************************/ 212/**************************** CONSTANTS ****************************/
@@ -322,6 +332,7 @@
322/* The first and the last (range) */ 332/* The first and the last (range) */
323#define SIOCIWFIRST 0x8B00 333#define SIOCIWFIRST 0x8B00
324#define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */ 334#define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */
335#define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST)
325 336
326/* Even : get (world access), odd : set (root access) */ 337/* Even : get (world access), odd : set (root access) */
327#define IW_IS_SET(cmd) (!((cmd) & 0x1)) 338#define IW_IS_SET(cmd) (!((cmd) & 0x1))
@@ -366,6 +377,7 @@
366 * (struct iw_pmkid_cand) */ 377 * (struct iw_pmkid_cand) */
367 378
368#define IWEVFIRST 0x8C00 379#define IWEVFIRST 0x8C00
380#define IW_EVENT_IDX(cmd) ((cmd) - IWEVFIRST)
369 381
370/* ------------------------- PRIVATE INFO ------------------------- */ 382/* ------------------------- PRIVATE INFO ------------------------- */
371/* 383/*
@@ -427,12 +439,15 @@
427#define IW_MODE_MONITOR 6 /* Passive monitor (listen only) */ 439#define IW_MODE_MONITOR 6 /* Passive monitor (listen only) */
428 440
429/* Statistics flags (bitmask in updated) */ 441/* Statistics flags (bitmask in updated) */
430#define IW_QUAL_QUAL_UPDATED 0x1 /* Value was updated since last read */ 442#define IW_QUAL_QUAL_UPDATED 0x01 /* Value was updated since last read */
431#define IW_QUAL_LEVEL_UPDATED 0x2 443#define IW_QUAL_LEVEL_UPDATED 0x02
432#define IW_QUAL_NOISE_UPDATED 0x4 444#define IW_QUAL_NOISE_UPDATED 0x04
445#define IW_QUAL_ALL_UPDATED 0x07
446#define IW_QUAL_DBM 0x08 /* Level + Noise are dBm */
433#define IW_QUAL_QUAL_INVALID 0x10 /* Driver doesn't provide value */ 447#define IW_QUAL_QUAL_INVALID 0x10 /* Driver doesn't provide value */
434#define IW_QUAL_LEVEL_INVALID 0x20 448#define IW_QUAL_LEVEL_INVALID 0x20
435#define IW_QUAL_NOISE_INVALID 0x40 449#define IW_QUAL_NOISE_INVALID 0x40
450#define IW_QUAL_ALL_INVALID 0x70
436 451
437/* Frequency flags */ 452/* Frequency flags */
438#define IW_FREQ_AUTO 0x00 /* Let the driver decides */ 453#define IW_FREQ_AUTO 0x00 /* Let the driver decides */
@@ -443,7 +458,7 @@
443#define IW_MAX_ENCODING_SIZES 8 458#define IW_MAX_ENCODING_SIZES 8
444 459
445/* Maximum size of the encoding token in bytes */ 460/* Maximum size of the encoding token in bytes */
446#define IW_ENCODING_TOKEN_MAX 32 /* 256 bits (for now) */ 461#define IW_ENCODING_TOKEN_MAX 64 /* 512 bits (for now) */
447 462
448/* Flags for encoding (along with the token) */ 463/* Flags for encoding (along with the token) */
449#define IW_ENCODE_INDEX 0x00FF /* Token index (if needed) */ 464#define IW_ENCODE_INDEX 0x00FF /* Token index (if needed) */
@@ -1039,12 +1054,16 @@ struct iw_event
1039#define IW_EV_CHAR_LEN (IW_EV_LCP_LEN + IFNAMSIZ) 1054#define IW_EV_CHAR_LEN (IW_EV_LCP_LEN + IFNAMSIZ)
1040#define IW_EV_UINT_LEN (IW_EV_LCP_LEN + sizeof(__u32)) 1055#define IW_EV_UINT_LEN (IW_EV_LCP_LEN + sizeof(__u32))
1041#define IW_EV_FREQ_LEN (IW_EV_LCP_LEN + sizeof(struct iw_freq)) 1056#define IW_EV_FREQ_LEN (IW_EV_LCP_LEN + sizeof(struct iw_freq))
1042#define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point))
1043#define IW_EV_PARAM_LEN (IW_EV_LCP_LEN + sizeof(struct iw_param)) 1057#define IW_EV_PARAM_LEN (IW_EV_LCP_LEN + sizeof(struct iw_param))
1044#define IW_EV_ADDR_LEN (IW_EV_LCP_LEN + sizeof(struct sockaddr)) 1058#define IW_EV_ADDR_LEN (IW_EV_LCP_LEN + sizeof(struct sockaddr))
1045#define IW_EV_QUAL_LEN (IW_EV_LCP_LEN + sizeof(struct iw_quality)) 1059#define IW_EV_QUAL_LEN (IW_EV_LCP_LEN + sizeof(struct iw_quality))
1046 1060
1047/* Note : in the case of iw_point, the extra data will come at the 1061/* iw_point events are special. First, the payload (extra data) come at
1048 * end of the event */ 1062 * the end of the event, so they are bigger than IW_EV_POINT_LEN. Second,
1063 * we omit the pointer, so start at an offset. */
1064#define IW_EV_POINT_OFF (((char *) &(((struct iw_point *) NULL)->length)) - \
1065 (char *) NULL)
1066#define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - \
1067 IW_EV_POINT_OFF)
1049 1068
1050#endif /* _LINUX_WIRELESS_H */ 1069#endif /* _LINUX_WIRELESS_H */