aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/assoc.h
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2009-10-22 09:30:48 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:48:36 -0400
commit2d46502dce3c79c3c15ac537cb271911f58d12d1 (patch)
tree7bf08660d6316121e2b08fad286fdbf75e14128d /drivers/net/wireless/libertas/assoc.h
parent243e84e91ed810f7dca5ba1c2d1a611811948566 (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/assoc.h')
-rw-r--r--drivers/net/wireless/libertas/assoc.h122
1 files changed, 121 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/assoc.h b/drivers/net/wireless/libertas/assoc.h
index 6e765e9f91a3..610d14c14cd4 100644
--- a/drivers/net/wireless/libertas/assoc.h
+++ b/drivers/net/wireless/libertas/assoc.h
@@ -3,7 +3,127 @@
3#ifndef _LBS_ASSOC_H_ 3#ifndef _LBS_ASSOC_H_
4#define _LBS_ASSOC_H_ 4#define _LBS_ASSOC_H_
5 5
6#include "dev.h" 6
7#include "defs.h"
8#include "host.h"
9
10
11struct lbs_private;
12
13/*
14 * In theory, the IE is limited to the IE length, 255,
15 * but in practice 64 bytes are enough.
16 */
17#define MAX_WPA_IE_LEN 64
18
19
20
21struct lbs_802_11_security {
22 u8 WPAenabled;
23 u8 WPA2enabled;
24 u8 wep_enabled;
25 u8 auth_mode;
26 u32 key_mgmt;
27};
28
29/** Current Basic Service Set State Structure */
30struct current_bss_params {
31 /** bssid */
32 u8 bssid[ETH_ALEN];
33 /** ssid */
34 u8 ssid[IEEE80211_MAX_SSID_LEN + 1];
35 u8 ssid_len;
36
37 /** band */
38 u8 band;
39 /** channel */
40 u8 channel;
41 /** zero-terminated array of supported data rates */
42 u8 rates[MAX_RATES + 1];
43};
44
45/**
46 * @brief Structure used to store information for each beacon/probe response
47 */
48struct bss_descriptor {
49 u8 bssid[ETH_ALEN];
50
51 u8 ssid[IEEE80211_MAX_SSID_LEN + 1];
52 u8 ssid_len;
53
54 u16 capability;
55 u32 rssi;
56 u32 channel;
57 u16 beaconperiod;
58 __le16 atimwindow;
59
60 /* IW_MODE_AUTO, IW_MODE_ADHOC, IW_MODE_INFRA */
61 u8 mode;
62
63 /* zero-terminated array of supported data rates */
64 u8 rates[MAX_RATES + 1];
65
66 unsigned long last_scanned;
67
68 union ieee_phy_param_set phy;
69 union ieee_ss_param_set ss;
70
71 u8 wpa_ie[MAX_WPA_IE_LEN];
72 size_t wpa_ie_len;
73 u8 rsn_ie[MAX_WPA_IE_LEN];
74 size_t rsn_ie_len;
75
76 u8 mesh;
77
78 struct list_head list;
79};
80
81/** Association request
82 *
83 * Encapsulates all the options that describe a specific assocation request
84 * or configuration of the wireless card's radio, mode, and security settings.
85 */
86struct assoc_request {
87#define ASSOC_FLAG_SSID 1
88#define ASSOC_FLAG_CHANNEL 2
89#define ASSOC_FLAG_BAND 3
90#define ASSOC_FLAG_MODE 4
91#define ASSOC_FLAG_BSSID 5
92#define ASSOC_FLAG_WEP_KEYS 6
93#define ASSOC_FLAG_WEP_TX_KEYIDX 7
94#define ASSOC_FLAG_WPA_MCAST_KEY 8
95#define ASSOC_FLAG_WPA_UCAST_KEY 9
96#define ASSOC_FLAG_SECINFO 10
97#define ASSOC_FLAG_WPA_IE 11
98 unsigned long flags;
99
100 u8 ssid[IEEE80211_MAX_SSID_LEN + 1];
101 u8 ssid_len;
102 u8 channel;
103 u8 band;
104 u8 mode;
105 u8 bssid[ETH_ALEN] __attribute__ ((aligned (2)));
106
107 /** WEP keys */
108 struct enc_key wep_keys[4];
109 u16 wep_tx_keyidx;
110
111 /** WPA keys */
112 struct enc_key wpa_mcast_key;
113 struct enc_key wpa_unicast_key;
114
115 struct lbs_802_11_security secinfo;
116
117 /** WPA Information Elements*/
118 u8 wpa_ie[MAX_WPA_IE_LEN];
119 u8 wpa_ie_len;
120
121 /* BSS to associate with for infrastructure of Ad-Hoc join */
122 struct bss_descriptor bss;
123};
124
125
126extern u8 lbs_bg_rates[MAX_RATES];
7 127
8void lbs_association_worker(struct work_struct *work); 128void lbs_association_worker(struct work_struct *work);
9struct assoc_request *lbs_get_association_request(struct lbs_private *priv); 129struct assoc_request *lbs_get_association_request(struct lbs_private *priv);