diff options
author | David Kilroy <kilroyd@googlemail.com> | 2009-02-04 18:05:56 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-13 13:44:33 -0500 |
commit | cb1576a829826d56fab59e22aa3af8c5a7db9936 (patch) | |
tree | 9d5fcd385dc1e28e7ddb89412bbdfc433d23c769 /drivers/net/wireless/orinoco/main.h | |
parent | 712a4342a0d89e855a03ba06fb11f7eb29456d45 (diff) |
orinoco: Move WEXT handlers into a separate file
No functional change.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco/main.h')
-rw-r--r-- | drivers/net/wireless/orinoco/main.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/drivers/net/wireless/orinoco/main.h b/drivers/net/wireless/orinoco/main.h new file mode 100644 index 00000000000..af2bae4fe39 --- /dev/null +++ b/drivers/net/wireless/orinoco/main.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* Exports from main to helper modules | ||
2 | * | ||
3 | * See copyright notice in main.c | ||
4 | */ | ||
5 | #ifndef _ORINOCO_MAIN_H_ | ||
6 | #define _ORINOCO_MAIN_H_ | ||
7 | |||
8 | #include <linux/ieee80211.h> | ||
9 | #include "orinoco.h" | ||
10 | |||
11 | /********************************************************************/ | ||
12 | /* Compile time configuration and compatibility stuff */ | ||
13 | /********************************************************************/ | ||
14 | |||
15 | /* We do this this way to avoid ifdefs in the actual code */ | ||
16 | #ifdef WIRELESS_SPY | ||
17 | #define SPY_NUMBER(priv) (priv->spy_data.spy_number) | ||
18 | #else | ||
19 | #define SPY_NUMBER(priv) 0 | ||
20 | #endif /* WIRELESS_SPY */ | ||
21 | |||
22 | /********************************************************************/ | ||
23 | |||
24 | /* Export module parameter */ | ||
25 | extern int force_monitor; | ||
26 | |||
27 | /* Forward declarations */ | ||
28 | struct net_device; | ||
29 | struct work_struct; | ||
30 | |||
31 | void set_port_type(struct orinoco_private *priv); | ||
32 | int __orinoco_program_rids(struct net_device *dev); | ||
33 | void orinoco_reset(struct work_struct *work); | ||
34 | |||
35 | |||
36 | /* Information element helpers - find a home for these... */ | ||
37 | static inline u8 *orinoco_get_ie(u8 *data, size_t len, | ||
38 | enum ieee80211_eid eid) | ||
39 | { | ||
40 | u8 *p = data; | ||
41 | while ((p + 2) < (data + len)) { | ||
42 | if (p[0] == eid) | ||
43 | return p; | ||
44 | p += p[1] + 2; | ||
45 | } | ||
46 | return NULL; | ||
47 | } | ||
48 | |||
49 | #define WPA_OUI_TYPE "\x00\x50\xF2\x01" | ||
50 | #define WPA_SELECTOR_LEN 4 | ||
51 | static inline u8 *orinoco_get_wpa_ie(u8 *data, size_t len) | ||
52 | { | ||
53 | u8 *p = data; | ||
54 | while ((p + 2 + WPA_SELECTOR_LEN) < (data + len)) { | ||
55 | if ((p[0] == WLAN_EID_GENERIC) && | ||
56 | (memcmp(&p[2], WPA_OUI_TYPE, WPA_SELECTOR_LEN) == 0)) | ||
57 | return p; | ||
58 | p += p[1] + 2; | ||
59 | } | ||
60 | return NULL; | ||
61 | } | ||
62 | |||
63 | #endif /* _ORINOCO_MAIN_H_ */ | ||