diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2007-11-15 18:05:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:04:46 -0500 |
commit | 1007832103d016d1563fab71d4cf2b057a0bcceb (patch) | |
tree | 3b5080b01bee6e1f98cc9489382c534e963ac748 /drivers/net/wireless/libertas/wext.c | |
parent | 9a62f73b1a3bbd35a6f84fcd6636e672b09981ec (diff) |
libertas: move to uniform lbs_/LBS_ namespace
This patch unifies the namespace of variables, functions defines
and structures. It does:
- rename libertas_XXX to lbs_XXX
- rename LIBERTAS_XXX to lbs_XXX
- rename wlan_XXX to lbs_XXX
- rename WLAN_XXX to LBS_XXX (but only those that were
defined in libertas-local *.h files, e.g. not defines
from net/ieee80211.h)
While passing, I fixed some checkpatch.pl errors too.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/wext.c')
-rw-r--r-- | drivers/net/wireless/libertas/wext.c | 476 |
1 files changed, 238 insertions, 238 deletions
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index 19c2873d2d78..57fe5f67a05a 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "assoc.h" | 21 | #include "assoc.h" |
22 | 22 | ||
23 | 23 | ||
24 | static inline void libertas_postpone_association_work(wlan_private *priv) | 24 | static inline void lbs_postpone_association_work(lbs_private *priv) |
25 | { | 25 | { |
26 | if (priv->adapter->surpriseremoved) | 26 | if (priv->adapter->surpriseremoved) |
27 | return; | 27 | return; |
@@ -29,7 +29,7 @@ static inline void libertas_postpone_association_work(wlan_private *priv) | |||
29 | queue_delayed_work(priv->work_thread, &priv->assoc_work, HZ / 2); | 29 | queue_delayed_work(priv->work_thread, &priv->assoc_work, HZ / 2); |
30 | } | 30 | } |
31 | 31 | ||
32 | static inline void libertas_cancel_association_work(wlan_private *priv) | 32 | static inline void lbs_cancel_association_work(lbs_private *priv) |
33 | { | 33 | { |
34 | cancel_delayed_work(&priv->assoc_work); | 34 | cancel_delayed_work(&priv->assoc_work); |
35 | kfree(priv->adapter->pending_assoc_req); | 35 | kfree(priv->adapter->pending_assoc_req); |
@@ -40,12 +40,12 @@ static inline void libertas_cancel_association_work(wlan_private *priv) | |||
40 | /** | 40 | /** |
41 | * @brief Find the channel frequency power info with specific channel | 41 | * @brief Find the channel frequency power info with specific channel |
42 | * | 42 | * |
43 | * @param adapter A pointer to wlan_adapter structure | 43 | * @param adapter A pointer to lbs_adapter structure |
44 | * @param band it can be BAND_A, BAND_G or BAND_B | 44 | * @param band it can be BAND_A, BAND_G or BAND_B |
45 | * @param channel the channel for looking | 45 | * @param channel the channel for looking |
46 | * @return A pointer to struct chan_freq_power structure or NULL if not find. | 46 | * @return A pointer to struct chan_freq_power structure or NULL if not find. |
47 | */ | 47 | */ |
48 | struct chan_freq_power *libertas_find_cfp_by_band_and_channel(wlan_adapter * adapter, | 48 | struct chan_freq_power *lbs_find_cfp_by_band_and_channel(lbs_adapter *adapter, |
49 | u8 band, u16 channel) | 49 | u8 band, u16 channel) |
50 | { | 50 | { |
51 | struct chan_freq_power *cfp = NULL; | 51 | struct chan_freq_power *cfp = NULL; |
@@ -70,7 +70,7 @@ struct chan_freq_power *libertas_find_cfp_by_band_and_channel(wlan_adapter * ada | |||
70 | } | 70 | } |
71 | 71 | ||
72 | if (!cfp && channel) | 72 | if (!cfp && channel) |
73 | lbs_deb_wext("libertas_find_cfp_by_band_and_channel: can't find " | 73 | lbs_deb_wext("lbs_find_cfp_by_band_and_channel: can't find " |
74 | "cfp by band %d / channel %d\n", band, channel); | 74 | "cfp by band %d / channel %d\n", band, channel); |
75 | 75 | ||
76 | return cfp; | 76 | return cfp; |
@@ -79,12 +79,12 @@ struct chan_freq_power *libertas_find_cfp_by_band_and_channel(wlan_adapter * ada | |||
79 | /** | 79 | /** |
80 | * @brief Find the channel frequency power info with specific frequency | 80 | * @brief Find the channel frequency power info with specific frequency |
81 | * | 81 | * |
82 | * @param adapter A pointer to wlan_adapter structure | 82 | * @param adapter A pointer to lbs_adapter structure |
83 | * @param band it can be BAND_A, BAND_G or BAND_B | 83 | * @param band it can be BAND_A, BAND_G or BAND_B |
84 | * @param freq the frequency for looking | 84 | * @param freq the frequency for looking |
85 | * @return A pointer to struct chan_freq_power structure or NULL if not find. | 85 | * @return A pointer to struct chan_freq_power structure or NULL if not find. |
86 | */ | 86 | */ |
87 | static struct chan_freq_power *find_cfp_by_band_and_freq(wlan_adapter * adapter, | 87 | static struct chan_freq_power *find_cfp_by_band_and_freq(lbs_adapter *adapter, |
88 | u8 band, u32 freq) | 88 | u8 band, u32 freq) |
89 | { | 89 | { |
90 | struct chan_freq_power *cfp = NULL; | 90 | struct chan_freq_power *cfp = NULL; |
@@ -119,14 +119,14 @@ static struct chan_freq_power *find_cfp_by_band_and_freq(wlan_adapter * adapter, | |||
119 | /** | 119 | /** |
120 | * @brief Set Radio On/OFF | 120 | * @brief Set Radio On/OFF |
121 | * | 121 | * |
122 | * @param priv A pointer to wlan_private structure | 122 | * @param priv A pointer to lbs_private structure |
123 | * @option Radio Option | 123 | * @option Radio Option |
124 | * @return 0 --success, otherwise fail | 124 | * @return 0 --success, otherwise fail |
125 | */ | 125 | */ |
126 | static int wlan_radio_ioctl(wlan_private * priv, u8 option) | 126 | static int lbs_radio_ioctl(lbs_private *priv, u8 option) |
127 | { | 127 | { |
128 | int ret = 0; | 128 | int ret = 0; |
129 | wlan_adapter *adapter = priv->adapter; | 129 | lbs_adapter *adapter = priv->adapter; |
130 | 130 | ||
131 | lbs_deb_enter(LBS_DEB_WEXT); | 131 | lbs_deb_enter(LBS_DEB_WEXT); |
132 | 132 | ||
@@ -134,7 +134,7 @@ static int wlan_radio_ioctl(wlan_private * priv, u8 option) | |||
134 | lbs_deb_wext("switching radio %s\n", option ? "on" : "off"); | 134 | lbs_deb_wext("switching radio %s\n", option ? "on" : "off"); |
135 | adapter->radioon = option; | 135 | adapter->radioon = option; |
136 | 136 | ||
137 | ret = libertas_prepare_and_send_command(priv, | 137 | ret = lbs_prepare_and_send_command(priv, |
138 | CMD_802_11_RADIO_CONTROL, | 138 | CMD_802_11_RADIO_CONTROL, |
139 | CMD_ACT_SET, | 139 | CMD_ACT_SET, |
140 | CMD_OPTION_WAITFORRSP, 0, NULL); | 140 | CMD_OPTION_WAITFORRSP, 0, NULL); |
@@ -147,22 +147,22 @@ static int wlan_radio_ioctl(wlan_private * priv, u8 option) | |||
147 | /** | 147 | /** |
148 | * @brief Copy active data rates based on adapter mode and status | 148 | * @brief Copy active data rates based on adapter mode and status |
149 | * | 149 | * |
150 | * @param adapter A pointer to wlan_adapter structure | 150 | * @param adapter A pointer to lbs_adapter structure |
151 | * @param rate The buf to return the active rates | 151 | * @param rate The buf to return the active rates |
152 | */ | 152 | */ |
153 | static void copy_active_data_rates(wlan_adapter * adapter, u8 * rates) | 153 | static void copy_active_data_rates(lbs_adapter *adapter, u8 *rates) |
154 | { | 154 | { |
155 | lbs_deb_enter(LBS_DEB_WEXT); | 155 | lbs_deb_enter(LBS_DEB_WEXT); |
156 | 156 | ||
157 | if (adapter->connect_status != LIBERTAS_CONNECTED) | 157 | if (adapter->connect_status != LBS_CONNECTED) |
158 | memcpy(rates, libertas_bg_rates, MAX_RATES); | 158 | memcpy(rates, lbs_bg_rates, MAX_RATES); |
159 | else | 159 | else |
160 | memcpy(rates, adapter->curbssparams.rates, MAX_RATES); | 160 | memcpy(rates, adapter->curbssparams.rates, MAX_RATES); |
161 | 161 | ||
162 | lbs_deb_leave(LBS_DEB_WEXT); | 162 | lbs_deb_leave(LBS_DEB_WEXT); |
163 | } | 163 | } |
164 | 164 | ||
165 | static int wlan_get_name(struct net_device *dev, struct iw_request_info *info, | 165 | static int lbs_get_name(struct net_device *dev, struct iw_request_info *info, |
166 | char *cwrq, char *extra) | 166 | char *cwrq, char *extra) |
167 | { | 167 | { |
168 | 168 | ||
@@ -175,16 +175,16 @@ static int wlan_get_name(struct net_device *dev, struct iw_request_info *info, | |||
175 | return 0; | 175 | return 0; |
176 | } | 176 | } |
177 | 177 | ||
178 | static int wlan_get_freq(struct net_device *dev, struct iw_request_info *info, | 178 | static int lbs_get_freq(struct net_device *dev, struct iw_request_info *info, |
179 | struct iw_freq *fwrq, char *extra) | 179 | struct iw_freq *fwrq, char *extra) |
180 | { | 180 | { |
181 | wlan_private *priv = dev->priv; | 181 | lbs_private *priv = dev->priv; |
182 | wlan_adapter *adapter = priv->adapter; | 182 | lbs_adapter *adapter = priv->adapter; |
183 | struct chan_freq_power *cfp; | 183 | struct chan_freq_power *cfp; |
184 | 184 | ||
185 | lbs_deb_enter(LBS_DEB_WEXT); | 185 | lbs_deb_enter(LBS_DEB_WEXT); |
186 | 186 | ||
187 | cfp = libertas_find_cfp_by_band_and_channel(adapter, 0, | 187 | cfp = lbs_find_cfp_by_band_and_channel(adapter, 0, |
188 | adapter->curbssparams.channel); | 188 | adapter->curbssparams.channel); |
189 | 189 | ||
190 | if (!cfp) { | 190 | if (!cfp) { |
@@ -202,15 +202,15 @@ static int wlan_get_freq(struct net_device *dev, struct iw_request_info *info, | |||
202 | return 0; | 202 | return 0; |
203 | } | 203 | } |
204 | 204 | ||
205 | static int wlan_get_wap(struct net_device *dev, struct iw_request_info *info, | 205 | static int lbs_get_wap(struct net_device *dev, struct iw_request_info *info, |
206 | struct sockaddr *awrq, char *extra) | 206 | struct sockaddr *awrq, char *extra) |
207 | { | 207 | { |
208 | wlan_private *priv = dev->priv; | 208 | lbs_private *priv = dev->priv; |
209 | wlan_adapter *adapter = priv->adapter; | 209 | lbs_adapter *adapter = priv->adapter; |
210 | 210 | ||
211 | lbs_deb_enter(LBS_DEB_WEXT); | 211 | lbs_deb_enter(LBS_DEB_WEXT); |
212 | 212 | ||
213 | if (adapter->connect_status == LIBERTAS_CONNECTED) { | 213 | if (adapter->connect_status == LBS_CONNECTED) { |
214 | memcpy(awrq->sa_data, adapter->curbssparams.bssid, ETH_ALEN); | 214 | memcpy(awrq->sa_data, adapter->curbssparams.bssid, ETH_ALEN); |
215 | } else { | 215 | } else { |
216 | memset(awrq->sa_data, 0, ETH_ALEN); | 216 | memset(awrq->sa_data, 0, ETH_ALEN); |
@@ -221,11 +221,11 @@ static int wlan_get_wap(struct net_device *dev, struct iw_request_info *info, | |||
221 | return 0; | 221 | return 0; |
222 | } | 222 | } |
223 | 223 | ||
224 | static int wlan_set_nick(struct net_device *dev, struct iw_request_info *info, | 224 | static int lbs_set_nick(struct net_device *dev, struct iw_request_info *info, |
225 | struct iw_point *dwrq, char *extra) | 225 | struct iw_point *dwrq, char *extra) |
226 | { | 226 | { |
227 | wlan_private *priv = dev->priv; | 227 | lbs_private *priv = dev->priv; |
228 | wlan_adapter *adapter = priv->adapter; | 228 | lbs_adapter *adapter = priv->adapter; |
229 | 229 | ||
230 | lbs_deb_enter(LBS_DEB_WEXT); | 230 | lbs_deb_enter(LBS_DEB_WEXT); |
231 | 231 | ||
@@ -246,11 +246,11 @@ static int wlan_set_nick(struct net_device *dev, struct iw_request_info *info, | |||
246 | return 0; | 246 | return 0; |
247 | } | 247 | } |
248 | 248 | ||
249 | static int wlan_get_nick(struct net_device *dev, struct iw_request_info *info, | 249 | static int lbs_get_nick(struct net_device *dev, struct iw_request_info *info, |
250 | struct iw_point *dwrq, char *extra) | 250 | struct iw_point *dwrq, char *extra) |
251 | { | 251 | { |
252 | wlan_private *priv = dev->priv; | 252 | lbs_private *priv = dev->priv; |
253 | wlan_adapter *adapter = priv->adapter; | 253 | lbs_adapter *adapter = priv->adapter; |
254 | 254 | ||
255 | lbs_deb_enter(LBS_DEB_WEXT); | 255 | lbs_deb_enter(LBS_DEB_WEXT); |
256 | 256 | ||
@@ -267,14 +267,14 @@ static int wlan_get_nick(struct net_device *dev, struct iw_request_info *info, | |||
267 | static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info, | 267 | static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info, |
268 | struct iw_point *dwrq, char *extra) | 268 | struct iw_point *dwrq, char *extra) |
269 | { | 269 | { |
270 | wlan_private *priv = dev->priv; | 270 | lbs_private *priv = dev->priv; |
271 | wlan_adapter *adapter = priv->adapter; | 271 | lbs_adapter *adapter = priv->adapter; |
272 | 272 | ||
273 | lbs_deb_enter(LBS_DEB_WEXT); | 273 | lbs_deb_enter(LBS_DEB_WEXT); |
274 | 274 | ||
275 | /* Use nickname to indicate that mesh is on */ | 275 | /* Use nickname to indicate that mesh is on */ |
276 | 276 | ||
277 | if (adapter->connect_status == LIBERTAS_CONNECTED) { | 277 | if (adapter->connect_status == LBS_CONNECTED) { |
278 | strncpy(extra, "Mesh", 12); | 278 | strncpy(extra, "Mesh", 12); |
279 | extra[12] = '\0'; | 279 | extra[12] = '\0'; |
280 | dwrq->length = strlen(extra); | 280 | dwrq->length = strlen(extra); |
@@ -289,12 +289,12 @@ static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info, | |||
289 | return 0; | 289 | return 0; |
290 | } | 290 | } |
291 | 291 | ||
292 | static int wlan_set_rts(struct net_device *dev, struct iw_request_info *info, | 292 | static int lbs_set_rts(struct net_device *dev, struct iw_request_info *info, |
293 | struct iw_param *vwrq, char *extra) | 293 | struct iw_param *vwrq, char *extra) |
294 | { | 294 | { |
295 | int ret = 0; | 295 | int ret = 0; |
296 | wlan_private *priv = dev->priv; | 296 | lbs_private *priv = dev->priv; |
297 | wlan_adapter *adapter = priv->adapter; | 297 | lbs_adapter *adapter = priv->adapter; |
298 | u32 rthr = vwrq->value; | 298 | u32 rthr = vwrq->value; |
299 | 299 | ||
300 | lbs_deb_enter(LBS_DEB_WEXT); | 300 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -307,7 +307,7 @@ static int wlan_set_rts(struct net_device *dev, struct iw_request_info *info, | |||
307 | adapter->rtsthsd = rthr; | 307 | adapter->rtsthsd = rthr; |
308 | } | 308 | } |
309 | 309 | ||
310 | ret = libertas_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB, | 310 | ret = lbs_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB, |
311 | CMD_ACT_SET, CMD_OPTION_WAITFORRSP, | 311 | CMD_ACT_SET, CMD_OPTION_WAITFORRSP, |
312 | OID_802_11_RTS_THRESHOLD, &rthr); | 312 | OID_802_11_RTS_THRESHOLD, &rthr); |
313 | 313 | ||
@@ -315,17 +315,17 @@ static int wlan_set_rts(struct net_device *dev, struct iw_request_info *info, | |||
315 | return ret; | 315 | return ret; |
316 | } | 316 | } |
317 | 317 | ||
318 | static int wlan_get_rts(struct net_device *dev, struct iw_request_info *info, | 318 | static int lbs_get_rts(struct net_device *dev, struct iw_request_info *info, |
319 | struct iw_param *vwrq, char *extra) | 319 | struct iw_param *vwrq, char *extra) |
320 | { | 320 | { |
321 | int ret = 0; | 321 | int ret = 0; |
322 | wlan_private *priv = dev->priv; | 322 | lbs_private *priv = dev->priv; |
323 | wlan_adapter *adapter = priv->adapter; | 323 | lbs_adapter *adapter = priv->adapter; |
324 | 324 | ||
325 | lbs_deb_enter(LBS_DEB_WEXT); | 325 | lbs_deb_enter(LBS_DEB_WEXT); |
326 | 326 | ||
327 | adapter->rtsthsd = 0; | 327 | adapter->rtsthsd = 0; |
328 | ret = libertas_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB, | 328 | ret = lbs_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB, |
329 | CMD_ACT_GET, CMD_OPTION_WAITFORRSP, | 329 | CMD_ACT_GET, CMD_OPTION_WAITFORRSP, |
330 | OID_802_11_RTS_THRESHOLD, NULL); | 330 | OID_802_11_RTS_THRESHOLD, NULL); |
331 | if (ret) | 331 | if (ret) |
@@ -341,13 +341,13 @@ out: | |||
341 | return ret; | 341 | return ret; |
342 | } | 342 | } |
343 | 343 | ||
344 | static int wlan_set_frag(struct net_device *dev, struct iw_request_info *info, | 344 | static int lbs_set_frag(struct net_device *dev, struct iw_request_info *info, |
345 | struct iw_param *vwrq, char *extra) | 345 | struct iw_param *vwrq, char *extra) |
346 | { | 346 | { |
347 | int ret = 0; | 347 | int ret = 0; |
348 | u32 fthr = vwrq->value; | 348 | u32 fthr = vwrq->value; |
349 | wlan_private *priv = dev->priv; | 349 | lbs_private *priv = dev->priv; |
350 | wlan_adapter *adapter = priv->adapter; | 350 | lbs_adapter *adapter = priv->adapter; |
351 | 351 | ||
352 | lbs_deb_enter(LBS_DEB_WEXT); | 352 | lbs_deb_enter(LBS_DEB_WEXT); |
353 | 353 | ||
@@ -360,7 +360,7 @@ static int wlan_set_frag(struct net_device *dev, struct iw_request_info *info, | |||
360 | adapter->fragthsd = fthr; | 360 | adapter->fragthsd = fthr; |
361 | } | 361 | } |
362 | 362 | ||
363 | ret = libertas_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB, | 363 | ret = lbs_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB, |
364 | CMD_ACT_SET, CMD_OPTION_WAITFORRSP, | 364 | CMD_ACT_SET, CMD_OPTION_WAITFORRSP, |
365 | OID_802_11_FRAGMENTATION_THRESHOLD, &fthr); | 365 | OID_802_11_FRAGMENTATION_THRESHOLD, &fthr); |
366 | 366 | ||
@@ -368,17 +368,17 @@ static int wlan_set_frag(struct net_device *dev, struct iw_request_info *info, | |||
368 | return ret; | 368 | return ret; |
369 | } | 369 | } |
370 | 370 | ||
371 | static int wlan_get_frag(struct net_device *dev, struct iw_request_info *info, | 371 | static int lbs_get_frag(struct net_device *dev, struct iw_request_info *info, |
372 | struct iw_param *vwrq, char *extra) | 372 | struct iw_param *vwrq, char *extra) |
373 | { | 373 | { |
374 | int ret = 0; | 374 | int ret = 0; |
375 | wlan_private *priv = dev->priv; | 375 | lbs_private *priv = dev->priv; |
376 | wlan_adapter *adapter = priv->adapter; | 376 | lbs_adapter *adapter = priv->adapter; |
377 | 377 | ||
378 | lbs_deb_enter(LBS_DEB_WEXT); | 378 | lbs_deb_enter(LBS_DEB_WEXT); |
379 | 379 | ||
380 | adapter->fragthsd = 0; | 380 | adapter->fragthsd = 0; |
381 | ret = libertas_prepare_and_send_command(priv, | 381 | ret = lbs_prepare_and_send_command(priv, |
382 | CMD_802_11_SNMP_MIB, | 382 | CMD_802_11_SNMP_MIB, |
383 | CMD_ACT_GET, CMD_OPTION_WAITFORRSP, | 383 | CMD_ACT_GET, CMD_OPTION_WAITFORRSP, |
384 | OID_802_11_FRAGMENTATION_THRESHOLD, NULL); | 384 | OID_802_11_FRAGMENTATION_THRESHOLD, NULL); |
@@ -395,11 +395,11 @@ out: | |||
395 | return ret; | 395 | return ret; |
396 | } | 396 | } |
397 | 397 | ||
398 | static int wlan_get_mode(struct net_device *dev, | 398 | static int lbs_get_mode(struct net_device *dev, |
399 | struct iw_request_info *info, u32 * uwrq, char *extra) | 399 | struct iw_request_info *info, u32 * uwrq, char *extra) |
400 | { | 400 | { |
401 | wlan_private *priv = dev->priv; | 401 | lbs_private *priv = dev->priv; |
402 | wlan_adapter *adapter = priv->adapter; | 402 | lbs_adapter *adapter = priv->adapter; |
403 | 403 | ||
404 | lbs_deb_enter(LBS_DEB_WEXT); | 404 | lbs_deb_enter(LBS_DEB_WEXT); |
405 | 405 | ||
@@ -421,17 +421,17 @@ static int mesh_wlan_get_mode(struct net_device *dev, | |||
421 | return 0; | 421 | return 0; |
422 | } | 422 | } |
423 | 423 | ||
424 | static int wlan_get_txpow(struct net_device *dev, | 424 | static int lbs_get_txpow(struct net_device *dev, |
425 | struct iw_request_info *info, | 425 | struct iw_request_info *info, |
426 | struct iw_param *vwrq, char *extra) | 426 | struct iw_param *vwrq, char *extra) |
427 | { | 427 | { |
428 | int ret = 0; | 428 | int ret = 0; |
429 | wlan_private *priv = dev->priv; | 429 | lbs_private *priv = dev->priv; |
430 | wlan_adapter *adapter = priv->adapter; | 430 | lbs_adapter *adapter = priv->adapter; |
431 | 431 | ||
432 | lbs_deb_enter(LBS_DEB_WEXT); | 432 | lbs_deb_enter(LBS_DEB_WEXT); |
433 | 433 | ||
434 | ret = libertas_prepare_and_send_command(priv, | 434 | ret = lbs_prepare_and_send_command(priv, |
435 | CMD_802_11_RF_TX_POWER, | 435 | CMD_802_11_RF_TX_POWER, |
436 | CMD_ACT_TX_POWER_OPT_GET, | 436 | CMD_ACT_TX_POWER_OPT_GET, |
437 | CMD_OPTION_WAITFORRSP, 0, NULL); | 437 | CMD_OPTION_WAITFORRSP, 0, NULL); |
@@ -454,12 +454,12 @@ out: | |||
454 | return ret; | 454 | return ret; |
455 | } | 455 | } |
456 | 456 | ||
457 | static int wlan_set_retry(struct net_device *dev, struct iw_request_info *info, | 457 | static int lbs_set_retry(struct net_device *dev, struct iw_request_info *info, |
458 | struct iw_param *vwrq, char *extra) | 458 | struct iw_param *vwrq, char *extra) |
459 | { | 459 | { |
460 | int ret = 0; | 460 | int ret = 0; |
461 | wlan_private *priv = dev->priv; | 461 | lbs_private *priv = dev->priv; |
462 | wlan_adapter *adapter = priv->adapter; | 462 | lbs_adapter *adapter = priv->adapter; |
463 | 463 | ||
464 | lbs_deb_enter(LBS_DEB_WEXT); | 464 | lbs_deb_enter(LBS_DEB_WEXT); |
465 | 465 | ||
@@ -474,7 +474,7 @@ static int wlan_set_retry(struct net_device *dev, struct iw_request_info *info, | |||
474 | /* Adding 1 to convert retry count to try count */ | 474 | /* Adding 1 to convert retry count to try count */ |
475 | adapter->txretrycount = vwrq->value + 1; | 475 | adapter->txretrycount = vwrq->value + 1; |
476 | 476 | ||
477 | ret = libertas_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB, | 477 | ret = lbs_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB, |
478 | CMD_ACT_SET, | 478 | CMD_ACT_SET, |
479 | CMD_OPTION_WAITFORRSP, | 479 | CMD_OPTION_WAITFORRSP, |
480 | OID_802_11_TX_RETRYCOUNT, NULL); | 480 | OID_802_11_TX_RETRYCOUNT, NULL); |
@@ -490,17 +490,17 @@ out: | |||
490 | return ret; | 490 | return ret; |
491 | } | 491 | } |
492 | 492 | ||
493 | static int wlan_get_retry(struct net_device *dev, struct iw_request_info *info, | 493 | static int lbs_get_retry(struct net_device *dev, struct iw_request_info *info, |
494 | struct iw_param *vwrq, char *extra) | 494 | struct iw_param *vwrq, char *extra) |
495 | { | 495 | { |
496 | wlan_private *priv = dev->priv; | 496 | lbs_private *priv = dev->priv; |
497 | wlan_adapter *adapter = priv->adapter; | 497 | lbs_adapter *adapter = priv->adapter; |
498 | int ret = 0; | 498 | int ret = 0; |
499 | 499 | ||
500 | lbs_deb_enter(LBS_DEB_WEXT); | 500 | lbs_deb_enter(LBS_DEB_WEXT); |
501 | 501 | ||
502 | adapter->txretrycount = 0; | 502 | adapter->txretrycount = 0; |
503 | ret = libertas_prepare_and_send_command(priv, | 503 | ret = lbs_prepare_and_send_command(priv, |
504 | CMD_802_11_SNMP_MIB, | 504 | CMD_802_11_SNMP_MIB, |
505 | CMD_ACT_GET, CMD_OPTION_WAITFORRSP, | 505 | CMD_ACT_GET, CMD_OPTION_WAITFORRSP, |
506 | OID_802_11_TX_RETRYCOUNT, NULL); | 506 | OID_802_11_TX_RETRYCOUNT, NULL); |
@@ -558,12 +558,12 @@ static inline void sort_channels(struct iw_freq *freq, int num) | |||
558 | * @param extra A pointer to extra data buf | 558 | * @param extra A pointer to extra data buf |
559 | * @return 0 --success, otherwise fail | 559 | * @return 0 --success, otherwise fail |
560 | */ | 560 | */ |
561 | static int wlan_get_range(struct net_device *dev, struct iw_request_info *info, | 561 | static int lbs_get_range(struct net_device *dev, struct iw_request_info *info, |
562 | struct iw_point *dwrq, char *extra) | 562 | struct iw_point *dwrq, char *extra) |
563 | { | 563 | { |
564 | int i, j; | 564 | int i, j; |
565 | wlan_private *priv = dev->priv; | 565 | lbs_private *priv = dev->priv; |
566 | wlan_adapter *adapter = priv->adapter; | 566 | lbs_adapter *adapter = priv->adapter; |
567 | struct iw_range *range = (struct iw_range *)extra; | 567 | struct iw_range *range = (struct iw_range *)extra; |
568 | struct chan_freq_power *cfp; | 568 | struct chan_freq_power *cfp; |
569 | u8 rates[MAX_RATES + 1]; | 569 | u8 rates[MAX_RATES + 1]; |
@@ -589,7 +589,7 @@ static int wlan_get_range(struct net_device *dev, struct iw_request_info *info, | |||
589 | 589 | ||
590 | range->num_frequency = 0; | 590 | range->num_frequency = 0; |
591 | if (priv->adapter->enable11d && | 591 | if (priv->adapter->enable11d && |
592 | adapter->connect_status == LIBERTAS_CONNECTED) { | 592 | adapter->connect_status == LBS_CONNECTED) { |
593 | u8 chan_no; | 593 | u8 chan_no; |
594 | u8 band; | 594 | u8 band; |
595 | 595 | ||
@@ -610,7 +610,7 @@ static int wlan_get_range(struct net_device *dev, struct iw_request_info *info, | |||
610 | lbs_deb_wext("chan_no %d\n", chan_no); | 610 | lbs_deb_wext("chan_no %d\n", chan_no); |
611 | range->freq[range->num_frequency].i = (long)chan_no; | 611 | range->freq[range->num_frequency].i = (long)chan_no; |
612 | range->freq[range->num_frequency].m = | 612 | range->freq[range->num_frequency].m = |
613 | (long)libertas_chan_2_freq(chan_no, band) * 100000; | 613 | (long)lbs_chan_2_freq(chan_no, band) * 100000; |
614 | range->freq[range->num_frequency].e = 1; | 614 | range->freq[range->num_frequency].e = 1; |
615 | range->num_frequency++; | 615 | range->num_frequency++; |
616 | } | 616 | } |
@@ -735,11 +735,11 @@ out: | |||
735 | return 0; | 735 | return 0; |
736 | } | 736 | } |
737 | 737 | ||
738 | static int wlan_set_power(struct net_device *dev, struct iw_request_info *info, | 738 | static int lbs_set_power(struct net_device *dev, struct iw_request_info *info, |
739 | struct iw_param *vwrq, char *extra) | 739 | struct iw_param *vwrq, char *extra) |
740 | { | 740 | { |
741 | wlan_private *priv = dev->priv; | 741 | lbs_private *priv = dev->priv; |
742 | wlan_adapter *adapter = priv->adapter; | 742 | lbs_adapter *adapter = priv->adapter; |
743 | 743 | ||
744 | lbs_deb_enter(LBS_DEB_WEXT); | 744 | lbs_deb_enter(LBS_DEB_WEXT); |
745 | 745 | ||
@@ -748,9 +748,9 @@ static int wlan_set_power(struct net_device *dev, struct iw_request_info *info, | |||
748 | */ | 748 | */ |
749 | 749 | ||
750 | if (vwrq->disabled) { | 750 | if (vwrq->disabled) { |
751 | adapter->psmode = WLAN802_11POWERMODECAM; | 751 | adapter->psmode = LBS802_11POWERMODECAM; |
752 | if (adapter->psstate != PS_STATE_FULL_POWER) { | 752 | if (adapter->psstate != PS_STATE_FULL_POWER) { |
753 | libertas_ps_wakeup(priv, CMD_OPTION_WAITFORRSP); | 753 | lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP); |
754 | } | 754 | } |
755 | 755 | ||
756 | return 0; | 756 | return 0; |
@@ -765,33 +765,33 @@ static int wlan_set_power(struct net_device *dev, struct iw_request_info *info, | |||
765 | return -EINVAL; | 765 | return -EINVAL; |
766 | } | 766 | } |
767 | 767 | ||
768 | if (adapter->psmode != WLAN802_11POWERMODECAM) { | 768 | if (adapter->psmode != LBS802_11POWERMODECAM) { |
769 | return 0; | 769 | return 0; |
770 | } | 770 | } |
771 | 771 | ||
772 | adapter->psmode = WLAN802_11POWERMODEMAX_PSP; | 772 | adapter->psmode = LBS802_11POWERMODEMAX_PSP; |
773 | 773 | ||
774 | if (adapter->connect_status == LIBERTAS_CONNECTED) { | 774 | if (adapter->connect_status == LBS_CONNECTED) { |
775 | libertas_ps_sleep(priv, CMD_OPTION_WAITFORRSP); | 775 | lbs_ps_sleep(priv, CMD_OPTION_WAITFORRSP); |
776 | } | 776 | } |
777 | 777 | ||
778 | lbs_deb_leave(LBS_DEB_WEXT); | 778 | lbs_deb_leave(LBS_DEB_WEXT); |
779 | return 0; | 779 | return 0; |
780 | } | 780 | } |
781 | 781 | ||
782 | static int wlan_get_power(struct net_device *dev, struct iw_request_info *info, | 782 | static int lbs_get_power(struct net_device *dev, struct iw_request_info *info, |
783 | struct iw_param *vwrq, char *extra) | 783 | struct iw_param *vwrq, char *extra) |
784 | { | 784 | { |
785 | wlan_private *priv = dev->priv; | 785 | lbs_private *priv = dev->priv; |
786 | wlan_adapter *adapter = priv->adapter; | 786 | lbs_adapter *adapter = priv->adapter; |
787 | int mode; | 787 | int mode; |
788 | 788 | ||
789 | lbs_deb_enter(LBS_DEB_WEXT); | 789 | lbs_deb_enter(LBS_DEB_WEXT); |
790 | 790 | ||
791 | mode = adapter->psmode; | 791 | mode = adapter->psmode; |
792 | 792 | ||
793 | if ((vwrq->disabled = (mode == WLAN802_11POWERMODECAM)) | 793 | if ((vwrq->disabled = (mode == LBS802_11POWERMODECAM)) |
794 | || adapter->connect_status == LIBERTAS_DISCONNECTED) | 794 | || adapter->connect_status == LBS_DISCONNECTED) |
795 | { | 795 | { |
796 | goto out; | 796 | goto out; |
797 | } | 797 | } |
@@ -803,7 +803,7 @@ out: | |||
803 | return 0; | 803 | return 0; |
804 | } | 804 | } |
805 | 805 | ||
806 | static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev) | 806 | static struct iw_statistics *lbs_get_wireless_stats(struct net_device *dev) |
807 | { | 807 | { |
808 | enum { | 808 | enum { |
809 | POOR = 30, | 809 | POOR = 30, |
@@ -813,8 +813,8 @@ static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev) | |||
813 | EXCELLENT = 95, | 813 | EXCELLENT = 95, |
814 | PERFECT = 100 | 814 | PERFECT = 100 |
815 | }; | 815 | }; |
816 | wlan_private *priv = dev->priv; | 816 | lbs_private *priv = dev->priv; |
817 | wlan_adapter *adapter = priv->adapter; | 817 | lbs_adapter *adapter = priv->adapter; |
818 | u32 rssi_qual; | 818 | u32 rssi_qual; |
819 | u32 tx_qual; | 819 | u32 tx_qual; |
820 | u32 quality = 0; | 820 | u32 quality = 0; |
@@ -827,7 +827,7 @@ static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev) | |||
827 | priv->wstats.status = adapter->mode; | 827 | priv->wstats.status = adapter->mode; |
828 | 828 | ||
829 | /* If we're not associated, all quality values are meaningless */ | 829 | /* If we're not associated, all quality values are meaningless */ |
830 | if (adapter->connect_status != LIBERTAS_CONNECTED) | 830 | if (adapter->connect_status != LBS_CONNECTED) |
831 | goto out; | 831 | goto out; |
832 | 832 | ||
833 | /* Quality by RSSI */ | 833 | /* Quality by RSSI */ |
@@ -890,9 +890,9 @@ static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev) | |||
890 | stats_valid = 1; | 890 | stats_valid = 1; |
891 | 891 | ||
892 | /* update stats asynchronously for future calls */ | 892 | /* update stats asynchronously for future calls */ |
893 | libertas_prepare_and_send_command(priv, CMD_802_11_RSSI, 0, | 893 | lbs_prepare_and_send_command(priv, CMD_802_11_RSSI, 0, |
894 | 0, 0, NULL); | 894 | 0, 0, NULL); |
895 | libertas_prepare_and_send_command(priv, CMD_802_11_GET_LOG, 0, | 895 | lbs_prepare_and_send_command(priv, CMD_802_11_GET_LOG, 0, |
896 | 0, 0, NULL); | 896 | 0, 0, NULL); |
897 | out: | 897 | out: |
898 | if (!stats_valid) { | 898 | if (!stats_valid) { |
@@ -912,19 +912,19 @@ out: | |||
912 | 912 | ||
913 | } | 913 | } |
914 | 914 | ||
915 | static int wlan_set_freq(struct net_device *dev, struct iw_request_info *info, | 915 | static int lbs_set_freq(struct net_device *dev, struct iw_request_info *info, |
916 | struct iw_freq *fwrq, char *extra) | 916 | struct iw_freq *fwrq, char *extra) |
917 | { | 917 | { |
918 | int ret = -EINVAL; | 918 | int ret = -EINVAL; |
919 | wlan_private *priv = dev->priv; | 919 | lbs_private *priv = dev->priv; |
920 | wlan_adapter *adapter = priv->adapter; | 920 | lbs_adapter *adapter = priv->adapter; |
921 | struct chan_freq_power *cfp; | 921 | struct chan_freq_power *cfp; |
922 | struct assoc_request * assoc_req; | 922 | struct assoc_request * assoc_req; |
923 | 923 | ||
924 | lbs_deb_enter(LBS_DEB_WEXT); | 924 | lbs_deb_enter(LBS_DEB_WEXT); |
925 | 925 | ||
926 | mutex_lock(&adapter->lock); | 926 | mutex_lock(&adapter->lock); |
927 | assoc_req = wlan_get_association_request(adapter); | 927 | assoc_req = lbs_get_association_request(adapter); |
928 | if (!assoc_req) { | 928 | if (!assoc_req) { |
929 | ret = -ENOMEM; | 929 | ret = -ENOMEM; |
930 | goto out; | 930 | goto out; |
@@ -949,7 +949,7 @@ static int wlan_set_freq(struct net_device *dev, struct iw_request_info *info, | |||
949 | goto out; | 949 | goto out; |
950 | } | 950 | } |
951 | 951 | ||
952 | cfp = libertas_find_cfp_by_band_and_channel(adapter, 0, fwrq->m); | 952 | cfp = lbs_find_cfp_by_band_and_channel(adapter, 0, fwrq->m); |
953 | if (!cfp) { | 953 | if (!cfp) { |
954 | goto out; | 954 | goto out; |
955 | } | 955 | } |
@@ -960,9 +960,9 @@ static int wlan_set_freq(struct net_device *dev, struct iw_request_info *info, | |||
960 | out: | 960 | out: |
961 | if (ret == 0) { | 961 | if (ret == 0) { |
962 | set_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags); | 962 | set_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags); |
963 | libertas_postpone_association_work(priv); | 963 | lbs_postpone_association_work(priv); |
964 | } else { | 964 | } else { |
965 | libertas_cancel_association_work(priv); | 965 | lbs_cancel_association_work(priv); |
966 | } | 966 | } |
967 | mutex_unlock(&adapter->lock); | 967 | mutex_unlock(&adapter->lock); |
968 | 968 | ||
@@ -970,11 +970,11 @@ out: | |||
970 | return ret; | 970 | return ret; |
971 | } | 971 | } |
972 | 972 | ||
973 | static int wlan_set_rate(struct net_device *dev, struct iw_request_info *info, | 973 | static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info, |
974 | struct iw_param *vwrq, char *extra) | 974 | struct iw_param *vwrq, char *extra) |
975 | { | 975 | { |
976 | wlan_private *priv = dev->priv; | 976 | lbs_private *priv = dev->priv; |
977 | wlan_adapter *adapter = priv->adapter; | 977 | lbs_adapter *adapter = priv->adapter; |
978 | u32 new_rate; | 978 | u32 new_rate; |
979 | u16 action; | 979 | u16 action; |
980 | int ret = -EINVAL; | 980 | int ret = -EINVAL; |
@@ -1006,7 +1006,7 @@ static int wlan_set_rate(struct net_device *dev, struct iw_request_info *info, | |||
1006 | adapter->auto_rate = 0; | 1006 | adapter->auto_rate = 0; |
1007 | } | 1007 | } |
1008 | 1008 | ||
1009 | ret = libertas_prepare_and_send_command(priv, CMD_802_11_DATA_RATE, | 1009 | ret = lbs_prepare_and_send_command(priv, CMD_802_11_DATA_RATE, |
1010 | action, CMD_OPTION_WAITFORRSP, 0, NULL); | 1010 | action, CMD_OPTION_WAITFORRSP, 0, NULL); |
1011 | 1011 | ||
1012 | out: | 1012 | out: |
@@ -1014,15 +1014,15 @@ out: | |||
1014 | return ret; | 1014 | return ret; |
1015 | } | 1015 | } |
1016 | 1016 | ||
1017 | static int wlan_get_rate(struct net_device *dev, struct iw_request_info *info, | 1017 | static int lbs_get_rate(struct net_device *dev, struct iw_request_info *info, |
1018 | struct iw_param *vwrq, char *extra) | 1018 | struct iw_param *vwrq, char *extra) |
1019 | { | 1019 | { |
1020 | wlan_private *priv = dev->priv; | 1020 | lbs_private *priv = dev->priv; |
1021 | wlan_adapter *adapter = priv->adapter; | 1021 | lbs_adapter *adapter = priv->adapter; |
1022 | 1022 | ||
1023 | lbs_deb_enter(LBS_DEB_WEXT); | 1023 | lbs_deb_enter(LBS_DEB_WEXT); |
1024 | 1024 | ||
1025 | if (adapter->connect_status == LIBERTAS_CONNECTED) { | 1025 | if (adapter->connect_status == LBS_CONNECTED) { |
1026 | vwrq->value = adapter->cur_rate * 500000; | 1026 | vwrq->value = adapter->cur_rate * 500000; |
1027 | 1027 | ||
1028 | if (adapter->auto_rate) | 1028 | if (adapter->auto_rate) |
@@ -1039,12 +1039,12 @@ static int wlan_get_rate(struct net_device *dev, struct iw_request_info *info, | |||
1039 | return 0; | 1039 | return 0; |
1040 | } | 1040 | } |
1041 | 1041 | ||
1042 | static int wlan_set_mode(struct net_device *dev, | 1042 | static int lbs_set_mode(struct net_device *dev, |
1043 | struct iw_request_info *info, u32 * uwrq, char *extra) | 1043 | struct iw_request_info *info, u32 * uwrq, char *extra) |
1044 | { | 1044 | { |
1045 | int ret = 0; | 1045 | int ret = 0; |
1046 | wlan_private *priv = dev->priv; | 1046 | lbs_private *priv = dev->priv; |
1047 | wlan_adapter *adapter = priv->adapter; | 1047 | lbs_adapter *adapter = priv->adapter; |
1048 | struct assoc_request * assoc_req; | 1048 | struct assoc_request * assoc_req; |
1049 | 1049 | ||
1050 | lbs_deb_enter(LBS_DEB_WEXT); | 1050 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -1058,14 +1058,14 @@ static int wlan_set_mode(struct net_device *dev, | |||
1058 | } | 1058 | } |
1059 | 1059 | ||
1060 | mutex_lock(&adapter->lock); | 1060 | mutex_lock(&adapter->lock); |
1061 | assoc_req = wlan_get_association_request(adapter); | 1061 | assoc_req = lbs_get_association_request(adapter); |
1062 | if (!assoc_req) { | 1062 | if (!assoc_req) { |
1063 | ret = -ENOMEM; | 1063 | ret = -ENOMEM; |
1064 | libertas_cancel_association_work(priv); | 1064 | lbs_cancel_association_work(priv); |
1065 | } else { | 1065 | } else { |
1066 | assoc_req->mode = *uwrq; | 1066 | assoc_req->mode = *uwrq; |
1067 | set_bit(ASSOC_FLAG_MODE, &assoc_req->flags); | 1067 | set_bit(ASSOC_FLAG_MODE, &assoc_req->flags); |
1068 | libertas_postpone_association_work(priv); | 1068 | lbs_postpone_association_work(priv); |
1069 | lbs_deb_wext("Switching to mode: 0x%x\n", *uwrq); | 1069 | lbs_deb_wext("Switching to mode: 0x%x\n", *uwrq); |
1070 | } | 1070 | } |
1071 | mutex_unlock(&adapter->lock); | 1071 | mutex_unlock(&adapter->lock); |
@@ -1085,12 +1085,12 @@ out: | |||
1085 | * @param extra A pointer to extra data buf | 1085 | * @param extra A pointer to extra data buf |
1086 | * @return 0 --success, otherwise fail | 1086 | * @return 0 --success, otherwise fail |
1087 | */ | 1087 | */ |
1088 | static int wlan_get_encode(struct net_device *dev, | 1088 | static int lbs_get_encode(struct net_device *dev, |
1089 | struct iw_request_info *info, | 1089 | struct iw_request_info *info, |
1090 | struct iw_point *dwrq, u8 * extra) | 1090 | struct iw_point *dwrq, u8 * extra) |
1091 | { | 1091 | { |
1092 | wlan_private *priv = dev->priv; | 1092 | lbs_private *priv = dev->priv; |
1093 | wlan_adapter *adapter = priv->adapter; | 1093 | lbs_adapter *adapter = priv->adapter; |
1094 | int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; | 1094 | int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; |
1095 | 1095 | ||
1096 | lbs_deb_enter(LBS_DEB_WEXT); | 1096 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -1171,7 +1171,7 @@ static int wlan_get_encode(struct net_device *dev, | |||
1171 | * @param set_tx_key Force set TX key (1 = yes, 0 = no) | 1171 | * @param set_tx_key Force set TX key (1 = yes, 0 = no) |
1172 | * @return 0 --success, otherwise fail | 1172 | * @return 0 --success, otherwise fail |
1173 | */ | 1173 | */ |
1174 | static int wlan_set_wep_key(struct assoc_request *assoc_req, | 1174 | static int lbs_set_wep_key(struct assoc_request *assoc_req, |
1175 | const char *key_material, | 1175 | const char *key_material, |
1176 | u16 key_length, | 1176 | u16 key_length, |
1177 | u16 index, | 1177 | u16 index, |
@@ -1289,20 +1289,20 @@ static void disable_wpa(struct assoc_request *assoc_req) | |||
1289 | * @param extra A pointer to extra data buf | 1289 | * @param extra A pointer to extra data buf |
1290 | * @return 0 --success, otherwise fail | 1290 | * @return 0 --success, otherwise fail |
1291 | */ | 1291 | */ |
1292 | static int wlan_set_encode(struct net_device *dev, | 1292 | static int lbs_set_encode(struct net_device *dev, |
1293 | struct iw_request_info *info, | 1293 | struct iw_request_info *info, |
1294 | struct iw_point *dwrq, char *extra) | 1294 | struct iw_point *dwrq, char *extra) |
1295 | { | 1295 | { |
1296 | int ret = 0; | 1296 | int ret = 0; |
1297 | wlan_private *priv = dev->priv; | 1297 | lbs_private *priv = dev->priv; |
1298 | wlan_adapter *adapter = priv->adapter; | 1298 | lbs_adapter *adapter = priv->adapter; |
1299 | struct assoc_request * assoc_req; | 1299 | struct assoc_request * assoc_req; |
1300 | u16 is_default = 0, index = 0, set_tx_key = 0; | 1300 | u16 is_default = 0, index = 0, set_tx_key = 0; |
1301 | 1301 | ||
1302 | lbs_deb_enter(LBS_DEB_WEXT); | 1302 | lbs_deb_enter(LBS_DEB_WEXT); |
1303 | 1303 | ||
1304 | mutex_lock(&adapter->lock); | 1304 | mutex_lock(&adapter->lock); |
1305 | assoc_req = wlan_get_association_request(adapter); | 1305 | assoc_req = lbs_get_association_request(adapter); |
1306 | if (!assoc_req) { | 1306 | if (!assoc_req) { |
1307 | ret = -ENOMEM; | 1307 | ret = -ENOMEM; |
1308 | goto out; | 1308 | goto out; |
@@ -1328,7 +1328,7 @@ static int wlan_set_encode(struct net_device *dev, | |||
1328 | if (!assoc_req->secinfo.wep_enabled || (dwrq->length == 0 && !is_default)) | 1328 | if (!assoc_req->secinfo.wep_enabled || (dwrq->length == 0 && !is_default)) |
1329 | set_tx_key = 1; | 1329 | set_tx_key = 1; |
1330 | 1330 | ||
1331 | ret = wlan_set_wep_key(assoc_req, extra, dwrq->length, index, set_tx_key); | 1331 | ret = lbs_set_wep_key(assoc_req, extra, dwrq->length, index, set_tx_key); |
1332 | if (ret) | 1332 | if (ret) |
1333 | goto out; | 1333 | goto out; |
1334 | 1334 | ||
@@ -1346,9 +1346,9 @@ static int wlan_set_encode(struct net_device *dev, | |||
1346 | out: | 1346 | out: |
1347 | if (ret == 0) { | 1347 | if (ret == 0) { |
1348 | set_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags); | 1348 | set_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags); |
1349 | libertas_postpone_association_work(priv); | 1349 | lbs_postpone_association_work(priv); |
1350 | } else { | 1350 | } else { |
1351 | libertas_cancel_association_work(priv); | 1351 | lbs_cancel_association_work(priv); |
1352 | } | 1352 | } |
1353 | mutex_unlock(&adapter->lock); | 1353 | mutex_unlock(&adapter->lock); |
1354 | 1354 | ||
@@ -1365,14 +1365,14 @@ out: | |||
1365 | * @param extra A pointer to extra data buf | 1365 | * @param extra A pointer to extra data buf |
1366 | * @return 0 on success, otherwise failure | 1366 | * @return 0 on success, otherwise failure |
1367 | */ | 1367 | */ |
1368 | static int wlan_get_encodeext(struct net_device *dev, | 1368 | static int lbs_get_encodeext(struct net_device *dev, |
1369 | struct iw_request_info *info, | 1369 | struct iw_request_info *info, |
1370 | struct iw_point *dwrq, | 1370 | struct iw_point *dwrq, |
1371 | char *extra) | 1371 | char *extra) |
1372 | { | 1372 | { |
1373 | int ret = -EINVAL; | 1373 | int ret = -EINVAL; |
1374 | wlan_private *priv = dev->priv; | 1374 | lbs_private *priv = dev->priv; |
1375 | wlan_adapter *adapter = priv->adapter; | 1375 | lbs_adapter *adapter = priv->adapter; |
1376 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; | 1376 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; |
1377 | int index, max_key_len; | 1377 | int index, max_key_len; |
1378 | 1378 | ||
@@ -1472,14 +1472,14 @@ out: | |||
1472 | * @param extra A pointer to extra data buf | 1472 | * @param extra A pointer to extra data buf |
1473 | * @return 0 --success, otherwise fail | 1473 | * @return 0 --success, otherwise fail |
1474 | */ | 1474 | */ |
1475 | static int wlan_set_encodeext(struct net_device *dev, | 1475 | static int lbs_set_encodeext(struct net_device *dev, |
1476 | struct iw_request_info *info, | 1476 | struct iw_request_info *info, |
1477 | struct iw_point *dwrq, | 1477 | struct iw_point *dwrq, |
1478 | char *extra) | 1478 | char *extra) |
1479 | { | 1479 | { |
1480 | int ret = 0; | 1480 | int ret = 0; |
1481 | wlan_private *priv = dev->priv; | 1481 | lbs_private *priv = dev->priv; |
1482 | wlan_adapter *adapter = priv->adapter; | 1482 | lbs_adapter *adapter = priv->adapter; |
1483 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; | 1483 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; |
1484 | int alg = ext->alg; | 1484 | int alg = ext->alg; |
1485 | struct assoc_request * assoc_req; | 1485 | struct assoc_request * assoc_req; |
@@ -1487,7 +1487,7 @@ static int wlan_set_encodeext(struct net_device *dev, | |||
1487 | lbs_deb_enter(LBS_DEB_WEXT); | 1487 | lbs_deb_enter(LBS_DEB_WEXT); |
1488 | 1488 | ||
1489 | mutex_lock(&adapter->lock); | 1489 | mutex_lock(&adapter->lock); |
1490 | assoc_req = wlan_get_association_request(adapter); | 1490 | assoc_req = lbs_get_association_request(adapter); |
1491 | if (!assoc_req) { | 1491 | if (!assoc_req) { |
1492 | ret = -ENOMEM; | 1492 | ret = -ENOMEM; |
1493 | goto out; | 1493 | goto out; |
@@ -1514,7 +1514,7 @@ static int wlan_set_encodeext(struct net_device *dev, | |||
1514 | set_tx_key = 1; | 1514 | set_tx_key = 1; |
1515 | 1515 | ||
1516 | /* Copy key to driver */ | 1516 | /* Copy key to driver */ |
1517 | ret = wlan_set_wep_key (assoc_req, ext->key, ext->key_len, index, | 1517 | ret = lbs_set_wep_key(assoc_req, ext->key, ext->key_len, index, |
1518 | set_tx_key); | 1518 | set_tx_key); |
1519 | if (ret) | 1519 | if (ret) |
1520 | goto out; | 1520 | goto out; |
@@ -1587,9 +1587,9 @@ static int wlan_set_encodeext(struct net_device *dev, | |||
1587 | 1587 | ||
1588 | out: | 1588 | out: |
1589 | if (ret == 0) { | 1589 | if (ret == 0) { |
1590 | libertas_postpone_association_work(priv); | 1590 | lbs_postpone_association_work(priv); |
1591 | } else { | 1591 | } else { |
1592 | libertas_cancel_association_work(priv); | 1592 | lbs_cancel_association_work(priv); |
1593 | } | 1593 | } |
1594 | mutex_unlock(&adapter->lock); | 1594 | mutex_unlock(&adapter->lock); |
1595 | 1595 | ||
@@ -1598,20 +1598,20 @@ out: | |||
1598 | } | 1598 | } |
1599 | 1599 | ||
1600 | 1600 | ||
1601 | static int wlan_set_genie(struct net_device *dev, | 1601 | static int lbs_set_genie(struct net_device *dev, |
1602 | struct iw_request_info *info, | 1602 | struct iw_request_info *info, |
1603 | struct iw_point *dwrq, | 1603 | struct iw_point *dwrq, |
1604 | char *extra) | 1604 | char *extra) |
1605 | { | 1605 | { |
1606 | wlan_private *priv = dev->priv; | 1606 | lbs_private *priv = dev->priv; |
1607 | wlan_adapter *adapter = priv->adapter; | 1607 | lbs_adapter *adapter = priv->adapter; |
1608 | int ret = 0; | 1608 | int ret = 0; |
1609 | struct assoc_request * assoc_req; | 1609 | struct assoc_request * assoc_req; |
1610 | 1610 | ||
1611 | lbs_deb_enter(LBS_DEB_WEXT); | 1611 | lbs_deb_enter(LBS_DEB_WEXT); |
1612 | 1612 | ||
1613 | mutex_lock(&adapter->lock); | 1613 | mutex_lock(&adapter->lock); |
1614 | assoc_req = wlan_get_association_request(adapter); | 1614 | assoc_req = lbs_get_association_request(adapter); |
1615 | if (!assoc_req) { | 1615 | if (!assoc_req) { |
1616 | ret = -ENOMEM; | 1616 | ret = -ENOMEM; |
1617 | goto out; | 1617 | goto out; |
@@ -1634,9 +1634,9 @@ static int wlan_set_genie(struct net_device *dev, | |||
1634 | out: | 1634 | out: |
1635 | if (ret == 0) { | 1635 | if (ret == 0) { |
1636 | set_bit(ASSOC_FLAG_WPA_IE, &assoc_req->flags); | 1636 | set_bit(ASSOC_FLAG_WPA_IE, &assoc_req->flags); |
1637 | libertas_postpone_association_work(priv); | 1637 | lbs_postpone_association_work(priv); |
1638 | } else { | 1638 | } else { |
1639 | libertas_cancel_association_work(priv); | 1639 | lbs_cancel_association_work(priv); |
1640 | } | 1640 | } |
1641 | mutex_unlock(&adapter->lock); | 1641 | mutex_unlock(&adapter->lock); |
1642 | 1642 | ||
@@ -1644,14 +1644,14 @@ out: | |||
1644 | return ret; | 1644 | return ret; |
1645 | } | 1645 | } |
1646 | 1646 | ||
1647 | static int wlan_get_genie(struct net_device *dev, | 1647 | static int lbs_get_genie(struct net_device *dev, |
1648 | struct iw_request_info *info, | 1648 | struct iw_request_info *info, |
1649 | struct iw_point *dwrq, | 1649 | struct iw_point *dwrq, |
1650 | char *extra) | 1650 | char *extra) |
1651 | { | 1651 | { |
1652 | int ret = 0; | 1652 | int ret = 0; |
1653 | wlan_private *priv = dev->priv; | 1653 | lbs_private *priv = dev->priv; |
1654 | wlan_adapter *adapter = priv->adapter; | 1654 | lbs_adapter *adapter = priv->adapter; |
1655 | 1655 | ||
1656 | lbs_deb_enter(LBS_DEB_WEXT); | 1656 | lbs_deb_enter(LBS_DEB_WEXT); |
1657 | 1657 | ||
@@ -1674,13 +1674,13 @@ out: | |||
1674 | } | 1674 | } |
1675 | 1675 | ||
1676 | 1676 | ||
1677 | static int wlan_set_auth(struct net_device *dev, | 1677 | static int lbs_set_auth(struct net_device *dev, |
1678 | struct iw_request_info *info, | 1678 | struct iw_request_info *info, |
1679 | struct iw_param *dwrq, | 1679 | struct iw_param *dwrq, |
1680 | char *extra) | 1680 | char *extra) |
1681 | { | 1681 | { |
1682 | wlan_private *priv = dev->priv; | 1682 | lbs_private *priv = dev->priv; |
1683 | wlan_adapter *adapter = priv->adapter; | 1683 | lbs_adapter *adapter = priv->adapter; |
1684 | struct assoc_request * assoc_req; | 1684 | struct assoc_request * assoc_req; |
1685 | int ret = 0; | 1685 | int ret = 0; |
1686 | int updated = 0; | 1686 | int updated = 0; |
@@ -1688,7 +1688,7 @@ static int wlan_set_auth(struct net_device *dev, | |||
1688 | lbs_deb_enter(LBS_DEB_WEXT); | 1688 | lbs_deb_enter(LBS_DEB_WEXT); |
1689 | 1689 | ||
1690 | mutex_lock(&adapter->lock); | 1690 | mutex_lock(&adapter->lock); |
1691 | assoc_req = wlan_get_association_request(adapter); | 1691 | assoc_req = lbs_get_association_request(adapter); |
1692 | if (!assoc_req) { | 1692 | if (!assoc_req) { |
1693 | ret = -ENOMEM; | 1693 | ret = -ENOMEM; |
1694 | goto out; | 1694 | goto out; |
@@ -1763,9 +1763,9 @@ out: | |||
1763 | if (ret == 0) { | 1763 | if (ret == 0) { |
1764 | if (updated) | 1764 | if (updated) |
1765 | set_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags); | 1765 | set_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags); |
1766 | libertas_postpone_association_work(priv); | 1766 | lbs_postpone_association_work(priv); |
1767 | } else if (ret != -EOPNOTSUPP) { | 1767 | } else if (ret != -EOPNOTSUPP) { |
1768 | libertas_cancel_association_work(priv); | 1768 | lbs_cancel_association_work(priv); |
1769 | } | 1769 | } |
1770 | mutex_unlock(&adapter->lock); | 1770 | mutex_unlock(&adapter->lock); |
1771 | 1771 | ||
@@ -1773,14 +1773,14 @@ out: | |||
1773 | return ret; | 1773 | return ret; |
1774 | } | 1774 | } |
1775 | 1775 | ||
1776 | static int wlan_get_auth(struct net_device *dev, | 1776 | static int lbs_get_auth(struct net_device *dev, |
1777 | struct iw_request_info *info, | 1777 | struct iw_request_info *info, |
1778 | struct iw_param *dwrq, | 1778 | struct iw_param *dwrq, |
1779 | char *extra) | 1779 | char *extra) |
1780 | { | 1780 | { |
1781 | int ret = 0; | 1781 | int ret = 0; |
1782 | wlan_private *priv = dev->priv; | 1782 | lbs_private *priv = dev->priv; |
1783 | wlan_adapter *adapter = priv->adapter; | 1783 | lbs_adapter *adapter = priv->adapter; |
1784 | 1784 | ||
1785 | lbs_deb_enter(LBS_DEB_WEXT); | 1785 | lbs_deb_enter(LBS_DEB_WEXT); |
1786 | 1786 | ||
@@ -1813,25 +1813,25 @@ static int wlan_get_auth(struct net_device *dev, | |||
1813 | } | 1813 | } |
1814 | 1814 | ||
1815 | 1815 | ||
1816 | static int wlan_set_txpow(struct net_device *dev, struct iw_request_info *info, | 1816 | static int lbs_set_txpow(struct net_device *dev, struct iw_request_info *info, |
1817 | struct iw_param *vwrq, char *extra) | 1817 | struct iw_param *vwrq, char *extra) |
1818 | { | 1818 | { |
1819 | int ret = 0; | 1819 | int ret = 0; |
1820 | wlan_private *priv = dev->priv; | 1820 | lbs_private *priv = dev->priv; |
1821 | wlan_adapter *adapter = priv->adapter; | 1821 | lbs_adapter *adapter = priv->adapter; |
1822 | 1822 | ||
1823 | u16 dbm; | 1823 | u16 dbm; |
1824 | 1824 | ||
1825 | lbs_deb_enter(LBS_DEB_WEXT); | 1825 | lbs_deb_enter(LBS_DEB_WEXT); |
1826 | 1826 | ||
1827 | if (vwrq->disabled) { | 1827 | if (vwrq->disabled) { |
1828 | wlan_radio_ioctl(priv, RADIO_OFF); | 1828 | lbs_radio_ioctl(priv, RADIO_OFF); |
1829 | return 0; | 1829 | return 0; |
1830 | } | 1830 | } |
1831 | 1831 | ||
1832 | adapter->preamble = CMD_TYPE_AUTO_PREAMBLE; | 1832 | adapter->preamble = CMD_TYPE_AUTO_PREAMBLE; |
1833 | 1833 | ||
1834 | wlan_radio_ioctl(priv, RADIO_ON); | 1834 | lbs_radio_ioctl(priv, RADIO_ON); |
1835 | 1835 | ||
1836 | /* Userspace check in iwrange if it should use dBm or mW, | 1836 | /* Userspace check in iwrange if it should use dBm or mW, |
1837 | * therefore this should never happen... Jean II */ | 1837 | * therefore this should never happen... Jean II */ |
@@ -1847,7 +1847,7 @@ static int wlan_set_txpow(struct net_device *dev, struct iw_request_info *info, | |||
1847 | 1847 | ||
1848 | lbs_deb_wext("txpower set %d dbm\n", dbm); | 1848 | lbs_deb_wext("txpower set %d dbm\n", dbm); |
1849 | 1849 | ||
1850 | ret = libertas_prepare_and_send_command(priv, | 1850 | ret = lbs_prepare_and_send_command(priv, |
1851 | CMD_802_11_RF_TX_POWER, | 1851 | CMD_802_11_RF_TX_POWER, |
1852 | CMD_ACT_TX_POWER_OPT_SET_LOW, | 1852 | CMD_ACT_TX_POWER_OPT_SET_LOW, |
1853 | CMD_OPTION_WAITFORRSP, 0, (void *)&dbm); | 1853 | CMD_OPTION_WAITFORRSP, 0, (void *)&dbm); |
@@ -1856,11 +1856,11 @@ static int wlan_set_txpow(struct net_device *dev, struct iw_request_info *info, | |||
1856 | return ret; | 1856 | return ret; |
1857 | } | 1857 | } |
1858 | 1858 | ||
1859 | static int wlan_get_essid(struct net_device *dev, struct iw_request_info *info, | 1859 | static int lbs_get_essid(struct net_device *dev, struct iw_request_info *info, |
1860 | struct iw_point *dwrq, char *extra) | 1860 | struct iw_point *dwrq, char *extra) |
1861 | { | 1861 | { |
1862 | wlan_private *priv = dev->priv; | 1862 | lbs_private *priv = dev->priv; |
1863 | wlan_adapter *adapter = priv->adapter; | 1863 | lbs_adapter *adapter = priv->adapter; |
1864 | 1864 | ||
1865 | lbs_deb_enter(LBS_DEB_WEXT); | 1865 | lbs_deb_enter(LBS_DEB_WEXT); |
1866 | 1866 | ||
@@ -1872,7 +1872,7 @@ static int wlan_get_essid(struct net_device *dev, struct iw_request_info *info, | |||
1872 | /* | 1872 | /* |
1873 | * Get the current SSID | 1873 | * Get the current SSID |
1874 | */ | 1874 | */ |
1875 | if (adapter->connect_status == LIBERTAS_CONNECTED) { | 1875 | if (adapter->connect_status == LBS_CONNECTED) { |
1876 | memcpy(extra, adapter->curbssparams.ssid, | 1876 | memcpy(extra, adapter->curbssparams.ssid, |
1877 | adapter->curbssparams.ssid_len); | 1877 | adapter->curbssparams.ssid_len); |
1878 | extra[adapter->curbssparams.ssid_len] = '\0'; | 1878 | extra[adapter->curbssparams.ssid_len] = '\0'; |
@@ -1892,11 +1892,11 @@ static int wlan_get_essid(struct net_device *dev, struct iw_request_info *info, | |||
1892 | return 0; | 1892 | return 0; |
1893 | } | 1893 | } |
1894 | 1894 | ||
1895 | static int wlan_set_essid(struct net_device *dev, struct iw_request_info *info, | 1895 | static int lbs_set_essid(struct net_device *dev, struct iw_request_info *info, |
1896 | struct iw_point *dwrq, char *extra) | 1896 | struct iw_point *dwrq, char *extra) |
1897 | { | 1897 | { |
1898 | wlan_private *priv = dev->priv; | 1898 | lbs_private *priv = dev->priv; |
1899 | wlan_adapter *adapter = priv->adapter; | 1899 | lbs_adapter *adapter = priv->adapter; |
1900 | int ret = 0; | 1900 | int ret = 0; |
1901 | u8 ssid[IW_ESSID_MAX_SIZE]; | 1901 | u8 ssid[IW_ESSID_MAX_SIZE]; |
1902 | u8 ssid_len = 0; | 1902 | u8 ssid_len = 0; |
@@ -1932,7 +1932,7 @@ out: | |||
1932 | mutex_lock(&adapter->lock); | 1932 | mutex_lock(&adapter->lock); |
1933 | if (ret == 0) { | 1933 | if (ret == 0) { |
1934 | /* Get or create the current association request */ | 1934 | /* Get or create the current association request */ |
1935 | assoc_req = wlan_get_association_request(adapter); | 1935 | assoc_req = lbs_get_association_request(adapter); |
1936 | if (!assoc_req) { | 1936 | if (!assoc_req) { |
1937 | ret = -ENOMEM; | 1937 | ret = -ENOMEM; |
1938 | } else { | 1938 | } else { |
@@ -1940,13 +1940,13 @@ out: | |||
1940 | memcpy(&assoc_req->ssid, &ssid, IW_ESSID_MAX_SIZE); | 1940 | memcpy(&assoc_req->ssid, &ssid, IW_ESSID_MAX_SIZE); |
1941 | assoc_req->ssid_len = ssid_len; | 1941 | assoc_req->ssid_len = ssid_len; |
1942 | set_bit(ASSOC_FLAG_SSID, &assoc_req->flags); | 1942 | set_bit(ASSOC_FLAG_SSID, &assoc_req->flags); |
1943 | libertas_postpone_association_work(priv); | 1943 | lbs_postpone_association_work(priv); |
1944 | } | 1944 | } |
1945 | } | 1945 | } |
1946 | 1946 | ||
1947 | /* Cancel the association request if there was an error */ | 1947 | /* Cancel the association request if there was an error */ |
1948 | if (ret != 0) { | 1948 | if (ret != 0) { |
1949 | libertas_cancel_association_work(priv); | 1949 | lbs_cancel_association_work(priv); |
1950 | } | 1950 | } |
1951 | 1951 | ||
1952 | mutex_unlock(&adapter->lock); | 1952 | mutex_unlock(&adapter->lock); |
@@ -1964,11 +1964,11 @@ out: | |||
1964 | * @param extra A pointer to extra data buf | 1964 | * @param extra A pointer to extra data buf |
1965 | * @return 0 --success, otherwise fail | 1965 | * @return 0 --success, otherwise fail |
1966 | */ | 1966 | */ |
1967 | static int wlan_set_wap(struct net_device *dev, struct iw_request_info *info, | 1967 | static int lbs_set_wap(struct net_device *dev, struct iw_request_info *info, |
1968 | struct sockaddr *awrq, char *extra) | 1968 | struct sockaddr *awrq, char *extra) |
1969 | { | 1969 | { |
1970 | wlan_private *priv = dev->priv; | 1970 | lbs_private *priv = dev->priv; |
1971 | wlan_adapter *adapter = priv->adapter; | 1971 | lbs_adapter *adapter = priv->adapter; |
1972 | struct assoc_request * assoc_req; | 1972 | struct assoc_request * assoc_req; |
1973 | int ret = 0; | 1973 | int ret = 0; |
1974 | DECLARE_MAC_BUF(mac); | 1974 | DECLARE_MAC_BUF(mac); |
@@ -1983,15 +1983,15 @@ static int wlan_set_wap(struct net_device *dev, struct iw_request_info *info, | |||
1983 | mutex_lock(&adapter->lock); | 1983 | mutex_lock(&adapter->lock); |
1984 | 1984 | ||
1985 | /* Get or create the current association request */ | 1985 | /* Get or create the current association request */ |
1986 | assoc_req = wlan_get_association_request(adapter); | 1986 | assoc_req = lbs_get_association_request(adapter); |
1987 | if (!assoc_req) { | 1987 | if (!assoc_req) { |
1988 | libertas_cancel_association_work(priv); | 1988 | lbs_cancel_association_work(priv); |
1989 | ret = -ENOMEM; | 1989 | ret = -ENOMEM; |
1990 | } else { | 1990 | } else { |
1991 | /* Copy the BSSID to the association request */ | 1991 | /* Copy the BSSID to the association request */ |
1992 | memcpy(&assoc_req->bssid, awrq->sa_data, ETH_ALEN); | 1992 | memcpy(&assoc_req->bssid, awrq->sa_data, ETH_ALEN); |
1993 | set_bit(ASSOC_FLAG_BSSID, &assoc_req->flags); | 1993 | set_bit(ASSOC_FLAG_BSSID, &assoc_req->flags); |
1994 | libertas_postpone_association_work(priv); | 1994 | lbs_postpone_association_work(priv); |
1995 | } | 1995 | } |
1996 | 1996 | ||
1997 | mutex_unlock(&adapter->lock); | 1997 | mutex_unlock(&adapter->lock); |
@@ -1999,7 +1999,7 @@ static int wlan_set_wap(struct net_device *dev, struct iw_request_info *info, | |||
1999 | return ret; | 1999 | return ret; |
2000 | } | 2000 | } |
2001 | 2001 | ||
2002 | void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen) | 2002 | void lbs_get_fwversion(lbs_adapter *adapter, char *fwversion, int maxlen) |
2003 | { | 2003 | { |
2004 | char fwver[32]; | 2004 | char fwver[32]; |
2005 | 2005 | ||
@@ -2025,19 +2025,19 @@ void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen) | |||
2025 | /* | 2025 | /* |
2026 | * iwconfig settable callbacks | 2026 | * iwconfig settable callbacks |
2027 | */ | 2027 | */ |
2028 | static const iw_handler wlan_handler[] = { | 2028 | static const iw_handler lbs_handler[] = { |
2029 | (iw_handler) NULL, /* SIOCSIWCOMMIT */ | 2029 | (iw_handler) NULL, /* SIOCSIWCOMMIT */ |
2030 | (iw_handler) wlan_get_name, /* SIOCGIWNAME */ | 2030 | (iw_handler) lbs_get_name, /* SIOCGIWNAME */ |
2031 | (iw_handler) NULL, /* SIOCSIWNWID */ | 2031 | (iw_handler) NULL, /* SIOCSIWNWID */ |
2032 | (iw_handler) NULL, /* SIOCGIWNWID */ | 2032 | (iw_handler) NULL, /* SIOCGIWNWID */ |
2033 | (iw_handler) wlan_set_freq, /* SIOCSIWFREQ */ | 2033 | (iw_handler) lbs_set_freq, /* SIOCSIWFREQ */ |
2034 | (iw_handler) wlan_get_freq, /* SIOCGIWFREQ */ | 2034 | (iw_handler) lbs_get_freq, /* SIOCGIWFREQ */ |
2035 | (iw_handler) wlan_set_mode, /* SIOCSIWMODE */ | 2035 | (iw_handler) lbs_set_mode, /* SIOCSIWMODE */ |
2036 | (iw_handler) wlan_get_mode, /* SIOCGIWMODE */ | 2036 | (iw_handler) lbs_get_mode, /* SIOCGIWMODE */ |
2037 | (iw_handler) NULL, /* SIOCSIWSENS */ | 2037 | (iw_handler) NULL, /* SIOCSIWSENS */ |
2038 | (iw_handler) NULL, /* SIOCGIWSENS */ | 2038 | (iw_handler) NULL, /* SIOCGIWSENS */ |
2039 | (iw_handler) NULL, /* SIOCSIWRANGE */ | 2039 | (iw_handler) NULL, /* SIOCSIWRANGE */ |
2040 | (iw_handler) wlan_get_range, /* SIOCGIWRANGE */ | 2040 | (iw_handler) lbs_get_range, /* SIOCGIWRANGE */ |
2041 | (iw_handler) NULL, /* SIOCSIWPRIV */ | 2041 | (iw_handler) NULL, /* SIOCSIWPRIV */ |
2042 | (iw_handler) NULL, /* SIOCGIWPRIV */ | 2042 | (iw_handler) NULL, /* SIOCGIWPRIV */ |
2043 | (iw_handler) NULL, /* SIOCSIWSTATS */ | 2043 | (iw_handler) NULL, /* SIOCSIWSTATS */ |
@@ -2046,56 +2046,56 @@ static const iw_handler wlan_handler[] = { | |||
2046 | iw_handler_get_spy, /* SIOCGIWSPY */ | 2046 | iw_handler_get_spy, /* SIOCGIWSPY */ |
2047 | iw_handler_set_thrspy, /* SIOCSIWTHRSPY */ | 2047 | iw_handler_set_thrspy, /* SIOCSIWTHRSPY */ |
2048 | iw_handler_get_thrspy, /* SIOCGIWTHRSPY */ | 2048 | iw_handler_get_thrspy, /* SIOCGIWTHRSPY */ |
2049 | (iw_handler) wlan_set_wap, /* SIOCSIWAP */ | 2049 | (iw_handler) lbs_set_wap, /* SIOCSIWAP */ |
2050 | (iw_handler) wlan_get_wap, /* SIOCGIWAP */ | 2050 | (iw_handler) lbs_get_wap, /* SIOCGIWAP */ |
2051 | (iw_handler) NULL, /* SIOCSIWMLME */ | 2051 | (iw_handler) NULL, /* SIOCSIWMLME */ |
2052 | (iw_handler) NULL, /* SIOCGIWAPLIST - deprecated */ | 2052 | (iw_handler) NULL, /* SIOCGIWAPLIST - deprecated */ |
2053 | (iw_handler) libertas_set_scan, /* SIOCSIWSCAN */ | 2053 | (iw_handler) lbs_set_scan, /* SIOCSIWSCAN */ |
2054 | (iw_handler) libertas_get_scan, /* SIOCGIWSCAN */ | 2054 | (iw_handler) lbs_get_scan, /* SIOCGIWSCAN */ |
2055 | (iw_handler) wlan_set_essid, /* SIOCSIWESSID */ | 2055 | (iw_handler) lbs_set_essid, /* SIOCSIWESSID */ |
2056 | (iw_handler) wlan_get_essid, /* SIOCGIWESSID */ | 2056 | (iw_handler) lbs_get_essid, /* SIOCGIWESSID */ |
2057 | (iw_handler) wlan_set_nick, /* SIOCSIWNICKN */ | 2057 | (iw_handler) lbs_set_nick, /* SIOCSIWNICKN */ |
2058 | (iw_handler) wlan_get_nick, /* SIOCGIWNICKN */ | 2058 | (iw_handler) lbs_get_nick, /* SIOCGIWNICKN */ |
2059 | (iw_handler) NULL, /* -- hole -- */ | 2059 | (iw_handler) NULL, /* -- hole -- */ |
2060 | (iw_handler) NULL, /* -- hole -- */ | 2060 | (iw_handler) NULL, /* -- hole -- */ |
2061 | (iw_handler) wlan_set_rate, /* SIOCSIWRATE */ | 2061 | (iw_handler) lbs_set_rate, /* SIOCSIWRATE */ |
2062 | (iw_handler) wlan_get_rate, /* SIOCGIWRATE */ | 2062 | (iw_handler) lbs_get_rate, /* SIOCGIWRATE */ |
2063 | (iw_handler) wlan_set_rts, /* SIOCSIWRTS */ | 2063 | (iw_handler) lbs_set_rts, /* SIOCSIWRTS */ |
2064 | (iw_handler) wlan_get_rts, /* SIOCGIWRTS */ | 2064 | (iw_handler) lbs_get_rts, /* SIOCGIWRTS */ |
2065 | (iw_handler) wlan_set_frag, /* SIOCSIWFRAG */ | 2065 | (iw_handler) lbs_set_frag, /* SIOCSIWFRAG */ |
2066 | (iw_handler) wlan_get_frag, /* SIOCGIWFRAG */ | 2066 | (iw_handler) lbs_get_frag, /* SIOCGIWFRAG */ |
2067 | (iw_handler) wlan_set_txpow, /* SIOCSIWTXPOW */ | 2067 | (iw_handler) lbs_set_txpow, /* SIOCSIWTXPOW */ |
2068 | (iw_handler) wlan_get_txpow, /* SIOCGIWTXPOW */ | 2068 | (iw_handler) lbs_get_txpow, /* SIOCGIWTXPOW */ |
2069 | (iw_handler) wlan_set_retry, /* SIOCSIWRETRY */ | 2069 | (iw_handler) lbs_set_retry, /* SIOCSIWRETRY */ |
2070 | (iw_handler) wlan_get_retry, /* SIOCGIWRETRY */ | 2070 | (iw_handler) lbs_get_retry, /* SIOCGIWRETRY */ |
2071 | (iw_handler) wlan_set_encode, /* SIOCSIWENCODE */ | 2071 | (iw_handler) lbs_set_encode, /* SIOCSIWENCODE */ |
2072 | (iw_handler) wlan_get_encode, /* SIOCGIWENCODE */ | 2072 | (iw_handler) lbs_get_encode, /* SIOCGIWENCODE */ |
2073 | (iw_handler) wlan_set_power, /* SIOCSIWPOWER */ | 2073 | (iw_handler) lbs_set_power, /* SIOCSIWPOWER */ |
2074 | (iw_handler) wlan_get_power, /* SIOCGIWPOWER */ | 2074 | (iw_handler) lbs_get_power, /* SIOCGIWPOWER */ |
2075 | (iw_handler) NULL, /* -- hole -- */ | 2075 | (iw_handler) NULL, /* -- hole -- */ |
2076 | (iw_handler) NULL, /* -- hole -- */ | 2076 | (iw_handler) NULL, /* -- hole -- */ |
2077 | (iw_handler) wlan_set_genie, /* SIOCSIWGENIE */ | 2077 | (iw_handler) lbs_set_genie, /* SIOCSIWGENIE */ |
2078 | (iw_handler) wlan_get_genie, /* SIOCGIWGENIE */ | 2078 | (iw_handler) lbs_get_genie, /* SIOCGIWGENIE */ |
2079 | (iw_handler) wlan_set_auth, /* SIOCSIWAUTH */ | 2079 | (iw_handler) lbs_set_auth, /* SIOCSIWAUTH */ |
2080 | (iw_handler) wlan_get_auth, /* SIOCGIWAUTH */ | 2080 | (iw_handler) lbs_get_auth, /* SIOCGIWAUTH */ |
2081 | (iw_handler) wlan_set_encodeext,/* SIOCSIWENCODEEXT */ | 2081 | (iw_handler) lbs_set_encodeext,/* SIOCSIWENCODEEXT */ |
2082 | (iw_handler) wlan_get_encodeext,/* SIOCGIWENCODEEXT */ | 2082 | (iw_handler) lbs_get_encodeext,/* SIOCGIWENCODEEXT */ |
2083 | (iw_handler) NULL, /* SIOCSIWPMKSA */ | 2083 | (iw_handler) NULL, /* SIOCSIWPMKSA */ |
2084 | }; | 2084 | }; |
2085 | 2085 | ||
2086 | static const iw_handler mesh_wlan_handler[] = { | 2086 | static const iw_handler mesh_wlan_handler[] = { |
2087 | (iw_handler) NULL, /* SIOCSIWCOMMIT */ | 2087 | (iw_handler) NULL, /* SIOCSIWCOMMIT */ |
2088 | (iw_handler) wlan_get_name, /* SIOCGIWNAME */ | 2088 | (iw_handler) lbs_get_name, /* SIOCGIWNAME */ |
2089 | (iw_handler) NULL, /* SIOCSIWNWID */ | 2089 | (iw_handler) NULL, /* SIOCSIWNWID */ |
2090 | (iw_handler) NULL, /* SIOCGIWNWID */ | 2090 | (iw_handler) NULL, /* SIOCGIWNWID */ |
2091 | (iw_handler) wlan_set_freq, /* SIOCSIWFREQ */ | 2091 | (iw_handler) lbs_set_freq, /* SIOCSIWFREQ */ |
2092 | (iw_handler) wlan_get_freq, /* SIOCGIWFREQ */ | 2092 | (iw_handler) lbs_get_freq, /* SIOCGIWFREQ */ |
2093 | (iw_handler) NULL, /* SIOCSIWMODE */ | 2093 | (iw_handler) NULL, /* SIOCSIWMODE */ |
2094 | (iw_handler) mesh_wlan_get_mode, /* SIOCGIWMODE */ | 2094 | (iw_handler) mesh_wlan_get_mode, /* SIOCGIWMODE */ |
2095 | (iw_handler) NULL, /* SIOCSIWSENS */ | 2095 | (iw_handler) NULL, /* SIOCSIWSENS */ |
2096 | (iw_handler) NULL, /* SIOCGIWSENS */ | 2096 | (iw_handler) NULL, /* SIOCGIWSENS */ |
2097 | (iw_handler) NULL, /* SIOCSIWRANGE */ | 2097 | (iw_handler) NULL, /* SIOCSIWRANGE */ |
2098 | (iw_handler) wlan_get_range, /* SIOCGIWRANGE */ | 2098 | (iw_handler) lbs_get_range, /* SIOCGIWRANGE */ |
2099 | (iw_handler) NULL, /* SIOCSIWPRIV */ | 2099 | (iw_handler) NULL, /* SIOCSIWPRIV */ |
2100 | (iw_handler) NULL, /* SIOCGIWPRIV */ | 2100 | (iw_handler) NULL, /* SIOCGIWPRIV */ |
2101 | (iw_handler) NULL, /* SIOCSIWSTATS */ | 2101 | (iw_handler) NULL, /* SIOCSIWSTATS */ |
@@ -2108,46 +2108,46 @@ static const iw_handler mesh_wlan_handler[] = { | |||
2108 | (iw_handler) NULL, /* SIOCGIWAP */ | 2108 | (iw_handler) NULL, /* SIOCGIWAP */ |
2109 | (iw_handler) NULL, /* SIOCSIWMLME */ | 2109 | (iw_handler) NULL, /* SIOCSIWMLME */ |
2110 | (iw_handler) NULL, /* SIOCGIWAPLIST - deprecated */ | 2110 | (iw_handler) NULL, /* SIOCGIWAPLIST - deprecated */ |
2111 | (iw_handler) libertas_set_scan, /* SIOCSIWSCAN */ | 2111 | (iw_handler) lbs_set_scan, /* SIOCSIWSCAN */ |
2112 | (iw_handler) libertas_get_scan, /* SIOCGIWSCAN */ | 2112 | (iw_handler) lbs_get_scan, /* SIOCGIWSCAN */ |
2113 | (iw_handler) NULL, /* SIOCSIWESSID */ | 2113 | (iw_handler) NULL, /* SIOCSIWESSID */ |
2114 | (iw_handler) NULL, /* SIOCGIWESSID */ | 2114 | (iw_handler) NULL, /* SIOCGIWESSID */ |
2115 | (iw_handler) NULL, /* SIOCSIWNICKN */ | 2115 | (iw_handler) NULL, /* SIOCSIWNICKN */ |
2116 | (iw_handler) mesh_get_nick, /* SIOCGIWNICKN */ | 2116 | (iw_handler) mesh_get_nick, /* SIOCGIWNICKN */ |
2117 | (iw_handler) NULL, /* -- hole -- */ | 2117 | (iw_handler) NULL, /* -- hole -- */ |
2118 | (iw_handler) NULL, /* -- hole -- */ | 2118 | (iw_handler) NULL, /* -- hole -- */ |
2119 | (iw_handler) wlan_set_rate, /* SIOCSIWRATE */ | 2119 | (iw_handler) lbs_set_rate, /* SIOCSIWRATE */ |
2120 | (iw_handler) wlan_get_rate, /* SIOCGIWRATE */ | 2120 | (iw_handler) lbs_get_rate, /* SIOCGIWRATE */ |
2121 | (iw_handler) wlan_set_rts, /* SIOCSIWRTS */ | 2121 | (iw_handler) lbs_set_rts, /* SIOCSIWRTS */ |
2122 | (iw_handler) wlan_get_rts, /* SIOCGIWRTS */ | 2122 | (iw_handler) lbs_get_rts, /* SIOCGIWRTS */ |
2123 | (iw_handler) wlan_set_frag, /* SIOCSIWFRAG */ | 2123 | (iw_handler) lbs_set_frag, /* SIOCSIWFRAG */ |
2124 | (iw_handler) wlan_get_frag, /* SIOCGIWFRAG */ | 2124 | (iw_handler) lbs_get_frag, /* SIOCGIWFRAG */ |
2125 | (iw_handler) wlan_set_txpow, /* SIOCSIWTXPOW */ | 2125 | (iw_handler) lbs_set_txpow, /* SIOCSIWTXPOW */ |
2126 | (iw_handler) wlan_get_txpow, /* SIOCGIWTXPOW */ | 2126 | (iw_handler) lbs_get_txpow, /* SIOCGIWTXPOW */ |
2127 | (iw_handler) wlan_set_retry, /* SIOCSIWRETRY */ | 2127 | (iw_handler) lbs_set_retry, /* SIOCSIWRETRY */ |
2128 | (iw_handler) wlan_get_retry, /* SIOCGIWRETRY */ | 2128 | (iw_handler) lbs_get_retry, /* SIOCGIWRETRY */ |
2129 | (iw_handler) wlan_set_encode, /* SIOCSIWENCODE */ | 2129 | (iw_handler) lbs_set_encode, /* SIOCSIWENCODE */ |
2130 | (iw_handler) wlan_get_encode, /* SIOCGIWENCODE */ | 2130 | (iw_handler) lbs_get_encode, /* SIOCGIWENCODE */ |
2131 | (iw_handler) wlan_set_power, /* SIOCSIWPOWER */ | 2131 | (iw_handler) lbs_set_power, /* SIOCSIWPOWER */ |
2132 | (iw_handler) wlan_get_power, /* SIOCGIWPOWER */ | 2132 | (iw_handler) lbs_get_power, /* SIOCGIWPOWER */ |
2133 | (iw_handler) NULL, /* -- hole -- */ | 2133 | (iw_handler) NULL, /* -- hole -- */ |
2134 | (iw_handler) NULL, /* -- hole -- */ | 2134 | (iw_handler) NULL, /* -- hole -- */ |
2135 | (iw_handler) wlan_set_genie, /* SIOCSIWGENIE */ | 2135 | (iw_handler) lbs_set_genie, /* SIOCSIWGENIE */ |
2136 | (iw_handler) wlan_get_genie, /* SIOCGIWGENIE */ | 2136 | (iw_handler) lbs_get_genie, /* SIOCGIWGENIE */ |
2137 | (iw_handler) wlan_set_auth, /* SIOCSIWAUTH */ | 2137 | (iw_handler) lbs_set_auth, /* SIOCSIWAUTH */ |
2138 | (iw_handler) wlan_get_auth, /* SIOCGIWAUTH */ | 2138 | (iw_handler) lbs_get_auth, /* SIOCGIWAUTH */ |
2139 | (iw_handler) wlan_set_encodeext,/* SIOCSIWENCODEEXT */ | 2139 | (iw_handler) lbs_set_encodeext,/* SIOCSIWENCODEEXT */ |
2140 | (iw_handler) wlan_get_encodeext,/* SIOCGIWENCODEEXT */ | 2140 | (iw_handler) lbs_get_encodeext,/* SIOCGIWENCODEEXT */ |
2141 | (iw_handler) NULL, /* SIOCSIWPMKSA */ | 2141 | (iw_handler) NULL, /* SIOCSIWPMKSA */ |
2142 | }; | 2142 | }; |
2143 | struct iw_handler_def libertas_handler_def = { | 2143 | struct iw_handler_def lbs_handler_def = { |
2144 | .num_standard = ARRAY_SIZE(wlan_handler), | 2144 | .num_standard = ARRAY_SIZE(lbs_handler), |
2145 | .standard = (iw_handler *) wlan_handler, | 2145 | .standard = (iw_handler *) lbs_handler, |
2146 | .get_wireless_stats = wlan_get_wireless_stats, | 2146 | .get_wireless_stats = lbs_get_wireless_stats, |
2147 | }; | 2147 | }; |
2148 | 2148 | ||
2149 | struct iw_handler_def mesh_handler_def = { | 2149 | struct iw_handler_def mesh_handler_def = { |
2150 | .num_standard = ARRAY_SIZE(mesh_wlan_handler), | 2150 | .num_standard = ARRAY_SIZE(mesh_wlan_handler), |
2151 | .standard = (iw_handler *) mesh_wlan_handler, | 2151 | .standard = (iw_handler *) mesh_wlan_handler, |
2152 | .get_wireless_stats = wlan_get_wireless_stats, | 2152 | .get_wireless_stats = lbs_get_wireless_stats, |
2153 | }; | 2153 | }; |