diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2009-10-22 09:30:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:48:36 -0400 |
commit | 2d46502dce3c79c3c15ac537cb271911f58d12d1 (patch) | |
tree | 7bf08660d6316121e2b08fad286fdbf75e14128d /drivers/net/wireless/libertas/dev.h | |
parent | 243e84e91ed810f7dca5ba1c2d1a611811948566 (diff) |
libertas: move scan/assoc related stuff
Another cfg80211-preparation patch: removes some code/definitions from
main.c and dev.h and put's it into assoc.c/.h, scan.c/.h.
No function change.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/dev.h')
-rw-r--r-- | drivers/net/wireless/libertas/dev.h | 155 |
1 files changed, 2 insertions, 153 deletions
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h index 50b457706bad..cc245820d3f2 100644 --- a/drivers/net/wireless/libertas/dev.h +++ b/drivers/net/wireless/libertas/dev.h | |||
@@ -6,75 +6,10 @@ | |||
6 | #ifndef _LBS_DEV_H_ | 6 | #ifndef _LBS_DEV_H_ |
7 | #define _LBS_DEV_H_ | 7 | #define _LBS_DEV_H_ |
8 | 8 | ||
9 | #include <linux/netdevice.h> | 9 | #include "scan.h" |
10 | #include <linux/wireless.h> | 10 | #include "assoc.h" |
11 | #include <linux/ethtool.h> | ||
12 | #include <linux/debugfs.h> | ||
13 | 11 | ||
14 | #include "defs.h" | ||
15 | #include "host.h" | ||
16 | 12 | ||
17 | extern const struct ethtool_ops lbs_ethtool_ops; | ||
18 | |||
19 | #define MAX_BSSID_PER_CHANNEL 16 | ||
20 | |||
21 | #define NR_TX_QUEUE 3 | ||
22 | |||
23 | /* For the extended Scan */ | ||
24 | #define MAX_EXTENDED_SCAN_BSSID_LIST MAX_BSSID_PER_CHANNEL * \ | ||
25 | MRVDRV_MAX_CHANNEL_SIZE + 1 | ||
26 | |||
27 | #define MAX_REGION_CHANNEL_NUM 2 | ||
28 | |||
29 | /** Chan-freq-TxPower mapping table*/ | ||
30 | struct chan_freq_power { | ||
31 | /** channel Number */ | ||
32 | u16 channel; | ||
33 | /** frequency of this channel */ | ||
34 | u32 freq; | ||
35 | /** Max allowed Tx power level */ | ||
36 | u16 maxtxpower; | ||
37 | /** TRUE:channel unsupported; FLASE:supported*/ | ||
38 | u8 unsupported; | ||
39 | }; | ||
40 | |||
41 | /** region-band mapping table*/ | ||
42 | struct region_channel { | ||
43 | /** TRUE if this entry is valid */ | ||
44 | u8 valid; | ||
45 | /** region code for US, Japan ... */ | ||
46 | u8 region; | ||
47 | /** band B/G/A, used for BAND_CONFIG cmd */ | ||
48 | u8 band; | ||
49 | /** Actual No. of elements in the array below */ | ||
50 | u8 nrcfp; | ||
51 | /** chan-freq-txpower mapping table*/ | ||
52 | struct chan_freq_power *CFP; | ||
53 | }; | ||
54 | |||
55 | struct lbs_802_11_security { | ||
56 | u8 WPAenabled; | ||
57 | u8 WPA2enabled; | ||
58 | u8 wep_enabled; | ||
59 | u8 auth_mode; | ||
60 | u32 key_mgmt; | ||
61 | }; | ||
62 | |||
63 | /** Current Basic Service Set State Structure */ | ||
64 | struct current_bss_params { | ||
65 | /** bssid */ | ||
66 | u8 bssid[ETH_ALEN]; | ||
67 | /** ssid */ | ||
68 | u8 ssid[IEEE80211_MAX_SSID_LEN + 1]; | ||
69 | u8 ssid_len; | ||
70 | |||
71 | /** band */ | ||
72 | u8 band; | ||
73 | /** channel */ | ||
74 | u8 channel; | ||
75 | /** zero-terminated array of supported data rates */ | ||
76 | u8 rates[MAX_RATES + 1]; | ||
77 | }; | ||
78 | 13 | ||
79 | /** sleep_params */ | 14 | /** sleep_params */ |
80 | struct sleep_params { | 15 | struct sleep_params { |
@@ -295,12 +230,6 @@ struct lbs_private { | |||
295 | struct enc_key wpa_mcast_key; | 230 | struct enc_key wpa_mcast_key; |
296 | struct enc_key wpa_unicast_key; | 231 | struct enc_key wpa_unicast_key; |
297 | 232 | ||
298 | /* | ||
299 | * In theory, the IE is limited to the IE length, 255, | ||
300 | * but in practice 64 bytes are enough. | ||
301 | */ | ||
302 | #define MAX_WPA_IE_LEN 64 | ||
303 | |||
304 | /** WPA Information Elements*/ | 233 | /** WPA Information Elements*/ |
305 | u8 wpa_ie[MAX_WPA_IE_LEN]; | 234 | u8 wpa_ie[MAX_WPA_IE_LEN]; |
306 | u8 wpa_ie_len; | 235 | u8 wpa_ie_len; |
@@ -334,84 +263,4 @@ struct lbs_private { | |||
334 | 263 | ||
335 | extern struct cmd_confirm_sleep confirm_sleep; | 264 | extern struct cmd_confirm_sleep confirm_sleep; |
336 | 265 | ||
337 | /** | ||
338 | * @brief Structure used to store information for each beacon/probe response | ||
339 | */ | ||
340 | struct bss_descriptor { | ||
341 | u8 bssid[ETH_ALEN]; | ||
342 | |||
343 | u8 ssid[IEEE80211_MAX_SSID_LEN + 1]; | ||
344 | u8 ssid_len; | ||
345 | |||
346 | u16 capability; | ||
347 | u32 rssi; | ||
348 | u32 channel; | ||
349 | u16 beaconperiod; | ||
350 | __le16 atimwindow; | ||
351 | |||
352 | /* IW_MODE_AUTO, IW_MODE_ADHOC, IW_MODE_INFRA */ | ||
353 | u8 mode; | ||
354 | |||
355 | /* zero-terminated array of supported data rates */ | ||
356 | u8 rates[MAX_RATES + 1]; | ||
357 | |||
358 | unsigned long last_scanned; | ||
359 | |||
360 | union ieee_phy_param_set phy; | ||
361 | union ieee_ss_param_set ss; | ||
362 | |||
363 | u8 wpa_ie[MAX_WPA_IE_LEN]; | ||
364 | size_t wpa_ie_len; | ||
365 | u8 rsn_ie[MAX_WPA_IE_LEN]; | ||
366 | size_t rsn_ie_len; | ||
367 | |||
368 | u8 mesh; | ||
369 | |||
370 | struct list_head list; | ||
371 | }; | ||
372 | |||
373 | /** Association request | ||
374 | * | ||
375 | * Encapsulates all the options that describe a specific assocation request | ||
376 | * or configuration of the wireless card's radio, mode, and security settings. | ||
377 | */ | ||
378 | struct assoc_request { | ||
379 | #define ASSOC_FLAG_SSID 1 | ||
380 | #define ASSOC_FLAG_CHANNEL 2 | ||
381 | #define ASSOC_FLAG_BAND 3 | ||
382 | #define ASSOC_FLAG_MODE 4 | ||
383 | #define ASSOC_FLAG_BSSID 5 | ||
384 | #define ASSOC_FLAG_WEP_KEYS 6 | ||
385 | #define ASSOC_FLAG_WEP_TX_KEYIDX 7 | ||
386 | #define ASSOC_FLAG_WPA_MCAST_KEY 8 | ||
387 | #define ASSOC_FLAG_WPA_UCAST_KEY 9 | ||
388 | #define ASSOC_FLAG_SECINFO 10 | ||
389 | #define ASSOC_FLAG_WPA_IE 11 | ||
390 | unsigned long flags; | ||
391 | |||
392 | u8 ssid[IEEE80211_MAX_SSID_LEN + 1]; | ||
393 | u8 ssid_len; | ||
394 | u8 channel; | ||
395 | u8 band; | ||
396 | u8 mode; | ||
397 | u8 bssid[ETH_ALEN] __attribute__ ((aligned (2))); | ||
398 | |||
399 | /** WEP keys */ | ||
400 | struct enc_key wep_keys[4]; | ||
401 | u16 wep_tx_keyidx; | ||
402 | |||
403 | /** WPA keys */ | ||
404 | struct enc_key wpa_mcast_key; | ||
405 | struct enc_key wpa_unicast_key; | ||
406 | |||
407 | struct lbs_802_11_security secinfo; | ||
408 | |||
409 | /** WPA Information Elements*/ | ||
410 | u8 wpa_ie[MAX_WPA_IE_LEN]; | ||
411 | u8 wpa_ie_len; | ||
412 | |||
413 | /* BSS to associate with for infrastructure of Ad-Hoc join */ | ||
414 | struct bss_descriptor bss; | ||
415 | }; | ||
416 | |||
417 | #endif | 266 | #endif |