diff options
Diffstat (limited to 'drivers/net/wireless/libertas/dev.h')
-rw-r--r-- | drivers/net/wireless/libertas/dev.h | 99 |
1 files changed, 53 insertions, 46 deletions
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h index e8b9020f9bd6..785192b884bc 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 */ |
65 | struct current_bss_params { | 65 | struct 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 */ | ||
93 | typedef 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 */ |
118 | struct wlan_mesh_stats { | 93 | struct 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,15 @@ 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 | struct work_struct sync_channel; | ||
154 | |||
155 | /** Hardware access */ | ||
156 | int (*hw_register_dev) (wlan_private * priv); | ||
157 | int (*hw_unregister_dev) (wlan_private *); | ||
158 | int (*hw_prog_firmware) (wlan_private *); | ||
159 | int (*hw_host_to_card) (wlan_private * priv, u8 type, u8 * payload, u16 nb); | ||
160 | int (*hw_get_int_status) (wlan_private * priv, u8 *); | ||
161 | int (*hw_read_event_cause) (wlan_private *); | ||
164 | }; | 162 | }; |
165 | 163 | ||
166 | /** Association request | 164 | /** Association request |
@@ -171,18 +169,21 @@ struct _wlan_private { | |||
171 | struct assoc_request { | 169 | struct assoc_request { |
172 | #define ASSOC_FLAG_SSID 1 | 170 | #define ASSOC_FLAG_SSID 1 |
173 | #define ASSOC_FLAG_CHANNEL 2 | 171 | #define ASSOC_FLAG_CHANNEL 2 |
174 | #define ASSOC_FLAG_MODE 3 | 172 | #define ASSOC_FLAG_BAND 3 |
175 | #define ASSOC_FLAG_BSSID 4 | 173 | #define ASSOC_FLAG_MODE 4 |
176 | #define ASSOC_FLAG_WEP_KEYS 5 | 174 | #define ASSOC_FLAG_BSSID 5 |
177 | #define ASSOC_FLAG_WEP_TX_KEYIDX 6 | 175 | #define ASSOC_FLAG_WEP_KEYS 6 |
178 | #define ASSOC_FLAG_WPA_MCAST_KEY 7 | 176 | #define ASSOC_FLAG_WEP_TX_KEYIDX 7 |
179 | #define ASSOC_FLAG_WPA_UCAST_KEY 8 | 177 | #define ASSOC_FLAG_WPA_MCAST_KEY 8 |
180 | #define ASSOC_FLAG_SECINFO 9 | 178 | #define ASSOC_FLAG_WPA_UCAST_KEY 9 |
181 | #define ASSOC_FLAG_WPA_IE 10 | 179 | #define ASSOC_FLAG_SECINFO 10 |
180 | #define ASSOC_FLAG_WPA_IE 11 | ||
182 | unsigned long flags; | 181 | unsigned long flags; |
183 | 182 | ||
184 | struct WLAN_802_11_SSID ssid; | 183 | u8 ssid[IW_ESSID_MAX_SIZE + 1]; |
184 | u8 ssid_len; | ||
185 | u8 channel; | 185 | u8 channel; |
186 | u8 band; | ||
186 | u8 mode; | 187 | u8 mode; |
187 | u8 bssid[ETH_ALEN]; | 188 | u8 bssid[ETH_ALEN]; |
188 | 189 | ||
@@ -199,12 +200,15 @@ struct assoc_request { | |||
199 | /** WPA Information Elements*/ | 200 | /** WPA Information Elements*/ |
200 | u8 wpa_ie[MAX_WPA_IE_LEN]; | 201 | u8 wpa_ie[MAX_WPA_IE_LEN]; |
201 | u8 wpa_ie_len; | 202 | u8 wpa_ie_len; |
203 | |||
204 | /* BSS to associate with for infrastructure of Ad-Hoc join */ | ||
205 | struct bss_descriptor bss; | ||
202 | }; | 206 | }; |
203 | 207 | ||
204 | /** Wlan adapter data structure*/ | 208 | /** Wlan adapter data structure*/ |
205 | struct _wlan_adapter { | 209 | struct _wlan_adapter { |
206 | /** STATUS variables */ | 210 | /** STATUS variables */ |
207 | u32 fwreleasenumber; | 211 | u8 fwreleasenumber[4]; |
208 | u32 fwcapinfo; | 212 | u32 fwcapinfo; |
209 | /* protected with big lock */ | 213 | /* protected with big lock */ |
210 | 214 | ||
@@ -255,13 +259,14 @@ struct _wlan_adapter { | |||
255 | /* IW_MODE_* */ | 259 | /* IW_MODE_* */ |
256 | u8 mode; | 260 | u8 mode; |
257 | 261 | ||
258 | struct bss_descriptor *pattemptedbssdesc; | 262 | u8 prev_ssid[IW_ESSID_MAX_SIZE + 1]; |
259 | 263 | u8 prev_ssid_len; | |
260 | struct WLAN_802_11_SSID previousssid; | 264 | u8 prev_bssid[ETH_ALEN]; |
261 | u8 previousbssid[ETH_ALEN]; | ||
262 | 265 | ||
263 | struct bss_descriptor *scantable; | 266 | /* Scan results list */ |
264 | u32 numinscantable; | 267 | struct list_head network_list; |
268 | struct list_head network_free_list; | ||
269 | struct bss_descriptor *networks; | ||
265 | 270 | ||
266 | u8 scantype; | 271 | u8 scantype; |
267 | u32 scanmode; | 272 | u32 scanmode; |
@@ -288,7 +293,6 @@ struct _wlan_adapter { | |||
288 | u32 txantenna; | 293 | u32 txantenna; |
289 | u32 rxantenna; | 294 | u32 rxantenna; |
290 | 295 | ||
291 | u8 adhocchannel; | ||
292 | u32 fragthsd; | 296 | u32 fragthsd; |
293 | u32 rtsthsd; | 297 | u32 rtsthsd; |
294 | 298 | ||
@@ -324,7 +328,8 @@ struct _wlan_adapter { | |||
324 | u16 locallisteninterval; | 328 | u16 locallisteninterval; |
325 | u16 nullpktinterval; | 329 | u16 nullpktinterval; |
326 | 330 | ||
327 | struct assoc_request * assoc_req; | 331 | struct assoc_request * pending_assoc_req; |
332 | struct assoc_request * in_progress_assoc_req; | ||
328 | 333 | ||
329 | /** Encryption parameter */ | 334 | /** Encryption parameter */ |
330 | struct wlan_802_11_security secinfo; | 335 | struct wlan_802_11_security secinfo; |
@@ -396,6 +401,8 @@ struct _wlan_adapter { | |||
396 | u32 radiomode; | 401 | u32 radiomode; |
397 | u32 debugmode; | 402 | u32 debugmode; |
398 | u8 fw_ready; | 403 | u8 fw_ready; |
404 | |||
405 | u8 last_scanned_channel; | ||
399 | }; | 406 | }; |
400 | 407 | ||
401 | #endif /* _WLAN_DEV_H_ */ | 408 | #endif /* _WLAN_DEV_H_ */ |