aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/dev.h
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-06-12 22:27:30 -0400
committerJeff Garzik <jeff@garzik.org>2007-06-12 22:27:30 -0400
commit12b90de64f38226e1e095c55b533f0f4d4f0f572 (patch)
tree9955197d842511064a1eff6db815fe56cd8f0eb3 /drivers/net/wireless/libertas/dev.h
parent6f8a7c66e2dc8080950d28edc0259f37739aead9 (diff)
parent717c9339202a42ae7bec7d3c4b84deecdcae9f81 (diff)
Merge branch 'libertas' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes
Diffstat (limited to 'drivers/net/wireless/libertas/dev.h')
-rw-r--r--drivers/net/wireless/libertas/dev.h98
1 files changed, 52 insertions, 46 deletions
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index e8b9020f9bd6..d6c340aef681 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -63,11 +63,11 @@ struct wlan_802_11_security {
63 63
64/** Current Basic Service Set State Structure */ 64/** Current Basic Service Set State Structure */
65struct current_bss_params { 65struct current_bss_params {
66 struct bss_descriptor bssdescriptor;
67 /** bssid */ 66 /** bssid */
68 u8 bssid[ETH_ALEN]; 67 u8 bssid[ETH_ALEN];
69 /** ssid */ 68 /** ssid */
70 struct WLAN_802_11_SSID ssid; 69 u8 ssid[IW_ESSID_MAX_SIZE + 1];
70 u8 ssid_len;
71 71
72 /** band */ 72 /** band */
73 u8 band; 73 u8 band;
@@ -89,31 +89,6 @@ struct sleep_params {
89 u16 sp_reserved; 89 u16 sp_reserved;
90}; 90};
91 91
92/** Data structure for the Marvell WLAN device */
93typedef struct _wlan_dev {
94 /** device name */
95 char name[DEV_NAME_LEN];
96 /** card pointer */
97 void *card;
98 /** IO port */
99 u32 ioport;
100 /** Upload received */
101 u32 upld_rcv;
102 /** Upload type */
103 u32 upld_typ;
104 /** Upload length */
105 u32 upld_len;
106 /** netdev pointer */
107 struct net_device *netdev;
108 /* Upload buffer */
109 u8 upld_buf[WLAN_UPLD_SIZE];
110 /* Download sent:
111 bit0 1/0=data_sent/data_tx_done,
112 bit1 1/0=cmd_sent/cmd_tx_done,
113 all other bits reserved 0 */
114 u8 dnld_sent;
115} wlan_dev_t, *pwlan_dev_t;
116
117/* Mesh statistics */ 92/* Mesh statistics */
118struct wlan_mesh_stats { 93struct wlan_mesh_stats {
119 u32 fwd_bcast_cnt; /* Fwd: Broadcast counter */ 94 u32 fwd_bcast_cnt; /* Fwd: Broadcast counter */
@@ -123,6 +98,7 @@ struct wlan_mesh_stats {
123 u32 fwd_drop_noroute; /* Fwd: No route to Destination */ 98 u32 fwd_drop_noroute; /* Fwd: No route to Destination */
124 u32 fwd_drop_nobuf; /* Fwd: Run out of internal buffers */ 99 u32 fwd_drop_nobuf; /* Fwd: Run out of internal buffers */
125 u32 drop_blind; /* Rx: Dropped by blinding table */ 100 u32 drop_blind; /* Rx: Dropped by blinding table */
101 u32 tx_failed_cnt; /* Tx: Failed transmissions */
126}; 102};
127 103
128/** Private structure for the MV device */ 104/** Private structure for the MV device */
@@ -131,8 +107,11 @@ struct _wlan_private {
131 int mesh_open; 107 int mesh_open;
132 int infra_open; 108 int infra_open;
133 109
110 char name[DEV_NAME_LEN];
111
112 void *card;
134 wlan_adapter *adapter; 113 wlan_adapter *adapter;
135 wlan_dev_t wlan_dev; 114 struct net_device *dev;
136 115
137 struct net_device_stats stats; 116 struct net_device_stats stats;
138 struct net_device *mesh_dev ; /* Virtual device */ 117 struct net_device *mesh_dev ; /* Virtual device */
@@ -153,6 +132,16 @@ struct _wlan_private {
153 u32 bbp_offset; 132 u32 bbp_offset;
154 u32 rf_offset; 133 u32 rf_offset;
155 134
135 /** Upload length */
136 u32 upld_len;
137 /* Upload buffer */
138 u8 upld_buf[WLAN_UPLD_SIZE];
139 /* Download sent:
140 bit0 1/0=data_sent/data_tx_done,
141 bit1 1/0=cmd_sent/cmd_tx_done,
142 all other bits reserved 0 */
143 u8 dnld_sent;
144
156 const struct firmware *firmware; 145 const struct firmware *firmware;
157 struct device *hotplug_device; 146 struct device *hotplug_device;
158 147
@@ -161,6 +150,14 @@ struct _wlan_private {
161 150
162 struct delayed_work assoc_work; 151 struct delayed_work assoc_work;
163 struct workqueue_struct *assoc_thread; 152 struct workqueue_struct *assoc_thread;
153
154 /** Hardware access */
155 int (*hw_register_dev) (wlan_private * priv);
156 int (*hw_unregister_dev) (wlan_private *);
157 int (*hw_prog_firmware) (wlan_private *);
158 int (*hw_host_to_card) (wlan_private * priv, u8 type, u8 * payload, u16 nb);
159 int (*hw_get_int_status) (wlan_private * priv, u8 *);
160 int (*hw_read_event_cause) (wlan_private *);
164}; 161};
165 162
166/** Association request 163/** Association request
@@ -171,18 +168,21 @@ struct _wlan_private {
171struct assoc_request { 168struct assoc_request {
172#define ASSOC_FLAG_SSID 1 169#define ASSOC_FLAG_SSID 1
173#define ASSOC_FLAG_CHANNEL 2 170#define ASSOC_FLAG_CHANNEL 2
174#define ASSOC_FLAG_MODE 3 171#define ASSOC_FLAG_BAND 3
175#define ASSOC_FLAG_BSSID 4 172#define ASSOC_FLAG_MODE 4
176#define ASSOC_FLAG_WEP_KEYS 5 173#define ASSOC_FLAG_BSSID 5
177#define ASSOC_FLAG_WEP_TX_KEYIDX 6 174#define ASSOC_FLAG_WEP_KEYS 6
178#define ASSOC_FLAG_WPA_MCAST_KEY 7 175#define ASSOC_FLAG_WEP_TX_KEYIDX 7
179#define ASSOC_FLAG_WPA_UCAST_KEY 8 176#define ASSOC_FLAG_WPA_MCAST_KEY 8
180#define ASSOC_FLAG_SECINFO 9 177#define ASSOC_FLAG_WPA_UCAST_KEY 9
181#define ASSOC_FLAG_WPA_IE 10 178#define ASSOC_FLAG_SECINFO 10
179#define ASSOC_FLAG_WPA_IE 11
182 unsigned long flags; 180 unsigned long flags;
183 181
184 struct WLAN_802_11_SSID ssid; 182 u8 ssid[IW_ESSID_MAX_SIZE + 1];
183 u8 ssid_len;
185 u8 channel; 184 u8 channel;
185 u8 band;
186 u8 mode; 186 u8 mode;
187 u8 bssid[ETH_ALEN]; 187 u8 bssid[ETH_ALEN];
188 188
@@ -199,12 +199,15 @@ struct assoc_request {
199 /** WPA Information Elements*/ 199 /** WPA Information Elements*/
200 u8 wpa_ie[MAX_WPA_IE_LEN]; 200 u8 wpa_ie[MAX_WPA_IE_LEN];
201 u8 wpa_ie_len; 201 u8 wpa_ie_len;
202
203 /* BSS to associate with for infrastructure of Ad-Hoc join */
204 struct bss_descriptor bss;
202}; 205};
203 206
204/** Wlan adapter data structure*/ 207/** Wlan adapter data structure*/
205struct _wlan_adapter { 208struct _wlan_adapter {
206 /** STATUS variables */ 209 /** STATUS variables */
207 u32 fwreleasenumber; 210 u8 fwreleasenumber[4];
208 u32 fwcapinfo; 211 u32 fwcapinfo;
209 /* protected with big lock */ 212 /* protected with big lock */
210 213
@@ -255,13 +258,14 @@ struct _wlan_adapter {
255 /* IW_MODE_* */ 258 /* IW_MODE_* */
256 u8 mode; 259 u8 mode;
257 260
258 struct bss_descriptor *pattemptedbssdesc; 261 u8 prev_ssid[IW_ESSID_MAX_SIZE + 1];
259 262 u8 prev_ssid_len;
260 struct WLAN_802_11_SSID previousssid; 263 u8 prev_bssid[ETH_ALEN];
261 u8 previousbssid[ETH_ALEN];
262 264
263 struct bss_descriptor *scantable; 265 /* Scan results list */
264 u32 numinscantable; 266 struct list_head network_list;
267 struct list_head network_free_list;
268 struct bss_descriptor *networks;
265 269
266 u8 scantype; 270 u8 scantype;
267 u32 scanmode; 271 u32 scanmode;
@@ -288,7 +292,6 @@ struct _wlan_adapter {
288 u32 txantenna; 292 u32 txantenna;
289 u32 rxantenna; 293 u32 rxantenna;
290 294
291 u8 adhocchannel;
292 u32 fragthsd; 295 u32 fragthsd;
293 u32 rtsthsd; 296 u32 rtsthsd;
294 297
@@ -324,7 +327,8 @@ struct _wlan_adapter {
324 u16 locallisteninterval; 327 u16 locallisteninterval;
325 u16 nullpktinterval; 328 u16 nullpktinterval;
326 329
327 struct assoc_request * assoc_req; 330 struct assoc_request * pending_assoc_req;
331 struct assoc_request * in_progress_assoc_req;
328 332
329 /** Encryption parameter */ 333 /** Encryption parameter */
330 struct wlan_802_11_security secinfo; 334 struct wlan_802_11_security secinfo;
@@ -396,6 +400,8 @@ struct _wlan_adapter {
396 u32 radiomode; 400 u32 radiomode;
397 u32 debugmode; 401 u32 debugmode;
398 u8 fw_ready; 402 u8 fw_ready;
403
404 u8 last_scanned_channel;
399}; 405};
400 406
401#endif /* _WLAN_DEV_H_ */ 407#endif /* _WLAN_DEV_H_ */