aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2007-11-15 18:05:47 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:04:46 -0500
commit1007832103d016d1563fab71d4cf2b057a0bcceb (patch)
tree3b5080b01bee6e1f98cc9489382c534e963ac748 /drivers
parent9a62f73b1a3bbd35a6f84fcd6636e672b09981ec (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')
-rw-r--r--drivers/net/wireless/libertas/11d.c72
-rw-r--r--drivers/net/wireless/libertas/11d.h24
-rw-r--r--drivers/net/wireless/libertas/assoc.c120
-rw-r--r--drivers/net/wireless/libertas/assoc.h12
-rw-r--r--drivers/net/wireless/libertas/cmd.c274
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c174
-rw-r--r--drivers/net/wireless/libertas/debugfs.c402
-rw-r--r--drivers/net/wireless/libertas/debugfs.h12
-rw-r--r--drivers/net/wireless/libertas/decl.h84
-rw-r--r--drivers/net/wireless/libertas/defs.h54
-rw-r--r--drivers/net/wireless/libertas/dev.h42
-rw-r--r--drivers/net/wireless/libertas/ethtool.c52
-rw-r--r--drivers/net/wireless/libertas/host.h6
-rw-r--r--drivers/net/wireless/libertas/hostcmd.h12
-rw-r--r--drivers/net/wireless/libertas/if_cs.c42
-rw-r--r--drivers/net/wireless/libertas/if_sdio.c46
-rw-r--r--drivers/net/wireless/libertas/if_sdio.h4
-rw-r--r--drivers/net/wireless/libertas/if_usb.c86
-rw-r--r--drivers/net/wireless/libertas/if_usb.h4
-rw-r--r--drivers/net/wireless/libertas/join.c130
-rw-r--r--drivers/net/wireless/libertas/join.h38
-rw-r--r--drivers/net/wireless/libertas/main.c528
-rw-r--r--drivers/net/wireless/libertas/rx.c66
-rw-r--r--drivers/net/wireless/libertas/scan.c184
-rw-r--r--drivers/net/wireless/libertas/scan.h86
-rw-r--r--drivers/net/wireless/libertas/tx.c38
-rw-r--r--drivers/net/wireless/libertas/types.h6
-rw-r--r--drivers/net/wireless/libertas/wext.c476
-rw-r--r--drivers/net/wireless/libertas/wext.h14
29 files changed, 1546 insertions, 1542 deletions
diff --git a/drivers/net/wireless/libertas/11d.c b/drivers/net/wireless/libertas/11d.c
index 8bbd3227e6fb..d16f566e878b 100644
--- a/drivers/net/wireless/libertas/11d.c
+++ b/drivers/net/wireless/libertas/11d.c
@@ -43,7 +43,7 @@ static struct chan_freq_power channel_freq_power_UN_BG[] = {
43 {14, 2484, TX_PWR_DEFAULT} 43 {14, 2484, TX_PWR_DEFAULT}
44}; 44};
45 45
46static u8 wlan_region_2_code(u8 * region) 46static u8 lbs_region_2_code(u8 *region)
47{ 47{
48 u8 i; 48 u8 i;
49 49
@@ -60,7 +60,7 @@ static u8 wlan_region_2_code(u8 * region)
60 return (region_code_mapping[0].code); 60 return (region_code_mapping[0].code);
61} 61}
62 62
63static u8 *wlan_code_2_region(u8 code) 63static u8 *lbs_code_2_region(u8 code)
64{ 64{
65 u8 i; 65 u8 i;
66 66
@@ -79,7 +79,7 @@ static u8 *wlan_code_2_region(u8 code)
79 * @param nrchan number of channels 79 * @param nrchan number of channels
80 * @return the nrchan-th chan number 80 * @return the nrchan-th chan number
81*/ 81*/
82static u8 wlan_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 * chan) 82static u8 lbs_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 *chan)
83/*find the nrchan-th chan after the firstchan*/ 83/*find the nrchan-th chan after the firstchan*/
84{ 84{
85 u8 i; 85 u8 i;
@@ -113,7 +113,7 @@ static u8 wlan_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 * chan)
113 * @param parsed_region_chan pointer to parsed_region_chan_11d 113 * @param parsed_region_chan pointer to parsed_region_chan_11d
114 * @return TRUE; FALSE 114 * @return TRUE; FALSE
115*/ 115*/
116static u8 wlan_channel_known_11d(u8 chan, 116static u8 lbs_channel_known_11d(u8 chan,
117 struct parsed_region_chan_11d * parsed_region_chan) 117 struct parsed_region_chan_11d * parsed_region_chan)
118{ 118{
119 struct chan_power_11d *chanpwr = parsed_region_chan->chanpwr; 119 struct chan_power_11d *chanpwr = parsed_region_chan->chanpwr;
@@ -134,7 +134,7 @@ static u8 wlan_channel_known_11d(u8 chan,
134 return 0; 134 return 0;
135} 135}
136 136
137u32 libertas_chan_2_freq(u8 chan, u8 band) 137u32 lbs_chan_2_freq(u8 chan, u8 band)
138{ 138{
139 struct chan_freq_power *cf; 139 struct chan_freq_power *cf;
140 u16 i; 140 u16 i;
@@ -152,7 +152,7 @@ u32 libertas_chan_2_freq(u8 chan, u8 band)
152 152
153static int generate_domain_info_11d(struct parsed_region_chan_11d 153static int generate_domain_info_11d(struct parsed_region_chan_11d
154 *parsed_region_chan, 154 *parsed_region_chan,
155 struct wlan_802_11d_domain_reg * domaininfo) 155 struct lbs_802_11d_domain_reg *domaininfo)
156{ 156{
157 u8 nr_subband = 0; 157 u8 nr_subband = 0;
158 158
@@ -217,7 +217,7 @@ static int generate_domain_info_11d(struct parsed_region_chan_11d
217 * @param *parsed_region_chan pointer to parsed_region_chan_11d 217 * @param *parsed_region_chan pointer to parsed_region_chan_11d
218 * @return N/A 218 * @return N/A
219*/ 219*/
220static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_chan, 220static void lbs_generate_parsed_region_chan_11d(struct region_channel *region_chan,
221 struct parsed_region_chan_11d * 221 struct parsed_region_chan_11d *
222 parsed_region_chan) 222 parsed_region_chan)
223{ 223{
@@ -238,7 +238,7 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_
238 parsed_region_chan->band = region_chan->band; 238 parsed_region_chan->band = region_chan->band;
239 parsed_region_chan->region = region_chan->region; 239 parsed_region_chan->region = region_chan->region;
240 memcpy(parsed_region_chan->countrycode, 240 memcpy(parsed_region_chan->countrycode,
241 wlan_code_2_region(region_chan->region), COUNTRY_CODE_LEN); 241 lbs_code_2_region(region_chan->region), COUNTRY_CODE_LEN);
242 242
243 lbs_deb_11d("region 0x%x, band %d\n", parsed_region_chan->region, 243 lbs_deb_11d("region 0x%x, band %d\n", parsed_region_chan->region,
244 parsed_region_chan->band); 244 parsed_region_chan->band);
@@ -264,7 +264,7 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_
264 * @param chan chan 264 * @param chan chan
265 * @return TRUE;FALSE 265 * @return TRUE;FALSE
266*/ 266*/
267static u8 wlan_region_chan_supported_11d(u8 region, u8 band, u8 chan) 267static u8 lbs_region_chan_supported_11d(u8 region, u8 band, u8 chan)
268{ 268{
269 struct chan_freq_power *cfp; 269 struct chan_freq_power *cfp;
270 int cfp_no; 270 int cfp_no;
@@ -273,7 +273,7 @@ static u8 wlan_region_chan_supported_11d(u8 region, u8 band, u8 chan)
273 273
274 lbs_deb_enter(LBS_DEB_11D); 274 lbs_deb_enter(LBS_DEB_11D);
275 275
276 cfp = libertas_get_region_cfp_table(region, band, &cfp_no); 276 cfp = lbs_get_region_cfp_table(region, band, &cfp_no);
277 if (cfp == NULL) 277 if (cfp == NULL)
278 return 0; 278 return 0;
279 279
@@ -338,7 +338,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
338 338
339 /*Step1: check region_code */ 339 /*Step1: check region_code */
340 parsed_region_chan->region = region = 340 parsed_region_chan->region = region =
341 wlan_region_2_code(countryinfo->countrycode); 341 lbs_region_2_code(countryinfo->countrycode);
342 342
343 lbs_deb_11d("regioncode=%x\n", (u8) parsed_region_chan->region); 343 lbs_deb_11d("regioncode=%x\n", (u8) parsed_region_chan->region);
344 lbs_deb_hex(LBS_DEB_11D, "countrycode", (char *)countryinfo->countrycode, 344 lbs_deb_hex(LBS_DEB_11D, "countrycode", (char *)countryinfo->countrycode,
@@ -367,7 +367,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
367 for (i = 0; idx < MAX_NO_OF_CHAN && i < nrchan; i++) { 367 for (i = 0; idx < MAX_NO_OF_CHAN && i < nrchan; i++) {
368 /*step4: channel is supported? */ 368 /*step4: channel is supported? */
369 369
370 if (!wlan_get_chan_11d(band, firstchan, i, &curchan)) { 370 if (!lbs_get_chan_11d(band, firstchan, i, &curchan)) {
371 /* Chan is not found in UN table */ 371 /* Chan is not found in UN table */
372 lbs_deb_11d("chan is not supported: %d \n", i); 372 lbs_deb_11d("chan is not supported: %d \n", i);
373 break; 373 break;
@@ -375,7 +375,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
375 375
376 lastchan = curchan; 376 lastchan = curchan;
377 377
378 if (wlan_region_chan_supported_11d 378 if (lbs_region_chan_supported_11d
379 (region, band, curchan)) { 379 (region, band, curchan)) {
380 /*step5: Check if curchan is supported by mrvl in region */ 380 /*step5: Check if curchan is supported by mrvl in region */
381 parsed_region_chan->chanpwr[idx].chan = curchan; 381 parsed_region_chan->chanpwr[idx].chan = curchan;
@@ -411,14 +411,14 @@ done:
411 * @param parsed_region_chan pointer to parsed_region_chan_11d 411 * @param parsed_region_chan pointer to parsed_region_chan_11d
412 * @return PASSIVE if chan is unknown; ACTIVE if chan is known 412 * @return PASSIVE if chan is unknown; ACTIVE if chan is known
413*/ 413*/
414u8 libertas_get_scan_type_11d(u8 chan, 414u8 lbs_get_scan_type_11d(u8 chan,
415 struct parsed_region_chan_11d * parsed_region_chan) 415 struct parsed_region_chan_11d * parsed_region_chan)
416{ 416{
417 u8 scan_type = CMD_SCAN_TYPE_PASSIVE; 417 u8 scan_type = CMD_SCAN_TYPE_PASSIVE;
418 418
419 lbs_deb_enter(LBS_DEB_11D); 419 lbs_deb_enter(LBS_DEB_11D);
420 420
421 if (wlan_channel_known_11d(chan, parsed_region_chan)) { 421 if (lbs_channel_known_11d(chan, parsed_region_chan)) {
422 lbs_deb_11d("found, do active scan\n"); 422 lbs_deb_11d("found, do active scan\n");
423 scan_type = CMD_SCAN_TYPE_ACTIVE; 423 scan_type = CMD_SCAN_TYPE_ACTIVE;
424 } else { 424 } else {
@@ -430,7 +430,7 @@ u8 libertas_get_scan_type_11d(u8 chan,
430 430
431} 431}
432 432
433void libertas_init_11d(wlan_private * priv) 433void lbs_init_11d(lbs_private * priv)
434{ 434{
435 priv->adapter->enable11d = 0; 435 priv->adapter->enable11d = 0;
436 memset(&(priv->adapter->parsed_region_chan), 0, 436 memset(&(priv->adapter->parsed_region_chan), 0,
@@ -440,10 +440,10 @@ void libertas_init_11d(wlan_private * priv)
440 440
441/** 441/**
442 * @brief This function sets DOMAIN INFO to FW 442 * @brief This function sets DOMAIN INFO to FW
443 * @param priv pointer to wlan_private 443 * @param priv pointer to lbs_private
444 * @return 0; -1 444 * @return 0; -1
445*/ 445*/
446static int set_domain_info_11d(wlan_private * priv) 446static int set_domain_info_11d(lbs_private * priv)
447{ 447{
448 int ret; 448 int ret;
449 449
@@ -452,7 +452,7 @@ static int set_domain_info_11d(wlan_private * priv)
452 return 0; 452 return 0;
453 } 453 }
454 454
455 ret = libertas_prepare_and_send_command(priv, CMD_802_11D_DOMAIN_INFO, 455 ret = lbs_prepare_and_send_command(priv, CMD_802_11D_DOMAIN_INFO,
456 CMD_ACT_SET, 456 CMD_ACT_SET,
457 CMD_OPTION_WAITFORRSP, 0, NULL); 457 CMD_OPTION_WAITFORRSP, 0, NULL);
458 if (ret) 458 if (ret)
@@ -463,13 +463,13 @@ static int set_domain_info_11d(wlan_private * priv)
463 463
464/** 464/**
465 * @brief This function setups scan channels 465 * @brief This function setups scan channels
466 * @param priv pointer to wlan_private 466 * @param priv pointer to lbs_private
467 * @param band band 467 * @param band band
468 * @return 0 468 * @return 0
469*/ 469*/
470int libertas_set_universaltable(wlan_private * priv, u8 band) 470int lbs_set_universaltable(lbs_private * priv, u8 band)
471{ 471{
472 wlan_adapter *adapter = priv->adapter; 472 lbs_adapter *adapter = priv->adapter;
473 u16 size = sizeof(struct chan_freq_power); 473 u16 size = sizeof(struct chan_freq_power);
474 u16 i = 0; 474 u16 i = 0;
475 475
@@ -492,20 +492,20 @@ int libertas_set_universaltable(wlan_private * priv, u8 band)
492 492
493/** 493/**
494 * @brief This function implements command CMD_802_11D_DOMAIN_INFO 494 * @brief This function implements command CMD_802_11D_DOMAIN_INFO
495 * @param priv pointer to wlan_private 495 * @param priv pointer to lbs_private
496 * @param cmd pointer to cmd buffer 496 * @param cmd pointer to cmd buffer
497 * @param cmdno cmd ID 497 * @param cmdno cmd ID
498 * @param cmdOption cmd action 498 * @param cmdOption cmd action
499 * @return 0 499 * @return 0
500*/ 500*/
501int libertas_cmd_802_11d_domain_info(wlan_private * priv, 501int lbs_cmd_802_11d_domain_info(lbs_private * priv,
502 struct cmd_ds_command *cmd, u16 cmdno, 502 struct cmd_ds_command *cmd, u16 cmdno,
503 u16 cmdoption) 503 u16 cmdoption)
504{ 504{
505 struct cmd_ds_802_11d_domain_info *pdomaininfo = 505 struct cmd_ds_802_11d_domain_info *pdomaininfo =
506 &cmd->params.domaininfo; 506 &cmd->params.domaininfo;
507 struct mrvlietypes_domainparamset *domain = &pdomaininfo->domain; 507 struct mrvlietypes_domainparamset *domain = &pdomaininfo->domain;
508 wlan_adapter *adapter = priv->adapter; 508 lbs_adapter *adapter = priv->adapter;
509 u8 nr_subband = adapter->domainreg.nr_subband; 509 u8 nr_subband = adapter->domainreg.nr_subband;
510 510
511 lbs_deb_enter(LBS_DEB_11D); 511 lbs_deb_enter(LBS_DEB_11D);
@@ -552,11 +552,11 @@ done:
552 552
553/** 553/**
554 * @brief This function parses countryinfo from AP and download country info to FW 554 * @brief This function parses countryinfo from AP and download country info to FW
555 * @param priv pointer to wlan_private 555 * @param priv pointer to lbs_private
556 * @param resp pointer to command response buffer 556 * @param resp pointer to command response buffer
557 * @return 0; -1 557 * @return 0; -1
558 */ 558 */
559int libertas_ret_802_11d_domain_info(wlan_private * priv, 559int lbs_ret_802_11d_domain_info(lbs_private * priv,
560 struct cmd_ds_command *resp) 560 struct cmd_ds_command *resp)
561{ 561{
562 struct cmd_ds_802_11d_domain_info *domaininfo = &resp->params.domaininforesp; 562 struct cmd_ds_802_11d_domain_info *domaininfo = &resp->params.domaininforesp;
@@ -598,14 +598,14 @@ int libertas_ret_802_11d_domain_info(wlan_private * priv,
598 598
599/** 599/**
600 * @brief This function parses countryinfo from AP and download country info to FW 600 * @brief This function parses countryinfo from AP and download country info to FW
601 * @param priv pointer to wlan_private 601 * @param priv pointer to lbs_private
602 * @return 0; -1 602 * @return 0; -1
603 */ 603 */
604int libertas_parse_dnld_countryinfo_11d(wlan_private * priv, 604int lbs_parse_dnld_countryinfo_11d(lbs_private * priv,
605 struct bss_descriptor * bss) 605 struct bss_descriptor * bss)
606{ 606{
607 int ret; 607 int ret;
608 wlan_adapter *adapter = priv->adapter; 608 lbs_adapter *adapter = priv->adapter;
609 609
610 lbs_deb_enter(LBS_DEB_11D); 610 lbs_deb_enter(LBS_DEB_11D);
611 if (priv->adapter->enable11d) { 611 if (priv->adapter->enable11d) {
@@ -620,7 +620,7 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv,
620 } 620 }
621 621
622 memset(&adapter->domainreg, 0, 622 memset(&adapter->domainreg, 0,
623 sizeof(struct wlan_802_11d_domain_reg)); 623 sizeof(struct lbs_802_11d_domain_reg));
624 generate_domain_info_11d(&adapter->parsed_region_chan, 624 generate_domain_info_11d(&adapter->parsed_region_chan,
625 &adapter->domainreg); 625 &adapter->domainreg);
626 626
@@ -640,13 +640,13 @@ done:
640 640
641/** 641/**
642 * @brief This function generates 11D info from user specified regioncode and download to FW 642 * @brief This function generates 11D info from user specified regioncode and download to FW
643 * @param priv pointer to wlan_private 643 * @param priv pointer to lbs_private
644 * @return 0; -1 644 * @return 0; -1
645 */ 645 */
646int libertas_create_dnld_countryinfo_11d(wlan_private * priv) 646int lbs_create_dnld_countryinfo_11d(lbs_private * priv)
647{ 647{
648 int ret; 648 int ret;
649 wlan_adapter *adapter = priv->adapter; 649 lbs_adapter *adapter = priv->adapter;
650 struct region_channel *region_chan; 650 struct region_channel *region_chan;
651 u8 j; 651 u8 j;
652 652
@@ -679,12 +679,12 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
679 679
680 memset(&adapter->parsed_region_chan, 0, 680 memset(&adapter->parsed_region_chan, 0,
681 sizeof(struct parsed_region_chan_11d)); 681 sizeof(struct parsed_region_chan_11d));
682 wlan_generate_parsed_region_chan_11d(region_chan, 682 lbs_generate_parsed_region_chan_11d(region_chan,
683 &adapter-> 683 &adapter->
684 parsed_region_chan); 684 parsed_region_chan);
685 685
686 memset(&adapter->domainreg, 0, 686 memset(&adapter->domainreg, 0,
687 sizeof(struct wlan_802_11d_domain_reg)); 687 sizeof(struct lbs_802_11d_domain_reg));
688 generate_domain_info_11d(&adapter->parsed_region_chan, 688 generate_domain_info_11d(&adapter->parsed_region_chan,
689 &adapter->domainreg); 689 &adapter->domainreg);
690 690
diff --git a/drivers/net/wireless/libertas/11d.h b/drivers/net/wireless/libertas/11d.h
index 3a6d1f8db78f..4f7f0deb6c84 100644
--- a/drivers/net/wireless/libertas/11d.h
+++ b/drivers/net/wireless/libertas/11d.h
@@ -2,8 +2,8 @@
2 * This header file contains data structures and 2 * This header file contains data structures and
3 * function declarations of 802.11d 3 * function declarations of 802.11d
4 */ 4 */
5#ifndef _WLAN_11D_ 5#ifndef _LBS_11D_
6#define _WLAN_11D_ 6#define _LBS_11D_
7 7
8#include "types.h" 8#include "types.h"
9#include "defs.h" 9#include "defs.h"
@@ -52,7 +52,7 @@ struct cmd_ds_802_11d_domain_info {
52} __attribute__ ((packed)); 52} __attribute__ ((packed));
53 53
54/** domain regulatory information */ 54/** domain regulatory information */
55struct wlan_802_11d_domain_reg { 55struct lbs_802_11d_domain_reg {
56 /** country Code*/ 56 /** country Code*/
57 u8 countrycode[COUNTRY_CODE_LEN]; 57 u8 countrycode[COUNTRY_CODE_LEN];
58 /** No. of subband*/ 58 /** No. of subband*/
@@ -78,26 +78,26 @@ struct region_code_mapping {
78 u8 code; 78 u8 code;
79}; 79};
80 80
81u8 libertas_get_scan_type_11d(u8 chan, 81u8 lbs_get_scan_type_11d(u8 chan,
82 struct parsed_region_chan_11d *parsed_region_chan); 82 struct parsed_region_chan_11d *parsed_region_chan);
83 83
84u32 libertas_chan_2_freq(u8 chan, u8 band); 84u32 lbs_chan_2_freq(u8 chan, u8 band);
85 85
86void libertas_init_11d(wlan_private * priv); 86void lbs_init_11d(lbs_private * priv);
87 87
88int libertas_set_universaltable(wlan_private * priv, u8 band); 88int lbs_set_universaltable(lbs_private * priv, u8 band);
89 89
90int libertas_cmd_802_11d_domain_info(wlan_private * priv, 90int lbs_cmd_802_11d_domain_info(lbs_private * priv,
91 struct cmd_ds_command *cmd, u16 cmdno, 91 struct cmd_ds_command *cmd, u16 cmdno,
92 u16 cmdOption); 92 u16 cmdOption);
93 93
94int libertas_ret_802_11d_domain_info(wlan_private * priv, 94int lbs_ret_802_11d_domain_info(lbs_private * priv,
95 struct cmd_ds_command *resp); 95 struct cmd_ds_command *resp);
96 96
97struct bss_descriptor; 97struct bss_descriptor;
98int libertas_parse_dnld_countryinfo_11d(wlan_private * priv, 98int lbs_parse_dnld_countryinfo_11d(lbs_private * priv,
99 struct bss_descriptor * bss); 99 struct bss_descriptor * bss);
100 100
101int libertas_create_dnld_countryinfo_11d(wlan_private * priv); 101int lbs_create_dnld_countryinfo_11d(lbs_private * priv);
102 102
103#endif /* _WLAN_11D_ */ 103#endif
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index b61b176e9d07..e52b1eead288 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -38,10 +38,10 @@ static void print_assoc_req(const char * extra, struct assoc_request * assoc_req
38} 38}
39 39
40 40
41static int assoc_helper_essid(wlan_private *priv, 41static int assoc_helper_essid(lbs_private *priv,
42 struct assoc_request * assoc_req) 42 struct assoc_request * assoc_req)
43{ 43{
44 wlan_adapter *adapter = priv->adapter; 44 lbs_adapter *adapter = priv->adapter;
45 int ret = 0; 45 int ret = 0;
46 struct bss_descriptor * bss; 46 struct bss_descriptor * bss;
47 int channel = -1; 47 int channel = -1;
@@ -58,15 +58,15 @@ static int assoc_helper_essid(wlan_private *priv,
58 lbs_deb_assoc("New SSID requested: '%s'\n", 58 lbs_deb_assoc("New SSID requested: '%s'\n",
59 escape_essid(assoc_req->ssid, assoc_req->ssid_len)); 59 escape_essid(assoc_req->ssid, assoc_req->ssid_len));
60 if (assoc_req->mode == IW_MODE_INFRA) { 60 if (assoc_req->mode == IW_MODE_INFRA) {
61 libertas_send_specific_ssid_scan(priv, assoc_req->ssid, 61 lbs_send_specific_ssid_scan(priv, assoc_req->ssid,
62 assoc_req->ssid_len, 0); 62 assoc_req->ssid_len, 0);
63 63
64 bss = libertas_find_ssid_in_list(adapter, assoc_req->ssid, 64 bss = lbs_find_ssid_in_list(adapter, assoc_req->ssid,
65 assoc_req->ssid_len, NULL, IW_MODE_INFRA, channel); 65 assoc_req->ssid_len, NULL, IW_MODE_INFRA, channel);
66 if (bss != NULL) { 66 if (bss != NULL) {
67 lbs_deb_assoc("SSID found in scan list, associating\n"); 67 lbs_deb_assoc("SSID found in scan list, associating\n");
68 memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor)); 68 memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor));
69 ret = wlan_associate(priv, assoc_req); 69 ret = lbs_associate(priv, assoc_req);
70 } else { 70 } else {
71 lbs_deb_assoc("SSID not found; cannot associate\n"); 71 lbs_deb_assoc("SSID not found; cannot associate\n");
72 } 72 }
@@ -74,23 +74,23 @@ static int assoc_helper_essid(wlan_private *priv,
74 /* Scan for the network, do not save previous results. Stale 74 /* Scan for the network, do not save previous results. Stale
75 * scan data will cause us to join a non-existant adhoc network 75 * scan data will cause us to join a non-existant adhoc network
76 */ 76 */
77 libertas_send_specific_ssid_scan(priv, assoc_req->ssid, 77 lbs_send_specific_ssid_scan(priv, assoc_req->ssid,
78 assoc_req->ssid_len, 1); 78 assoc_req->ssid_len, 1);
79 79
80 /* Search for the requested SSID in the scan table */ 80 /* Search for the requested SSID in the scan table */
81 bss = libertas_find_ssid_in_list(adapter, assoc_req->ssid, 81 bss = lbs_find_ssid_in_list(adapter, assoc_req->ssid,
82 assoc_req->ssid_len, NULL, IW_MODE_ADHOC, channel); 82 assoc_req->ssid_len, NULL, IW_MODE_ADHOC, channel);
83 if (bss != NULL) { 83 if (bss != NULL) {
84 lbs_deb_assoc("SSID found, will join\n"); 84 lbs_deb_assoc("SSID found, will join\n");
85 memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor)); 85 memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor));
86 libertas_join_adhoc_network(priv, assoc_req); 86 lbs_join_adhoc_network(priv, assoc_req);
87 } else { 87 } else {
88 /* else send START command */ 88 /* else send START command */
89 lbs_deb_assoc("SSID not found, creating adhoc network\n"); 89 lbs_deb_assoc("SSID not found, creating adhoc network\n");
90 memcpy(&assoc_req->bss.ssid, &assoc_req->ssid, 90 memcpy(&assoc_req->bss.ssid, &assoc_req->ssid,
91 IW_ESSID_MAX_SIZE); 91 IW_ESSID_MAX_SIZE);
92 assoc_req->bss.ssid_len = assoc_req->ssid_len; 92 assoc_req->bss.ssid_len = assoc_req->ssid_len;
93 libertas_start_adhoc_network(priv, assoc_req); 93 lbs_start_adhoc_network(priv, assoc_req);
94 } 94 }
95 } 95 }
96 96
@@ -99,10 +99,10 @@ static int assoc_helper_essid(wlan_private *priv,
99} 99}
100 100
101 101
102static int assoc_helper_bssid(wlan_private *priv, 102static int assoc_helper_bssid(lbs_private *priv,
103 struct assoc_request * assoc_req) 103 struct assoc_request * assoc_req)
104{ 104{
105 wlan_adapter *adapter = priv->adapter; 105 lbs_adapter *adapter = priv->adapter;
106 int ret = 0; 106 int ret = 0;
107 struct bss_descriptor * bss; 107 struct bss_descriptor * bss;
108 DECLARE_MAC_BUF(mac); 108 DECLARE_MAC_BUF(mac);
@@ -111,7 +111,7 @@ static int assoc_helper_bssid(wlan_private *priv,
111 print_mac(mac, assoc_req->bssid)); 111 print_mac(mac, assoc_req->bssid));
112 112
113 /* Search for index position in list for requested MAC */ 113 /* Search for index position in list for requested MAC */
114 bss = libertas_find_bssid_in_list(adapter, assoc_req->bssid, 114 bss = lbs_find_bssid_in_list(adapter, assoc_req->bssid,
115 assoc_req->mode); 115 assoc_req->mode);
116 if (bss == NULL) { 116 if (bss == NULL) {
117 lbs_deb_assoc("ASSOC: WAP: BSSID %s not found, " 117 lbs_deb_assoc("ASSOC: WAP: BSSID %s not found, "
@@ -121,10 +121,10 @@ static int assoc_helper_bssid(wlan_private *priv,
121 121
122 memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor)); 122 memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor));
123 if (assoc_req->mode == IW_MODE_INFRA) { 123 if (assoc_req->mode == IW_MODE_INFRA) {
124 ret = wlan_associate(priv, assoc_req); 124 ret = lbs_associate(priv, assoc_req);
125 lbs_deb_assoc("ASSOC: wlan_associate(bssid) returned %d\n", ret); 125 lbs_deb_assoc("ASSOC: lbs_associate(bssid) returned %d\n", ret);
126 } else if (assoc_req->mode == IW_MODE_ADHOC) { 126 } else if (assoc_req->mode == IW_MODE_ADHOC) {
127 libertas_join_adhoc_network(priv, assoc_req); 127 lbs_join_adhoc_network(priv, assoc_req);
128 } 128 }
129 129
130out: 130out:
@@ -133,7 +133,7 @@ out:
133} 133}
134 134
135 135
136static int assoc_helper_associate(wlan_private *priv, 136static int assoc_helper_associate(lbs_private *priv,
137 struct assoc_request * assoc_req) 137 struct assoc_request * assoc_req)
138{ 138{
139 int ret = 0, done = 0; 139 int ret = 0, done = 0;
@@ -162,10 +162,10 @@ static int assoc_helper_associate(wlan_private *priv,
162} 162}
163 163
164 164
165static int assoc_helper_mode(wlan_private *priv, 165static int assoc_helper_mode(lbs_private *priv,
166 struct assoc_request * assoc_req) 166 struct assoc_request * assoc_req)
167{ 167{
168 wlan_adapter *adapter = priv->adapter; 168 lbs_adapter *adapter = priv->adapter;
169 int ret = 0; 169 int ret = 0;
170 170
171 lbs_deb_enter(LBS_DEB_ASSOC); 171 lbs_deb_enter(LBS_DEB_ASSOC);
@@ -175,12 +175,12 @@ static int assoc_helper_mode(wlan_private *priv,
175 175
176 if (assoc_req->mode == IW_MODE_INFRA) { 176 if (assoc_req->mode == IW_MODE_INFRA) {
177 if (adapter->psstate != PS_STATE_FULL_POWER) 177 if (adapter->psstate != PS_STATE_FULL_POWER)
178 libertas_ps_wakeup(priv, CMD_OPTION_WAITFORRSP); 178 lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
179 adapter->psmode = WLAN802_11POWERMODECAM; 179 adapter->psmode = LBS802_11POWERMODECAM;
180 } 180 }
181 181
182 adapter->mode = assoc_req->mode; 182 adapter->mode = assoc_req->mode;
183 ret = libertas_prepare_and_send_command(priv, 183 ret = lbs_prepare_and_send_command(priv,
184 CMD_802_11_SNMP_MIB, 184 CMD_802_11_SNMP_MIB,
185 0, CMD_OPTION_WAITFORRSP, 185 0, CMD_OPTION_WAITFORRSP,
186 OID_802_11_INFRASTRUCTURE_MODE, 186 OID_802_11_INFRASTRUCTURE_MODE,
@@ -192,26 +192,26 @@ done:
192} 192}
193 193
194 194
195static int update_channel(wlan_private * priv) 195static int update_channel(lbs_private * priv)
196{ 196{
197 /* the channel in f/w could be out of sync, get the current channel */ 197 /* the channel in f/w could be out of sync, get the current channel */
198 return libertas_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL, 198 return lbs_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL,
199 CMD_OPT_802_11_RF_CHANNEL_GET, 199 CMD_OPT_802_11_RF_CHANNEL_GET,
200 CMD_OPTION_WAITFORRSP, 0, NULL); 200 CMD_OPTION_WAITFORRSP, 0, NULL);
201} 201}
202 202
203void libertas_sync_channel(struct work_struct *work) 203void lbs_sync_channel(struct work_struct *work)
204{ 204{
205 wlan_private *priv = container_of(work, wlan_private, sync_channel); 205 lbs_private *priv = container_of(work, lbs_private, sync_channel);
206 206
207 if (update_channel(priv) != 0) 207 if (update_channel(priv) != 0)
208 lbs_pr_info("Channel synchronization failed."); 208 lbs_pr_info("Channel synchronization failed.");
209} 209}
210 210
211static int assoc_helper_channel(wlan_private *priv, 211static int assoc_helper_channel(lbs_private *priv,
212 struct assoc_request * assoc_req) 212 struct assoc_request * assoc_req)
213{ 213{
214 wlan_adapter *adapter = priv->adapter; 214 lbs_adapter *adapter = priv->adapter;
215 int ret = 0; 215 int ret = 0;
216 216
217 lbs_deb_enter(LBS_DEB_ASSOC); 217 lbs_deb_enter(LBS_DEB_ASSOC);
@@ -227,7 +227,7 @@ static int assoc_helper_channel(wlan_private *priv,
227 lbs_deb_assoc("ASSOC: channel: %d -> %d\n", 227 lbs_deb_assoc("ASSOC: channel: %d -> %d\n",
228 adapter->curbssparams.channel, assoc_req->channel); 228 adapter->curbssparams.channel, assoc_req->channel);
229 229
230 ret = libertas_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL, 230 ret = lbs_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL,
231 CMD_OPT_802_11_RF_CHANNEL_SET, 231 CMD_OPT_802_11_RF_CHANNEL_SET,
232 CMD_OPTION_WAITFORRSP, 0, &assoc_req->channel); 232 CMD_OPTION_WAITFORRSP, 0, &assoc_req->channel);
233 if (ret < 0) { 233 if (ret < 0) {
@@ -263,10 +263,10 @@ done:
263} 263}
264 264
265 265
266static int assoc_helper_wep_keys(wlan_private *priv, 266static int assoc_helper_wep_keys(lbs_private *priv,
267 struct assoc_request * assoc_req) 267 struct assoc_request * assoc_req)
268{ 268{
269 wlan_adapter *adapter = priv->adapter; 269 lbs_adapter *adapter = priv->adapter;
270 int i; 270 int i;
271 int ret = 0; 271 int ret = 0;
272 272
@@ -277,13 +277,13 @@ static int assoc_helper_wep_keys(wlan_private *priv,
277 || assoc_req->wep_keys[1].len 277 || assoc_req->wep_keys[1].len
278 || assoc_req->wep_keys[2].len 278 || assoc_req->wep_keys[2].len
279 || assoc_req->wep_keys[3].len) { 279 || assoc_req->wep_keys[3].len) {
280 ret = libertas_prepare_and_send_command(priv, 280 ret = lbs_prepare_and_send_command(priv,
281 CMD_802_11_SET_WEP, 281 CMD_802_11_SET_WEP,
282 CMD_ACT_ADD, 282 CMD_ACT_ADD,
283 CMD_OPTION_WAITFORRSP, 283 CMD_OPTION_WAITFORRSP,
284 0, assoc_req); 284 0, assoc_req);
285 } else { 285 } else {
286 ret = libertas_prepare_and_send_command(priv, 286 ret = lbs_prepare_and_send_command(priv,
287 CMD_802_11_SET_WEP, 287 CMD_802_11_SET_WEP,
288 CMD_ACT_REMOVE, 288 CMD_ACT_REMOVE,
289 CMD_OPTION_WAITFORRSP, 289 CMD_OPTION_WAITFORRSP,
@@ -298,7 +298,7 @@ static int assoc_helper_wep_keys(wlan_private *priv,
298 adapter->currentpacketfilter |= CMD_ACT_MAC_WEP_ENABLE; 298 adapter->currentpacketfilter |= CMD_ACT_MAC_WEP_ENABLE;
299 else 299 else
300 adapter->currentpacketfilter &= ~CMD_ACT_MAC_WEP_ENABLE; 300 adapter->currentpacketfilter &= ~CMD_ACT_MAC_WEP_ENABLE;
301 ret = libertas_set_mac_packet_filter(priv); 301 ret = lbs_set_mac_packet_filter(priv);
302 if (ret) 302 if (ret)
303 goto out; 303 goto out;
304 304
@@ -318,10 +318,10 @@ out:
318 return ret; 318 return ret;
319} 319}
320 320
321static int assoc_helper_secinfo(wlan_private *priv, 321static int assoc_helper_secinfo(lbs_private *priv,
322 struct assoc_request * assoc_req) 322 struct assoc_request * assoc_req)
323{ 323{
324 wlan_adapter *adapter = priv->adapter; 324 lbs_adapter *adapter = priv->adapter;
325 int ret = 0; 325 int ret = 0;
326 u32 do_wpa; 326 u32 do_wpa;
327 u32 rsn = 0; 327 u32 rsn = 0;
@@ -329,9 +329,9 @@ static int assoc_helper_secinfo(wlan_private *priv,
329 lbs_deb_enter(LBS_DEB_ASSOC); 329 lbs_deb_enter(LBS_DEB_ASSOC);
330 330
331 memcpy(&adapter->secinfo, &assoc_req->secinfo, 331 memcpy(&adapter->secinfo, &assoc_req->secinfo,
332 sizeof(struct wlan_802_11_security)); 332 sizeof(struct lbs_802_11_security));
333 333
334 ret = libertas_set_mac_packet_filter(priv); 334 ret = lbs_set_mac_packet_filter(priv);
335 if (ret) 335 if (ret)
336 goto out; 336 goto out;
337 337
@@ -341,7 +341,7 @@ static int assoc_helper_secinfo(wlan_private *priv,
341 */ 341 */
342 342
343 /* Get RSN enabled/disabled */ 343 /* Get RSN enabled/disabled */
344 ret = libertas_prepare_and_send_command(priv, 344 ret = lbs_prepare_and_send_command(priv,
345 CMD_802_11_ENABLE_RSN, 345 CMD_802_11_ENABLE_RSN,
346 CMD_ACT_GET, 346 CMD_ACT_GET,
347 CMD_OPTION_WAITFORRSP, 347 CMD_OPTION_WAITFORRSP,
@@ -358,7 +358,7 @@ static int assoc_helper_secinfo(wlan_private *priv,
358 358
359 /* Set RSN enabled/disabled */ 359 /* Set RSN enabled/disabled */
360 rsn = do_wpa; 360 rsn = do_wpa;
361 ret = libertas_prepare_and_send_command(priv, 361 ret = lbs_prepare_and_send_command(priv,
362 CMD_802_11_ENABLE_RSN, 362 CMD_802_11_ENABLE_RSN,
363 CMD_ACT_SET, 363 CMD_ACT_SET,
364 CMD_OPTION_WAITFORRSP, 364 CMD_OPTION_WAITFORRSP,
@@ -370,7 +370,7 @@ out:
370} 370}
371 371
372 372
373static int assoc_helper_wpa_keys(wlan_private *priv, 373static int assoc_helper_wpa_keys(lbs_private *priv,
374 struct assoc_request * assoc_req) 374 struct assoc_request * assoc_req)
375{ 375{
376 int ret = 0; 376 int ret = 0;
@@ -385,7 +385,7 @@ static int assoc_helper_wpa_keys(wlan_private *priv,
385 385
386 if (test_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags)) { 386 if (test_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags)) {
387 clear_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags); 387 clear_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags);
388 ret = libertas_prepare_and_send_command(priv, 388 ret = lbs_prepare_and_send_command(priv,
389 CMD_802_11_KEY_MATERIAL, 389 CMD_802_11_KEY_MATERIAL,
390 CMD_ACT_SET, 390 CMD_ACT_SET,
391 CMD_OPTION_WAITFORRSP, 391 CMD_OPTION_WAITFORRSP,
@@ -399,7 +399,7 @@ static int assoc_helper_wpa_keys(wlan_private *priv,
399 if (test_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags)) { 399 if (test_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags)) {
400 clear_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags); 400 clear_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags);
401 401
402 ret = libertas_prepare_and_send_command(priv, 402 ret = lbs_prepare_and_send_command(priv,
403 CMD_802_11_KEY_MATERIAL, 403 CMD_802_11_KEY_MATERIAL,
404 CMD_ACT_SET, 404 CMD_ACT_SET,
405 CMD_OPTION_WAITFORRSP, 405 CMD_OPTION_WAITFORRSP,
@@ -413,10 +413,10 @@ out:
413} 413}
414 414
415 415
416static int assoc_helper_wpa_ie(wlan_private *priv, 416static int assoc_helper_wpa_ie(lbs_private *priv,
417 struct assoc_request * assoc_req) 417 struct assoc_request * assoc_req)
418{ 418{
419 wlan_adapter *adapter = priv->adapter; 419 lbs_adapter *adapter = priv->adapter;
420 int ret = 0; 420 int ret = 0;
421 421
422 lbs_deb_enter(LBS_DEB_ASSOC); 422 lbs_deb_enter(LBS_DEB_ASSOC);
@@ -434,10 +434,10 @@ static int assoc_helper_wpa_ie(wlan_private *priv,
434} 434}
435 435
436 436
437static int should_deauth_infrastructure(wlan_adapter *adapter, 437static int should_deauth_infrastructure(lbs_adapter *adapter,
438 struct assoc_request * assoc_req) 438 struct assoc_request * assoc_req)
439{ 439{
440 if (adapter->connect_status != LIBERTAS_CONNECTED) 440 if (adapter->connect_status != LBS_CONNECTED)
441 return 0; 441 return 0;
442 442
443 if (test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) { 443 if (test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) {
@@ -475,13 +475,13 @@ static int should_deauth_infrastructure(wlan_adapter *adapter,
475} 475}
476 476
477 477
478static int should_stop_adhoc(wlan_adapter *adapter, 478static int should_stop_adhoc(lbs_adapter *adapter,
479 struct assoc_request * assoc_req) 479 struct assoc_request * assoc_req)
480{ 480{
481 if (adapter->connect_status != LIBERTAS_CONNECTED) 481 if (adapter->connect_status != LBS_CONNECTED)
482 return 0; 482 return 0;
483 483
484 if (libertas_ssid_cmp(adapter->curbssparams.ssid, 484 if (lbs_ssid_cmp(adapter->curbssparams.ssid,
485 adapter->curbssparams.ssid_len, 485 adapter->curbssparams.ssid_len,
486 assoc_req->ssid, assoc_req->ssid_len) != 0) 486 assoc_req->ssid, assoc_req->ssid_len) != 0)
487 return 1; 487 return 1;
@@ -501,10 +501,10 @@ static int should_stop_adhoc(wlan_adapter *adapter,
501} 501}
502 502
503 503
504void libertas_association_worker(struct work_struct *work) 504void lbs_association_worker(struct work_struct *work)
505{ 505{
506 wlan_private *priv = container_of(work, wlan_private, assoc_work.work); 506 lbs_private *priv = container_of(work, lbs_private, assoc_work.work);
507 wlan_adapter *adapter = priv->adapter; 507 lbs_adapter *adapter = priv->adapter;
508 struct assoc_request * assoc_req = NULL; 508 struct assoc_request * assoc_req = NULL;
509 int ret = 0; 509 int ret = 0;
510 int find_any_ssid = 0; 510 int find_any_ssid = 0;
@@ -538,7 +538,7 @@ void libertas_association_worker(struct work_struct *work)
538 if (find_any_ssid) { 538 if (find_any_ssid) {
539 u8 new_mode; 539 u8 new_mode;
540 540
541 ret = libertas_find_best_network_ssid(priv, assoc_req->ssid, 541 ret = lbs_find_best_network_ssid(priv, assoc_req->ssid,
542 &assoc_req->ssid_len, assoc_req->mode, &new_mode); 542 &assoc_req->ssid_len, assoc_req->mode, &new_mode);
543 if (ret) { 543 if (ret) {
544 lbs_deb_assoc("Could not find best network\n"); 544 lbs_deb_assoc("Could not find best network\n");
@@ -559,7 +559,7 @@ void libertas_association_worker(struct work_struct *work)
559 */ 559 */
560 if (adapter->mode == IW_MODE_INFRA) { 560 if (adapter->mode == IW_MODE_INFRA) {
561 if (should_deauth_infrastructure(adapter, assoc_req)) { 561 if (should_deauth_infrastructure(adapter, assoc_req)) {
562 ret = libertas_send_deauthentication(priv); 562 ret = lbs_send_deauthentication(priv);
563 if (ret) { 563 if (ret) {
564 lbs_deb_assoc("Deauthentication due to new " 564 lbs_deb_assoc("Deauthentication due to new "
565 "configuration request failed: %d\n", 565 "configuration request failed: %d\n",
@@ -568,7 +568,7 @@ void libertas_association_worker(struct work_struct *work)
568 } 568 }
569 } else if (adapter->mode == IW_MODE_ADHOC) { 569 } else if (adapter->mode == IW_MODE_ADHOC) {
570 if (should_stop_adhoc(adapter, assoc_req)) { 570 if (should_stop_adhoc(adapter, assoc_req)) {
571 ret = libertas_stop_adhoc_network(priv); 571 ret = lbs_stop_adhoc_network(priv);
572 if (ret) { 572 if (ret) {
573 lbs_deb_assoc("Teardown of AdHoc network due to " 573 lbs_deb_assoc("Teardown of AdHoc network due to "
574 "new configuration request failed: %d\n", 574 "new configuration request failed: %d\n",
@@ -649,7 +649,7 @@ void libertas_association_worker(struct work_struct *work)
649 success = 0; 649 success = 0;
650 } 650 }
651 651
652 if (adapter->connect_status != LIBERTAS_CONNECTED) { 652 if (adapter->connect_status != LBS_CONNECTED) {
653 lbs_deb_assoc("ASSOC: association attempt unsuccessful, " 653 lbs_deb_assoc("ASSOC: association attempt unsuccessful, "
654 "not connected.\n"); 654 "not connected.\n");
655 success = 0; 655 success = 0;
@@ -661,11 +661,11 @@ void libertas_association_worker(struct work_struct *work)
661 escape_essid(adapter->curbssparams.ssid, 661 escape_essid(adapter->curbssparams.ssid,
662 adapter->curbssparams.ssid_len), 662 adapter->curbssparams.ssid_len),
663 print_mac(mac, adapter->curbssparams.bssid)); 663 print_mac(mac, adapter->curbssparams.bssid));
664 libertas_prepare_and_send_command(priv, 664 lbs_prepare_and_send_command(priv,
665 CMD_802_11_RSSI, 665 CMD_802_11_RSSI,
666 0, CMD_OPTION_WAITFORRSP, 0, NULL); 666 0, CMD_OPTION_WAITFORRSP, 0, NULL);
667 667
668 libertas_prepare_and_send_command(priv, 668 lbs_prepare_and_send_command(priv,
669 CMD_802_11_GET_LOG, 669 CMD_802_11_GET_LOG,
670 0, CMD_OPTION_WAITFORRSP, 0, NULL); 670 0, CMD_OPTION_WAITFORRSP, 0, NULL);
671 } else { 671 } else {
@@ -692,7 +692,7 @@ done:
692/* 692/*
693 * Caller MUST hold any necessary locks 693 * Caller MUST hold any necessary locks
694 */ 694 */
695struct assoc_request * wlan_get_association_request(wlan_adapter *adapter) 695struct assoc_request *lbs_get_association_request(lbs_adapter *adapter)
696{ 696{
697 struct assoc_request * assoc_req; 697 struct assoc_request * assoc_req;
698 698
@@ -753,7 +753,7 @@ struct assoc_request * wlan_get_association_request(wlan_adapter *adapter)
753 753
754 if (!test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) { 754 if (!test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) {
755 memcpy(&assoc_req->secinfo, &adapter->secinfo, 755 memcpy(&assoc_req->secinfo, &adapter->secinfo,
756 sizeof(struct wlan_802_11_security)); 756 sizeof(struct lbs_802_11_security));
757 } 757 }
758 758
759 if (!test_bit(ASSOC_FLAG_WPA_IE, &assoc_req->flags)) { 759 if (!test_bit(ASSOC_FLAG_WPA_IE, &assoc_req->flags)) {
diff --git a/drivers/net/wireless/libertas/assoc.h b/drivers/net/wireless/libertas/assoc.h
index ed737eb995c0..462931cbf3be 100644
--- a/drivers/net/wireless/libertas/assoc.h
+++ b/drivers/net/wireless/libertas/assoc.h
@@ -1,14 +1,14 @@
1/* Copyright (C) 2006, Red Hat, Inc. */ 1/* Copyright (C) 2006, Red Hat, Inc. */
2 2
3#ifndef _WLAN_ASSOC_H_ 3#ifndef _LBS_ASSOC_H_
4#define _WLAN_ASSOC_H_ 4#define _LBS_ASSOC_H_
5 5
6#include "dev.h" 6#include "dev.h"
7 7
8void libertas_association_worker(struct work_struct *work); 8void lbs_association_worker(struct work_struct *work);
9 9
10struct assoc_request * wlan_get_association_request(wlan_adapter *adapter); 10struct assoc_request * lbs_get_association_request(lbs_adapter *adapter);
11 11
12void libertas_sync_channel(struct work_struct *work); 12void lbs_sync_channel(struct work_struct *work);
13 13
14#endif /* _WLAN_ASSOC_H */ 14#endif /* _LBS_ASSOC_H */
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index be5cfd8402c7..5b2a1c7c5f05 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -37,7 +37,7 @@ static u8 is_command_allowed_in_ps(__le16 command)
37 return 0; 37 return 0;
38} 38}
39 39
40static int wlan_cmd_hw_spec(wlan_private * priv, struct cmd_ds_command *cmd) 40static int lbs_cmd_hw_spec(lbs_private * priv, struct cmd_ds_command *cmd)
41{ 41{
42 struct cmd_ds_get_hw_spec *hwspec = &cmd->params.hwspec; 42 struct cmd_ds_get_hw_spec *hwspec = &cmd->params.hwspec;
43 43
@@ -51,7 +51,7 @@ static int wlan_cmd_hw_spec(wlan_private * priv, struct cmd_ds_command *cmd)
51 return 0; 51 return 0;
52} 52}
53 53
54static int wlan_cmd_802_11_ps_mode(wlan_private * priv, 54static int lbs_cmd_802_11_ps_mode(lbs_private * priv,
55 struct cmd_ds_command *cmd, 55 struct cmd_ds_command *cmd,
56 u16 cmd_action) 56 u16 cmd_action)
57{ 57{
@@ -90,7 +90,7 @@ static int wlan_cmd_802_11_ps_mode(wlan_private * priv,
90 return 0; 90 return 0;
91} 91}
92 92
93static int wlan_cmd_802_11_inactivity_timeout(wlan_private * priv, 93static int lbs_cmd_802_11_inactivity_timeout(lbs_private * priv,
94 struct cmd_ds_command *cmd, 94 struct cmd_ds_command *cmd,
95 u16 cmd_action, void *pdata_buf) 95 u16 cmd_action, void *pdata_buf)
96{ 96{
@@ -114,11 +114,11 @@ static int wlan_cmd_802_11_inactivity_timeout(wlan_private * priv,
114 return 0; 114 return 0;
115} 115}
116 116
117static int wlan_cmd_802_11_sleep_params(wlan_private * priv, 117static int lbs_cmd_802_11_sleep_params(lbs_private * priv,
118 struct cmd_ds_command *cmd, 118 struct cmd_ds_command *cmd,
119 u16 cmd_action) 119 u16 cmd_action)
120{ 120{
121 wlan_adapter *adapter = priv->adapter; 121 lbs_adapter *adapter = priv->adapter;
122 struct cmd_ds_802_11_sleep_params *sp = &cmd->params.sleep_params; 122 struct cmd_ds_802_11_sleep_params *sp = &cmd->params.sleep_params;
123 123
124 lbs_deb_enter(LBS_DEB_CMD); 124 lbs_deb_enter(LBS_DEB_CMD);
@@ -145,13 +145,13 @@ static int wlan_cmd_802_11_sleep_params(wlan_private * priv,
145 return 0; 145 return 0;
146} 146}
147 147
148static int wlan_cmd_802_11_set_wep(wlan_private * priv, 148static int lbs_cmd_802_11_set_wep(lbs_private * priv,
149 struct cmd_ds_command *cmd, 149 struct cmd_ds_command *cmd,
150 u32 cmd_act, 150 u32 cmd_act,
151 void * pdata_buf) 151 void * pdata_buf)
152{ 152{
153 struct cmd_ds_802_11_set_wep *wep = &cmd->params.wep; 153 struct cmd_ds_802_11_set_wep *wep = &cmd->params.wep;
154 wlan_adapter *adapter = priv->adapter; 154 lbs_adapter *adapter = priv->adapter;
155 int ret = 0; 155 int ret = 0;
156 struct assoc_request * assoc_req = pdata_buf; 156 struct assoc_request * assoc_req = pdata_buf;
157 157
@@ -219,7 +219,7 @@ done:
219 return ret; 219 return ret;
220} 220}
221 221
222static int wlan_cmd_802_11_enable_rsn(wlan_private * priv, 222static int lbs_cmd_802_11_enable_rsn(lbs_private * priv,
223 struct cmd_ds_command *cmd, 223 struct cmd_ds_command *cmd,
224 u16 cmd_action, 224 u16 cmd_action,
225 void * pdata_buf) 225 void * pdata_buf)
@@ -272,7 +272,7 @@ static void set_one_wpa_key(struct MrvlIEtype_keyParamSet * pkeyparamset,
272 lbs_deb_leave(LBS_DEB_CMD); 272 lbs_deb_leave(LBS_DEB_CMD);
273} 273}
274 274
275static int wlan_cmd_802_11_key_material(wlan_private * priv, 275static int lbs_cmd_802_11_key_material(lbs_private * priv,
276 struct cmd_ds_command *cmd, 276 struct cmd_ds_command *cmd,
277 u16 cmd_action, 277 u16 cmd_action,
278 u32 cmd_oid, void *pdata_buf) 278 u32 cmd_oid, void *pdata_buf)
@@ -319,7 +319,7 @@ done:
319 return ret; 319 return ret;
320} 320}
321 321
322static int wlan_cmd_802_11_reset(wlan_private * priv, 322static int lbs_cmd_802_11_reset(lbs_private * priv,
323 struct cmd_ds_command *cmd, int cmd_action) 323 struct cmd_ds_command *cmd, int cmd_action)
324{ 324{
325 struct cmd_ds_802_11_reset *reset = &cmd->params.reset; 325 struct cmd_ds_802_11_reset *reset = &cmd->params.reset;
@@ -334,7 +334,7 @@ static int wlan_cmd_802_11_reset(wlan_private * priv,
334 return 0; 334 return 0;
335} 335}
336 336
337static int wlan_cmd_802_11_get_log(wlan_private * priv, 337static int lbs_cmd_802_11_get_log(lbs_private * priv,
338 struct cmd_ds_command *cmd) 338 struct cmd_ds_command *cmd)
339{ 339{
340 lbs_deb_enter(LBS_DEB_CMD); 340 lbs_deb_enter(LBS_DEB_CMD);
@@ -346,7 +346,7 @@ static int wlan_cmd_802_11_get_log(wlan_private * priv,
346 return 0; 346 return 0;
347} 347}
348 348
349static int wlan_cmd_802_11_get_stat(wlan_private * priv, 349static int lbs_cmd_802_11_get_stat(lbs_private * priv,
350 struct cmd_ds_command *cmd) 350 struct cmd_ds_command *cmd)
351{ 351{
352 lbs_deb_enter(LBS_DEB_CMD); 352 lbs_deb_enter(LBS_DEB_CMD);
@@ -358,13 +358,13 @@ static int wlan_cmd_802_11_get_stat(wlan_private * priv,
358 return 0; 358 return 0;
359} 359}
360 360
361static int wlan_cmd_802_11_snmp_mib(wlan_private * priv, 361static int lbs_cmd_802_11_snmp_mib(lbs_private * priv,
362 struct cmd_ds_command *cmd, 362 struct cmd_ds_command *cmd,
363 int cmd_action, 363 int cmd_action,
364 int cmd_oid, void *pdata_buf) 364 int cmd_oid, void *pdata_buf)
365{ 365{
366 struct cmd_ds_802_11_snmp_mib *pSNMPMIB = &cmd->params.smib; 366 struct cmd_ds_802_11_snmp_mib *pSNMPMIB = &cmd->params.smib;
367 wlan_adapter *adapter = priv->adapter; 367 lbs_adapter *adapter = priv->adapter;
368 u8 ucTemp; 368 u8 ucTemp;
369 369
370 lbs_deb_enter(LBS_DEB_CMD); 370 lbs_deb_enter(LBS_DEB_CMD);
@@ -479,11 +479,11 @@ static int wlan_cmd_802_11_snmp_mib(wlan_private * priv,
479 return 0; 479 return 0;
480} 480}
481 481
482static int wlan_cmd_802_11_radio_control(wlan_private * priv, 482static int lbs_cmd_802_11_radio_control(lbs_private * priv,
483 struct cmd_ds_command *cmd, 483 struct cmd_ds_command *cmd,
484 int cmd_action) 484 int cmd_action)
485{ 485{
486 wlan_adapter *adapter = priv->adapter; 486 lbs_adapter *adapter = priv->adapter;
487 struct cmd_ds_802_11_radio_control *pradiocontrol = &cmd->params.radio; 487 struct cmd_ds_802_11_radio_control *pradiocontrol = &cmd->params.radio;
488 488
489 lbs_deb_enter(LBS_DEB_CMD); 489 lbs_deb_enter(LBS_DEB_CMD);
@@ -519,7 +519,7 @@ static int wlan_cmd_802_11_radio_control(wlan_private * priv,
519 return 0; 519 return 0;
520} 520}
521 521
522static int wlan_cmd_802_11_rf_tx_power(wlan_private * priv, 522static int lbs_cmd_802_11_rf_tx_power(lbs_private * priv,
523 struct cmd_ds_command *cmd, 523 struct cmd_ds_command *cmd,
524 u16 cmd_action, void *pdata_buf) 524 u16 cmd_action, void *pdata_buf)
525{ 525{
@@ -563,7 +563,7 @@ static int wlan_cmd_802_11_rf_tx_power(wlan_private * priv,
563 return 0; 563 return 0;
564} 564}
565 565
566static int wlan_cmd_802_11_monitor_mode(wlan_private * priv, 566static int lbs_cmd_802_11_monitor_mode(lbs_private * priv,
567 struct cmd_ds_command *cmd, 567 struct cmd_ds_command *cmd,
568 u16 cmd_action, void *pdata_buf) 568 u16 cmd_action, void *pdata_buf)
569{ 569{
@@ -583,13 +583,13 @@ static int wlan_cmd_802_11_monitor_mode(wlan_private * priv,
583 return 0; 583 return 0;
584} 584}
585 585
586static int wlan_cmd_802_11_rate_adapt_rateset(wlan_private * priv, 586static int lbs_cmd_802_11_rate_adapt_rateset(lbs_private * priv,
587 struct cmd_ds_command *cmd, 587 struct cmd_ds_command *cmd,
588 u16 cmd_action) 588 u16 cmd_action)
589{ 589{
590 struct cmd_ds_802_11_rate_adapt_rateset 590 struct cmd_ds_802_11_rate_adapt_rateset
591 *rateadapt = &cmd->params.rateset; 591 *rateadapt = &cmd->params.rateset;
592 wlan_adapter *adapter = priv->adapter; 592 lbs_adapter *adapter = priv->adapter;
593 593
594 lbs_deb_enter(LBS_DEB_CMD); 594 lbs_deb_enter(LBS_DEB_CMD);
595 cmd->size = 595 cmd->size =
@@ -605,12 +605,12 @@ static int wlan_cmd_802_11_rate_adapt_rateset(wlan_private * priv,
605 return 0; 605 return 0;
606} 606}
607 607
608static int wlan_cmd_802_11_data_rate(wlan_private * priv, 608static int lbs_cmd_802_11_data_rate(lbs_private * priv,
609 struct cmd_ds_command *cmd, 609 struct cmd_ds_command *cmd,
610 u16 cmd_action) 610 u16 cmd_action)
611{ 611{
612 struct cmd_ds_802_11_data_rate *pdatarate = &cmd->params.drate; 612 struct cmd_ds_802_11_data_rate *pdatarate = &cmd->params.drate;
613 wlan_adapter *adapter = priv->adapter; 613 lbs_adapter *adapter = priv->adapter;
614 614
615 lbs_deb_enter(LBS_DEB_CMD); 615 lbs_deb_enter(LBS_DEB_CMD);
616 616
@@ -621,7 +621,7 @@ static int wlan_cmd_802_11_data_rate(wlan_private * priv,
621 pdatarate->action = cpu_to_le16(cmd_action); 621 pdatarate->action = cpu_to_le16(cmd_action);
622 622
623 if (cmd_action == CMD_ACT_SET_TX_FIX_RATE) { 623 if (cmd_action == CMD_ACT_SET_TX_FIX_RATE) {
624 pdatarate->rates[0] = libertas_data_rate_to_fw_index(adapter->cur_rate); 624 pdatarate->rates[0] = lbs_data_rate_to_fw_index(adapter->cur_rate);
625 lbs_deb_cmd("DATA_RATE: set fixed 0x%02X\n", 625 lbs_deb_cmd("DATA_RATE: set fixed 0x%02X\n",
626 adapter->cur_rate); 626 adapter->cur_rate);
627 } else if (cmd_action == CMD_ACT_SET_TX_AUTO) { 627 } else if (cmd_action == CMD_ACT_SET_TX_AUTO) {
@@ -632,12 +632,12 @@ static int wlan_cmd_802_11_data_rate(wlan_private * priv,
632 return 0; 632 return 0;
633} 633}
634 634
635static int wlan_cmd_mac_multicast_adr(wlan_private * priv, 635static int lbs_cmd_mac_multicast_adr(lbs_private * priv,
636 struct cmd_ds_command *cmd, 636 struct cmd_ds_command *cmd,
637 u16 cmd_action) 637 u16 cmd_action)
638{ 638{
639 struct cmd_ds_mac_multicast_adr *pMCastAdr = &cmd->params.madr; 639 struct cmd_ds_mac_multicast_adr *pMCastAdr = &cmd->params.madr;
640 wlan_adapter *adapter = priv->adapter; 640 lbs_adapter *adapter = priv->adapter;
641 641
642 lbs_deb_enter(LBS_DEB_CMD); 642 lbs_deb_enter(LBS_DEB_CMD);
643 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_multicast_adr) + 643 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_multicast_adr) +
@@ -655,7 +655,7 @@ static int wlan_cmd_mac_multicast_adr(wlan_private * priv,
655 return 0; 655 return 0;
656} 656}
657 657
658static int wlan_cmd_802_11_rf_channel(wlan_private * priv, 658static int lbs_cmd_802_11_rf_channel(lbs_private * priv,
659 struct cmd_ds_command *cmd, 659 struct cmd_ds_command *cmd,
660 int option, void *pdata_buf) 660 int option, void *pdata_buf)
661{ 661{
@@ -676,10 +676,10 @@ static int wlan_cmd_802_11_rf_channel(wlan_private * priv,
676 return 0; 676 return 0;
677} 677}
678 678
679static int wlan_cmd_802_11_rssi(wlan_private * priv, 679static int lbs_cmd_802_11_rssi(lbs_private * priv,
680 struct cmd_ds_command *cmd) 680 struct cmd_ds_command *cmd)
681{ 681{
682 wlan_adapter *adapter = priv->adapter; 682 lbs_adapter *adapter = priv->adapter;
683 683
684 lbs_deb_enter(LBS_DEB_CMD); 684 lbs_deb_enter(LBS_DEB_CMD);
685 cmd->command = cpu_to_le16(CMD_802_11_RSSI); 685 cmd->command = cpu_to_le16(CMD_802_11_RSSI);
@@ -698,15 +698,15 @@ static int wlan_cmd_802_11_rssi(wlan_private * priv,
698 return 0; 698 return 0;
699} 699}
700 700
701static int wlan_cmd_reg_access(wlan_private * priv, 701static int lbs_cmd_reg_access(lbs_private * priv,
702 struct cmd_ds_command *cmdptr, 702 struct cmd_ds_command *cmdptr,
703 u8 cmd_action, void *pdata_buf) 703 u8 cmd_action, void *pdata_buf)
704{ 704{
705 struct wlan_offset_value *offval; 705 struct lbs_offset_value *offval;
706 706
707 lbs_deb_enter(LBS_DEB_CMD); 707 lbs_deb_enter(LBS_DEB_CMD);
708 708
709 offval = (struct wlan_offset_value *)pdata_buf; 709 offval = (struct lbs_offset_value *)pdata_buf;
710 710
711 switch (cmdptr->command) { 711 switch (cmdptr->command) {
712 case CMD_MAC_REG_ACCESS: 712 case CMD_MAC_REG_ACCESS:
@@ -773,11 +773,11 @@ static int wlan_cmd_reg_access(wlan_private * priv,
773 return 0; 773 return 0;
774} 774}
775 775
776static int wlan_cmd_802_11_mac_address(wlan_private * priv, 776static int lbs_cmd_802_11_mac_address(lbs_private * priv,
777 struct cmd_ds_command *cmd, 777 struct cmd_ds_command *cmd,
778 u16 cmd_action) 778 u16 cmd_action)
779{ 779{
780 wlan_adapter *adapter = priv->adapter; 780 lbs_adapter *adapter = priv->adapter;
781 781
782 lbs_deb_enter(LBS_DEB_CMD); 782 lbs_deb_enter(LBS_DEB_CMD);
783 cmd->command = cpu_to_le16(CMD_802_11_MAC_ADDRESS); 783 cmd->command = cpu_to_le16(CMD_802_11_MAC_ADDRESS);
@@ -797,11 +797,11 @@ static int wlan_cmd_802_11_mac_address(wlan_private * priv,
797 return 0; 797 return 0;
798} 798}
799 799
800static int wlan_cmd_802_11_eeprom_access(wlan_private * priv, 800static int lbs_cmd_802_11_eeprom_access(lbs_private * priv,
801 struct cmd_ds_command *cmd, 801 struct cmd_ds_command *cmd,
802 int cmd_action, void *pdata_buf) 802 int cmd_action, void *pdata_buf)
803{ 803{
804 struct wlan_ioctl_regrdwr *ea = pdata_buf; 804 struct lbs_ioctl_regrdwr *ea = pdata_buf;
805 805
806 lbs_deb_enter(LBS_DEB_CMD); 806 lbs_deb_enter(LBS_DEB_CMD);
807 807
@@ -819,7 +819,7 @@ static int wlan_cmd_802_11_eeprom_access(wlan_private * priv,
819 return 0; 819 return 0;
820} 820}
821 821
822static int wlan_cmd_bt_access(wlan_private * priv, 822static int lbs_cmd_bt_access(lbs_private * priv,
823 struct cmd_ds_command *cmd, 823 struct cmd_ds_command *cmd,
824 u16 cmd_action, void *pdata_buf) 824 u16 cmd_action, void *pdata_buf)
825{ 825{
@@ -857,7 +857,7 @@ static int wlan_cmd_bt_access(wlan_private * priv,
857 return 0; 857 return 0;
858} 858}
859 859
860static int wlan_cmd_fwt_access(wlan_private * priv, 860static int lbs_cmd_fwt_access(lbs_private * priv,
861 struct cmd_ds_command *cmd, 861 struct cmd_ds_command *cmd,
862 u16 cmd_action, void *pdata_buf) 862 u16 cmd_action, void *pdata_buf)
863{ 863{
@@ -879,7 +879,7 @@ static int wlan_cmd_fwt_access(wlan_private * priv,
879 return 0; 879 return 0;
880} 880}
881 881
882static int wlan_cmd_mesh_access(wlan_private * priv, 882static int lbs_cmd_mesh_access(lbs_private * priv,
883 struct cmd_ds_command *cmd, 883 struct cmd_ds_command *cmd,
884 u16 cmd_action, void *pdata_buf) 884 u16 cmd_action, void *pdata_buf)
885{ 885{
@@ -901,7 +901,7 @@ static int wlan_cmd_mesh_access(wlan_private * priv,
901 return 0; 901 return 0;
902} 902}
903 903
904static int wlan_cmd_set_boot2_ver(wlan_private * priv, 904static int lbs_cmd_set_boot2_ver(lbs_private * priv,
905 struct cmd_ds_command *cmd, 905 struct cmd_ds_command *cmd,
906 u16 cmd_action, void *pdata_buf) 906 u16 cmd_action, void *pdata_buf)
907{ 907{
@@ -913,10 +913,10 @@ static int wlan_cmd_set_boot2_ver(wlan_private * priv,
913} 913}
914 914
915/* 915/*
916 * Note: NEVER use libertas_queue_cmd() with addtail==0 other than for 916 * Note: NEVER use lbs_queue_cmd() with addtail==0 other than for
917 * the command timer, because it does not account for queued commands. 917 * the command timer, because it does not account for queued commands.
918 */ 918 */
919void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail) 919void lbs_queue_cmd(lbs_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail)
920{ 920{
921 unsigned long flags; 921 unsigned long flags;
922 struct cmd_ds_command *cmdptr; 922 struct cmd_ds_command *cmdptr;
@@ -968,12 +968,12 @@ done:
968 * For now - we are not performing the endian conversion the second time - but 968 * For now - we are not performing the endian conversion the second time - but
969 * for PS and DEEP_SLEEP we need to worry 969 * for PS and DEEP_SLEEP we need to worry
970 */ 970 */
971static int DownloadcommandToStation(wlan_private * priv, 971static int DownloadcommandToStation(lbs_private * priv,
972 struct cmd_ctrl_node *cmdnode) 972 struct cmd_ctrl_node *cmdnode)
973{ 973{
974 unsigned long flags; 974 unsigned long flags;
975 struct cmd_ds_command *cmdptr; 975 struct cmd_ds_command *cmdptr;
976 wlan_adapter *adapter = priv->adapter; 976 lbs_adapter *adapter = priv->adapter;
977 int ret = -1; 977 int ret = -1;
978 u16 cmdsize; 978 u16 cmdsize;
979 u16 command; 979 u16 command;
@@ -990,7 +990,7 @@ static int DownloadcommandToStation(wlan_private * priv,
990 spin_lock_irqsave(&adapter->driver_lock, flags); 990 spin_lock_irqsave(&adapter->driver_lock, flags);
991 if (!cmdptr || !cmdptr->size) { 991 if (!cmdptr || !cmdptr->size) {
992 lbs_deb_host("DNLD_CMD: cmdptr is NULL or zero\n"); 992 lbs_deb_host("DNLD_CMD: cmdptr is NULL or zero\n");
993 __libertas_cleanup_and_insert_cmd(priv, cmdnode); 993 __lbs_cleanup_and_insert_cmd(priv, cmdnode);
994 spin_unlock_irqrestore(&adapter->driver_lock, flags); 994 spin_unlock_irqrestore(&adapter->driver_lock, flags);
995 goto done; 995 goto done;
996 } 996 }
@@ -1015,7 +1015,7 @@ static int DownloadcommandToStation(wlan_private * priv,
1015 lbs_deb_host("DNLD_CMD: hw_host_to_card failed\n"); 1015 lbs_deb_host("DNLD_CMD: hw_host_to_card failed\n");
1016 spin_lock_irqsave(&adapter->driver_lock, flags); 1016 spin_lock_irqsave(&adapter->driver_lock, flags);
1017 adapter->cur_cmd_retcode = ret; 1017 adapter->cur_cmd_retcode = ret;
1018 __libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd); 1018 __lbs_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
1019 adapter->nr_cmd_pending--; 1019 adapter->nr_cmd_pending--;
1020 adapter->cur_cmd = NULL; 1020 adapter->cur_cmd = NULL;
1021 spin_unlock_irqrestore(&adapter->driver_lock, flags); 1021 spin_unlock_irqrestore(&adapter->driver_lock, flags);
@@ -1038,7 +1038,7 @@ done:
1038 return ret; 1038 return ret;
1039} 1039}
1040 1040
1041static int wlan_cmd_mac_control(wlan_private * priv, 1041static int lbs_cmd_mac_control(lbs_private * priv,
1042 struct cmd_ds_command *cmd) 1042 struct cmd_ds_command *cmd)
1043{ 1043{
1044 struct cmd_ds_mac_control *mac = &cmd->params.macctrl; 1044 struct cmd_ds_mac_control *mac = &cmd->params.macctrl;
@@ -1060,9 +1060,9 @@ static int wlan_cmd_mac_control(wlan_private * priv,
1060 * This function inserts command node to cmdfreeq 1060 * This function inserts command node to cmdfreeq
1061 * after cleans it. Requires adapter->driver_lock held. 1061 * after cleans it. Requires adapter->driver_lock held.
1062 */ 1062 */
1063void __libertas_cleanup_and_insert_cmd(wlan_private * priv, struct cmd_ctrl_node *ptempcmd) 1063void __lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptempcmd)
1064{ 1064{
1065 wlan_adapter *adapter = priv->adapter; 1065 lbs_adapter *adapter = priv->adapter;
1066 1066
1067 if (!ptempcmd) 1067 if (!ptempcmd)
1068 return; 1068 return;
@@ -1071,22 +1071,22 @@ void __libertas_cleanup_and_insert_cmd(wlan_private * priv, struct cmd_ctrl_node
1071 list_add_tail((struct list_head *)ptempcmd, &adapter->cmdfreeq); 1071 list_add_tail((struct list_head *)ptempcmd, &adapter->cmdfreeq);
1072} 1072}
1073 1073
1074static void libertas_cleanup_and_insert_cmd(wlan_private * priv, struct cmd_ctrl_node *ptempcmd) 1074static void lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptempcmd)
1075{ 1075{
1076 unsigned long flags; 1076 unsigned long flags;
1077 1077
1078 spin_lock_irqsave(&priv->adapter->driver_lock, flags); 1078 spin_lock_irqsave(&priv->adapter->driver_lock, flags);
1079 __libertas_cleanup_and_insert_cmd(priv, ptempcmd); 1079 __lbs_cleanup_and_insert_cmd(priv, ptempcmd);
1080 spin_unlock_irqrestore(&priv->adapter->driver_lock, flags); 1080 spin_unlock_irqrestore(&priv->adapter->driver_lock, flags);
1081} 1081}
1082 1082
1083int libertas_set_radio_control(wlan_private * priv) 1083int lbs_set_radio_control(lbs_private * priv)
1084{ 1084{
1085 int ret = 0; 1085 int ret = 0;
1086 1086
1087 lbs_deb_enter(LBS_DEB_CMD); 1087 lbs_deb_enter(LBS_DEB_CMD);
1088 1088
1089 ret = libertas_prepare_and_send_command(priv, 1089 ret = lbs_prepare_and_send_command(priv,
1090 CMD_802_11_RADIO_CONTROL, 1090 CMD_802_11_RADIO_CONTROL,
1091 CMD_ACT_SET, 1091 CMD_ACT_SET,
1092 CMD_OPTION_WAITFORRSP, 0, NULL); 1092 CMD_OPTION_WAITFORRSP, 0, NULL);
@@ -1098,14 +1098,14 @@ int libertas_set_radio_control(wlan_private * priv)
1098 return ret; 1098 return ret;
1099} 1099}
1100 1100
1101int libertas_set_mac_packet_filter(wlan_private * priv) 1101int lbs_set_mac_packet_filter(lbs_private * priv)
1102{ 1102{
1103 int ret = 0; 1103 int ret = 0;
1104 1104
1105 lbs_deb_enter(LBS_DEB_CMD); 1105 lbs_deb_enter(LBS_DEB_CMD);
1106 1106
1107 /* Send MAC control command to station */ 1107 /* Send MAC control command to station */
1108 ret = libertas_prepare_and_send_command(priv, 1108 ret = lbs_prepare_and_send_command(priv,
1109 CMD_MAC_CONTROL, 0, 0, 0, NULL); 1109 CMD_MAC_CONTROL, 0, 0, 0, NULL);
1110 1110
1111 lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret); 1111 lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret);
@@ -1115,7 +1115,7 @@ int libertas_set_mac_packet_filter(wlan_private * priv)
1115/** 1115/**
1116 * @brief This function prepare the command before send to firmware. 1116 * @brief This function prepare the command before send to firmware.
1117 * 1117 *
1118 * @param priv A pointer to wlan_private structure 1118 * @param priv A pointer to lbs_private structure
1119 * @param cmd_no command number 1119 * @param cmd_no command number
1120 * @param cmd_action command action: GET or SET 1120 * @param cmd_action command action: GET or SET
1121 * @param wait_option wait option: wait response or not 1121 * @param wait_option wait option: wait response or not
@@ -1123,13 +1123,13 @@ int libertas_set_mac_packet_filter(wlan_private * priv)
1123 * @param pdata_buf A pointer to informaion buffer 1123 * @param pdata_buf A pointer to informaion buffer
1124 * @return 0 or -1 1124 * @return 0 or -1
1125 */ 1125 */
1126int libertas_prepare_and_send_command(wlan_private * priv, 1126int lbs_prepare_and_send_command(lbs_private * priv,
1127 u16 cmd_no, 1127 u16 cmd_no,
1128 u16 cmd_action, 1128 u16 cmd_action,
1129 u16 wait_option, u32 cmd_oid, void *pdata_buf) 1129 u16 wait_option, u32 cmd_oid, void *pdata_buf)
1130{ 1130{
1131 int ret = 0; 1131 int ret = 0;
1132 wlan_adapter *adapter = priv->adapter; 1132 lbs_adapter *adapter = priv->adapter;
1133 struct cmd_ctrl_node *cmdnode; 1133 struct cmd_ctrl_node *cmdnode;
1134 struct cmd_ds_command *cmdptr; 1134 struct cmd_ds_command *cmdptr;
1135 unsigned long flags; 1135 unsigned long flags;
@@ -1148,7 +1148,7 @@ int libertas_prepare_and_send_command(wlan_private * priv,
1148 goto done; 1148 goto done;
1149 } 1149 }
1150 1150
1151 cmdnode = libertas_get_free_cmd_ctrl_node(priv); 1151 cmdnode = lbs_get_free_cmd_ctrl_node(priv);
1152 1152
1153 if (cmdnode == NULL) { 1153 if (cmdnode == NULL) {
1154 lbs_deb_host("PREP_CMD: cmdnode is NULL\n"); 1154 lbs_deb_host("PREP_CMD: cmdnode is NULL\n");
@@ -1159,7 +1159,7 @@ int libertas_prepare_and_send_command(wlan_private * priv,
1159 goto done; 1159 goto done;
1160 } 1160 }
1161 1161
1162 libertas_set_cmd_ctrl_node(priv, cmdnode, cmd_oid, wait_option, pdata_buf); 1162 lbs_set_cmd_ctrl_node(priv, cmdnode, cmd_oid, wait_option, pdata_buf);
1163 1163
1164 cmdptr = (struct cmd_ds_command *)cmdnode->bufvirtualaddr; 1164 cmdptr = (struct cmd_ds_command *)cmdnode->bufvirtualaddr;
1165 1165
@@ -1167,7 +1167,7 @@ int libertas_prepare_and_send_command(wlan_private * priv,
1167 1167
1168 if (!cmdptr) { 1168 if (!cmdptr) {
1169 lbs_deb_host("PREP_CMD: cmdptr is NULL\n"); 1169 lbs_deb_host("PREP_CMD: cmdptr is NULL\n");
1170 libertas_cleanup_and_insert_cmd(priv, cmdnode); 1170 lbs_cleanup_and_insert_cmd(priv, cmdnode);
1171 ret = -1; 1171 ret = -1;
1172 goto done; 1172 goto done;
1173 } 1173 }
@@ -1181,116 +1181,116 @@ int libertas_prepare_and_send_command(wlan_private * priv,
1181 1181
1182 switch (cmd_no) { 1182 switch (cmd_no) {
1183 case CMD_GET_HW_SPEC: 1183 case CMD_GET_HW_SPEC:
1184 ret = wlan_cmd_hw_spec(priv, cmdptr); 1184 ret = lbs_cmd_hw_spec(priv, cmdptr);
1185 break; 1185 break;
1186 case CMD_802_11_PS_MODE: 1186 case CMD_802_11_PS_MODE:
1187 ret = wlan_cmd_802_11_ps_mode(priv, cmdptr, cmd_action); 1187 ret = lbs_cmd_802_11_ps_mode(priv, cmdptr, cmd_action);
1188 break; 1188 break;
1189 1189
1190 case CMD_802_11_SCAN: 1190 case CMD_802_11_SCAN:
1191 ret = libertas_cmd_80211_scan(priv, cmdptr, pdata_buf); 1191 ret = lbs_cmd_80211_scan(priv, cmdptr, pdata_buf);
1192 break; 1192 break;
1193 1193
1194 case CMD_MAC_CONTROL: 1194 case CMD_MAC_CONTROL:
1195 ret = wlan_cmd_mac_control(priv, cmdptr); 1195 ret = lbs_cmd_mac_control(priv, cmdptr);
1196 break; 1196 break;
1197 1197
1198 case CMD_802_11_ASSOCIATE: 1198 case CMD_802_11_ASSOCIATE:
1199 case CMD_802_11_REASSOCIATE: 1199 case CMD_802_11_REASSOCIATE:
1200 ret = libertas_cmd_80211_associate(priv, cmdptr, pdata_buf); 1200 ret = lbs_cmd_80211_associate(priv, cmdptr, pdata_buf);
1201 break; 1201 break;
1202 1202
1203 case CMD_802_11_DEAUTHENTICATE: 1203 case CMD_802_11_DEAUTHENTICATE:
1204 ret = libertas_cmd_80211_deauthenticate(priv, cmdptr); 1204 ret = lbs_cmd_80211_deauthenticate(priv, cmdptr);
1205 break; 1205 break;
1206 1206
1207 case CMD_802_11_SET_WEP: 1207 case CMD_802_11_SET_WEP:
1208 ret = wlan_cmd_802_11_set_wep(priv, cmdptr, cmd_action, pdata_buf); 1208 ret = lbs_cmd_802_11_set_wep(priv, cmdptr, cmd_action, pdata_buf);
1209 break; 1209 break;
1210 1210
1211 case CMD_802_11_AD_HOC_START: 1211 case CMD_802_11_AD_HOC_START:
1212 ret = libertas_cmd_80211_ad_hoc_start(priv, cmdptr, pdata_buf); 1212 ret = lbs_cmd_80211_ad_hoc_start(priv, cmdptr, pdata_buf);
1213 break; 1213 break;
1214 case CMD_CODE_DNLD: 1214 case CMD_CODE_DNLD:
1215 break; 1215 break;
1216 1216
1217 case CMD_802_11_RESET: 1217 case CMD_802_11_RESET:
1218 ret = wlan_cmd_802_11_reset(priv, cmdptr, cmd_action); 1218 ret = lbs_cmd_802_11_reset(priv, cmdptr, cmd_action);
1219 break; 1219 break;
1220 1220
1221 case CMD_802_11_GET_LOG: 1221 case CMD_802_11_GET_LOG:
1222 ret = wlan_cmd_802_11_get_log(priv, cmdptr); 1222 ret = lbs_cmd_802_11_get_log(priv, cmdptr);
1223 break; 1223 break;
1224 1224
1225 case CMD_802_11_AUTHENTICATE: 1225 case CMD_802_11_AUTHENTICATE:
1226 ret = libertas_cmd_80211_authenticate(priv, cmdptr, pdata_buf); 1226 ret = lbs_cmd_80211_authenticate(priv, cmdptr, pdata_buf);
1227 break; 1227 break;
1228 1228
1229 case CMD_802_11_GET_STAT: 1229 case CMD_802_11_GET_STAT:
1230 ret = wlan_cmd_802_11_get_stat(priv, cmdptr); 1230 ret = lbs_cmd_802_11_get_stat(priv, cmdptr);
1231 break; 1231 break;
1232 1232
1233 case CMD_802_11_SNMP_MIB: 1233 case CMD_802_11_SNMP_MIB:
1234 ret = wlan_cmd_802_11_snmp_mib(priv, cmdptr, 1234 ret = lbs_cmd_802_11_snmp_mib(priv, cmdptr,
1235 cmd_action, cmd_oid, pdata_buf); 1235 cmd_action, cmd_oid, pdata_buf);
1236 break; 1236 break;
1237 1237
1238 case CMD_MAC_REG_ACCESS: 1238 case CMD_MAC_REG_ACCESS:
1239 case CMD_BBP_REG_ACCESS: 1239 case CMD_BBP_REG_ACCESS:
1240 case CMD_RF_REG_ACCESS: 1240 case CMD_RF_REG_ACCESS:
1241 ret = wlan_cmd_reg_access(priv, cmdptr, cmd_action, pdata_buf); 1241 ret = lbs_cmd_reg_access(priv, cmdptr, cmd_action, pdata_buf);
1242 break; 1242 break;
1243 1243
1244 case CMD_802_11_RF_CHANNEL: 1244 case CMD_802_11_RF_CHANNEL:
1245 ret = wlan_cmd_802_11_rf_channel(priv, cmdptr, 1245 ret = lbs_cmd_802_11_rf_channel(priv, cmdptr,
1246 cmd_action, pdata_buf); 1246 cmd_action, pdata_buf);
1247 break; 1247 break;
1248 1248
1249 case CMD_802_11_RF_TX_POWER: 1249 case CMD_802_11_RF_TX_POWER:
1250 ret = wlan_cmd_802_11_rf_tx_power(priv, cmdptr, 1250 ret = lbs_cmd_802_11_rf_tx_power(priv, cmdptr,
1251 cmd_action, pdata_buf); 1251 cmd_action, pdata_buf);
1252 break; 1252 break;
1253 1253
1254 case CMD_802_11_RADIO_CONTROL: 1254 case CMD_802_11_RADIO_CONTROL:
1255 ret = wlan_cmd_802_11_radio_control(priv, cmdptr, cmd_action); 1255 ret = lbs_cmd_802_11_radio_control(priv, cmdptr, cmd_action);
1256 break; 1256 break;
1257 1257
1258 case CMD_802_11_DATA_RATE: 1258 case CMD_802_11_DATA_RATE:
1259 ret = wlan_cmd_802_11_data_rate(priv, cmdptr, cmd_action); 1259 ret = lbs_cmd_802_11_data_rate(priv, cmdptr, cmd_action);
1260 break; 1260 break;
1261 case CMD_802_11_RATE_ADAPT_RATESET: 1261 case CMD_802_11_RATE_ADAPT_RATESET:
1262 ret = wlan_cmd_802_11_rate_adapt_rateset(priv, 1262 ret = lbs_cmd_802_11_rate_adapt_rateset(priv,
1263 cmdptr, cmd_action); 1263 cmdptr, cmd_action);
1264 break; 1264 break;
1265 1265
1266 case CMD_MAC_MULTICAST_ADR: 1266 case CMD_MAC_MULTICAST_ADR:
1267 ret = wlan_cmd_mac_multicast_adr(priv, cmdptr, cmd_action); 1267 ret = lbs_cmd_mac_multicast_adr(priv, cmdptr, cmd_action);
1268 break; 1268 break;
1269 1269
1270 case CMD_802_11_MONITOR_MODE: 1270 case CMD_802_11_MONITOR_MODE:
1271 ret = wlan_cmd_802_11_monitor_mode(priv, cmdptr, 1271 ret = lbs_cmd_802_11_monitor_mode(priv, cmdptr,
1272 cmd_action, pdata_buf); 1272 cmd_action, pdata_buf);
1273 break; 1273 break;
1274 1274
1275 case CMD_802_11_AD_HOC_JOIN: 1275 case CMD_802_11_AD_HOC_JOIN:
1276 ret = libertas_cmd_80211_ad_hoc_join(priv, cmdptr, pdata_buf); 1276 ret = lbs_cmd_80211_ad_hoc_join(priv, cmdptr, pdata_buf);
1277 break; 1277 break;
1278 1278
1279 case CMD_802_11_RSSI: 1279 case CMD_802_11_RSSI:
1280 ret = wlan_cmd_802_11_rssi(priv, cmdptr); 1280 ret = lbs_cmd_802_11_rssi(priv, cmdptr);
1281 break; 1281 break;
1282 1282
1283 case CMD_802_11_AD_HOC_STOP: 1283 case CMD_802_11_AD_HOC_STOP:
1284 ret = libertas_cmd_80211_ad_hoc_stop(priv, cmdptr); 1284 ret = lbs_cmd_80211_ad_hoc_stop(priv, cmdptr);
1285 break; 1285 break;
1286 1286
1287 case CMD_802_11_ENABLE_RSN: 1287 case CMD_802_11_ENABLE_RSN:
1288 ret = wlan_cmd_802_11_enable_rsn(priv, cmdptr, cmd_action, 1288 ret = lbs_cmd_802_11_enable_rsn(priv, cmdptr, cmd_action,
1289 pdata_buf); 1289 pdata_buf);
1290 break; 1290 break;
1291 1291
1292 case CMD_802_11_KEY_MATERIAL: 1292 case CMD_802_11_KEY_MATERIAL:
1293 ret = wlan_cmd_802_11_key_material(priv, cmdptr, cmd_action, 1293 ret = lbs_cmd_802_11_key_material(priv, cmdptr, cmd_action,
1294 cmd_oid, pdata_buf); 1294 cmd_oid, pdata_buf);
1295 break; 1295 break;
1296 1296
@@ -1300,11 +1300,11 @@ int libertas_prepare_and_send_command(wlan_private * priv,
1300 break; 1300 break;
1301 1301
1302 case CMD_802_11_MAC_ADDRESS: 1302 case CMD_802_11_MAC_ADDRESS:
1303 ret = wlan_cmd_802_11_mac_address(priv, cmdptr, cmd_action); 1303 ret = lbs_cmd_802_11_mac_address(priv, cmdptr, cmd_action);
1304 break; 1304 break;
1305 1305
1306 case CMD_802_11_EEPROM_ACCESS: 1306 case CMD_802_11_EEPROM_ACCESS:
1307 ret = wlan_cmd_802_11_eeprom_access(priv, cmdptr, 1307 ret = lbs_cmd_802_11_eeprom_access(priv, cmdptr,
1308 cmd_action, pdata_buf); 1308 cmd_action, pdata_buf);
1309 break; 1309 break;
1310 1310
@@ -1322,17 +1322,17 @@ int libertas_prepare_and_send_command(wlan_private * priv,
1322 goto done; 1322 goto done;
1323 1323
1324 case CMD_802_11D_DOMAIN_INFO: 1324 case CMD_802_11D_DOMAIN_INFO:
1325 ret = libertas_cmd_802_11d_domain_info(priv, cmdptr, 1325 ret = lbs_cmd_802_11d_domain_info(priv, cmdptr,
1326 cmd_no, cmd_action); 1326 cmd_no, cmd_action);
1327 break; 1327 break;
1328 1328
1329 case CMD_802_11_SLEEP_PARAMS: 1329 case CMD_802_11_SLEEP_PARAMS:
1330 ret = wlan_cmd_802_11_sleep_params(priv, cmdptr, cmd_action); 1330 ret = lbs_cmd_802_11_sleep_params(priv, cmdptr, cmd_action);
1331 break; 1331 break;
1332 case CMD_802_11_INACTIVITY_TIMEOUT: 1332 case CMD_802_11_INACTIVITY_TIMEOUT:
1333 ret = wlan_cmd_802_11_inactivity_timeout(priv, cmdptr, 1333 ret = lbs_cmd_802_11_inactivity_timeout(priv, cmdptr,
1334 cmd_action, pdata_buf); 1334 cmd_action, pdata_buf);
1335 libertas_set_cmd_ctrl_node(priv, cmdnode, 0, 0, pdata_buf); 1335 lbs_set_cmd_ctrl_node(priv, cmdnode, 0, 0, pdata_buf);
1336 break; 1336 break;
1337 1337
1338 case CMD_802_11_TPC_CFG: 1338 case CMD_802_11_TPC_CFG:
@@ -1379,19 +1379,19 @@ int libertas_prepare_and_send_command(wlan_private * priv,
1379 ret = 0; 1379 ret = 0;
1380 break; 1380 break;
1381 case CMD_BT_ACCESS: 1381 case CMD_BT_ACCESS:
1382 ret = wlan_cmd_bt_access(priv, cmdptr, cmd_action, pdata_buf); 1382 ret = lbs_cmd_bt_access(priv, cmdptr, cmd_action, pdata_buf);
1383 break; 1383 break;
1384 1384
1385 case CMD_FWT_ACCESS: 1385 case CMD_FWT_ACCESS:
1386 ret = wlan_cmd_fwt_access(priv, cmdptr, cmd_action, pdata_buf); 1386 ret = lbs_cmd_fwt_access(priv, cmdptr, cmd_action, pdata_buf);
1387 break; 1387 break;
1388 1388
1389 case CMD_MESH_ACCESS: 1389 case CMD_MESH_ACCESS:
1390 ret = wlan_cmd_mesh_access(priv, cmdptr, cmd_action, pdata_buf); 1390 ret = lbs_cmd_mesh_access(priv, cmdptr, cmd_action, pdata_buf);
1391 break; 1391 break;
1392 1392
1393 case CMD_SET_BOOT2_VER: 1393 case CMD_SET_BOOT2_VER:
1394 ret = wlan_cmd_set_boot2_ver(priv, cmdptr, cmd_action, pdata_buf); 1394 ret = lbs_cmd_set_boot2_ver(priv, cmdptr, cmd_action, pdata_buf);
1395 break; 1395 break;
1396 1396
1397 case CMD_GET_TSF: 1397 case CMD_GET_TSF:
@@ -1409,14 +1409,14 @@ int libertas_prepare_and_send_command(wlan_private * priv,
1409 /* return error, since the command preparation failed */ 1409 /* return error, since the command preparation failed */
1410 if (ret != 0) { 1410 if (ret != 0) {
1411 lbs_deb_host("PREP_CMD: command preparation failed\n"); 1411 lbs_deb_host("PREP_CMD: command preparation failed\n");
1412 libertas_cleanup_and_insert_cmd(priv, cmdnode); 1412 lbs_cleanup_and_insert_cmd(priv, cmdnode);
1413 ret = -1; 1413 ret = -1;
1414 goto done; 1414 goto done;
1415 } 1415 }
1416 1416
1417 cmdnode->cmdwaitqwoken = 0; 1417 cmdnode->cmdwaitqwoken = 0;
1418 1418
1419 libertas_queue_cmd(adapter, cmdnode, 1); 1419 lbs_queue_cmd(adapter, cmdnode, 1);
1420 wake_up_interruptible(&priv->waitq); 1420 wake_up_interruptible(&priv->waitq);
1421 1421
1422 if (wait_option & CMD_OPTION_WAITFORRSP) { 1422 if (wait_option & CMD_OPTION_WAITFORRSP) {
@@ -1439,23 +1439,23 @@ done:
1439 lbs_deb_leave_args(LBS_DEB_HOST, "ret %d", ret); 1439 lbs_deb_leave_args(LBS_DEB_HOST, "ret %d", ret);
1440 return ret; 1440 return ret;
1441} 1441}
1442EXPORT_SYMBOL_GPL(libertas_prepare_and_send_command); 1442EXPORT_SYMBOL_GPL(lbs_prepare_and_send_command);
1443 1443
1444/** 1444/**
1445 * @brief This function allocates the command buffer and link 1445 * @brief This function allocates the command buffer and link
1446 * it to command free queue. 1446 * it to command free queue.
1447 * 1447 *
1448 * @param priv A pointer to wlan_private structure 1448 * @param priv A pointer to lbs_private structure
1449 * @return 0 or -1 1449 * @return 0 or -1
1450 */ 1450 */
1451int libertas_allocate_cmd_buffer(wlan_private * priv) 1451int lbs_allocate_cmd_buffer(lbs_private * priv)
1452{ 1452{
1453 int ret = 0; 1453 int ret = 0;
1454 u32 ulbufsize; 1454 u32 ulbufsize;
1455 u32 i; 1455 u32 i;
1456 struct cmd_ctrl_node *tempcmd_array; 1456 struct cmd_ctrl_node *tempcmd_array;
1457 u8 *ptempvirtualaddr; 1457 u8 *ptempvirtualaddr;
1458 wlan_adapter *adapter = priv->adapter; 1458 lbs_adapter *adapter = priv->adapter;
1459 1459
1460 lbs_deb_enter(LBS_DEB_HOST); 1460 lbs_deb_enter(LBS_DEB_HOST);
1461 1461
@@ -1484,7 +1484,7 @@ int libertas_allocate_cmd_buffer(wlan_private * priv)
1484 1484
1485 for (i = 0; i < MRVDRV_NUM_OF_CMD_BUFFER; i++) { 1485 for (i = 0; i < MRVDRV_NUM_OF_CMD_BUFFER; i++) {
1486 init_waitqueue_head(&tempcmd_array[i].cmdwait_q); 1486 init_waitqueue_head(&tempcmd_array[i].cmdwait_q);
1487 libertas_cleanup_and_insert_cmd(priv, &tempcmd_array[i]); 1487 lbs_cleanup_and_insert_cmd(priv, &tempcmd_array[i]);
1488 } 1488 }
1489 1489
1490 ret = 0; 1490 ret = 0;
@@ -1497,15 +1497,15 @@ done:
1497/** 1497/**
1498 * @brief This function frees the command buffer. 1498 * @brief This function frees the command buffer.
1499 * 1499 *
1500 * @param priv A pointer to wlan_private structure 1500 * @param priv A pointer to lbs_private structure
1501 * @return 0 or -1 1501 * @return 0 or -1
1502 */ 1502 */
1503int libertas_free_cmd_buffer(wlan_private * priv) 1503int lbs_free_cmd_buffer(lbs_private * priv)
1504{ 1504{
1505 u32 ulbufsize; /* Someone needs to die for this. Slowly and painfully */ 1505 u32 ulbufsize; /* Someone needs to die for this. Slowly and painfully */
1506 unsigned int i; 1506 unsigned int i;
1507 struct cmd_ctrl_node *tempcmd_array; 1507 struct cmd_ctrl_node *tempcmd_array;
1508 wlan_adapter *adapter = priv->adapter; 1508 lbs_adapter *adapter = priv->adapter;
1509 1509
1510 lbs_deb_enter(LBS_DEB_HOST); 1510 lbs_deb_enter(LBS_DEB_HOST);
1511 1511
@@ -1541,13 +1541,13 @@ done:
1541 * @brief This function gets a free command node if available in 1541 * @brief This function gets a free command node if available in
1542 * command free queue. 1542 * command free queue.
1543 * 1543 *
1544 * @param priv A pointer to wlan_private structure 1544 * @param priv A pointer to lbs_private structure
1545 * @return cmd_ctrl_node A pointer to cmd_ctrl_node structure or NULL 1545 * @return cmd_ctrl_node A pointer to cmd_ctrl_node structure or NULL
1546 */ 1546 */
1547struct cmd_ctrl_node *libertas_get_free_cmd_ctrl_node(wlan_private * priv) 1547struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(lbs_private * priv)
1548{ 1548{
1549 struct cmd_ctrl_node *tempnode; 1549 struct cmd_ctrl_node *tempnode;
1550 wlan_adapter *adapter = priv->adapter; 1550 lbs_adapter *adapter = priv->adapter;
1551 unsigned long flags; 1551 unsigned long flags;
1552 1552
1553 lbs_deb_enter(LBS_DEB_HOST); 1553 lbs_deb_enter(LBS_DEB_HOST);
@@ -1602,14 +1602,14 @@ static void cleanup_cmdnode(struct cmd_ctrl_node *ptempnode)
1602/** 1602/**
1603 * @brief This function initializes the command node. 1603 * @brief This function initializes the command node.
1604 * 1604 *
1605 * @param priv A pointer to wlan_private structure 1605 * @param priv A pointer to lbs_private structure
1606 * @param ptempnode A pointer to cmd_ctrl_node structure 1606 * @param ptempnode A pointer to cmd_ctrl_node structure
1607 * @param cmd_oid cmd oid: treated as sub command 1607 * @param cmd_oid cmd oid: treated as sub command
1608 * @param wait_option wait option: wait response or not 1608 * @param wait_option wait option: wait response or not
1609 * @param pdata_buf A pointer to informaion buffer 1609 * @param pdata_buf A pointer to informaion buffer
1610 * @return 0 or -1 1610 * @return 0 or -1
1611 */ 1611 */
1612void libertas_set_cmd_ctrl_node(wlan_private * priv, 1612void lbs_set_cmd_ctrl_node(lbs_private * priv,
1613 struct cmd_ctrl_node *ptempnode, 1613 struct cmd_ctrl_node *ptempnode,
1614 u32 cmd_oid, u16 wait_option, void *pdata_buf) 1614 u32 cmd_oid, u16 wait_option, void *pdata_buf)
1615{ 1615{
@@ -1630,19 +1630,19 @@ void libertas_set_cmd_ctrl_node(wlan_private * priv,
1630 * pending queue. It will put fimware back to PS mode 1630 * pending queue. It will put fimware back to PS mode
1631 * if applicable. 1631 * if applicable.
1632 * 1632 *
1633 * @param priv A pointer to wlan_private structure 1633 * @param priv A pointer to lbs_private structure
1634 * @return 0 or -1 1634 * @return 0 or -1
1635 */ 1635 */
1636int libertas_execute_next_command(wlan_private * priv) 1636int lbs_execute_next_command(lbs_private * priv)
1637{ 1637{
1638 wlan_adapter *adapter = priv->adapter; 1638 lbs_adapter *adapter = priv->adapter;
1639 struct cmd_ctrl_node *cmdnode = NULL; 1639 struct cmd_ctrl_node *cmdnode = NULL;
1640 struct cmd_ds_command *cmdptr; 1640 struct cmd_ds_command *cmdptr;
1641 unsigned long flags; 1641 unsigned long flags;
1642 int ret = 0; 1642 int ret = 0;
1643 1643
1644 // Debug group is LBS_DEB_THREAD and not LBS_DEB_HOST, because the 1644 // Debug group is LBS_DEB_THREAD and not LBS_DEB_HOST, because the
1645 // only caller to us is libertas_thread() and we get even when a 1645 // only caller to us is lbs_thread() and we get even when a
1646 // data packet is received 1646 // data packet is received
1647 lbs_deb_enter(LBS_DEB_THREAD); 1647 lbs_deb_enter(LBS_DEB_THREAD);
1648 1648
@@ -1683,7 +1683,7 @@ int libertas_execute_next_command(wlan_private * priv)
1683 /* 1683 /*
1684 * 1. Non-PS command: 1684 * 1. Non-PS command:
1685 * Queue it. set needtowakeup to TRUE if current state 1685 * Queue it. set needtowakeup to TRUE if current state
1686 * is SLEEP, otherwise call libertas_ps_wakeup to send Exit_PS. 1686 * is SLEEP, otherwise call lbs_ps_wakeup to send Exit_PS.
1687 * 2. PS command but not Exit_PS: 1687 * 2. PS command but not Exit_PS:
1688 * Ignore it. 1688 * Ignore it.
1689 * 3. PS command Exit_PS: 1689 * 3. PS command Exit_PS:
@@ -1702,7 +1702,7 @@ int libertas_execute_next_command(wlan_private * priv)
1702 since it is blocked in main_thread. */ 1702 since it is blocked in main_thread. */
1703 adapter->needtowakeup = 1; 1703 adapter->needtowakeup = 1;
1704 } else 1704 } else
1705 libertas_ps_wakeup(priv, 0); 1705 lbs_ps_wakeup(priv, 0);
1706 1706
1707 ret = 0; 1707 ret = 0;
1708 goto done; 1708 goto done;
@@ -1722,7 +1722,7 @@ int libertas_execute_next_command(wlan_private * priv)
1722 lbs_deb_host( 1722 lbs_deb_host(
1723 "EXEC_NEXT_CMD: ignore ENTER_PS cmd\n"); 1723 "EXEC_NEXT_CMD: ignore ENTER_PS cmd\n");
1724 list_del((struct list_head *)cmdnode); 1724 list_del((struct list_head *)cmdnode);
1725 libertas_cleanup_and_insert_cmd(priv, cmdnode); 1725 lbs_cleanup_and_insert_cmd(priv, cmdnode);
1726 1726
1727 ret = 0; 1727 ret = 0;
1728 goto done; 1728 goto done;
@@ -1733,7 +1733,7 @@ int libertas_execute_next_command(wlan_private * priv)
1733 lbs_deb_host( 1733 lbs_deb_host(
1734 "EXEC_NEXT_CMD: ignore EXIT_PS cmd in sleep\n"); 1734 "EXEC_NEXT_CMD: ignore EXIT_PS cmd in sleep\n");
1735 list_del((struct list_head *)cmdnode); 1735 list_del((struct list_head *)cmdnode);
1736 libertas_cleanup_and_insert_cmd(priv, cmdnode); 1736 lbs_cleanup_and_insert_cmd(priv, cmdnode);
1737 adapter->needtowakeup = 1; 1737 adapter->needtowakeup = 1;
1738 1738
1739 ret = 0; 1739 ret = 0;
@@ -1753,9 +1753,9 @@ int libertas_execute_next_command(wlan_private * priv)
1753 * check if in power save mode, if yes, put the device back 1753 * check if in power save mode, if yes, put the device back
1754 * to PS mode 1754 * to PS mode
1755 */ 1755 */
1756 if ((adapter->psmode != WLAN802_11POWERMODECAM) && 1756 if ((adapter->psmode != LBS802_11POWERMODECAM) &&
1757 (adapter->psstate == PS_STATE_FULL_POWER) && 1757 (adapter->psstate == PS_STATE_FULL_POWER) &&
1758 (adapter->connect_status == LIBERTAS_CONNECTED)) { 1758 (adapter->connect_status == LBS_CONNECTED)) {
1759 if (adapter->secinfo.WPAenabled || 1759 if (adapter->secinfo.WPAenabled ||
1760 adapter->secinfo.WPA2enabled) { 1760 adapter->secinfo.WPA2enabled) {
1761 /* check for valid WPA group keys */ 1761 /* check for valid WPA group keys */
@@ -1764,13 +1764,13 @@ int libertas_execute_next_command(wlan_private * priv)
1764 lbs_deb_host( 1764 lbs_deb_host(
1765 "EXEC_NEXT_CMD: WPA enabled and GTK_SET" 1765 "EXEC_NEXT_CMD: WPA enabled and GTK_SET"
1766 " go back to PS_SLEEP"); 1766 " go back to PS_SLEEP");
1767 libertas_ps_sleep(priv, 0); 1767 lbs_ps_sleep(priv, 0);
1768 } 1768 }
1769 } else { 1769 } else {
1770 lbs_deb_host( 1770 lbs_deb_host(
1771 "EXEC_NEXT_CMD: cmdpendingq empty, " 1771 "EXEC_NEXT_CMD: cmdpendingq empty, "
1772 "go back to PS_SLEEP"); 1772 "go back to PS_SLEEP");
1773 libertas_ps_sleep(priv, 0); 1773 lbs_ps_sleep(priv, 0);
1774 } 1774 }
1775 } 1775 }
1776 } 1776 }
@@ -1781,7 +1781,7 @@ done:
1781 return ret; 1781 return ret;
1782} 1782}
1783 1783
1784void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str) 1784void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str)
1785{ 1785{
1786 union iwreq_data iwrq; 1786 union iwreq_data iwrq;
1787 u8 buf[50]; 1787 u8 buf[50];
@@ -1805,10 +1805,10 @@ void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str)
1805 lbs_deb_leave(LBS_DEB_WEXT); 1805 lbs_deb_leave(LBS_DEB_WEXT);
1806} 1806}
1807 1807
1808static int sendconfirmsleep(wlan_private * priv, u8 * cmdptr, u16 size) 1808static int sendconfirmsleep(lbs_private *priv, u8 *cmdptr, u16 size)
1809{ 1809{
1810 unsigned long flags; 1810 unsigned long flags;
1811 wlan_adapter *adapter = priv->adapter; 1811 lbs_adapter *adapter = priv->adapter;
1812 int ret = 0; 1812 int ret = 0;
1813 1813
1814 lbs_deb_enter(LBS_DEB_HOST); 1814 lbs_deb_enter(LBS_DEB_HOST);
@@ -1847,7 +1847,7 @@ static int sendconfirmsleep(wlan_private * priv, u8 * cmdptr, u16 size)
1847 return ret; 1847 return ret;
1848} 1848}
1849 1849
1850void libertas_ps_sleep(wlan_private * priv, int wait_option) 1850void lbs_ps_sleep(lbs_private * priv, int wait_option)
1851{ 1851{
1852 lbs_deb_enter(LBS_DEB_HOST); 1852 lbs_deb_enter(LBS_DEB_HOST);
1853 1853
@@ -1856,7 +1856,7 @@ void libertas_ps_sleep(wlan_private * priv, int wait_option)
1856 * Remove this check if it is to be supported in IBSS mode also 1856 * Remove this check if it is to be supported in IBSS mode also
1857 */ 1857 */
1858 1858
1859 libertas_prepare_and_send_command(priv, CMD_802_11_PS_MODE, 1859 lbs_prepare_and_send_command(priv, CMD_802_11_PS_MODE,
1860 CMD_SUBCMD_ENTER_PS, wait_option, 0, NULL); 1860 CMD_SUBCMD_ENTER_PS, wait_option, 0, NULL);
1861 1861
1862 lbs_deb_leave(LBS_DEB_HOST); 1862 lbs_deb_leave(LBS_DEB_HOST);
@@ -1865,19 +1865,19 @@ void libertas_ps_sleep(wlan_private * priv, int wait_option)
1865/** 1865/**
1866 * @brief This function sends Exit_PS command to firmware. 1866 * @brief This function sends Exit_PS command to firmware.
1867 * 1867 *
1868 * @param priv A pointer to wlan_private structure 1868 * @param priv A pointer to lbs_private structure
1869 * @param wait_option wait response or not 1869 * @param wait_option wait response or not
1870 * @return n/a 1870 * @return n/a
1871 */ 1871 */
1872void libertas_ps_wakeup(wlan_private * priv, int wait_option) 1872void lbs_ps_wakeup(lbs_private * priv, int wait_option)
1873{ 1873{
1874 __le32 Localpsmode; 1874 __le32 Localpsmode;
1875 1875
1876 lbs_deb_enter(LBS_DEB_HOST); 1876 lbs_deb_enter(LBS_DEB_HOST);
1877 1877
1878 Localpsmode = cpu_to_le32(WLAN802_11POWERMODECAM); 1878 Localpsmode = cpu_to_le32(LBS802_11POWERMODECAM);
1879 1879
1880 libertas_prepare_and_send_command(priv, CMD_802_11_PS_MODE, 1880 lbs_prepare_and_send_command(priv, CMD_802_11_PS_MODE,
1881 CMD_SUBCMD_EXIT_PS, 1881 CMD_SUBCMD_EXIT_PS,
1882 wait_option, 0, &Localpsmode); 1882 wait_option, 0, &Localpsmode);
1883 1883
@@ -1888,14 +1888,14 @@ void libertas_ps_wakeup(wlan_private * priv, int wait_option)
1888 * @brief This function checks condition and prepares to 1888 * @brief This function checks condition and prepares to
1889 * send sleep confirm command to firmware if ok. 1889 * send sleep confirm command to firmware if ok.
1890 * 1890 *
1891 * @param priv A pointer to wlan_private structure 1891 * @param priv A pointer to lbs_private structure
1892 * @param psmode Power Saving mode 1892 * @param psmode Power Saving mode
1893 * @return n/a 1893 * @return n/a
1894 */ 1894 */
1895void libertas_ps_confirm_sleep(wlan_private * priv, u16 psmode) 1895void lbs_ps_confirm_sleep(lbs_private * priv, u16 psmode)
1896{ 1896{
1897 unsigned long flags =0; 1897 unsigned long flags =0;
1898 wlan_adapter *adapter = priv->adapter; 1898 lbs_adapter *adapter = priv->adapter;
1899 u8 allowed = 1; 1899 u8 allowed = 1;
1900 1900
1901 lbs_deb_enter(LBS_DEB_HOST); 1901 lbs_deb_enter(LBS_DEB_HOST);
@@ -1917,8 +1917,8 @@ void libertas_ps_confirm_sleep(wlan_private * priv, u16 psmode)
1917 spin_unlock_irqrestore(&adapter->driver_lock, flags); 1917 spin_unlock_irqrestore(&adapter->driver_lock, flags);
1918 1918
1919 if (allowed) { 1919 if (allowed) {
1920 lbs_deb_host("sending libertas_ps_confirm_sleep\n"); 1920 lbs_deb_host("sending lbs_ps_confirm_sleep\n");
1921 sendconfirmsleep(priv, (u8 *) & adapter->libertas_ps_confirm_sleep, 1921 sendconfirmsleep(priv, (u8 *) & adapter->lbs_ps_confirm_sleep,
1922 sizeof(struct PS_CMD_ConfirmSleep)); 1922 sizeof(struct PS_CMD_ConfirmSleep));
1923 } else { 1923 } else {
1924 lbs_deb_host("sleep confirm has been delayed\n"); 1924 lbs_deb_host("sleep confirm has been delayed\n");
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 8f90892ea22e..6c1fdb8f11fb 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -20,15 +20,15 @@
20 * reports disconnect to upper layer, clean tx/rx packets, 20 * reports disconnect to upper layer, clean tx/rx packets,
21 * reset link state etc. 21 * reset link state etc.
22 * 22 *
23 * @param priv A pointer to wlan_private structure 23 * @param priv A pointer to lbs_private structure
24 * @return n/a 24 * @return n/a
25 */ 25 */
26void libertas_mac_event_disconnected(wlan_private * priv) 26void lbs_mac_event_disconnected(lbs_private * priv)
27{ 27{
28 wlan_adapter *adapter = priv->adapter; 28 lbs_adapter *adapter = priv->adapter;
29 union iwreq_data wrqu; 29 union iwreq_data wrqu;
30 30
31 if (adapter->connect_status != LIBERTAS_CONNECTED) 31 if (adapter->connect_status != LBS_CONNECTED)
32 return; 32 return;
33 33
34 lbs_deb_enter(LBS_DEB_CMD); 34 lbs_deb_enter(LBS_DEB_CMD);
@@ -65,7 +65,7 @@ void libertas_mac_event_disconnected(wlan_private * priv)
65 adapter->curbssparams.ssid_len), 65 adapter->curbssparams.ssid_len),
66 adapter->curbssparams.ssid_len); 66 adapter->curbssparams.ssid_len);
67 67
68 adapter->connect_status = LIBERTAS_DISCONNECTED; 68 adapter->connect_status = LBS_DISCONNECTED;
69 69
70 /* Clear out associated SSID and BSSID since connection is 70 /* Clear out associated SSID and BSSID since connection is
71 * no longer valid. 71 * no longer valid.
@@ -77,7 +77,7 @@ void libertas_mac_event_disconnected(wlan_private * priv)
77 if (adapter->psstate != PS_STATE_FULL_POWER) { 77 if (adapter->psstate != PS_STATE_FULL_POWER) {
78 /* make firmware to exit PS mode */ 78 /* make firmware to exit PS mode */
79 lbs_deb_cmd("disconnected, so exit PS mode\n"); 79 lbs_deb_cmd("disconnected, so exit PS mode\n");
80 libertas_ps_wakeup(priv, 0); 80 lbs_ps_wakeup(priv, 0);
81 } 81 }
82 lbs_deb_leave(LBS_DEB_CMD); 82 lbs_deb_leave(LBS_DEB_CMD);
83} 83}
@@ -85,11 +85,11 @@ void libertas_mac_event_disconnected(wlan_private * priv)
85/** 85/**
86 * @brief This function handles MIC failure event. 86 * @brief This function handles MIC failure event.
87 * 87 *
88 * @param priv A pointer to wlan_private structure 88 * @param priv A pointer to lbs_private structure
89 * @para event the event id 89 * @para event the event id
90 * @return n/a 90 * @return n/a
91 */ 91 */
92static void handle_mic_failureevent(wlan_private * priv, u32 event) 92static void handle_mic_failureevent(lbs_private * priv, u32 event)
93{ 93{
94 char buf[50]; 94 char buf[50];
95 95
@@ -104,15 +104,15 @@ static void handle_mic_failureevent(wlan_private * priv, u32 event)
104 strcat(buf, "multicast "); 104 strcat(buf, "multicast ");
105 } 105 }
106 106
107 libertas_send_iwevcustom_event(priv, buf); 107 lbs_send_iwevcustom_event(priv, buf);
108 lbs_deb_leave(LBS_DEB_CMD); 108 lbs_deb_leave(LBS_DEB_CMD);
109} 109}
110 110
111static int wlan_ret_reg_access(wlan_private * priv, 111static int lbs_ret_reg_access(lbs_private * priv,
112 u16 type, struct cmd_ds_command *resp) 112 u16 type, struct cmd_ds_command *resp)
113{ 113{
114 int ret = 0; 114 int ret = 0;
115 wlan_adapter *adapter = priv->adapter; 115 lbs_adapter *adapter = priv->adapter;
116 116
117 lbs_deb_enter(LBS_DEB_CMD); 117 lbs_deb_enter(LBS_DEB_CMD);
118 118
@@ -152,12 +152,12 @@ static int wlan_ret_reg_access(wlan_private * priv,
152 return ret; 152 return ret;
153} 153}
154 154
155static int wlan_ret_get_hw_spec(wlan_private * priv, 155static int lbs_ret_get_hw_spec(lbs_private * priv,
156 struct cmd_ds_command *resp) 156 struct cmd_ds_command *resp)
157{ 157{
158 u32 i; 158 u32 i;
159 struct cmd_ds_get_hw_spec *hwspec = &resp->params.hwspec; 159 struct cmd_ds_get_hw_spec *hwspec = &resp->params.hwspec;
160 wlan_adapter *adapter = priv->adapter; 160 lbs_adapter *adapter = priv->adapter;
161 int ret = 0; 161 int ret = 0;
162 DECLARE_MAC_BUF(mac); 162 DECLARE_MAC_BUF(mac);
163 163
@@ -183,7 +183,7 @@ static int wlan_ret_get_hw_spec(wlan_private * priv,
183 183
184 for (i = 0; i < MRVDRV_MAX_REGION_CODE; i++) { 184 for (i = 0; i < MRVDRV_MAX_REGION_CODE; i++) {
185 /* use the region code to search for the index */ 185 /* use the region code to search for the index */
186 if (adapter->regioncode == libertas_region_code_to_index[i]) { 186 if (adapter->regioncode == lbs_region_code_to_index[i]) {
187 break; 187 break;
188 } 188 }
189 } 189 }
@@ -201,12 +201,12 @@ static int wlan_ret_get_hw_spec(wlan_private * priv,
201 if (priv->mesh_dev) 201 if (priv->mesh_dev)
202 memcpy(priv->mesh_dev->dev_addr, adapter->current_addr, ETH_ALEN); 202 memcpy(priv->mesh_dev->dev_addr, adapter->current_addr, ETH_ALEN);
203 203
204 if (libertas_set_regiontable(priv, adapter->regioncode, 0)) { 204 if (lbs_set_regiontable(priv, adapter->regioncode, 0)) {
205 ret = -1; 205 ret = -1;
206 goto done; 206 goto done;
207 } 207 }
208 208
209 if (libertas_set_universaltable(priv, 0)) { 209 if (lbs_set_universaltable(priv, 0)) {
210 ret = -1; 210 ret = -1;
211 goto done; 211 goto done;
212 } 212 }
@@ -216,11 +216,11 @@ done:
216 return ret; 216 return ret;
217} 217}
218 218
219static int wlan_ret_802_11_sleep_params(wlan_private * priv, 219static int lbs_ret_802_11_sleep_params(lbs_private * priv,
220 struct cmd_ds_command *resp) 220 struct cmd_ds_command *resp)
221{ 221{
222 struct cmd_ds_802_11_sleep_params *sp = &resp->params.sleep_params; 222 struct cmd_ds_802_11_sleep_params *sp = &resp->params.sleep_params;
223 wlan_adapter *adapter = priv->adapter; 223 lbs_adapter *adapter = priv->adapter;
224 224
225 lbs_deb_enter(LBS_DEB_CMD); 225 lbs_deb_enter(LBS_DEB_CMD);
226 226
@@ -240,14 +240,14 @@ static int wlan_ret_802_11_sleep_params(wlan_private * priv,
240 return 0; 240 return 0;
241} 241}
242 242
243static int wlan_ret_802_11_stat(wlan_private * priv, 243static int lbs_ret_802_11_stat(lbs_private * priv,
244 struct cmd_ds_command *resp) 244 struct cmd_ds_command *resp)
245{ 245{
246 lbs_deb_enter(LBS_DEB_CMD); 246 lbs_deb_enter(LBS_DEB_CMD);
247/* currently adapter->wlan802_11Stat is unused 247/* currently adapter->wlan802_11Stat is unused
248 248
249 struct cmd_ds_802_11_get_stat *p11Stat = &resp->params.gstat; 249 struct cmd_ds_802_11_get_stat *p11Stat = &resp->params.gstat;
250 wlan_adapter *adapter = priv->adapter; 250 lbs_adapter *adapter = priv->adapter;
251 251
252 // TODO Convert it to Big endian befor copy 252 // TODO Convert it to Big endian befor copy
253 memcpy(&adapter->wlan802_11Stat, 253 memcpy(&adapter->wlan802_11Stat,
@@ -257,7 +257,7 @@ static int wlan_ret_802_11_stat(wlan_private * priv,
257 return 0; 257 return 0;
258} 258}
259 259
260static int wlan_ret_802_11_snmp_mib(wlan_private * priv, 260static int lbs_ret_802_11_snmp_mib(lbs_private * priv,
261 struct cmd_ds_command *resp) 261 struct cmd_ds_command *resp)
262{ 262{
263 struct cmd_ds_802_11_snmp_mib *smib = &resp->params.smib; 263 struct cmd_ds_802_11_snmp_mib *smib = &resp->params.smib;
@@ -299,12 +299,12 @@ static int wlan_ret_802_11_snmp_mib(wlan_private * priv,
299 return 0; 299 return 0;
300} 300}
301 301
302static int wlan_ret_802_11_key_material(wlan_private * priv, 302static int lbs_ret_802_11_key_material(lbs_private * priv,
303 struct cmd_ds_command *resp) 303 struct cmd_ds_command *resp)
304{ 304{
305 struct cmd_ds_802_11_key_material *pkeymaterial = 305 struct cmd_ds_802_11_key_material *pkeymaterial =
306 &resp->params.keymaterial; 306 &resp->params.keymaterial;
307 wlan_adapter *adapter = priv->adapter; 307 lbs_adapter *adapter = priv->adapter;
308 u16 action = le16_to_cpu(pkeymaterial->action); 308 u16 action = le16_to_cpu(pkeymaterial->action);
309 309
310 lbs_deb_enter(LBS_DEB_CMD); 310 lbs_deb_enter(LBS_DEB_CMD);
@@ -355,11 +355,11 @@ static int wlan_ret_802_11_key_material(wlan_private * priv,
355 return 0; 355 return 0;
356} 356}
357 357
358static int wlan_ret_802_11_mac_address(wlan_private * priv, 358static int lbs_ret_802_11_mac_address(lbs_private * priv,
359 struct cmd_ds_command *resp) 359 struct cmd_ds_command *resp)
360{ 360{
361 struct cmd_ds_802_11_mac_address *macadd = &resp->params.macadd; 361 struct cmd_ds_802_11_mac_address *macadd = &resp->params.macadd;
362 wlan_adapter *adapter = priv->adapter; 362 lbs_adapter *adapter = priv->adapter;
363 363
364 lbs_deb_enter(LBS_DEB_CMD); 364 lbs_deb_enter(LBS_DEB_CMD);
365 365
@@ -369,11 +369,11 @@ static int wlan_ret_802_11_mac_address(wlan_private * priv,
369 return 0; 369 return 0;
370} 370}
371 371
372static int wlan_ret_802_11_rf_tx_power(wlan_private * priv, 372static int lbs_ret_802_11_rf_tx_power(lbs_private * priv,
373 struct cmd_ds_command *resp) 373 struct cmd_ds_command *resp)
374{ 374{
375 struct cmd_ds_802_11_rf_tx_power *rtp = &resp->params.txp; 375 struct cmd_ds_802_11_rf_tx_power *rtp = &resp->params.txp;
376 wlan_adapter *adapter = priv->adapter; 376 lbs_adapter *adapter = priv->adapter;
377 377
378 lbs_deb_enter(LBS_DEB_CMD); 378 lbs_deb_enter(LBS_DEB_CMD);
379 379
@@ -385,11 +385,11 @@ static int wlan_ret_802_11_rf_tx_power(wlan_private * priv,
385 return 0; 385 return 0;
386} 386}
387 387
388static int wlan_ret_802_11_rate_adapt_rateset(wlan_private * priv, 388static int lbs_ret_802_11_rate_adapt_rateset(lbs_private * priv,
389 struct cmd_ds_command *resp) 389 struct cmd_ds_command *resp)
390{ 390{
391 struct cmd_ds_802_11_rate_adapt_rateset *rates = &resp->params.rateset; 391 struct cmd_ds_802_11_rate_adapt_rateset *rates = &resp->params.rateset;
392 wlan_adapter *adapter = priv->adapter; 392 lbs_adapter *adapter = priv->adapter;
393 393
394 lbs_deb_enter(LBS_DEB_CMD); 394 lbs_deb_enter(LBS_DEB_CMD);
395 395
@@ -402,11 +402,11 @@ static int wlan_ret_802_11_rate_adapt_rateset(wlan_private * priv,
402 return 0; 402 return 0;
403} 403}
404 404
405static int wlan_ret_802_11_data_rate(wlan_private * priv, 405static int lbs_ret_802_11_data_rate(lbs_private * priv,
406 struct cmd_ds_command *resp) 406 struct cmd_ds_command *resp)
407{ 407{
408 struct cmd_ds_802_11_data_rate *pdatarate = &resp->params.drate; 408 struct cmd_ds_802_11_data_rate *pdatarate = &resp->params.drate;
409 wlan_adapter *adapter = priv->adapter; 409 lbs_adapter *adapter = priv->adapter;
410 410
411 lbs_deb_enter(LBS_DEB_CMD); 411 lbs_deb_enter(LBS_DEB_CMD);
412 412
@@ -416,18 +416,18 @@ static int wlan_ret_802_11_data_rate(wlan_private * priv,
416 /* FIXME: get actual rates FW can do if this command actually returns 416 /* FIXME: get actual rates FW can do if this command actually returns
417 * all data rates supported. 417 * all data rates supported.
418 */ 418 */
419 adapter->cur_rate = libertas_fw_index_to_data_rate(pdatarate->rates[0]); 419 adapter->cur_rate = lbs_fw_index_to_data_rate(pdatarate->rates[0]);
420 lbs_deb_cmd("DATA_RATE: current rate 0x%02x\n", adapter->cur_rate); 420 lbs_deb_cmd("DATA_RATE: current rate 0x%02x\n", adapter->cur_rate);
421 421
422 lbs_deb_leave(LBS_DEB_CMD); 422 lbs_deb_leave(LBS_DEB_CMD);
423 return 0; 423 return 0;
424} 424}
425 425
426static int wlan_ret_802_11_rf_channel(wlan_private * priv, 426static int lbs_ret_802_11_rf_channel(lbs_private * priv,
427 struct cmd_ds_command *resp) 427 struct cmd_ds_command *resp)
428{ 428{
429 struct cmd_ds_802_11_rf_channel *rfchannel = &resp->params.rfchannel; 429 struct cmd_ds_802_11_rf_channel *rfchannel = &resp->params.rfchannel;
430 wlan_adapter *adapter = priv->adapter; 430 lbs_adapter *adapter = priv->adapter;
431 u16 action = le16_to_cpu(rfchannel->action); 431 u16 action = le16_to_cpu(rfchannel->action);
432 u16 newchannel = le16_to_cpu(rfchannel->currentchannel); 432 u16 newchannel = le16_to_cpu(rfchannel->currentchannel);
433 433
@@ -446,11 +446,11 @@ static int wlan_ret_802_11_rf_channel(wlan_private * priv,
446 return 0; 446 return 0;
447} 447}
448 448
449static int wlan_ret_802_11_rssi(wlan_private * priv, 449static int lbs_ret_802_11_rssi(lbs_private * priv,
450 struct cmd_ds_command *resp) 450 struct cmd_ds_command *resp)
451{ 451{
452 struct cmd_ds_802_11_rssi_rsp *rssirsp = &resp->params.rssirsp; 452 struct cmd_ds_802_11_rssi_rsp *rssirsp = &resp->params.rssirsp;
453 wlan_adapter *adapter = priv->adapter; 453 lbs_adapter *adapter = priv->adapter;
454 454
455 lbs_deb_enter(LBS_DEB_CMD); 455 lbs_deb_enter(LBS_DEB_CMD);
456 456
@@ -477,12 +477,12 @@ static int wlan_ret_802_11_rssi(wlan_private * priv,
477 return 0; 477 return 0;
478} 478}
479 479
480static int wlan_ret_802_11_eeprom_access(wlan_private * priv, 480static int lbs_ret_802_11_eeprom_access(lbs_private * priv,
481 struct cmd_ds_command *resp) 481 struct cmd_ds_command *resp)
482{ 482{
483 wlan_adapter *adapter = priv->adapter; 483 lbs_adapter *adapter = priv->adapter;
484 struct wlan_ioctl_regrdwr *pbuf; 484 struct lbs_ioctl_regrdwr *pbuf;
485 pbuf = (struct wlan_ioctl_regrdwr *) adapter->prdeeprom; 485 pbuf = (struct lbs_ioctl_regrdwr *) adapter->prdeeprom;
486 486
487 lbs_deb_enter_args(LBS_DEB_CMD, "len %d", 487 lbs_deb_enter_args(LBS_DEB_CMD, "len %d",
488 le16_to_cpu(resp->params.rdeeprom.bytecount)); 488 le16_to_cpu(resp->params.rdeeprom.bytecount));
@@ -503,11 +503,11 @@ static int wlan_ret_802_11_eeprom_access(wlan_private * priv,
503 return 0; 503 return 0;
504} 504}
505 505
506static int wlan_ret_get_log(wlan_private * priv, 506static int lbs_ret_get_log(lbs_private * priv,
507 struct cmd_ds_command *resp) 507 struct cmd_ds_command *resp)
508{ 508{
509 struct cmd_ds_802_11_get_log *logmessage = &resp->params.glog; 509 struct cmd_ds_802_11_get_log *logmessage = &resp->params.glog;
510 wlan_adapter *adapter = priv->adapter; 510 lbs_adapter *adapter = priv->adapter;
511 511
512 lbs_deb_enter(LBS_DEB_CMD); 512 lbs_deb_enter(LBS_DEB_CMD);
513 513
@@ -518,11 +518,11 @@ static int wlan_ret_get_log(wlan_private * priv,
518 return 0; 518 return 0;
519} 519}
520 520
521static int libertas_ret_802_11_enable_rsn(wlan_private * priv, 521static int lbs_ret_802_11_enable_rsn(lbs_private * priv,
522 struct cmd_ds_command *resp) 522 struct cmd_ds_command *resp)
523{ 523{
524 struct cmd_ds_802_11_enable_rsn *enable_rsn = &resp->params.enbrsn; 524 struct cmd_ds_802_11_enable_rsn *enable_rsn = &resp->params.enbrsn;
525 wlan_adapter *adapter = priv->adapter; 525 lbs_adapter *adapter = priv->adapter;
526 u32 * pdata_buf = adapter->cur_cmd->pdata_buf; 526 u32 * pdata_buf = adapter->cur_cmd->pdata_buf;
527 527
528 lbs_deb_enter(LBS_DEB_CMD); 528 lbs_deb_enter(LBS_DEB_CMD);
@@ -538,11 +538,11 @@ static int libertas_ret_802_11_enable_rsn(wlan_private * priv,
538 538
539static inline int handle_cmd_response(u16 respcmd, 539static inline int handle_cmd_response(u16 respcmd,
540 struct cmd_ds_command *resp, 540 struct cmd_ds_command *resp,
541 wlan_private *priv) 541 lbs_private *priv)
542{ 542{
543 int ret = 0; 543 int ret = 0;
544 unsigned long flags; 544 unsigned long flags;
545 wlan_adapter *adapter = priv->adapter; 545 lbs_adapter *adapter = priv->adapter;
546 546
547 lbs_deb_enter(LBS_DEB_HOST); 547 lbs_deb_enter(LBS_DEB_HOST);
548 548
@@ -550,47 +550,47 @@ static inline int handle_cmd_response(u16 respcmd,
550 case CMD_RET(CMD_MAC_REG_ACCESS): 550 case CMD_RET(CMD_MAC_REG_ACCESS):
551 case CMD_RET(CMD_BBP_REG_ACCESS): 551 case CMD_RET(CMD_BBP_REG_ACCESS):
552 case CMD_RET(CMD_RF_REG_ACCESS): 552 case CMD_RET(CMD_RF_REG_ACCESS):
553 ret = wlan_ret_reg_access(priv, respcmd, resp); 553 ret = lbs_ret_reg_access(priv, respcmd, resp);
554 break; 554 break;
555 555
556 case CMD_RET(CMD_GET_HW_SPEC): 556 case CMD_RET(CMD_GET_HW_SPEC):
557 ret = wlan_ret_get_hw_spec(priv, resp); 557 ret = lbs_ret_get_hw_spec(priv, resp);
558 break; 558 break;
559 559
560 case CMD_RET(CMD_802_11_SCAN): 560 case CMD_RET(CMD_802_11_SCAN):
561 ret = libertas_ret_80211_scan(priv, resp); 561 ret = lbs_ret_80211_scan(priv, resp);
562 break; 562 break;
563 563
564 case CMD_RET(CMD_802_11_GET_LOG): 564 case CMD_RET(CMD_802_11_GET_LOG):
565 ret = wlan_ret_get_log(priv, resp); 565 ret = lbs_ret_get_log(priv, resp);
566 break; 566 break;
567 567
568 case CMD_RET_802_11_ASSOCIATE: 568 case CMD_RET_802_11_ASSOCIATE:
569 case CMD_RET(CMD_802_11_ASSOCIATE): 569 case CMD_RET(CMD_802_11_ASSOCIATE):
570 case CMD_RET(CMD_802_11_REASSOCIATE): 570 case CMD_RET(CMD_802_11_REASSOCIATE):
571 ret = libertas_ret_80211_associate(priv, resp); 571 ret = lbs_ret_80211_associate(priv, resp);
572 break; 572 break;
573 573
574 case CMD_RET(CMD_802_11_DISASSOCIATE): 574 case CMD_RET(CMD_802_11_DISASSOCIATE):
575 case CMD_RET(CMD_802_11_DEAUTHENTICATE): 575 case CMD_RET(CMD_802_11_DEAUTHENTICATE):
576 ret = libertas_ret_80211_disassociate(priv, resp); 576 ret = lbs_ret_80211_disassociate(priv, resp);
577 break; 577 break;
578 578
579 case CMD_RET(CMD_802_11_AD_HOC_START): 579 case CMD_RET(CMD_802_11_AD_HOC_START):
580 case CMD_RET(CMD_802_11_AD_HOC_JOIN): 580 case CMD_RET(CMD_802_11_AD_HOC_JOIN):
581 ret = libertas_ret_80211_ad_hoc_start(priv, resp); 581 ret = lbs_ret_80211_ad_hoc_start(priv, resp);
582 break; 582 break;
583 583
584 case CMD_RET(CMD_802_11_GET_STAT): 584 case CMD_RET(CMD_802_11_GET_STAT):
585 ret = wlan_ret_802_11_stat(priv, resp); 585 ret = lbs_ret_802_11_stat(priv, resp);
586 break; 586 break;
587 587
588 case CMD_RET(CMD_802_11_SNMP_MIB): 588 case CMD_RET(CMD_802_11_SNMP_MIB):
589 ret = wlan_ret_802_11_snmp_mib(priv, resp); 589 ret = lbs_ret_802_11_snmp_mib(priv, resp);
590 break; 590 break;
591 591
592 case CMD_RET(CMD_802_11_RF_TX_POWER): 592 case CMD_RET(CMD_802_11_RF_TX_POWER):
593 ret = wlan_ret_802_11_rf_tx_power(priv, resp); 593 ret = lbs_ret_802_11_rf_tx_power(priv, resp);
594 break; 594 break;
595 595
596 case CMD_RET(CMD_802_11_SET_AFC): 596 case CMD_RET(CMD_802_11_SET_AFC):
@@ -612,45 +612,45 @@ static inline int handle_cmd_response(u16 respcmd,
612 break; 612 break;
613 613
614 case CMD_RET(CMD_802_11_ENABLE_RSN): 614 case CMD_RET(CMD_802_11_ENABLE_RSN):
615 ret = libertas_ret_802_11_enable_rsn(priv, resp); 615 ret = lbs_ret_802_11_enable_rsn(priv, resp);
616 break; 616 break;
617 617
618 case CMD_RET(CMD_802_11_DATA_RATE): 618 case CMD_RET(CMD_802_11_DATA_RATE):
619 ret = wlan_ret_802_11_data_rate(priv, resp); 619 ret = lbs_ret_802_11_data_rate(priv, resp);
620 break; 620 break;
621 case CMD_RET(CMD_802_11_RATE_ADAPT_RATESET): 621 case CMD_RET(CMD_802_11_RATE_ADAPT_RATESET):
622 ret = wlan_ret_802_11_rate_adapt_rateset(priv, resp); 622 ret = lbs_ret_802_11_rate_adapt_rateset(priv, resp);
623 break; 623 break;
624 case CMD_RET(CMD_802_11_RF_CHANNEL): 624 case CMD_RET(CMD_802_11_RF_CHANNEL):
625 ret = wlan_ret_802_11_rf_channel(priv, resp); 625 ret = lbs_ret_802_11_rf_channel(priv, resp);
626 break; 626 break;
627 627
628 case CMD_RET(CMD_802_11_RSSI): 628 case CMD_RET(CMD_802_11_RSSI):
629 ret = wlan_ret_802_11_rssi(priv, resp); 629 ret = lbs_ret_802_11_rssi(priv, resp);
630 break; 630 break;
631 631
632 case CMD_RET(CMD_802_11_MAC_ADDRESS): 632 case CMD_RET(CMD_802_11_MAC_ADDRESS):
633 ret = wlan_ret_802_11_mac_address(priv, resp); 633 ret = lbs_ret_802_11_mac_address(priv, resp);
634 break; 634 break;
635 635
636 case CMD_RET(CMD_802_11_AD_HOC_STOP): 636 case CMD_RET(CMD_802_11_AD_HOC_STOP):
637 ret = libertas_ret_80211_ad_hoc_stop(priv, resp); 637 ret = lbs_ret_80211_ad_hoc_stop(priv, resp);
638 break; 638 break;
639 639
640 case CMD_RET(CMD_802_11_KEY_MATERIAL): 640 case CMD_RET(CMD_802_11_KEY_MATERIAL):
641 ret = wlan_ret_802_11_key_material(priv, resp); 641 ret = lbs_ret_802_11_key_material(priv, resp);
642 break; 642 break;
643 643
644 case CMD_RET(CMD_802_11_EEPROM_ACCESS): 644 case CMD_RET(CMD_802_11_EEPROM_ACCESS):
645 ret = wlan_ret_802_11_eeprom_access(priv, resp); 645 ret = lbs_ret_802_11_eeprom_access(priv, resp);
646 break; 646 break;
647 647
648 case CMD_RET(CMD_802_11D_DOMAIN_INFO): 648 case CMD_RET(CMD_802_11D_DOMAIN_INFO):
649 ret = libertas_ret_802_11d_domain_info(priv, resp); 649 ret = lbs_ret_802_11d_domain_info(priv, resp);
650 break; 650 break;
651 651
652 case CMD_RET(CMD_802_11_SLEEP_PARAMS): 652 case CMD_RET(CMD_802_11_SLEEP_PARAMS):
653 ret = wlan_ret_802_11_sleep_params(priv, resp); 653 ret = lbs_ret_802_11_sleep_params(priv, resp);
654 break; 654 break;
655 case CMD_RET(CMD_802_11_INACTIVITY_TIMEOUT): 655 case CMD_RET(CMD_802_11_INACTIVITY_TIMEOUT):
656 spin_lock_irqsave(&adapter->driver_lock, flags); 656 spin_lock_irqsave(&adapter->driver_lock, flags);
@@ -713,11 +713,11 @@ static inline int handle_cmd_response(u16 respcmd,
713 return ret; 713 return ret;
714} 714}
715 715
716int libertas_process_rx_command(wlan_private * priv) 716int lbs_process_rx_command(lbs_private * priv)
717{ 717{
718 u16 respcmd; 718 u16 respcmd;
719 struct cmd_ds_command *resp; 719 struct cmd_ds_command *resp;
720 wlan_adapter *adapter = priv->adapter; 720 lbs_adapter *adapter = priv->adapter;
721 int ret = 0; 721 int ret = 0;
722 ulong flags; 722 ulong flags;
723 u16 result; 723 u16 result;
@@ -749,7 +749,7 @@ int libertas_process_rx_command(wlan_private * priv)
749 if (!(respcmd & 0x8000)) { 749 if (!(respcmd & 0x8000)) {
750 lbs_deb_host("invalid response!\n"); 750 lbs_deb_host("invalid response!\n");
751 adapter->cur_cmd_retcode = -1; 751 adapter->cur_cmd_retcode = -1;
752 __libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd); 752 __lbs_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
753 adapter->nr_cmd_pending--; 753 adapter->nr_cmd_pending--;
754 adapter->cur_cmd = NULL; 754 adapter->cur_cmd = NULL;
755 spin_unlock_irqrestore(&adapter->driver_lock, flags); 755 spin_unlock_irqrestore(&adapter->driver_lock, flags);
@@ -774,27 +774,27 @@ int libertas_process_rx_command(wlan_private * priv)
774 /* 774 /*
775 * We should not re-try enter-ps command in 775 * We should not re-try enter-ps command in
776 * ad-hoc mode. It takes place in 776 * ad-hoc mode. It takes place in
777 * libertas_execute_next_command(). 777 * lbs_execute_next_command().
778 */ 778 */
779 if (adapter->mode == IW_MODE_ADHOC && 779 if (adapter->mode == IW_MODE_ADHOC &&
780 action == CMD_SUBCMD_ENTER_PS) 780 action == CMD_SUBCMD_ENTER_PS)
781 adapter->psmode = WLAN802_11POWERMODECAM; 781 adapter->psmode = LBS802_11POWERMODECAM;
782 } else if (action == CMD_SUBCMD_ENTER_PS) { 782 } else if (action == CMD_SUBCMD_ENTER_PS) {
783 adapter->needtowakeup = 0; 783 adapter->needtowakeup = 0;
784 adapter->psstate = PS_STATE_AWAKE; 784 adapter->psstate = PS_STATE_AWAKE;
785 785
786 lbs_deb_host("CMD_RESP: ENTER_PS command response\n"); 786 lbs_deb_host("CMD_RESP: ENTER_PS command response\n");
787 if (adapter->connect_status != LIBERTAS_CONNECTED) { 787 if (adapter->connect_status != LBS_CONNECTED) {
788 /* 788 /*
789 * When Deauth Event received before Enter_PS command 789 * When Deauth Event received before Enter_PS command
790 * response, We need to wake up the firmware. 790 * response, We need to wake up the firmware.
791 */ 791 */
792 lbs_deb_host( 792 lbs_deb_host(
793 "disconnected, invoking libertas_ps_wakeup\n"); 793 "disconnected, invoking lbs_ps_wakeup\n");
794 794
795 spin_unlock_irqrestore(&adapter->driver_lock, flags); 795 spin_unlock_irqrestore(&adapter->driver_lock, flags);
796 mutex_unlock(&adapter->lock); 796 mutex_unlock(&adapter->lock);
797 libertas_ps_wakeup(priv, 0); 797 lbs_ps_wakeup(priv, 0);
798 mutex_lock(&adapter->lock); 798 mutex_lock(&adapter->lock);
799 spin_lock_irqsave(&adapter->driver_lock, flags); 799 spin_lock_irqsave(&adapter->driver_lock, flags);
800 } 800 }
@@ -806,7 +806,7 @@ int libertas_process_rx_command(wlan_private * priv)
806 lbs_deb_host("CMD_RESP: PS action 0x%X\n", action); 806 lbs_deb_host("CMD_RESP: PS action 0x%X\n", action);
807 } 807 }
808 808
809 __libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd); 809 __lbs_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
810 adapter->nr_cmd_pending--; 810 adapter->nr_cmd_pending--;
811 adapter->cur_cmd = NULL; 811 adapter->cur_cmd = NULL;
812 spin_unlock_irqrestore(&adapter->driver_lock, flags); 812 spin_unlock_irqrestore(&adapter->driver_lock, flags);
@@ -837,7 +837,7 @@ int libertas_process_rx_command(wlan_private * priv)
837 837
838 } 838 }
839 839
840 __libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd); 840 __lbs_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
841 adapter->nr_cmd_pending--; 841 adapter->nr_cmd_pending--;
842 adapter->cur_cmd = NULL; 842 adapter->cur_cmd = NULL;
843 spin_unlock_irqrestore(&adapter->driver_lock, flags); 843 spin_unlock_irqrestore(&adapter->driver_lock, flags);
@@ -853,7 +853,7 @@ int libertas_process_rx_command(wlan_private * priv)
853 spin_lock_irqsave(&adapter->driver_lock, flags); 853 spin_lock_irqsave(&adapter->driver_lock, flags);
854 if (adapter->cur_cmd) { 854 if (adapter->cur_cmd) {
855 /* Clean up and Put current command back to cmdfreeq */ 855 /* Clean up and Put current command back to cmdfreeq */
856 __libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd); 856 __lbs_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
857 adapter->nr_cmd_pending--; 857 adapter->nr_cmd_pending--;
858 WARN_ON(adapter->nr_cmd_pending > 128); 858 WARN_ON(adapter->nr_cmd_pending > 128);
859 adapter->cur_cmd = NULL; 859 adapter->cur_cmd = NULL;
@@ -866,10 +866,10 @@ done:
866 return ret; 866 return ret;
867} 867}
868 868
869int libertas_process_event(wlan_private * priv) 869int lbs_process_event(lbs_private * priv)
870{ 870{
871 int ret = 0; 871 int ret = 0;
872 wlan_adapter *adapter = priv->adapter; 872 lbs_adapter *adapter = priv->adapter;
873 u32 eventcause; 873 u32 eventcause;
874 874
875 lbs_deb_enter(LBS_DEB_CMD); 875 lbs_deb_enter(LBS_DEB_CMD);
@@ -887,17 +887,17 @@ int libertas_process_event(wlan_private * priv)
887 887
888 case MACREG_INT_CODE_DEAUTHENTICATED: 888 case MACREG_INT_CODE_DEAUTHENTICATED:
889 lbs_deb_cmd("EVENT: deauthenticated\n"); 889 lbs_deb_cmd("EVENT: deauthenticated\n");
890 libertas_mac_event_disconnected(priv); 890 lbs_mac_event_disconnected(priv);
891 break; 891 break;
892 892
893 case MACREG_INT_CODE_DISASSOCIATED: 893 case MACREG_INT_CODE_DISASSOCIATED:
894 lbs_deb_cmd("EVENT: disassociated\n"); 894 lbs_deb_cmd("EVENT: disassociated\n");
895 libertas_mac_event_disconnected(priv); 895 lbs_mac_event_disconnected(priv);
896 break; 896 break;
897 897
898 case MACREG_INT_CODE_LINK_LOSE_NO_SCAN: 898 case MACREG_INT_CODE_LINK_LOSE_NO_SCAN:
899 lbs_deb_cmd("EVENT: link lost\n"); 899 lbs_deb_cmd("EVENT: link lost\n");
900 libertas_mac_event_disconnected(priv); 900 lbs_mac_event_disconnected(priv);
901 break; 901 break;
902 902
903 case MACREG_INT_CODE_PS_SLEEP: 903 case MACREG_INT_CODE_PS_SLEEP:
@@ -911,7 +911,7 @@ int libertas_process_event(wlan_private * priv)
911 } 911 }
912 adapter->psstate = PS_STATE_PRE_SLEEP; 912 adapter->psstate = PS_STATE_PRE_SLEEP;
913 913
914 libertas_ps_confirm_sleep(priv, (u16) adapter->psmode); 914 lbs_ps_confirm_sleep(priv, (u16) adapter->psmode);
915 915
916 break; 916 break;
917 917
@@ -932,10 +932,10 @@ int libertas_process_event(wlan_private * priv)
932 * wait for the command processing to finish 932 * wait for the command processing to finish
933 * before resuming sending 933 * before resuming sending
934 * adapter->needtowakeup will be set to FALSE 934 * adapter->needtowakeup will be set to FALSE
935 * in libertas_ps_wakeup() 935 * in lbs_ps_wakeup()
936 */ 936 */
937 lbs_deb_cmd("waking up ...\n"); 937 lbs_deb_cmd("waking up ...\n");
938 libertas_ps_wakeup(priv, 0); 938 lbs_ps_wakeup(priv, 0);
939 } 939 }
940 break; 940 break;
941 941
@@ -979,7 +979,7 @@ int libertas_process_event(wlan_private * priv)
979 break; 979 break;
980 } 980 }
981 lbs_pr_info("EVENT: MESH_AUTO_STARTED\n"); 981 lbs_pr_info("EVENT: MESH_AUTO_STARTED\n");
982 adapter->connect_status = LIBERTAS_CONNECTED; 982 adapter->connect_status = LBS_CONNECTED;
983 if (priv->mesh_open == 1) { 983 if (priv->mesh_open == 1) {
984 netif_wake_queue(priv->mesh_dev); 984 netif_wake_queue(priv->mesh_dev);
985 netif_carrier_on(priv->mesh_dev); 985 netif_carrier_on(priv->mesh_dev);
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index 95dd4edf64cf..1b382cfaf37a 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -11,14 +11,14 @@
11#include "host.h" 11#include "host.h"
12#include "debugfs.h" 12#include "debugfs.h"
13 13
14static struct dentry *libertas_dir = NULL; 14static struct dentry *lbs_dir;
15static char *szStates[] = { 15static char *szStates[] = {
16 "Connected", 16 "Connected",
17 "Disconnected" 17 "Disconnected"
18}; 18};
19 19
20#ifdef PROC_DEBUG 20#ifdef PROC_DEBUG
21static void libertas_debug_init(wlan_private * priv, struct net_device *dev); 21static void lbs_debug_init(lbs_private * priv, struct net_device *dev);
22#endif 22#endif
23 23
24static int open_file_generic(struct inode *inode, struct file *file) 24static int open_file_generic(struct inode *inode, struct file *file)
@@ -35,10 +35,10 @@ static ssize_t write_file_dummy(struct file *file, const char __user *buf,
35 35
36static const size_t len = PAGE_SIZE; 36static const size_t len = PAGE_SIZE;
37 37
38static ssize_t libertas_dev_info(struct file *file, char __user *userbuf, 38static ssize_t lbs_dev_info(struct file *file, char __user *userbuf,
39 size_t count, loff_t *ppos) 39 size_t count, loff_t *ppos)
40{ 40{
41 wlan_private *priv = file->private_data; 41 lbs_private *priv = file->private_data;
42 size_t pos = 0; 42 size_t pos = 0;
43 unsigned long addr = get_zeroed_page(GFP_KERNEL); 43 unsigned long addr = get_zeroed_page(GFP_KERNEL);
44 char *buf = (char *)addr; 44 char *buf = (char *)addr;
@@ -56,10 +56,10 @@ static ssize_t libertas_dev_info(struct file *file, char __user *userbuf,
56} 56}
57 57
58 58
59static ssize_t libertas_getscantable(struct file *file, char __user *userbuf, 59static ssize_t lbs_getscantable(struct file *file, char __user *userbuf,
60 size_t count, loff_t *ppos) 60 size_t count, loff_t *ppos)
61{ 61{
62 wlan_private *priv = file->private_data; 62 lbs_private *priv = file->private_data;
63 size_t pos = 0; 63 size_t pos = 0;
64 int numscansdone = 0, res; 64 int numscansdone = 0, res;
65 unsigned long addr = get_zeroed_page(GFP_KERNEL); 65 unsigned long addr = get_zeroed_page(GFP_KERNEL);
@@ -98,11 +98,11 @@ static ssize_t libertas_getscantable(struct file *file, char __user *userbuf,
98 return res; 98 return res;
99} 99}
100 100
101static ssize_t libertas_sleepparams_write(struct file *file, 101static ssize_t lbs_sleepparams_write(struct file *file,
102 const char __user *user_buf, size_t count, 102 const char __user *user_buf, size_t count,
103 loff_t *ppos) 103 loff_t *ppos)
104{ 104{
105 wlan_private *priv = file->private_data; 105 lbs_private *priv = file->private_data;
106 ssize_t buf_size, res; 106 ssize_t buf_size, res;
107 int p1, p2, p3, p4, p5, p6; 107 int p1, p2, p3, p4, p5, p6;
108 unsigned long addr = get_zeroed_page(GFP_KERNEL); 108 unsigned long addr = get_zeroed_page(GFP_KERNEL);
@@ -125,7 +125,7 @@ static ssize_t libertas_sleepparams_write(struct file *file,
125 priv->adapter->sp.sp_extsleepclk = p5; 125 priv->adapter->sp.sp_extsleepclk = p5;
126 priv->adapter->sp.sp_reserved = p6; 126 priv->adapter->sp.sp_reserved = p6;
127 127
128 res = libertas_prepare_and_send_command(priv, 128 res = lbs_prepare_and_send_command(priv,
129 CMD_802_11_SLEEP_PARAMS, 129 CMD_802_11_SLEEP_PARAMS,
130 CMD_ACT_SET, 130 CMD_ACT_SET,
131 CMD_OPTION_WAITFORRSP, 0, NULL); 131 CMD_OPTION_WAITFORRSP, 0, NULL);
@@ -140,17 +140,17 @@ out_unlock:
140 return res; 140 return res;
141} 141}
142 142
143static ssize_t libertas_sleepparams_read(struct file *file, char __user *userbuf, 143static ssize_t lbs_sleepparams_read(struct file *file, char __user *userbuf,
144 size_t count, loff_t *ppos) 144 size_t count, loff_t *ppos)
145{ 145{
146 wlan_private *priv = file->private_data; 146 lbs_private *priv = file->private_data;
147 wlan_adapter *adapter = priv->adapter; 147 lbs_adapter *adapter = priv->adapter;
148 ssize_t res; 148 ssize_t res;
149 size_t pos = 0; 149 size_t pos = 0;
150 unsigned long addr = get_zeroed_page(GFP_KERNEL); 150 unsigned long addr = get_zeroed_page(GFP_KERNEL);
151 char *buf = (char *)addr; 151 char *buf = (char *)addr;
152 152
153 res = libertas_prepare_and_send_command(priv, 153 res = lbs_prepare_and_send_command(priv,
154 CMD_802_11_SLEEP_PARAMS, 154 CMD_802_11_SLEEP_PARAMS,
155 CMD_ACT_GET, 155 CMD_ACT_GET,
156 CMD_OPTION_WAITFORRSP, 0, NULL); 156 CMD_OPTION_WAITFORRSP, 0, NULL);
@@ -171,10 +171,10 @@ out_unlock:
171 return res; 171 return res;
172} 172}
173 173
174static ssize_t libertas_extscan(struct file *file, const char __user *userbuf, 174static ssize_t lbs_extscan(struct file *file, const char __user *userbuf,
175 size_t count, loff_t *ppos) 175 size_t count, loff_t *ppos)
176{ 176{
177 wlan_private *priv = file->private_data; 177 lbs_private *priv = file->private_data;
178 ssize_t res, buf_size; 178 ssize_t res, buf_size;
179 union iwreq_data wrqu; 179 union iwreq_data wrqu;
180 unsigned long addr = get_zeroed_page(GFP_KERNEL); 180 unsigned long addr = get_zeroed_page(GFP_KERNEL);
@@ -186,7 +186,7 @@ static ssize_t libertas_extscan(struct file *file, const char __user *userbuf,
186 goto out_unlock; 186 goto out_unlock;
187 } 187 }
188 188
189 libertas_send_specific_ssid_scan(priv, buf, strlen(buf)-1, 0); 189 lbs_send_specific_ssid_scan(priv, buf, strlen(buf)-1, 0);
190 190
191 memset(&wrqu, 0, sizeof(union iwreq_data)); 191 memset(&wrqu, 0, sizeof(union iwreq_data));
192 wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL); 192 wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL);
@@ -196,8 +196,8 @@ out_unlock:
196 return count; 196 return count;
197} 197}
198 198
199static int libertas_parse_chan(char *buf, size_t count, 199static int lbs_parse_chan(char *buf, size_t count,
200 struct wlan_ioctl_user_scan_cfg *scan_cfg, int dur) 200 struct lbs_ioctl_user_scan_cfg *scan_cfg, int dur)
201{ 201{
202 char *start, *end, *hold, *str; 202 char *start, *end, *hold, *str;
203 int i = 0; 203 int i = 0;
@@ -233,8 +233,8 @@ static int libertas_parse_chan(char *buf, size_t count,
233 return i; 233 return i;
234} 234}
235 235
236static void libertas_parse_bssid(char *buf, size_t count, 236static void lbs_parse_bssid(char *buf, size_t count,
237 struct wlan_ioctl_user_scan_cfg *scan_cfg) 237 struct lbs_ioctl_user_scan_cfg *scan_cfg)
238{ 238{
239 char *hold; 239 char *hold;
240 unsigned int mac[ETH_ALEN]; 240 unsigned int mac[ETH_ALEN];
@@ -248,8 +248,8 @@ static void libertas_parse_bssid(char *buf, size_t count,
248 memcpy(scan_cfg->bssid, mac, ETH_ALEN); 248 memcpy(scan_cfg->bssid, mac, ETH_ALEN);
249} 249}
250 250
251static void libertas_parse_ssid(char *buf, size_t count, 251static void lbs_parse_ssid(char *buf, size_t count,
252 struct wlan_ioctl_user_scan_cfg *scan_cfg) 252 struct lbs_ioctl_user_scan_cfg *scan_cfg)
253{ 253{
254 char *hold, *end; 254 char *hold, *end;
255 ssize_t size; 255 ssize_t size;
@@ -268,7 +268,7 @@ static void libertas_parse_ssid(char *buf, size_t count,
268 return; 268 return;
269} 269}
270 270
271static int libertas_parse_clear(char *buf, size_t count, const char *tag) 271static int lbs_parse_clear(char *buf, size_t count, const char *tag)
272{ 272{
273 char *hold; 273 char *hold;
274 int val; 274 int val;
@@ -285,8 +285,8 @@ static int libertas_parse_clear(char *buf, size_t count, const char *tag)
285 return val; 285 return val;
286} 286}
287 287
288static int libertas_parse_dur(char *buf, size_t count, 288static int lbs_parse_dur(char *buf, size_t count,
289 struct wlan_ioctl_user_scan_cfg *scan_cfg) 289 struct lbs_ioctl_user_scan_cfg *scan_cfg)
290{ 290{
291 char *hold; 291 char *hold;
292 int val; 292 int val;
@@ -300,8 +300,8 @@ static int libertas_parse_dur(char *buf, size_t count,
300 return val; 300 return val;
301} 301}
302 302
303static void libertas_parse_probes(char *buf, size_t count, 303static void lbs_parse_probes(char *buf, size_t count,
304 struct wlan_ioctl_user_scan_cfg *scan_cfg) 304 struct lbs_ioctl_user_scan_cfg *scan_cfg)
305{ 305{
306 char *hold; 306 char *hold;
307 int val; 307 int val;
@@ -317,8 +317,8 @@ static void libertas_parse_probes(char *buf, size_t count,
317 return; 317 return;
318} 318}
319 319
320static void libertas_parse_type(char *buf, size_t count, 320static void lbs_parse_type(char *buf, size_t count,
321 struct wlan_ioctl_user_scan_cfg *scan_cfg) 321 struct lbs_ioctl_user_scan_cfg *scan_cfg)
322{ 322{
323 char *hold; 323 char *hold;
324 int val; 324 int val;
@@ -338,19 +338,19 @@ static void libertas_parse_type(char *buf, size_t count,
338 return; 338 return;
339} 339}
340 340
341static ssize_t libertas_setuserscan(struct file *file, 341static ssize_t lbs_setuserscan(struct file *file,
342 const char __user *userbuf, 342 const char __user *userbuf,
343 size_t count, loff_t *ppos) 343 size_t count, loff_t *ppos)
344{ 344{
345 wlan_private *priv = file->private_data; 345 lbs_private *priv = file->private_data;
346 ssize_t res, buf_size; 346 ssize_t res, buf_size;
347 struct wlan_ioctl_user_scan_cfg *scan_cfg; 347 struct lbs_ioctl_user_scan_cfg *scan_cfg;
348 union iwreq_data wrqu; 348 union iwreq_data wrqu;
349 int dur; 349 int dur;
350 unsigned long addr = get_zeroed_page(GFP_KERNEL); 350 unsigned long addr = get_zeroed_page(GFP_KERNEL);
351 char *buf = (char *)addr; 351 char *buf = (char *)addr;
352 352
353 scan_cfg = kzalloc(sizeof(struct wlan_ioctl_user_scan_cfg), GFP_KERNEL); 353 scan_cfg = kzalloc(sizeof(struct lbs_ioctl_user_scan_cfg), GFP_KERNEL);
354 if (!scan_cfg) 354 if (!scan_cfg)
355 return -ENOMEM; 355 return -ENOMEM;
356 356
@@ -360,18 +360,18 @@ static ssize_t libertas_setuserscan(struct file *file,
360 goto out_unlock; 360 goto out_unlock;
361 } 361 }
362 362
363 scan_cfg->bsstype = WLAN_SCAN_BSS_TYPE_ANY; 363 scan_cfg->bsstype = LBS_SCAN_BSS_TYPE_ANY;
364 364
365 dur = libertas_parse_dur(buf, count, scan_cfg); 365 dur = lbs_parse_dur(buf, count, scan_cfg);
366 libertas_parse_chan(buf, count, scan_cfg, dur); 366 lbs_parse_chan(buf, count, scan_cfg, dur);
367 libertas_parse_bssid(buf, count, scan_cfg); 367 lbs_parse_bssid(buf, count, scan_cfg);
368 scan_cfg->clear_bssid = libertas_parse_clear(buf, count, "clear_bssid="); 368 scan_cfg->clear_bssid = lbs_parse_clear(buf, count, "clear_bssid=");
369 libertas_parse_ssid(buf, count, scan_cfg); 369 lbs_parse_ssid(buf, count, scan_cfg);
370 scan_cfg->clear_ssid = libertas_parse_clear(buf, count, "clear_ssid="); 370 scan_cfg->clear_ssid = lbs_parse_clear(buf, count, "clear_ssid=");
371 libertas_parse_probes(buf, count, scan_cfg); 371 lbs_parse_probes(buf, count, scan_cfg);
372 libertas_parse_type(buf, count, scan_cfg); 372 lbs_parse_type(buf, count, scan_cfg);
373 373
374 wlan_scan_networks(priv, scan_cfg, 1); 374 lbs_scan_networks(priv, scan_cfg, 1);
375 wait_event_interruptible(priv->adapter->cmd_pending, 375 wait_event_interruptible(priv->adapter->cmd_pending,
376 !priv->adapter->nr_cmd_pending); 376 !priv->adapter->nr_cmd_pending);
377 377
@@ -384,21 +384,21 @@ out_unlock:
384 return count; 384 return count;
385} 385}
386 386
387static int libertas_event_initcmd(wlan_private *priv, void **response_buf, 387static int lbs_event_initcmd(lbs_private *priv, void **response_buf,
388 struct cmd_ctrl_node **cmdnode, 388 struct cmd_ctrl_node **cmdnode,
389 struct cmd_ds_command **cmd) 389 struct cmd_ds_command **cmd)
390{ 390{
391 u16 wait_option = CMD_OPTION_WAITFORRSP; 391 u16 wait_option = CMD_OPTION_WAITFORRSP;
392 392
393 if (!(*cmdnode = libertas_get_free_cmd_ctrl_node(priv))) { 393 if (!(*cmdnode = lbs_get_free_cmd_ctrl_node(priv))) {
394 lbs_deb_debugfs("failed libertas_get_free_cmd_ctrl_node\n"); 394 lbs_deb_debugfs("failed lbs_get_free_cmd_ctrl_node\n");
395 return -ENOMEM; 395 return -ENOMEM;
396 } 396 }
397 if (!(*response_buf = kmalloc(3000, GFP_KERNEL))) { 397 if (!(*response_buf = kmalloc(3000, GFP_KERNEL))) {
398 lbs_deb_debugfs("failed to allocate response buffer!\n"); 398 lbs_deb_debugfs("failed to allocate response buffer!\n");
399 return -ENOMEM; 399 return -ENOMEM;
400 } 400 }
401 libertas_set_cmd_ctrl_node(priv, *cmdnode, 0, wait_option, NULL); 401 lbs_set_cmd_ctrl_node(priv, *cmdnode, 0, wait_option, NULL);
402 init_waitqueue_head(&(*cmdnode)->cmdwait_q); 402 init_waitqueue_head(&(*cmdnode)->cmdwait_q);
403 (*cmdnode)->pdata_buf = *response_buf; 403 (*cmdnode)->pdata_buf = *response_buf;
404 (*cmdnode)->cmdflags |= CMD_F_HOSTCMD; 404 (*cmdnode)->cmdflags |= CMD_F_HOSTCMD;
@@ -410,11 +410,11 @@ static int libertas_event_initcmd(wlan_private *priv, void **response_buf,
410 return 0; 410 return 0;
411} 411}
412 412
413static ssize_t libertas_lowrssi_read(struct file *file, char __user *userbuf, 413static ssize_t lbs_lowrssi_read(struct file *file, char __user *userbuf,
414 size_t count, loff_t *ppos) 414 size_t count, loff_t *ppos)
415{ 415{
416 wlan_private *priv = file->private_data; 416 lbs_private *priv = file->private_data;
417 wlan_adapter *adapter = priv->adapter; 417 lbs_adapter *adapter = priv->adapter;
418 struct cmd_ctrl_node *pcmdnode; 418 struct cmd_ctrl_node *pcmdnode;
419 struct cmd_ds_command *pcmdptr; 419 struct cmd_ds_command *pcmdptr;
420 struct cmd_ds_802_11_subscribe_event *event; 420 struct cmd_ds_802_11_subscribe_event *event;
@@ -424,7 +424,7 @@ static ssize_t libertas_lowrssi_read(struct file *file, char __user *userbuf,
424 unsigned long addr = get_zeroed_page(GFP_KERNEL); 424 unsigned long addr = get_zeroed_page(GFP_KERNEL);
425 char *buf = (char *)addr; 425 char *buf = (char *)addr;
426 426
427 res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr); 427 res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
428 if (res < 0) { 428 if (res < 0) {
429 free_page(addr); 429 free_page(addr);
430 return res; 430 return res;
@@ -433,7 +433,7 @@ static ssize_t libertas_lowrssi_read(struct file *file, char __user *userbuf,
433 event = &pcmdptr->params.subscribe_event; 433 event = &pcmdptr->params.subscribe_event;
434 event->action = cpu_to_le16(CMD_ACT_GET); 434 event->action = cpu_to_le16(CMD_ACT_GET);
435 pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN); 435 pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
436 libertas_queue_cmd(adapter, pcmdnode, 1); 436 lbs_queue_cmd(adapter, pcmdnode, 1);
437 wake_up_interruptible(&priv->waitq); 437 wake_up_interruptible(&priv->waitq);
438 438
439 /* Sleep until response is generated by FW */ 439 /* Sleep until response is generated by FW */
@@ -480,9 +480,9 @@ static ssize_t libertas_lowrssi_read(struct file *file, char __user *userbuf,
480 return res; 480 return res;
481} 481}
482 482
483static u16 libertas_get_events_bitmap(wlan_private *priv) 483static u16 lbs_get_events_bitmap(lbs_private *priv)
484{ 484{
485 wlan_adapter *adapter = priv->adapter; 485 lbs_adapter *adapter = priv->adapter;
486 struct cmd_ctrl_node *pcmdnode; 486 struct cmd_ctrl_node *pcmdnode;
487 struct cmd_ds_command *pcmdptr; 487 struct cmd_ds_command *pcmdptr;
488 struct cmd_ds_802_11_subscribe_event *event; 488 struct cmd_ds_802_11_subscribe_event *event;
@@ -490,14 +490,14 @@ static u16 libertas_get_events_bitmap(wlan_private *priv)
490 int res; 490 int res;
491 u16 event_bitmap; 491 u16 event_bitmap;
492 492
493 res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr); 493 res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
494 if (res < 0) 494 if (res < 0)
495 return res; 495 return res;
496 496
497 event = &pcmdptr->params.subscribe_event; 497 event = &pcmdptr->params.subscribe_event;
498 event->action = cpu_to_le16(CMD_ACT_GET); 498 event->action = cpu_to_le16(CMD_ACT_GET);
499 pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN); 499 pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
500 libertas_queue_cmd(adapter, pcmdnode, 1); 500 lbs_queue_cmd(adapter, pcmdnode, 1);
501 wake_up_interruptible(&priv->waitq); 501 wake_up_interruptible(&priv->waitq);
502 502
503 /* Sleep until response is generated by FW */ 503 /* Sleep until response is generated by FW */
@@ -525,12 +525,12 @@ static u16 libertas_get_events_bitmap(wlan_private *priv)
525 return event_bitmap; 525 return event_bitmap;
526} 526}
527 527
528static ssize_t libertas_lowrssi_write(struct file *file, 528static ssize_t lbs_lowrssi_write(struct file *file,
529 const char __user *userbuf, 529 const char __user *userbuf,
530 size_t count, loff_t *ppos) 530 size_t count, loff_t *ppos)
531{ 531{
532 wlan_private *priv = file->private_data; 532 lbs_private *priv = file->private_data;
533 wlan_adapter *adapter = priv->adapter; 533 lbs_adapter *adapter = priv->adapter;
534 ssize_t res, buf_size; 534 ssize_t res, buf_size;
535 int value, freq, subscribed, cmd_len; 535 int value, freq, subscribed, cmd_len;
536 struct cmd_ctrl_node *pcmdnode; 536 struct cmd_ctrl_node *pcmdnode;
@@ -554,9 +554,9 @@ static ssize_t libertas_lowrssi_write(struct file *file,
554 goto out_unlock; 554 goto out_unlock;
555 } 555 }
556 556
557 event_bitmap = libertas_get_events_bitmap(priv); 557 event_bitmap = lbs_get_events_bitmap(priv);
558 558
559 res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr); 559 res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
560 if (res < 0) 560 if (res < 0)
561 goto out_unlock; 561 goto out_unlock;
562 562
@@ -576,7 +576,7 @@ static ssize_t libertas_lowrssi_write(struct file *file,
576 event_bitmap |= subscribed ? 0x0001 : 0x0; 576 event_bitmap |= subscribed ? 0x0001 : 0x0;
577 event->events = cpu_to_le16(event_bitmap); 577 event->events = cpu_to_le16(event_bitmap);
578 578
579 libertas_queue_cmd(adapter, pcmdnode, 1); 579 lbs_queue_cmd(adapter, pcmdnode, 1);
580 wake_up_interruptible(&priv->waitq); 580 wake_up_interruptible(&priv->waitq);
581 581
582 /* Sleep until response is generated by FW */ 582 /* Sleep until response is generated by FW */
@@ -606,11 +606,11 @@ out_unlock:
606 return res; 606 return res;
607} 607}
608 608
609static ssize_t libertas_lowsnr_read(struct file *file, char __user *userbuf, 609static ssize_t lbs_lowsnr_read(struct file *file, char __user *userbuf,
610 size_t count, loff_t *ppos) 610 size_t count, loff_t *ppos)
611{ 611{
612 wlan_private *priv = file->private_data; 612 lbs_private *priv = file->private_data;
613 wlan_adapter *adapter = priv->adapter; 613 lbs_adapter *adapter = priv->adapter;
614 struct cmd_ctrl_node *pcmdnode; 614 struct cmd_ctrl_node *pcmdnode;
615 struct cmd_ds_command *pcmdptr; 615 struct cmd_ds_command *pcmdptr;
616 struct cmd_ds_802_11_subscribe_event *event; 616 struct cmd_ds_802_11_subscribe_event *event;
@@ -620,7 +620,7 @@ static ssize_t libertas_lowsnr_read(struct file *file, char __user *userbuf,
620 unsigned long addr = get_zeroed_page(GFP_KERNEL); 620 unsigned long addr = get_zeroed_page(GFP_KERNEL);
621 char *buf = (char *)addr; 621 char *buf = (char *)addr;
622 622
623 res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr); 623 res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
624 if (res < 0) { 624 if (res < 0) {
625 free_page(addr); 625 free_page(addr);
626 return res; 626 return res;
@@ -629,7 +629,7 @@ static ssize_t libertas_lowsnr_read(struct file *file, char __user *userbuf,
629 event = &pcmdptr->params.subscribe_event; 629 event = &pcmdptr->params.subscribe_event;
630 event->action = cpu_to_le16(CMD_ACT_GET); 630 event->action = cpu_to_le16(CMD_ACT_GET);
631 pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN); 631 pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
632 libertas_queue_cmd(adapter, pcmdnode, 1); 632 lbs_queue_cmd(adapter, pcmdnode, 1);
633 wake_up_interruptible(&priv->waitq); 633 wake_up_interruptible(&priv->waitq);
634 634
635 /* Sleep until response is generated by FW */ 635 /* Sleep until response is generated by FW */
@@ -678,12 +678,12 @@ static ssize_t libertas_lowsnr_read(struct file *file, char __user *userbuf,
678 return res; 678 return res;
679} 679}
680 680
681static ssize_t libertas_lowsnr_write(struct file *file, 681static ssize_t lbs_lowsnr_write(struct file *file,
682 const char __user *userbuf, 682 const char __user *userbuf,
683 size_t count, loff_t *ppos) 683 size_t count, loff_t *ppos)
684{ 684{
685 wlan_private *priv = file->private_data; 685 lbs_private *priv = file->private_data;
686 wlan_adapter *adapter = priv->adapter; 686 lbs_adapter *adapter = priv->adapter;
687 ssize_t res, buf_size; 687 ssize_t res, buf_size;
688 int value, freq, subscribed, cmd_len; 688 int value, freq, subscribed, cmd_len;
689 struct cmd_ctrl_node *pcmdnode; 689 struct cmd_ctrl_node *pcmdnode;
@@ -707,9 +707,9 @@ static ssize_t libertas_lowsnr_write(struct file *file,
707 goto out_unlock; 707 goto out_unlock;
708 } 708 }
709 709
710 event_bitmap = libertas_get_events_bitmap(priv); 710 event_bitmap = lbs_get_events_bitmap(priv);
711 711
712 res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr); 712 res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
713 if (res < 0) 713 if (res < 0)
714 goto out_unlock; 714 goto out_unlock;
715 715
@@ -728,7 +728,7 @@ static ssize_t libertas_lowsnr_write(struct file *file,
728 event_bitmap |= subscribed ? 0x0002 : 0x0; 728 event_bitmap |= subscribed ? 0x0002 : 0x0;
729 event->events = cpu_to_le16(event_bitmap); 729 event->events = cpu_to_le16(event_bitmap);
730 730
731 libertas_queue_cmd(adapter, pcmdnode, 1); 731 lbs_queue_cmd(adapter, pcmdnode, 1);
732 wake_up_interruptible(&priv->waitq); 732 wake_up_interruptible(&priv->waitq);
733 733
734 /* Sleep until response is generated by FW */ 734 /* Sleep until response is generated by FW */
@@ -759,11 +759,11 @@ out_unlock:
759 return res; 759 return res;
760} 760}
761 761
762static ssize_t libertas_failcount_read(struct file *file, char __user *userbuf, 762static ssize_t lbs_failcount_read(struct file *file, char __user *userbuf,
763 size_t count, loff_t *ppos) 763 size_t count, loff_t *ppos)
764{ 764{
765 wlan_private *priv = file->private_data; 765 lbs_private *priv = file->private_data;
766 wlan_adapter *adapter = priv->adapter; 766 lbs_adapter *adapter = priv->adapter;
767 struct cmd_ctrl_node *pcmdnode; 767 struct cmd_ctrl_node *pcmdnode;
768 struct cmd_ds_command *pcmdptr; 768 struct cmd_ds_command *pcmdptr;
769 struct cmd_ds_802_11_subscribe_event *event; 769 struct cmd_ds_802_11_subscribe_event *event;
@@ -773,7 +773,7 @@ static ssize_t libertas_failcount_read(struct file *file, char __user *userbuf,
773 unsigned long addr = get_zeroed_page(GFP_KERNEL); 773 unsigned long addr = get_zeroed_page(GFP_KERNEL);
774 char *buf = (char *)addr; 774 char *buf = (char *)addr;
775 775
776 res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr); 776 res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
777 if (res < 0) { 777 if (res < 0) {
778 free_page(addr); 778 free_page(addr);
779 return res; 779 return res;
@@ -782,7 +782,7 @@ static ssize_t libertas_failcount_read(struct file *file, char __user *userbuf,
782 event = &pcmdptr->params.subscribe_event; 782 event = &pcmdptr->params.subscribe_event;
783 event->action = cpu_to_le16(CMD_ACT_GET); 783 event->action = cpu_to_le16(CMD_ACT_GET);
784 pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN); 784 pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
785 libertas_queue_cmd(adapter, pcmdnode, 1); 785 lbs_queue_cmd(adapter, pcmdnode, 1);
786 wake_up_interruptible(&priv->waitq); 786 wake_up_interruptible(&priv->waitq);
787 787
788 /* Sleep until response is generated by FW */ 788 /* Sleep until response is generated by FW */
@@ -830,12 +830,12 @@ static ssize_t libertas_failcount_read(struct file *file, char __user *userbuf,
830 return res; 830 return res;
831} 831}
832 832
833static ssize_t libertas_failcount_write(struct file *file, 833static ssize_t lbs_failcount_write(struct file *file,
834 const char __user *userbuf, 834 const char __user *userbuf,
835 size_t count, loff_t *ppos) 835 size_t count, loff_t *ppos)
836{ 836{
837 wlan_private *priv = file->private_data; 837 lbs_private *priv = file->private_data;
838 wlan_adapter *adapter = priv->adapter; 838 lbs_adapter *adapter = priv->adapter;
839 ssize_t res, buf_size; 839 ssize_t res, buf_size;
840 int value, freq, subscribed, cmd_len; 840 int value, freq, subscribed, cmd_len;
841 struct cmd_ctrl_node *pcmdnode; 841 struct cmd_ctrl_node *pcmdnode;
@@ -859,9 +859,9 @@ static ssize_t libertas_failcount_write(struct file *file,
859 goto out_unlock; 859 goto out_unlock;
860 } 860 }
861 861
862 event_bitmap = libertas_get_events_bitmap(priv); 862 event_bitmap = lbs_get_events_bitmap(priv);
863 863
864 res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr); 864 res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
865 if (res < 0) 865 if (res < 0)
866 goto out_unlock; 866 goto out_unlock;
867 867
@@ -880,7 +880,7 @@ static ssize_t libertas_failcount_write(struct file *file,
880 event_bitmap |= subscribed ? 0x0004 : 0x0; 880 event_bitmap |= subscribed ? 0x0004 : 0x0;
881 event->events = cpu_to_le16(event_bitmap); 881 event->events = cpu_to_le16(event_bitmap);
882 882
883 libertas_queue_cmd(adapter, pcmdnode, 1); 883 lbs_queue_cmd(adapter, pcmdnode, 1);
884 wake_up_interruptible(&priv->waitq); 884 wake_up_interruptible(&priv->waitq);
885 885
886 /* Sleep until response is generated by FW */ 886 /* Sleep until response is generated by FW */
@@ -910,11 +910,11 @@ out_unlock:
910 return res; 910 return res;
911} 911}
912 912
913static ssize_t libertas_bcnmiss_read(struct file *file, char __user *userbuf, 913static ssize_t lbs_bcnmiss_read(struct file *file, char __user *userbuf,
914 size_t count, loff_t *ppos) 914 size_t count, loff_t *ppos)
915{ 915{
916 wlan_private *priv = file->private_data; 916 lbs_private *priv = file->private_data;
917 wlan_adapter *adapter = priv->adapter; 917 lbs_adapter *adapter = priv->adapter;
918 struct cmd_ctrl_node *pcmdnode; 918 struct cmd_ctrl_node *pcmdnode;
919 struct cmd_ds_command *pcmdptr; 919 struct cmd_ds_command *pcmdptr;
920 struct cmd_ds_802_11_subscribe_event *event; 920 struct cmd_ds_802_11_subscribe_event *event;
@@ -924,7 +924,7 @@ static ssize_t libertas_bcnmiss_read(struct file *file, char __user *userbuf,
924 unsigned long addr = get_zeroed_page(GFP_KERNEL); 924 unsigned long addr = get_zeroed_page(GFP_KERNEL);
925 char *buf = (char *)addr; 925 char *buf = (char *)addr;
926 926
927 res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr); 927 res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
928 if (res < 0) { 928 if (res < 0) {
929 free_page(addr); 929 free_page(addr);
930 return res; 930 return res;
@@ -933,7 +933,7 @@ static ssize_t libertas_bcnmiss_read(struct file *file, char __user *userbuf,
933 event = &pcmdptr->params.subscribe_event; 933 event = &pcmdptr->params.subscribe_event;
934 event->action = cpu_to_le16(CMD_ACT_GET); 934 event->action = cpu_to_le16(CMD_ACT_GET);
935 pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN); 935 pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
936 libertas_queue_cmd(adapter, pcmdnode, 1); 936 lbs_queue_cmd(adapter, pcmdnode, 1);
937 wake_up_interruptible(&priv->waitq); 937 wake_up_interruptible(&priv->waitq);
938 938
939 /* Sleep until response is generated by FW */ 939 /* Sleep until response is generated by FW */
@@ -981,12 +981,12 @@ static ssize_t libertas_bcnmiss_read(struct file *file, char __user *userbuf,
981 return res; 981 return res;
982} 982}
983 983
984static ssize_t libertas_bcnmiss_write(struct file *file, 984static ssize_t lbs_bcnmiss_write(struct file *file,
985 const char __user *userbuf, 985 const char __user *userbuf,
986 size_t count, loff_t *ppos) 986 size_t count, loff_t *ppos)
987{ 987{
988 wlan_private *priv = file->private_data; 988 lbs_private *priv = file->private_data;
989 wlan_adapter *adapter = priv->adapter; 989 lbs_adapter *adapter = priv->adapter;
990 ssize_t res, buf_size; 990 ssize_t res, buf_size;
991 int value, freq, subscribed, cmd_len; 991 int value, freq, subscribed, cmd_len;
992 struct cmd_ctrl_node *pcmdnode; 992 struct cmd_ctrl_node *pcmdnode;
@@ -1010,9 +1010,9 @@ static ssize_t libertas_bcnmiss_write(struct file *file,
1010 goto out_unlock; 1010 goto out_unlock;
1011 } 1011 }
1012 1012
1013 event_bitmap = libertas_get_events_bitmap(priv); 1013 event_bitmap = lbs_get_events_bitmap(priv);
1014 1014
1015 res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr); 1015 res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
1016 if (res < 0) 1016 if (res < 0)
1017 goto out_unlock; 1017 goto out_unlock;
1018 1018
@@ -1030,7 +1030,7 @@ static ssize_t libertas_bcnmiss_write(struct file *file,
1030 event_bitmap |= subscribed ? 0x0008 : 0x0; 1030 event_bitmap |= subscribed ? 0x0008 : 0x0;
1031 event->events = cpu_to_le16(event_bitmap); 1031 event->events = cpu_to_le16(event_bitmap);
1032 1032
1033 libertas_queue_cmd(adapter, pcmdnode, 1); 1033 lbs_queue_cmd(adapter, pcmdnode, 1);
1034 wake_up_interruptible(&priv->waitq); 1034 wake_up_interruptible(&priv->waitq);
1035 1035
1036 /* Sleep until response is generated by FW */ 1036 /* Sleep until response is generated by FW */
@@ -1060,11 +1060,11 @@ out_unlock:
1060 return res; 1060 return res;
1061} 1061}
1062 1062
1063static ssize_t libertas_highrssi_read(struct file *file, char __user *userbuf, 1063static ssize_t lbs_highrssi_read(struct file *file, char __user *userbuf,
1064 size_t count, loff_t *ppos) 1064 size_t count, loff_t *ppos)
1065{ 1065{
1066 wlan_private *priv = file->private_data; 1066 lbs_private *priv = file->private_data;
1067 wlan_adapter *adapter = priv->adapter; 1067 lbs_adapter *adapter = priv->adapter;
1068 struct cmd_ctrl_node *pcmdnode; 1068 struct cmd_ctrl_node *pcmdnode;
1069 struct cmd_ds_command *pcmdptr; 1069 struct cmd_ds_command *pcmdptr;
1070 struct cmd_ds_802_11_subscribe_event *event; 1070 struct cmd_ds_802_11_subscribe_event *event;
@@ -1074,7 +1074,7 @@ static ssize_t libertas_highrssi_read(struct file *file, char __user *userbuf,
1074 unsigned long addr = get_zeroed_page(GFP_KERNEL); 1074 unsigned long addr = get_zeroed_page(GFP_KERNEL);
1075 char *buf = (char *)addr; 1075 char *buf = (char *)addr;
1076 1076
1077 res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr); 1077 res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
1078 if (res < 0) { 1078 if (res < 0) {
1079 free_page(addr); 1079 free_page(addr);
1080 return res; 1080 return res;
@@ -1083,7 +1083,7 @@ static ssize_t libertas_highrssi_read(struct file *file, char __user *userbuf,
1083 event = &pcmdptr->params.subscribe_event; 1083 event = &pcmdptr->params.subscribe_event;
1084 event->action = cpu_to_le16(CMD_ACT_GET); 1084 event->action = cpu_to_le16(CMD_ACT_GET);
1085 pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN); 1085 pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
1086 libertas_queue_cmd(adapter, pcmdnode, 1); 1086 lbs_queue_cmd(adapter, pcmdnode, 1);
1087 wake_up_interruptible(&priv->waitq); 1087 wake_up_interruptible(&priv->waitq);
1088 1088
1089 /* Sleep until response is generated by FW */ 1089 /* Sleep until response is generated by FW */
@@ -1132,12 +1132,12 @@ static ssize_t libertas_highrssi_read(struct file *file, char __user *userbuf,
1132 return res; 1132 return res;
1133} 1133}
1134 1134
1135static ssize_t libertas_highrssi_write(struct file *file, 1135static ssize_t lbs_highrssi_write(struct file *file,
1136 const char __user *userbuf, 1136 const char __user *userbuf,
1137 size_t count, loff_t *ppos) 1137 size_t count, loff_t *ppos)
1138{ 1138{
1139 wlan_private *priv = file->private_data; 1139 lbs_private *priv = file->private_data;
1140 wlan_adapter *adapter = priv->adapter; 1140 lbs_adapter *adapter = priv->adapter;
1141 ssize_t res, buf_size; 1141 ssize_t res, buf_size;
1142 int value, freq, subscribed, cmd_len; 1142 int value, freq, subscribed, cmd_len;
1143 struct cmd_ctrl_node *pcmdnode; 1143 struct cmd_ctrl_node *pcmdnode;
@@ -1161,9 +1161,9 @@ static ssize_t libertas_highrssi_write(struct file *file,
1161 goto out_unlock; 1161 goto out_unlock;
1162 } 1162 }
1163 1163
1164 event_bitmap = libertas_get_events_bitmap(priv); 1164 event_bitmap = lbs_get_events_bitmap(priv);
1165 1165
1166 res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr); 1166 res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
1167 if (res < 0) 1167 if (res < 0)
1168 goto out_unlock; 1168 goto out_unlock;
1169 1169
@@ -1182,7 +1182,7 @@ static ssize_t libertas_highrssi_write(struct file *file,
1182 event_bitmap |= subscribed ? 0x0010 : 0x0; 1182 event_bitmap |= subscribed ? 0x0010 : 0x0;
1183 event->events = cpu_to_le16(event_bitmap); 1183 event->events = cpu_to_le16(event_bitmap);
1184 1184
1185 libertas_queue_cmd(adapter, pcmdnode, 1); 1185 lbs_queue_cmd(adapter, pcmdnode, 1);
1186 wake_up_interruptible(&priv->waitq); 1186 wake_up_interruptible(&priv->waitq);
1187 1187
1188 /* Sleep until response is generated by FW */ 1188 /* Sleep until response is generated by FW */
@@ -1210,11 +1210,11 @@ out_unlock:
1210 return res; 1210 return res;
1211} 1211}
1212 1212
1213static ssize_t libertas_highsnr_read(struct file *file, char __user *userbuf, 1213static ssize_t lbs_highsnr_read(struct file *file, char __user *userbuf,
1214 size_t count, loff_t *ppos) 1214 size_t count, loff_t *ppos)
1215{ 1215{
1216 wlan_private *priv = file->private_data; 1216 lbs_private *priv = file->private_data;
1217 wlan_adapter *adapter = priv->adapter; 1217 lbs_adapter *adapter = priv->adapter;
1218 struct cmd_ctrl_node *pcmdnode; 1218 struct cmd_ctrl_node *pcmdnode;
1219 struct cmd_ds_command *pcmdptr; 1219 struct cmd_ds_command *pcmdptr;
1220 struct cmd_ds_802_11_subscribe_event *event; 1220 struct cmd_ds_802_11_subscribe_event *event;
@@ -1224,7 +1224,7 @@ static ssize_t libertas_highsnr_read(struct file *file, char __user *userbuf,
1224 unsigned long addr = get_zeroed_page(GFP_KERNEL); 1224 unsigned long addr = get_zeroed_page(GFP_KERNEL);
1225 char *buf = (char *)addr; 1225 char *buf = (char *)addr;
1226 1226
1227 res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr); 1227 res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
1228 if (res < 0) { 1228 if (res < 0) {
1229 free_page(addr); 1229 free_page(addr);
1230 return res; 1230 return res;
@@ -1233,7 +1233,7 @@ static ssize_t libertas_highsnr_read(struct file *file, char __user *userbuf,
1233 event = &pcmdptr->params.subscribe_event; 1233 event = &pcmdptr->params.subscribe_event;
1234 event->action = cpu_to_le16(CMD_ACT_GET); 1234 event->action = cpu_to_le16(CMD_ACT_GET);
1235 pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN); 1235 pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
1236 libertas_queue_cmd(adapter, pcmdnode, 1); 1236 lbs_queue_cmd(adapter, pcmdnode, 1);
1237 wake_up_interruptible(&priv->waitq); 1237 wake_up_interruptible(&priv->waitq);
1238 1238
1239 /* Sleep until response is generated by FW */ 1239 /* Sleep until response is generated by FW */
@@ -1282,12 +1282,12 @@ static ssize_t libertas_highsnr_read(struct file *file, char __user *userbuf,
1282 return res; 1282 return res;
1283} 1283}
1284 1284
1285static ssize_t libertas_highsnr_write(struct file *file, 1285static ssize_t lbs_highsnr_write(struct file *file,
1286 const char __user *userbuf, 1286 const char __user *userbuf,
1287 size_t count, loff_t *ppos) 1287 size_t count, loff_t *ppos)
1288{ 1288{
1289 wlan_private *priv = file->private_data; 1289 lbs_private *priv = file->private_data;
1290 wlan_adapter *adapter = priv->adapter; 1290 lbs_adapter *adapter = priv->adapter;
1291 ssize_t res, buf_size; 1291 ssize_t res, buf_size;
1292 int value, freq, subscribed, cmd_len; 1292 int value, freq, subscribed, cmd_len;
1293 struct cmd_ctrl_node *pcmdnode; 1293 struct cmd_ctrl_node *pcmdnode;
@@ -1311,9 +1311,9 @@ static ssize_t libertas_highsnr_write(struct file *file,
1311 goto out_unlock; 1311 goto out_unlock;
1312 } 1312 }
1313 1313
1314 event_bitmap = libertas_get_events_bitmap(priv); 1314 event_bitmap = lbs_get_events_bitmap(priv);
1315 1315
1316 res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr); 1316 res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
1317 if (res < 0) 1317 if (res < 0)
1318 goto out_unlock; 1318 goto out_unlock;
1319 1319
@@ -1332,7 +1332,7 @@ static ssize_t libertas_highsnr_write(struct file *file,
1332 event_bitmap |= subscribed ? 0x0020 : 0x0; 1332 event_bitmap |= subscribed ? 0x0020 : 0x0;
1333 event->events = cpu_to_le16(event_bitmap); 1333 event->events = cpu_to_le16(event_bitmap);
1334 1334
1335 libertas_queue_cmd(adapter, pcmdnode, 1); 1335 lbs_queue_cmd(adapter, pcmdnode, 1);
1336 wake_up_interruptible(&priv->waitq); 1336 wake_up_interruptible(&priv->waitq);
1337 1337
1338 /* Sleep until response is generated by FW */ 1338 /* Sleep until response is generated by FW */
@@ -1362,12 +1362,12 @@ out_unlock:
1362 return res; 1362 return res;
1363} 1363}
1364 1364
1365static ssize_t libertas_rdmac_read(struct file *file, char __user *userbuf, 1365static ssize_t lbs_rdmac_read(struct file *file, char __user *userbuf,
1366 size_t count, loff_t *ppos) 1366 size_t count, loff_t *ppos)
1367{ 1367{
1368 wlan_private *priv = file->private_data; 1368 lbs_private *priv = file->private_data;
1369 wlan_adapter *adapter = priv->adapter; 1369 lbs_adapter *adapter = priv->adapter;
1370 struct wlan_offset_value offval; 1370 struct lbs_offset_value offval;
1371 ssize_t pos = 0; 1371 ssize_t pos = 0;
1372 int ret; 1372 int ret;
1373 unsigned long addr = get_zeroed_page(GFP_KERNEL); 1373 unsigned long addr = get_zeroed_page(GFP_KERNEL);
@@ -1376,7 +1376,7 @@ static ssize_t libertas_rdmac_read(struct file *file, char __user *userbuf,
1376 offval.offset = priv->mac_offset; 1376 offval.offset = priv->mac_offset;
1377 offval.value = 0; 1377 offval.value = 0;
1378 1378
1379 ret = libertas_prepare_and_send_command(priv, 1379 ret = lbs_prepare_and_send_command(priv,
1380 CMD_MAC_REG_ACCESS, 0, 1380 CMD_MAC_REG_ACCESS, 0,
1381 CMD_OPTION_WAITFORRSP, 0, &offval); 1381 CMD_OPTION_WAITFORRSP, 0, &offval);
1382 mdelay(10); 1382 mdelay(10);
@@ -1388,11 +1388,11 @@ static ssize_t libertas_rdmac_read(struct file *file, char __user *userbuf,
1388 return ret; 1388 return ret;
1389} 1389}
1390 1390
1391static ssize_t libertas_rdmac_write(struct file *file, 1391static ssize_t lbs_rdmac_write(struct file *file,
1392 const char __user *userbuf, 1392 const char __user *userbuf,
1393 size_t count, loff_t *ppos) 1393 size_t count, loff_t *ppos)
1394{ 1394{
1395 wlan_private *priv = file->private_data; 1395 lbs_private *priv = file->private_data;
1396 ssize_t res, buf_size; 1396 ssize_t res, buf_size;
1397 unsigned long addr = get_zeroed_page(GFP_KERNEL); 1397 unsigned long addr = get_zeroed_page(GFP_KERNEL);
1398 char *buf = (char *)addr; 1398 char *buf = (char *)addr;
@@ -1409,15 +1409,15 @@ out_unlock:
1409 return res; 1409 return res;
1410} 1410}
1411 1411
1412static ssize_t libertas_wrmac_write(struct file *file, 1412static ssize_t lbs_wrmac_write(struct file *file,
1413 const char __user *userbuf, 1413 const char __user *userbuf,
1414 size_t count, loff_t *ppos) 1414 size_t count, loff_t *ppos)
1415{ 1415{
1416 1416
1417 wlan_private *priv = file->private_data; 1417 lbs_private *priv = file->private_data;
1418 ssize_t res, buf_size; 1418 ssize_t res, buf_size;
1419 u32 offset, value; 1419 u32 offset, value;
1420 struct wlan_offset_value offval; 1420 struct lbs_offset_value offval;
1421 unsigned long addr = get_zeroed_page(GFP_KERNEL); 1421 unsigned long addr = get_zeroed_page(GFP_KERNEL);
1422 char *buf = (char *)addr; 1422 char *buf = (char *)addr;
1423 1423
@@ -1434,7 +1434,7 @@ static ssize_t libertas_wrmac_write(struct file *file,
1434 1434
1435 offval.offset = offset; 1435 offval.offset = offset;
1436 offval.value = value; 1436 offval.value = value;
1437 res = libertas_prepare_and_send_command(priv, 1437 res = lbs_prepare_and_send_command(priv,
1438 CMD_MAC_REG_ACCESS, 1, 1438 CMD_MAC_REG_ACCESS, 1,
1439 CMD_OPTION_WAITFORRSP, 0, &offval); 1439 CMD_OPTION_WAITFORRSP, 0, &offval);
1440 mdelay(10); 1440 mdelay(10);
@@ -1445,12 +1445,12 @@ out_unlock:
1445 return res; 1445 return res;
1446} 1446}
1447 1447
1448static ssize_t libertas_rdbbp_read(struct file *file, char __user *userbuf, 1448static ssize_t lbs_rdbbp_read(struct file *file, char __user *userbuf,
1449 size_t count, loff_t *ppos) 1449 size_t count, loff_t *ppos)
1450{ 1450{
1451 wlan_private *priv = file->private_data; 1451 lbs_private *priv = file->private_data;
1452 wlan_adapter *adapter = priv->adapter; 1452 lbs_adapter *adapter = priv->adapter;
1453 struct wlan_offset_value offval; 1453 struct lbs_offset_value offval;
1454 ssize_t pos = 0; 1454 ssize_t pos = 0;
1455 int ret; 1455 int ret;
1456 unsigned long addr = get_zeroed_page(GFP_KERNEL); 1456 unsigned long addr = get_zeroed_page(GFP_KERNEL);
@@ -1459,7 +1459,7 @@ static ssize_t libertas_rdbbp_read(struct file *file, char __user *userbuf,
1459 offval.offset = priv->bbp_offset; 1459 offval.offset = priv->bbp_offset;
1460 offval.value = 0; 1460 offval.value = 0;
1461 1461
1462 ret = libertas_prepare_and_send_command(priv, 1462 ret = lbs_prepare_and_send_command(priv,
1463 CMD_BBP_REG_ACCESS, 0, 1463 CMD_BBP_REG_ACCESS, 0,
1464 CMD_OPTION_WAITFORRSP, 0, &offval); 1464 CMD_OPTION_WAITFORRSP, 0, &offval);
1465 mdelay(10); 1465 mdelay(10);
@@ -1472,11 +1472,11 @@ static ssize_t libertas_rdbbp_read(struct file *file, char __user *userbuf,
1472 return ret; 1472 return ret;
1473} 1473}
1474 1474
1475static ssize_t libertas_rdbbp_write(struct file *file, 1475static ssize_t lbs_rdbbp_write(struct file *file,
1476 const char __user *userbuf, 1476 const char __user *userbuf,
1477 size_t count, loff_t *ppos) 1477 size_t count, loff_t *ppos)
1478{ 1478{
1479 wlan_private *priv = file->private_data; 1479 lbs_private *priv = file->private_data;
1480 ssize_t res, buf_size; 1480 ssize_t res, buf_size;
1481 unsigned long addr = get_zeroed_page(GFP_KERNEL); 1481 unsigned long addr = get_zeroed_page(GFP_KERNEL);
1482 char *buf = (char *)addr; 1482 char *buf = (char *)addr;
@@ -1493,15 +1493,15 @@ out_unlock:
1493 return res; 1493 return res;
1494} 1494}
1495 1495
1496static ssize_t libertas_wrbbp_write(struct file *file, 1496static ssize_t lbs_wrbbp_write(struct file *file,
1497 const char __user *userbuf, 1497 const char __user *userbuf,
1498 size_t count, loff_t *ppos) 1498 size_t count, loff_t *ppos)
1499{ 1499{
1500 1500
1501 wlan_private *priv = file->private_data; 1501 lbs_private *priv = file->private_data;
1502 ssize_t res, buf_size; 1502 ssize_t res, buf_size;
1503 u32 offset, value; 1503 u32 offset, value;
1504 struct wlan_offset_value offval; 1504 struct lbs_offset_value offval;
1505 unsigned long addr = get_zeroed_page(GFP_KERNEL); 1505 unsigned long addr = get_zeroed_page(GFP_KERNEL);
1506 char *buf = (char *)addr; 1506 char *buf = (char *)addr;
1507 1507
@@ -1518,7 +1518,7 @@ static ssize_t libertas_wrbbp_write(struct file *file,
1518 1518
1519 offval.offset = offset; 1519 offval.offset = offset;
1520 offval.value = value; 1520 offval.value = value;
1521 res = libertas_prepare_and_send_command(priv, 1521 res = lbs_prepare_and_send_command(priv,
1522 CMD_BBP_REG_ACCESS, 1, 1522 CMD_BBP_REG_ACCESS, 1,
1523 CMD_OPTION_WAITFORRSP, 0, &offval); 1523 CMD_OPTION_WAITFORRSP, 0, &offval);
1524 mdelay(10); 1524 mdelay(10);
@@ -1529,12 +1529,12 @@ out_unlock:
1529 return res; 1529 return res;
1530} 1530}
1531 1531
1532static ssize_t libertas_rdrf_read(struct file *file, char __user *userbuf, 1532static ssize_t lbs_rdrf_read(struct file *file, char __user *userbuf,
1533 size_t count, loff_t *ppos) 1533 size_t count, loff_t *ppos)
1534{ 1534{
1535 wlan_private *priv = file->private_data; 1535 lbs_private *priv = file->private_data;
1536 wlan_adapter *adapter = priv->adapter; 1536 lbs_adapter *adapter = priv->adapter;
1537 struct wlan_offset_value offval; 1537 struct lbs_offset_value offval;
1538 ssize_t pos = 0; 1538 ssize_t pos = 0;
1539 int ret; 1539 int ret;
1540 unsigned long addr = get_zeroed_page(GFP_KERNEL); 1540 unsigned long addr = get_zeroed_page(GFP_KERNEL);
@@ -1543,7 +1543,7 @@ static ssize_t libertas_rdrf_read(struct file *file, char __user *userbuf,
1543 offval.offset = priv->rf_offset; 1543 offval.offset = priv->rf_offset;
1544 offval.value = 0; 1544 offval.value = 0;
1545 1545
1546 ret = libertas_prepare_and_send_command(priv, 1546 ret = lbs_prepare_and_send_command(priv,
1547 CMD_RF_REG_ACCESS, 0, 1547 CMD_RF_REG_ACCESS, 0,
1548 CMD_OPTION_WAITFORRSP, 0, &offval); 1548 CMD_OPTION_WAITFORRSP, 0, &offval);
1549 mdelay(10); 1549 mdelay(10);
@@ -1556,11 +1556,11 @@ static ssize_t libertas_rdrf_read(struct file *file, char __user *userbuf,
1556 return ret; 1556 return ret;
1557} 1557}
1558 1558
1559static ssize_t libertas_rdrf_write(struct file *file, 1559static ssize_t lbs_rdrf_write(struct file *file,
1560 const char __user *userbuf, 1560 const char __user *userbuf,
1561 size_t count, loff_t *ppos) 1561 size_t count, loff_t *ppos)
1562{ 1562{
1563 wlan_private *priv = file->private_data; 1563 lbs_private *priv = file->private_data;
1564 ssize_t res, buf_size; 1564 ssize_t res, buf_size;
1565 unsigned long addr = get_zeroed_page(GFP_KERNEL); 1565 unsigned long addr = get_zeroed_page(GFP_KERNEL);
1566 char *buf = (char *)addr; 1566 char *buf = (char *)addr;
@@ -1577,15 +1577,15 @@ out_unlock:
1577 return res; 1577 return res;
1578} 1578}
1579 1579
1580static ssize_t libertas_wrrf_write(struct file *file, 1580static ssize_t lbs_wrrf_write(struct file *file,
1581 const char __user *userbuf, 1581 const char __user *userbuf,
1582 size_t count, loff_t *ppos) 1582 size_t count, loff_t *ppos)
1583{ 1583{
1584 1584
1585 wlan_private *priv = file->private_data; 1585 lbs_private *priv = file->private_data;
1586 ssize_t res, buf_size; 1586 ssize_t res, buf_size;
1587 u32 offset, value; 1587 u32 offset, value;
1588 struct wlan_offset_value offval; 1588 struct lbs_offset_value offval;
1589 unsigned long addr = get_zeroed_page(GFP_KERNEL); 1589 unsigned long addr = get_zeroed_page(GFP_KERNEL);
1590 char *buf = (char *)addr; 1590 char *buf = (char *)addr;
1591 1591
@@ -1602,7 +1602,7 @@ static ssize_t libertas_wrrf_write(struct file *file,
1602 1602
1603 offval.offset = offset; 1603 offval.offset = offset;
1604 offval.value = value; 1604 offval.value = value;
1605 res = libertas_prepare_and_send_command(priv, 1605 res = lbs_prepare_and_send_command(priv,
1606 CMD_RF_REG_ACCESS, 1, 1606 CMD_RF_REG_ACCESS, 1,
1607 CMD_OPTION_WAITFORRSP, 0, &offval); 1607 CMD_OPTION_WAITFORRSP, 0, &offval);
1608 mdelay(10); 1608 mdelay(10);
@@ -1620,69 +1620,69 @@ out_unlock:
1620 .write = (fwrite), \ 1620 .write = (fwrite), \
1621} 1621}
1622 1622
1623struct libertas_debugfs_files { 1623struct lbs_debugfs_files {
1624 char *name; 1624 char *name;
1625 int perm; 1625 int perm;
1626 struct file_operations fops; 1626 struct file_operations fops;
1627}; 1627};
1628 1628
1629static struct libertas_debugfs_files debugfs_files[] = { 1629static struct lbs_debugfs_files debugfs_files[] = {
1630 { "info", 0444, FOPS(libertas_dev_info, write_file_dummy), }, 1630 { "info", 0444, FOPS(lbs_dev_info, write_file_dummy), },
1631 { "getscantable", 0444, FOPS(libertas_getscantable, 1631 { "getscantable", 0444, FOPS(lbs_getscantable,
1632 write_file_dummy), }, 1632 write_file_dummy), },
1633 { "sleepparams", 0644, FOPS(libertas_sleepparams_read, 1633 { "sleepparams", 0644, FOPS(lbs_sleepparams_read,
1634 libertas_sleepparams_write), }, 1634 lbs_sleepparams_write), },
1635 { "extscan", 0600, FOPS(NULL, libertas_extscan), }, 1635 { "extscan", 0600, FOPS(NULL, lbs_extscan), },
1636 { "setuserscan", 0600, FOPS(NULL, libertas_setuserscan), }, 1636 { "setuserscan", 0600, FOPS(NULL, lbs_setuserscan), },
1637}; 1637};
1638 1638
1639static struct libertas_debugfs_files debugfs_events_files[] = { 1639static struct lbs_debugfs_files debugfs_events_files[] = {
1640 {"low_rssi", 0644, FOPS(libertas_lowrssi_read, 1640 {"low_rssi", 0644, FOPS(lbs_lowrssi_read,
1641 libertas_lowrssi_write), }, 1641 lbs_lowrssi_write), },
1642 {"low_snr", 0644, FOPS(libertas_lowsnr_read, 1642 {"low_snr", 0644, FOPS(lbs_lowsnr_read,
1643 libertas_lowsnr_write), }, 1643 lbs_lowsnr_write), },
1644 {"failure_count", 0644, FOPS(libertas_failcount_read, 1644 {"failure_count", 0644, FOPS(lbs_failcount_read,
1645 libertas_failcount_write), }, 1645 lbs_failcount_write), },
1646 {"beacon_missed", 0644, FOPS(libertas_bcnmiss_read, 1646 {"beacon_missed", 0644, FOPS(lbs_bcnmiss_read,
1647 libertas_bcnmiss_write), }, 1647 lbs_bcnmiss_write), },
1648 {"high_rssi", 0644, FOPS(libertas_highrssi_read, 1648 {"high_rssi", 0644, FOPS(lbs_highrssi_read,
1649 libertas_highrssi_write), }, 1649 lbs_highrssi_write), },
1650 {"high_snr", 0644, FOPS(libertas_highsnr_read, 1650 {"high_snr", 0644, FOPS(lbs_highsnr_read,
1651 libertas_highsnr_write), }, 1651 lbs_highsnr_write), },
1652}; 1652};
1653 1653
1654static struct libertas_debugfs_files debugfs_regs_files[] = { 1654static struct lbs_debugfs_files debugfs_regs_files[] = {
1655 {"rdmac", 0644, FOPS(libertas_rdmac_read, libertas_rdmac_write), }, 1655 {"rdmac", 0644, FOPS(lbs_rdmac_read, lbs_rdmac_write), },
1656 {"wrmac", 0600, FOPS(NULL, libertas_wrmac_write), }, 1656 {"wrmac", 0600, FOPS(NULL, lbs_wrmac_write), },
1657 {"rdbbp", 0644, FOPS(libertas_rdbbp_read, libertas_rdbbp_write), }, 1657 {"rdbbp", 0644, FOPS(lbs_rdbbp_read, lbs_rdbbp_write), },
1658 {"wrbbp", 0600, FOPS(NULL, libertas_wrbbp_write), }, 1658 {"wrbbp", 0600, FOPS(NULL, lbs_wrbbp_write), },
1659 {"rdrf", 0644, FOPS(libertas_rdrf_read, libertas_rdrf_write), }, 1659 {"rdrf", 0644, FOPS(lbs_rdrf_read, lbs_rdrf_write), },
1660 {"wrrf", 0600, FOPS(NULL, libertas_wrrf_write), }, 1660 {"wrrf", 0600, FOPS(NULL, lbs_wrrf_write), },
1661}; 1661};
1662 1662
1663void libertas_debugfs_init(void) 1663void lbs_debugfs_init(void)
1664{ 1664{
1665 if (!libertas_dir) 1665 if (!lbs_dir)
1666 libertas_dir = debugfs_create_dir("libertas_wireless", NULL); 1666 lbs_dir = debugfs_create_dir("lbs_wireless", NULL);
1667 1667
1668 return; 1668 return;
1669} 1669}
1670 1670
1671void libertas_debugfs_remove(void) 1671void lbs_debugfs_remove(void)
1672{ 1672{
1673 if (libertas_dir) 1673 if (lbs_dir)
1674 debugfs_remove(libertas_dir); 1674 debugfs_remove(lbs_dir);
1675 return; 1675 return;
1676} 1676}
1677 1677
1678void libertas_debugfs_init_one(wlan_private *priv, struct net_device *dev) 1678void lbs_debugfs_init_one(lbs_private *priv, struct net_device *dev)
1679{ 1679{
1680 int i; 1680 int i;
1681 struct libertas_debugfs_files *files; 1681 struct lbs_debugfs_files *files;
1682 if (!libertas_dir) 1682 if (!lbs_dir)
1683 goto exit; 1683 goto exit;
1684 1684
1685 priv->debugfs_dir = debugfs_create_dir(dev->name, libertas_dir); 1685 priv->debugfs_dir = debugfs_create_dir(dev->name, lbs_dir);
1686 if (!priv->debugfs_dir) 1686 if (!priv->debugfs_dir)
1687 goto exit; 1687 goto exit;
1688 1688
@@ -1722,13 +1722,13 @@ void libertas_debugfs_init_one(wlan_private *priv, struct net_device *dev)
1722 } 1722 }
1723 1723
1724#ifdef PROC_DEBUG 1724#ifdef PROC_DEBUG
1725 libertas_debug_init(priv, dev); 1725 lbs_debug_init(priv, dev);
1726#endif 1726#endif
1727exit: 1727exit:
1728 return; 1728 return;
1729} 1729}
1730 1730
1731void libertas_debugfs_remove_one(wlan_private *priv) 1731void lbs_debugfs_remove_one(lbs_private *priv)
1732{ 1732{
1733 int i; 1733 int i;
1734 1734
@@ -1755,8 +1755,8 @@ void libertas_debugfs_remove_one(wlan_private *priv)
1755 1755
1756#ifdef PROC_DEBUG 1756#ifdef PROC_DEBUG
1757 1757
1758#define item_size(n) (FIELD_SIZEOF(wlan_adapter, n)) 1758#define item_size(n) (FIELD_SIZEOF(lbs_adapter, n))
1759#define item_addr(n) (offsetof(wlan_adapter, n)) 1759#define item_addr(n) (offsetof(lbs_adapter, n))
1760 1760
1761 1761
1762struct debug_data { 1762struct debug_data {
@@ -1765,7 +1765,7 @@ struct debug_data {
1765 size_t addr; 1765 size_t addr;
1766}; 1766};
1767 1767
1768/* To debug any member of wlan_adapter, simply add one line here. 1768/* To debug any member of lbs_adapter, simply add one line here.
1769 */ 1769 */
1770static struct debug_data items[] = { 1770static struct debug_data items[] = {
1771 {"intcounter", item_size(intcounter), item_addr(intcounter)}, 1771 {"intcounter", item_size(intcounter), item_addr(intcounter)},
@@ -1786,7 +1786,7 @@ static int num_of_items = ARRAY_SIZE(items);
1786 * @param data data to output 1786 * @param data data to output
1787 * @return number of output data 1787 * @return number of output data
1788 */ 1788 */
1789static ssize_t wlan_debugfs_read(struct file *file, char __user *userbuf, 1789static ssize_t lbs_debugfs_read(struct file *file, char __user *userbuf,
1790 size_t count, loff_t *ppos) 1790 size_t count, loff_t *ppos)
1791{ 1791{
1792 int val = 0; 1792 int val = 0;
@@ -1830,7 +1830,7 @@ static ssize_t wlan_debugfs_read(struct file *file, char __user *userbuf,
1830 * @param data data to write 1830 * @param data data to write
1831 * @return number of data 1831 * @return number of data
1832 */ 1832 */
1833static ssize_t wlan_debugfs_write(struct file *f, const char __user *buf, 1833static ssize_t lbs_debugfs_write(struct file *f, const char __user *buf,
1834 size_t cnt, loff_t *ppos) 1834 size_t cnt, loff_t *ppos)
1835{ 1835{
1836 int r, i; 1836 int r, i;
@@ -1882,21 +1882,21 @@ static ssize_t wlan_debugfs_write(struct file *f, const char __user *buf,
1882 return (ssize_t)cnt; 1882 return (ssize_t)cnt;
1883} 1883}
1884 1884
1885static struct file_operations libertas_debug_fops = { 1885static struct file_operations lbs_debug_fops = {
1886 .owner = THIS_MODULE, 1886 .owner = THIS_MODULE,
1887 .open = open_file_generic, 1887 .open = open_file_generic,
1888 .write = wlan_debugfs_write, 1888 .write = lbs_debugfs_write,
1889 .read = wlan_debugfs_read, 1889 .read = lbs_debugfs_read,
1890}; 1890};
1891 1891
1892/** 1892/**
1893 * @brief create debug proc file 1893 * @brief create debug proc file
1894 * 1894 *
1895 * @param priv pointer wlan_private 1895 * @param priv pointer lbs_private
1896 * @param dev pointer net_device 1896 * @param dev pointer net_device
1897 * @return N/A 1897 * @return N/A
1898 */ 1898 */
1899static void libertas_debug_init(wlan_private * priv, struct net_device *dev) 1899static void lbs_debug_init(lbs_private * priv, struct net_device *dev)
1900{ 1900{
1901 int i; 1901 int i;
1902 1902
@@ -1908,7 +1908,7 @@ static void libertas_debug_init(wlan_private * priv, struct net_device *dev)
1908 1908
1909 priv->debugfs_debug = debugfs_create_file("debug", 0644, 1909 priv->debugfs_debug = debugfs_create_file("debug", 0644,
1910 priv->debugfs_dir, &items[0], 1910 priv->debugfs_dir, &items[0],
1911 &libertas_debug_fops); 1911 &lbs_debug_fops);
1912} 1912}
1913#endif 1913#endif
1914 1914
diff --git a/drivers/net/wireless/libertas/debugfs.h b/drivers/net/wireless/libertas/debugfs.h
index 880a11b95d26..c97584581980 100644
--- a/drivers/net/wireless/libertas/debugfs.h
+++ b/drivers/net/wireless/libertas/debugfs.h
@@ -1,6 +1,10 @@
1void libertas_debugfs_init(void); 1#ifndef _LBS_DEBUGFS_H_
2void libertas_debugfs_remove(void); 2#define _LBS_DEBUGFS_H_
3 3
4void libertas_debugfs_init_one(wlan_private *priv, struct net_device *dev); 4void lbs_debugfs_init(void);
5void libertas_debugfs_remove_one(wlan_private *priv); 5void lbs_debugfs_remove(void);
6 6
7void lbs_debugfs_init_one(lbs_private *priv, struct net_device *dev);
8void lbs_debugfs_remove_one(lbs_private *priv);
9
10#endif
diff --git a/drivers/net/wireless/libertas/decl.h b/drivers/net/wireless/libertas/decl.h
index 87fea9d5b90a..7dd76f8e8d2d 100644
--- a/drivers/net/wireless/libertas/decl.h
+++ b/drivers/net/wireless/libertas/decl.h
@@ -3,80 +3,80 @@
3 * functions defined in other source files 3 * functions defined in other source files
4 */ 4 */
5 5
6#ifndef _WLAN_DECL_H_ 6#ifndef _LBS_DECL_H_
7#define _WLAN_DECL_H_ 7#define _LBS_DECL_H_
8 8
9#include <linux/device.h> 9#include <linux/device.h>
10 10
11#include "defs.h" 11#include "defs.h"
12 12
13/** Function Prototype Declaration */ 13/** Function Prototype Declaration */
14struct wlan_private; 14struct lbs_private;
15struct sk_buff; 15struct sk_buff;
16struct net_device; 16struct net_device;
17 17
18int libertas_set_mac_packet_filter(wlan_private * priv); 18int lbs_set_mac_packet_filter(lbs_private * priv);
19 19
20void libertas_send_tx_feedback(wlan_private * priv); 20void lbs_send_tx_feedback(lbs_private * priv);
21 21
22int libertas_free_cmd_buffer(wlan_private * priv); 22int lbs_free_cmd_buffer(lbs_private * priv);
23struct cmd_ctrl_node; 23struct cmd_ctrl_node;
24struct cmd_ctrl_node *libertas_get_free_cmd_ctrl_node(wlan_private * priv); 24struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(lbs_private * priv);
25 25
26void libertas_set_cmd_ctrl_node(wlan_private * priv, 26void lbs_set_cmd_ctrl_node(lbs_private * priv,
27 struct cmd_ctrl_node *ptempnode, 27 struct cmd_ctrl_node *ptempnode,
28 u32 cmd_oid, u16 wait_option, void *pdata_buf); 28 u32 cmd_oid, u16 wait_option, void *pdata_buf);
29 29
30int libertas_prepare_and_send_command(wlan_private * priv, 30int lbs_prepare_and_send_command(lbs_private * priv,
31 u16 cmd_no, 31 u16 cmd_no,
32 u16 cmd_action, 32 u16 cmd_action,
33 u16 wait_option, u32 cmd_oid, void *pdata_buf); 33 u16 wait_option, u32 cmd_oid, void *pdata_buf);
34 34
35void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail); 35void lbs_queue_cmd(lbs_adapter *adapter, struct cmd_ctrl_node *cmdnode, u8 addtail);
36 36
37int libertas_allocate_cmd_buffer(wlan_private * priv); 37int lbs_allocate_cmd_buffer(lbs_private * priv);
38int libertas_execute_next_command(wlan_private * priv); 38int lbs_execute_next_command(lbs_private * priv);
39int libertas_process_event(wlan_private * priv); 39int lbs_process_event(lbs_private * priv);
40void libertas_interrupt(struct net_device *); 40void lbs_interrupt(struct net_device *);
41int libertas_set_radio_control(wlan_private * priv); 41int lbs_set_radio_control(lbs_private * priv);
42u32 libertas_fw_index_to_data_rate(u8 index); 42u32 lbs_fw_index_to_data_rate(u8 index);
43u8 libertas_data_rate_to_fw_index(u32 rate); 43u8 lbs_data_rate_to_fw_index(u32 rate);
44void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen); 44void lbs_get_fwversion(lbs_adapter *adapter, char *fwversion, int maxlen);
45 45
46void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb); 46void lbs_upload_rx_packet(lbs_private * priv, struct sk_buff *skb);
47 47
48/** The proc fs interface */ 48/** The proc fs interface */
49int libertas_process_rx_command(wlan_private * priv); 49int lbs_process_rx_command(lbs_private * priv);
50int libertas_process_tx(wlan_private * priv, struct sk_buff *skb); 50int lbs_process_tx(lbs_private * priv, struct sk_buff *skb);
51void __libertas_cleanup_and_insert_cmd(wlan_private * priv, 51void __lbs_cleanup_and_insert_cmd(lbs_private * priv,
52 struct cmd_ctrl_node *ptempcmd); 52 struct cmd_ctrl_node *ptempcmd);
53 53
54int libertas_set_regiontable(wlan_private * priv, u8 region, u8 band); 54int lbs_set_regiontable(lbs_private * priv, u8 region, u8 band);
55 55
56int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *); 56int lbs_process_rxed_packet(lbs_private * priv, struct sk_buff *);
57 57
58void libertas_ps_sleep(wlan_private * priv, int wait_option); 58void lbs_ps_sleep(lbs_private * priv, int wait_option);
59void libertas_ps_confirm_sleep(wlan_private * priv, u16 psmode); 59void lbs_ps_confirm_sleep(lbs_private * priv, u16 psmode);
60void libertas_ps_wakeup(wlan_private * priv, int wait_option); 60void lbs_ps_wakeup(lbs_private * priv, int wait_option);
61 61
62void libertas_tx_runqueue(wlan_private *priv); 62void lbs_tx_runqueue(lbs_private *priv);
63 63
64struct chan_freq_power *libertas_find_cfp_by_band_and_channel( 64struct chan_freq_power *lbs_find_cfp_by_band_and_channel(
65 wlan_adapter * adapter, u8 band, u16 channel); 65 lbs_adapter *adapter, u8 band, u16 channel);
66 66
67void libertas_mac_event_disconnected(wlan_private * priv); 67void lbs_mac_event_disconnected(lbs_private * priv);
68 68
69void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str); 69void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str);
70 70
71/* main.c */ 71/* main.c */
72struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band, 72struct chan_freq_power *lbs_get_region_cfp_table(u8 region, u8 band,
73 int *cfp_no); 73 int *cfp_no);
74wlan_private *libertas_add_card(void *card, struct device *dmdev); 74lbs_private *lbs_add_card(void *card, struct device *dmdev);
75int libertas_remove_card(wlan_private *priv); 75int lbs_remove_card(lbs_private *priv);
76int libertas_start_card(wlan_private *priv); 76int lbs_start_card(lbs_private *priv);
77int libertas_stop_card(wlan_private *priv); 77int lbs_stop_card(lbs_private *priv);
78int libertas_add_mesh(wlan_private *priv, struct device *dev); 78int lbs_add_mesh(lbs_private *priv, struct device *dev);
79void libertas_remove_mesh(wlan_private *priv); 79void lbs_remove_mesh(lbs_private *priv);
80int libertas_reset_device(wlan_private *priv); 80int lbs_reset_device(lbs_private *priv);
81 81
82#endif /* _WLAN_DECL_H_ */ 82#endif
diff --git a/drivers/net/wireless/libertas/defs.h b/drivers/net/wireless/libertas/defs.h
index 3a0c9beefcf8..81ab99c3f49f 100644
--- a/drivers/net/wireless/libertas/defs.h
+++ b/drivers/net/wireless/libertas/defs.h
@@ -2,8 +2,8 @@
2 * This header file contains global constant/enum definitions, 2 * This header file contains global constant/enum definitions,
3 * global variable declaration. 3 * global variable declaration.
4 */ 4 */
5#ifndef _WLAN_DEFS_H_ 5#ifndef _LBS_DEFS_H_
6#define _WLAN_DEFS_H_ 6#define _LBS_DEFS_H_
7 7
8#include <linux/spinlock.h> 8#include <linux/spinlock.h>
9 9
@@ -41,11 +41,11 @@
41#define LBS_DEB_HEX 0x00200000 41#define LBS_DEB_HEX 0x00200000
42#define LBS_DEB_SDIO 0x00400000 42#define LBS_DEB_SDIO 0x00400000
43 43
44extern unsigned int libertas_debug; 44extern unsigned int lbs_debug;
45 45
46#ifdef DEBUG 46#ifdef DEBUG
47#define LBS_DEB_LL(grp, grpnam, fmt, args...) \ 47#define LBS_DEB_LL(grp, grpnam, fmt, args...) \
48do { if ((libertas_debug & (grp)) == (grp)) \ 48do { if ((lbs_debug & (grp)) == (grp)) \
49 printk(KERN_DEBUG DRV_NAME grpnam "%s: " fmt, \ 49 printk(KERN_DEBUG DRV_NAME grpnam "%s: " fmt, \
50 in_interrupt() ? " (INT)" : "", ## args); } while (0) 50 in_interrupt() ? " (INT)" : "", ## args); } while (0)
51#else 51#else
@@ -96,8 +96,8 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
96 int i = 0; 96 int i = 0;
97 97
98 if (len && 98 if (len &&
99 (libertas_debug & LBS_DEB_HEX) && 99 (lbs_debug & LBS_DEB_HEX) &&
100 (libertas_debug & grp)) 100 (lbs_debug & grp))
101 { 101 {
102 for (i = 1; i <= len; i++) { 102 for (i = 1; i <= len; i++) {
103 if ((i & 0xf) == 1) { 103 if ((i & 0xf) == 1) {
@@ -138,7 +138,7 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
138#define MRVDRV_ASSOCIATION_TIME_OUT 255 138#define MRVDRV_ASSOCIATION_TIME_OUT 255
139#define MRVDRV_SNAP_HEADER_LEN 8 139#define MRVDRV_SNAP_HEADER_LEN 8
140 140
141#define WLAN_UPLD_SIZE 2312 141#define LBS_UPLD_SIZE 2312
142#define DEV_NAME_LEN 32 142#define DEV_NAME_LEN 32
143 143
144/** Misc constants */ 144/** Misc constants */
@@ -262,12 +262,12 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
262#define UNSET_MESH_FRAME(x) (x->cb[6]=0) 262#define UNSET_MESH_FRAME(x) (x->cb[6]=0)
263 263
264/** Global Variable Declaration */ 264/** Global Variable Declaration */
265typedef struct _wlan_private wlan_private; 265typedef struct _lbs_private lbs_private;
266typedef struct _wlan_adapter wlan_adapter; 266typedef struct _lbs_adapter lbs_adapter;
267extern const char libertas_driver_version[]; 267extern const char lbs_driver_version[];
268extern u16 libertas_region_code_to_index[MRVDRV_MAX_REGION_CODE]; 268extern u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE];
269 269
270extern u8 libertas_bg_rates[MAX_RATES]; 270extern u8 lbs_bg_rates[MAX_RATES];
271 271
272/** ENUM definition*/ 272/** ENUM definition*/
273/** SNRNF_TYPE */ 273/** SNRNF_TYPE */
@@ -284,13 +284,13 @@ enum SNRNF_DATA {
284 MAX_TYPE_AVG 284 MAX_TYPE_AVG
285}; 285};
286 286
287/** WLAN_802_11_POWER_MODE */ 287/** LBS_802_11_POWER_MODE */
288enum WLAN_802_11_POWER_MODE { 288enum LBS_802_11_POWER_MODE {
289 WLAN802_11POWERMODECAM, 289 LBS802_11POWERMODECAM,
290 WLAN802_11POWERMODEMAX_PSP, 290 LBS802_11POWERMODEMAX_PSP,
291 WLAN802_11POWERMODEFAST_PSP, 291 LBS802_11POWERMODEFAST_PSP,
292 /*not a real mode, defined as an upper bound */ 292 /*not a real mode, defined as an upper bound */
293 WLAN802_11POWEMODEMAX 293 LBS802_11POWEMODEMAX
294}; 294};
295 295
296/** PS_STATE */ 296/** PS_STATE */
@@ -308,16 +308,16 @@ enum DNLD_STATE {
308 DNLD_CMD_SENT 308 DNLD_CMD_SENT
309}; 309};
310 310
311/** WLAN_MEDIA_STATE */ 311/** LBS_MEDIA_STATE */
312enum WLAN_MEDIA_STATE { 312enum LBS_MEDIA_STATE {
313 LIBERTAS_CONNECTED, 313 LBS_CONNECTED,
314 LIBERTAS_DISCONNECTED 314 LBS_DISCONNECTED
315}; 315};
316 316
317/** WLAN_802_11_PRIVACY_FILTER */ 317/** LBS_802_11_PRIVACY_FILTER */
318enum WLAN_802_11_PRIVACY_FILTER { 318enum LBS_802_11_PRIVACY_FILTER {
319 WLAN802_11PRIVFILTERACCEPTALL, 319 LBS802_11PRIVFILTERACCEPTALL,
320 WLAN802_11PRIVFILTER8021XWEP 320 LBS802_11PRIVFILTER8021XWEP
321}; 321};
322 322
323/** mv_ms_type */ 323/** mv_ms_type */
@@ -382,4 +382,4 @@ enum SNMP_MIB_VALUE_e {
382#define FWT_DEFAULT_SLEEPMODE 0 382#define FWT_DEFAULT_SLEEPMODE 0
383#define FWT_DEFAULT_SNR 0 383#define FWT_DEFAULT_SNR 0
384 384
385#endif /* _WLAN_DEFS_H_ */ 385#endif
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index 1fb807aa91b9..27db5d4389a7 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -1,10 +1,10 @@
1/** 1/**
2 * This file contains definitions and data structures specific 2 * This file contains definitions and data structures specific
3 * to Marvell 802.11 NIC. It contains the Device Information 3 * to Marvell 802.11 NIC. It contains the Device Information
4 * structure wlan_adapter. 4 * structure lbs_adapter.
5 */ 5 */
6#ifndef _WLAN_DEV_H_ 6#ifndef _LBS_DEV_H_
7#define _WLAN_DEV_H_ 7#define _LBS_DEV_H_
8 8
9#include <linux/netdevice.h> 9#include <linux/netdevice.h>
10#include <linux/wireless.h> 10#include <linux/wireless.h>
@@ -15,7 +15,7 @@
15#include "defs.h" 15#include "defs.h"
16#include "scan.h" 16#include "scan.h"
17 17
18extern struct ethtool_ops libertas_ethtool_ops; 18extern struct ethtool_ops lbs_ethtool_ops;
19 19
20#define MAX_BSSID_PER_CHANNEL 16 20#define MAX_BSSID_PER_CHANNEL 16
21 21
@@ -53,7 +53,7 @@ struct region_channel {
53 struct chan_freq_power *CFP; 53 struct chan_freq_power *CFP;
54}; 54};
55 55
56struct wlan_802_11_security { 56struct lbs_802_11_security {
57 u8 WPAenabled; 57 u8 WPAenabled;
58 u8 WPA2enabled; 58 u8 WPA2enabled;
59 u8 wep_enabled; 59 u8 wep_enabled;
@@ -87,7 +87,7 @@ struct sleep_params {
87}; 87};
88 88
89/* Mesh statistics */ 89/* Mesh statistics */
90struct wlan_mesh_stats { 90struct lbs_mesh_stats {
91 u32 fwd_bcast_cnt; /* Fwd: Broadcast counter */ 91 u32 fwd_bcast_cnt; /* Fwd: Broadcast counter */
92 u32 fwd_unicast_cnt; /* Fwd: Unicast counter */ 92 u32 fwd_unicast_cnt; /* Fwd: Unicast counter */
93 u32 fwd_drop_ttl; /* Fwd: TTL zero */ 93 u32 fwd_drop_ttl; /* Fwd: TTL zero */
@@ -99,7 +99,7 @@ struct wlan_mesh_stats {
99}; 99};
100 100
101/** Private structure for the MV device */ 101/** Private structure for the MV device */
102struct _wlan_private { 102struct _lbs_private {
103 int open; 103 int open;
104 int mesh_open; 104 int mesh_open;
105 int infra_open; 105 int infra_open;
@@ -109,7 +109,7 @@ struct _wlan_private {
109 char name[DEV_NAME_LEN]; 109 char name[DEV_NAME_LEN];
110 110
111 void *card; 111 void *card;
112 wlan_adapter *adapter; 112 lbs_adapter *adapter;
113 struct net_device *dev; 113 struct net_device *dev;
114 114
115 struct net_device_stats stats; 115 struct net_device_stats stats;
@@ -118,7 +118,7 @@ struct _wlan_private {
118 struct ieee80211_device *ieee; 118 struct ieee80211_device *ieee;
119 119
120 struct iw_statistics wstats; 120 struct iw_statistics wstats;
121 struct wlan_mesh_stats mstats; 121 struct lbs_mesh_stats mstats;
122 struct dentry *debugfs_dir; 122 struct dentry *debugfs_dir;
123 struct dentry *debugfs_debug; 123 struct dentry *debugfs_debug;
124 struct dentry *debugfs_files[6]; 124 struct dentry *debugfs_files[6];
@@ -136,7 +136,7 @@ struct _wlan_private {
136 /** Upload length */ 136 /** Upload length */
137 u32 upld_len; 137 u32 upld_len;
138 /* Upload buffer */ 138 /* Upload buffer */
139 u8 upld_buf[WLAN_UPLD_SIZE]; 139 u8 upld_buf[LBS_UPLD_SIZE];
140 /* Download sent: 140 /* Download sent:
141 bit0 1/0=data_sent/data_tx_done, 141 bit0 1/0=data_sent/data_tx_done,
142 bit1 1/0=cmd_sent/cmd_tx_done, 142 bit1 1/0=cmd_sent/cmd_tx_done,
@@ -155,9 +155,9 @@ struct _wlan_private {
155 struct work_struct sync_channel; 155 struct work_struct sync_channel;
156 156
157 /** Hardware access */ 157 /** Hardware access */
158 int (*hw_host_to_card) (wlan_private * priv, u8 type, u8 * payload, u16 nb); 158 int (*hw_host_to_card) (lbs_private *priv, u8 type, u8 *payload, u16 nb);
159 int (*hw_get_int_status) (wlan_private * priv, u8 *); 159 int (*hw_get_int_status) (lbs_private *priv, u8 *);
160 int (*hw_read_event_cause) (wlan_private *); 160 int (*hw_read_event_cause) (lbs_private *);
161}; 161};
162 162
163/** Association request 163/** Association request
@@ -194,7 +194,7 @@ struct assoc_request {
194 struct enc_key wpa_mcast_key; 194 struct enc_key wpa_mcast_key;
195 struct enc_key wpa_unicast_key; 195 struct enc_key wpa_unicast_key;
196 196
197 struct wlan_802_11_security secinfo; 197 struct lbs_802_11_security secinfo;
198 198
199 /** WPA Information Elements*/ 199 /** WPA Information Elements*/
200 u8 wpa_ie[MAX_WPA_IE_LEN]; 200 u8 wpa_ie[MAX_WPA_IE_LEN];
@@ -205,7 +205,7 @@ struct assoc_request {
205}; 205};
206 206
207/** Wlan adapter data structure*/ 207/** Wlan adapter data structure*/
208struct _wlan_adapter { 208struct _lbs_adapter {
209 /** STATUS variables */ 209 /** STATUS variables */
210 u8 fwreleasenumber[4]; 210 u8 fwreleasenumber[4];
211 u32 fwcapinfo; 211 u32 fwcapinfo;
@@ -213,7 +213,7 @@ struct _wlan_adapter {
213 213
214 struct mutex lock; 214 struct mutex lock;
215 215
216 u8 tmptxbuf[WLAN_UPLD_SIZE]; 216 u8 tmptxbuf[LBS_UPLD_SIZE];
217 /* protected by hard_start_xmit serialization */ 217 /* protected by hard_start_xmit serialization */
218 218
219 /** command-related variables */ 219 /** command-related variables */
@@ -302,13 +302,13 @@ struct _wlan_adapter {
302 u32 psstate; 302 u32 psstate;
303 u8 needtowakeup; 303 u8 needtowakeup;
304 304
305 struct PS_CMD_ConfirmSleep libertas_ps_confirm_sleep; 305 struct PS_CMD_ConfirmSleep lbs_ps_confirm_sleep;
306 306
307 struct assoc_request * pending_assoc_req; 307 struct assoc_request * pending_assoc_req;
308 struct assoc_request * in_progress_assoc_req; 308 struct assoc_request * in_progress_assoc_req;
309 309
310 /** Encryption parameter */ 310 /** Encryption parameter */
311 struct wlan_802_11_security secinfo; 311 struct lbs_802_11_security secinfo;
312 312
313 /** WEP keys */ 313 /** WEP keys */
314 struct enc_key wep_keys[4]; 314 struct enc_key wep_keys[4];
@@ -350,7 +350,7 @@ struct _wlan_adapter {
350 struct region_channel universal_channel[MAX_REGION_CHANNEL_NUM]; 350 struct region_channel universal_channel[MAX_REGION_CHANNEL_NUM];
351 351
352 /** 11D and Domain Regulatory Data */ 352 /** 11D and Domain Regulatory Data */
353 struct wlan_802_11d_domain_reg domainreg; 353 struct lbs_802_11d_domain_reg domainreg;
354 struct parsed_region_chan_11d parsed_region_chan; 354 struct parsed_region_chan_11d parsed_region_chan;
355 355
356 /** FSM variable for 11d support */ 356 /** FSM variable for 11d support */
@@ -358,7 +358,7 @@ struct _wlan_adapter {
358 358
359 /** MISCELLANEOUS */ 359 /** MISCELLANEOUS */
360 u8 *prdeeprom; 360 u8 *prdeeprom;
361 struct wlan_offset_value offsetvalue; 361 struct lbs_offset_value offsetvalue;
362 362
363 struct cmd_ds_802_11_get_log logmsg; 363 struct cmd_ds_802_11_get_log logmsg;
364 364
@@ -368,4 +368,4 @@ struct _wlan_adapter {
368 u8 last_scanned_channel; 368 u8 last_scanned_channel;
369}; 369};
370 370
371#endif /* _WLAN_DEV_H_ */ 371#endif
diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c
index 3dae15211b6a..8121399f4b90 100644
--- a/drivers/net/wireless/libertas/ethtool.c
+++ b/drivers/net/wireless/libertas/ethtool.c
@@ -19,35 +19,35 @@ static const char * mesh_stat_strings[]= {
19 "tx_failed_cnt" 19 "tx_failed_cnt"
20}; 20};
21 21
22static void libertas_ethtool_get_drvinfo(struct net_device *dev, 22static void lbs_ethtool_get_drvinfo(struct net_device *dev,
23 struct ethtool_drvinfo *info) 23 struct ethtool_drvinfo *info)
24{ 24{
25 wlan_private *priv = (wlan_private *) dev->priv; 25 lbs_private *priv = (lbs_private *) dev->priv;
26 char fwver[32]; 26 char fwver[32];
27 27
28 libertas_get_fwversion(priv->adapter, fwver, sizeof(fwver) - 1); 28 lbs_get_fwversion(priv->adapter, fwver, sizeof(fwver) - 1);
29 29
30 strcpy(info->driver, "libertas"); 30 strcpy(info->driver, "libertas");
31 strcpy(info->version, libertas_driver_version); 31 strcpy(info->version, lbs_driver_version);
32 strcpy(info->fw_version, fwver); 32 strcpy(info->fw_version, fwver);
33} 33}
34 34
35/* All 8388 parts have 16KiB EEPROM size at the time of writing. 35/* All 8388 parts have 16KiB EEPROM size at the time of writing.
36 * In case that changes this needs fixing. 36 * In case that changes this needs fixing.
37 */ 37 */
38#define LIBERTAS_EEPROM_LEN 16384 38#define LBS_EEPROM_LEN 16384
39 39
40static int libertas_ethtool_get_eeprom_len(struct net_device *dev) 40static int lbs_ethtool_get_eeprom_len(struct net_device *dev)
41{ 41{
42 return LIBERTAS_EEPROM_LEN; 42 return LBS_EEPROM_LEN;
43} 43}
44 44
45static int libertas_ethtool_get_eeprom(struct net_device *dev, 45static int lbs_ethtool_get_eeprom(struct net_device *dev,
46 struct ethtool_eeprom *eeprom, u8 * bytes) 46 struct ethtool_eeprom *eeprom, u8 * bytes)
47{ 47{
48 wlan_private *priv = (wlan_private *) dev->priv; 48 lbs_private *priv = (lbs_private *) dev->priv;
49 wlan_adapter *adapter = priv->adapter; 49 lbs_adapter *adapter = priv->adapter;
50 struct wlan_ioctl_regrdwr regctrl; 50 struct lbs_ioctl_regrdwr regctrl;
51 char *ptr; 51 char *ptr;
52 int ret; 52 int ret;
53 53
@@ -55,7 +55,7 @@ static int libertas_ethtool_get_eeprom(struct net_device *dev,
55 regctrl.offset = eeprom->offset; 55 regctrl.offset = eeprom->offset;
56 regctrl.NOB = eeprom->len; 56 regctrl.NOB = eeprom->len;
57 57
58 if (eeprom->offset + eeprom->len > LIBERTAS_EEPROM_LEN) 58 if (eeprom->offset + eeprom->len > LBS_EEPROM_LEN)
59 return -EINVAL; 59 return -EINVAL;
60 60
61// mutex_lock(&priv->mutex); 61// mutex_lock(&priv->mutex);
@@ -70,7 +70,7 @@ static int libertas_ethtool_get_eeprom(struct net_device *dev,
70 lbs_deb_ethtool("action:%d offset: %x NOB: %02x\n", 70 lbs_deb_ethtool("action:%d offset: %x NOB: %02x\n",
71 regctrl.action, regctrl.offset, regctrl.NOB); 71 regctrl.action, regctrl.offset, regctrl.NOB);
72 72
73 ret = libertas_prepare_and_send_command(priv, 73 ret = lbs_prepare_and_send_command(priv,
74 CMD_802_11_EEPROM_ACCESS, 74 CMD_802_11_EEPROM_ACCESS,
75 regctrl.action, 75 regctrl.action,
76 CMD_OPTION_WAITFORRSP, 0, 76 CMD_OPTION_WAITFORRSP, 0,
@@ -87,7 +87,7 @@ static int libertas_ethtool_get_eeprom(struct net_device *dev,
87 ptr = (char *)adapter->prdeeprom; 87 ptr = (char *)adapter->prdeeprom;
88 88
89 /* skip the command header, but include the "value" u32 variable */ 89 /* skip the command header, but include the "value" u32 variable */
90 ptr = ptr + sizeof(struct wlan_ioctl_regrdwr) - 4; 90 ptr = ptr + sizeof(struct lbs_ioctl_regrdwr) - 4;
91 91
92 /* 92 /*
93 * Return the result back to the user 93 * Return the result back to the user
@@ -105,17 +105,17 @@ done:
105 return ret; 105 return ret;
106} 106}
107 107
108static void libertas_ethtool_get_stats(struct net_device * dev, 108static void lbs_ethtool_get_stats(struct net_device * dev,
109 struct ethtool_stats * stats, u64 * data) 109 struct ethtool_stats * stats, u64 * data)
110{ 110{
111 wlan_private *priv = dev->priv; 111 lbs_private *priv = dev->priv;
112 struct cmd_ds_mesh_access mesh_access; 112 struct cmd_ds_mesh_access mesh_access;
113 int ret; 113 int ret;
114 114
115 lbs_deb_enter(LBS_DEB_ETHTOOL); 115 lbs_deb_enter(LBS_DEB_ETHTOOL);
116 116
117 /* Get Mesh Statistics */ 117 /* Get Mesh Statistics */
118 ret = libertas_prepare_and_send_command(priv, 118 ret = lbs_prepare_and_send_command(priv,
119 CMD_MESH_ACCESS, CMD_ACT_MESH_GET_STATS, 119 CMD_MESH_ACCESS, CMD_ACT_MESH_GET_STATS,
120 CMD_OPTION_WAITFORRSP, 0, &mesh_access); 120 CMD_OPTION_WAITFORRSP, 0, &mesh_access);
121 121
@@ -143,7 +143,7 @@ static void libertas_ethtool_get_stats(struct net_device * dev,
143 lbs_deb_enter(LBS_DEB_ETHTOOL); 143 lbs_deb_enter(LBS_DEB_ETHTOOL);
144} 144}
145 145
146static int libertas_ethtool_get_sset_count(struct net_device * dev, int sset) 146static int lbs_ethtool_get_sset_count(struct net_device * dev, int sset)
147{ 147{
148 switch (sset) { 148 switch (sset) {
149 case ETH_SS_STATS: 149 case ETH_SS_STATS:
@@ -153,7 +153,7 @@ static int libertas_ethtool_get_sset_count(struct net_device * dev, int sset)
153 } 153 }
154} 154}
155 155
156static void libertas_ethtool_get_strings (struct net_device * dev, 156static void lbs_ethtool_get_strings(struct net_device *dev,
157 u32 stringset, 157 u32 stringset,
158 u8 * s) 158 u8 * s)
159{ 159{
@@ -173,12 +173,12 @@ static void libertas_ethtool_get_strings (struct net_device * dev,
173 lbs_deb_enter(LBS_DEB_ETHTOOL); 173 lbs_deb_enter(LBS_DEB_ETHTOOL);
174} 174}
175 175
176struct ethtool_ops libertas_ethtool_ops = { 176struct ethtool_ops lbs_ethtool_ops = {
177 .get_drvinfo = libertas_ethtool_get_drvinfo, 177 .get_drvinfo = lbs_ethtool_get_drvinfo,
178 .get_eeprom = libertas_ethtool_get_eeprom, 178 .get_eeprom = lbs_ethtool_get_eeprom,
179 .get_eeprom_len = libertas_ethtool_get_eeprom_len, 179 .get_eeprom_len = lbs_ethtool_get_eeprom_len,
180 .get_sset_count = libertas_ethtool_get_sset_count, 180 .get_sset_count = lbs_ethtool_get_sset_count,
181 .get_ethtool_stats = libertas_ethtool_get_stats, 181 .get_ethtool_stats = lbs_ethtool_get_stats,
182 .get_strings = libertas_ethtool_get_strings, 182 .get_strings = lbs_ethtool_get_strings,
183}; 183};
184 184
diff --git a/drivers/net/wireless/libertas/host.h b/drivers/net/wireless/libertas/host.h
index b37ddbca969f..3746f702d980 100644
--- a/drivers/net/wireless/libertas/host.h
+++ b/drivers/net/wireless/libertas/host.h
@@ -2,8 +2,8 @@
2 * This file contains definitions of WLAN commands. 2 * This file contains definitions of WLAN commands.
3 */ 3 */
4 4
5#ifndef _HOST_H_ 5#ifndef _LBS_HOST_H_
6#define _HOST_H_ 6#define _LBS_HOST_H_
7 7
8/** PUBLIC DEFINITIONS */ 8/** PUBLIC DEFINITIONS */
9#define DEFAULT_AD_HOC_CHANNEL 6 9#define DEFAULT_AD_HOC_CHANNEL 6
@@ -287,4 +287,4 @@ enum cmd_mesh_access_opts {
287#define MACREG_INT_CODE_SNR_HIGH 0x0000001d 287#define MACREG_INT_CODE_SNR_HIGH 0x0000001d
288#define MACREG_INT_CODE_MESH_AUTO_STARTED 0x00000023 288#define MACREG_INT_CODE_MESH_AUTO_STARTED 0x00000023
289 289
290#endif /* _HOST_H_ */ 290#endif
diff --git a/drivers/net/wireless/libertas/hostcmd.h b/drivers/net/wireless/libertas/hostcmd.h
index e1045dc02cce..6477ce0839d7 100644
--- a/drivers/net/wireless/libertas/hostcmd.h
+++ b/drivers/net/wireless/libertas/hostcmd.h
@@ -2,8 +2,8 @@
2 * This file contains the function prototypes, data structure 2 * This file contains the function prototypes, data structure
3 * and defines for all the host/station commands 3 * and defines for all the host/station commands
4 */ 4 */
5#ifndef __HOSTCMD__H 5#ifndef _LBS_HOSTCMD_H
6#define __HOSTCMD__H 6#define _LBS_HOSTCMD_H
7 7
8#include <linux/wireless.h> 8#include <linux/wireless.h>
9#include "11d.h" 9#include "11d.h"
@@ -86,13 +86,13 @@ struct cmd_ctrl_node {
86/* Generic structure to hold all key types. */ 86/* Generic structure to hold all key types. */
87struct enc_key { 87struct enc_key {
88 u16 len; 88 u16 len;
89 u16 flags; /* KEY_INFO_* from wlan_defs.h */ 89 u16 flags; /* KEY_INFO_* from defs.h */
90 u16 type; /* KEY_TYPE_* from wlan_defs.h */ 90 u16 type; /* KEY_TYPE_* from defs.h */
91 u8 key[32]; 91 u8 key[32];
92}; 92};
93 93
94/* wlan_offset_value */ 94/* lbs_offset_value */
95struct wlan_offset_value { 95struct lbs_offset_value {
96 u32 offset; 96 u32 offset;
97 u32 value; 97 u32 value;
98}; 98};
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index d383c0f9fe3e..b0b95cf2e7c9 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -57,7 +57,7 @@ MODULE_LICENSE("GPL");
57 57
58struct if_cs_card { 58struct if_cs_card {
59 struct pcmcia_device *p_dev; 59 struct pcmcia_device *p_dev;
60 wlan_private *priv; 60 lbs_private *priv;
61 void __iomem *iobase; 61 void __iomem *iobase;
62}; 62};
63 63
@@ -263,7 +263,7 @@ static irqreturn_t if_cs_interrupt(int irq, void *data)
263 if (!card->priv->adapter->cur_cmd) 263 if (!card->priv->adapter->cur_cmd)
264 wake_up_interruptible(&card->priv->waitq); 264 wake_up_interruptible(&card->priv->waitq);
265 265
266 if (card->priv->adapter->connect_status == LIBERTAS_CONNECTED) 266 if (card->priv->adapter->connect_status == LBS_CONNECTED)
267 netif_wake_queue(card->priv->dev); 267 netif_wake_queue(card->priv->dev);
268 } 268 }
269 269
@@ -271,7 +271,7 @@ static irqreturn_t if_cs_interrupt(int irq, void *data)
271 if_cs_write16(card, IF_CS_C_INT_CAUSE, int_cause & IF_CS_C_IC_MASK); 271 if_cs_write16(card, IF_CS_C_INT_CAUSE, int_cause & IF_CS_C_IC_MASK);
272 } 272 }
273 273
274 libertas_interrupt(card->priv->dev); 274 lbs_interrupt(card->priv->dev);
275 275
276 return IRQ_HANDLED; 276 return IRQ_HANDLED;
277} 277}
@@ -286,7 +286,7 @@ static irqreturn_t if_cs_interrupt(int irq, void *data)
286/* 286/*
287 * Called from if_cs_host_to_card to send a command to the hardware 287 * Called from if_cs_host_to_card to send a command to the hardware
288 */ 288 */
289static int if_cs_send_cmd(wlan_private *priv, u8 *buf, u16 nb) 289static int if_cs_send_cmd(lbs_private *priv, u8 *buf, u16 nb)
290{ 290{
291 struct if_cs_card *card = (struct if_cs_card *)priv->card; 291 struct if_cs_card *card = (struct if_cs_card *)priv->card;
292 int ret = -1; 292 int ret = -1;
@@ -331,7 +331,7 @@ done:
331/* 331/*
332 * Called from if_cs_host_to_card to send a data to the hardware 332 * Called from if_cs_host_to_card to send a data to the hardware
333 */ 333 */
334static void if_cs_send_data(wlan_private *priv, u8 *buf, u16 nb) 334static void if_cs_send_data(lbs_private *priv, u8 *buf, u16 nb)
335{ 335{
336 struct if_cs_card *card = (struct if_cs_card *)priv->card; 336 struct if_cs_card *card = (struct if_cs_card *)priv->card;
337 337
@@ -354,7 +354,7 @@ static void if_cs_send_data(wlan_private *priv, u8 *buf, u16 nb)
354/* 354/*
355 * Get the command result out of the card. 355 * Get the command result out of the card.
356 */ 356 */
357static int if_cs_receive_cmdres(wlan_private *priv, u8* data, u32 *len) 357static int if_cs_receive_cmdres(lbs_private *priv, u8 *data, u32 *len)
358{ 358{
359 int ret = -1; 359 int ret = -1;
360 u16 val; 360 u16 val;
@@ -386,7 +386,7 @@ out:
386} 386}
387 387
388 388
389static struct sk_buff *if_cs_receive_data(wlan_private *priv) 389static struct sk_buff *if_cs_receive_data(lbs_private *priv)
390{ 390{
391 struct sk_buff *skb = NULL; 391 struct sk_buff *skb = NULL;
392 u16 len; 392 u16 len;
@@ -616,7 +616,7 @@ done:
616/********************************************************************/ 616/********************************************************************/
617 617
618/* Send commands or data packets to the card */ 618/* Send commands or data packets to the card */
619static int if_cs_host_to_card(wlan_private *priv, u8 type, u8 *buf, u16 nb) 619static int if_cs_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb)
620{ 620{
621 int ret = -1; 621 int ret = -1;
622 622
@@ -641,10 +641,10 @@ static int if_cs_host_to_card(wlan_private *priv, u8 type, u8 *buf, u16 nb)
641} 641}
642 642
643 643
644static int if_cs_get_int_status(wlan_private *priv, u8 *ireg) 644static int if_cs_get_int_status(lbs_private *priv, u8 *ireg)
645{ 645{
646 struct if_cs_card *card = (struct if_cs_card *)priv->card; 646 struct if_cs_card *card = (struct if_cs_card *)priv->card;
647 //wlan_adapter *adapter = priv->adapter; 647 /* lbs_adapter *adapter = priv->adapter; */
648 int ret = 0; 648 int ret = 0;
649 u16 int_cause; 649 u16 int_cause;
650 u8 *cmdbuf; 650 u8 *cmdbuf;
@@ -668,7 +668,7 @@ sbi_get_int_status_exit:
668 /* is there a data packet for us? */ 668 /* is there a data packet for us? */
669 if (*ireg & IF_CS_C_S_RX_UPLD_RDY) { 669 if (*ireg & IF_CS_C_S_RX_UPLD_RDY) {
670 struct sk_buff *skb = if_cs_receive_data(priv); 670 struct sk_buff *skb = if_cs_receive_data(priv);
671 libertas_process_rxed_packet(priv, skb); 671 lbs_process_rxed_packet(priv, skb);
672 *ireg &= ~IF_CS_C_S_RX_UPLD_RDY; 672 *ireg &= ~IF_CS_C_S_RX_UPLD_RDY;
673 } 673 }
674 674
@@ -698,7 +698,7 @@ out:
698} 698}
699 699
700 700
701static int if_cs_read_event_cause(wlan_private *priv) 701static int if_cs_read_event_cause(lbs_private *priv)
702{ 702{
703 lbs_deb_enter(LBS_DEB_CS); 703 lbs_deb_enter(LBS_DEB_CS);
704 704
@@ -746,7 +746,7 @@ static void if_cs_release(struct pcmcia_device *p_dev)
746static int if_cs_probe(struct pcmcia_device *p_dev) 746static int if_cs_probe(struct pcmcia_device *p_dev)
747{ 747{
748 int ret = -ENOMEM; 748 int ret = -ENOMEM;
749 wlan_private *priv; 749 lbs_private *priv;
750 struct if_cs_card *card; 750 struct if_cs_card *card;
751 /* CIS parsing */ 751 /* CIS parsing */
752 tuple_t tuple; 752 tuple_t tuple;
@@ -856,7 +856,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
856 goto out2; 856 goto out2;
857 857
858 /* Make this card known to the libertas driver */ 858 /* Make this card known to the libertas driver */
859 priv = libertas_add_card(card, &p_dev->dev); 859 priv = lbs_add_card(card, &p_dev->dev);
860 if (!priv) { 860 if (!priv) {
861 ret = -ENOMEM; 861 ret = -ENOMEM;
862 goto out2; 862 goto out2;
@@ -885,7 +885,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
885 if_cs_enable_ints(card); 885 if_cs_enable_ints(card);
886 886
887 /* And finally bring the card up */ 887 /* And finally bring the card up */
888 if (libertas_start_card(priv) != 0) { 888 if (lbs_start_card(priv) != 0) {
889 lbs_pr_err("could not activate card\n"); 889 lbs_pr_err("could not activate card\n");
890 goto out3; 890 goto out3;
891 } 891 }
@@ -894,7 +894,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
894 goto out; 894 goto out;
895 895
896out3: 896out3:
897 libertas_remove_card(priv); 897 lbs_remove_card(priv);
898out2: 898out2:
899 ioport_unmap(card->iobase); 899 ioport_unmap(card->iobase);
900out1: 900out1:
@@ -917,8 +917,8 @@ static void if_cs_detach(struct pcmcia_device *p_dev)
917 917
918 lbs_deb_enter(LBS_DEB_CS); 918 lbs_deb_enter(LBS_DEB_CS);
919 919
920 libertas_stop_card(card->priv); 920 lbs_stop_card(card->priv);
921 libertas_remove_card(card->priv); 921 lbs_remove_card(card->priv);
922 if_cs_disable_ints(card); 922 if_cs_disable_ints(card);
923 if_cs_release(p_dev); 923 if_cs_release(p_dev);
924 kfree(card); 924 kfree(card);
@@ -939,7 +939,7 @@ static struct pcmcia_device_id if_cs_ids[] = {
939MODULE_DEVICE_TABLE(pcmcia, if_cs_ids); 939MODULE_DEVICE_TABLE(pcmcia, if_cs_ids);
940 940
941 941
942static struct pcmcia_driver libertas_driver = { 942static struct pcmcia_driver lbs_driver = {
943 .owner = THIS_MODULE, 943 .owner = THIS_MODULE,
944 .drv = { 944 .drv = {
945 .name = DRV_NAME, 945 .name = DRV_NAME,
@@ -955,7 +955,7 @@ static int __init if_cs_init(void)
955 int ret; 955 int ret;
956 956
957 lbs_deb_enter(LBS_DEB_CS); 957 lbs_deb_enter(LBS_DEB_CS);
958 ret = pcmcia_register_driver(&libertas_driver); 958 ret = pcmcia_register_driver(&lbs_driver);
959 lbs_deb_leave(LBS_DEB_CS); 959 lbs_deb_leave(LBS_DEB_CS);
960 return ret; 960 return ret;
961} 961}
@@ -964,7 +964,7 @@ static int __init if_cs_init(void)
964static void __exit if_cs_exit(void) 964static void __exit if_cs_exit(void)
965{ 965{
966 lbs_deb_enter(LBS_DEB_CS); 966 lbs_deb_enter(LBS_DEB_CS);
967 pcmcia_unregister_driver(&libertas_driver); 967 pcmcia_unregister_driver(&lbs_driver);
968 lbs_deb_leave(LBS_DEB_CS); 968 lbs_deb_leave(LBS_DEB_CS);
969} 969}
970 970
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index 4f1efb108c28..0c762eea7a34 100644
--- a/drivers/net/wireless/libertas/if_sdio.c
+++ b/drivers/net/wireless/libertas/if_sdio.c
@@ -40,11 +40,11 @@
40#include "dev.h" 40#include "dev.h"
41#include "if_sdio.h" 41#include "if_sdio.h"
42 42
43static char *libertas_helper_name = NULL; 43static char *lbs_helper_name = NULL;
44module_param_named(helper_name, libertas_helper_name, charp, 0644); 44module_param_named(helper_name, lbs_helper_name, charp, 0644);
45 45
46static char *libertas_fw_name = NULL; 46static char *lbs_fw_name = NULL;
47module_param_named(fw_name, libertas_fw_name, charp, 0644); 47module_param_named(fw_name, lbs_fw_name, charp, 0644);
48 48
49static const struct sdio_device_id if_sdio_ids[] = { 49static const struct sdio_device_id if_sdio_ids[] = {
50 { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_LIBERTAS) }, 50 { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_LIBERTAS) },
@@ -82,7 +82,7 @@ struct if_sdio_packet {
82 82
83struct if_sdio_card { 83struct if_sdio_card {
84 struct sdio_func *func; 84 struct sdio_func *func;
85 wlan_private *priv; 85 lbs_private *priv;
86 86
87 int model; 87 int model;
88 unsigned long ioport; 88 unsigned long ioport;
@@ -154,7 +154,7 @@ static int if_sdio_handle_cmd(struct if_sdio_card *card,
154 154
155 card->int_cause |= MRVDRV_CMD_UPLD_RDY; 155 card->int_cause |= MRVDRV_CMD_UPLD_RDY;
156 156
157 libertas_interrupt(card->priv->dev); 157 lbs_interrupt(card->priv->dev);
158 158
159 ret = 0; 159 ret = 0;
160 160
@@ -194,7 +194,7 @@ static int if_sdio_handle_data(struct if_sdio_card *card,
194 194
195 memcpy(data, buffer, size); 195 memcpy(data, buffer, size);
196 196
197 libertas_process_rxed_packet(card->priv, skb); 197 lbs_process_rxed_packet(card->priv, skb);
198 198
199 ret = 0; 199 ret = 0;
200 200
@@ -236,7 +236,7 @@ static int if_sdio_handle_event(struct if_sdio_card *card,
236 card->event = event; 236 card->event = event;
237 card->int_cause |= MRVDRV_CARDEVENT; 237 card->int_cause |= MRVDRV_CARDEVENT;
238 238
239 libertas_interrupt(card->priv->dev); 239 lbs_interrupt(card->priv->dev);
240 240
241 spin_unlock_irqrestore(&card->priv->adapter->driver_lock, flags); 241 spin_unlock_irqrestore(&card->priv->adapter->driver_lock, flags);
242 242
@@ -694,7 +694,7 @@ out:
694/* Libertas callbacks */ 694/* Libertas callbacks */
695/*******************************************************************/ 695/*******************************************************************/
696 696
697static int if_sdio_host_to_card(wlan_private *priv, u8 type, u8 *buf, u16 nb) 697static int if_sdio_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb)
698{ 698{
699 int ret; 699 int ret;
700 struct if_sdio_card *card; 700 struct if_sdio_card *card;
@@ -775,7 +775,7 @@ out:
775 return ret; 775 return ret;
776} 776}
777 777
778static int if_sdio_get_int_status(wlan_private *priv, u8 *ireg) 778static int if_sdio_get_int_status(lbs_private *priv, u8 *ireg)
779{ 779{
780 struct if_sdio_card *card; 780 struct if_sdio_card *card;
781 781
@@ -791,7 +791,7 @@ static int if_sdio_get_int_status(wlan_private *priv, u8 *ireg)
791 return 0; 791 return 0;
792} 792}
793 793
794static int if_sdio_read_event_cause(wlan_private *priv) 794static int if_sdio_read_event_cause(lbs_private *priv)
795{ 795{
796 struct if_sdio_card *card; 796 struct if_sdio_card *card;
797 797
@@ -836,7 +836,7 @@ static void if_sdio_interrupt(struct sdio_func *func)
836 */ 836 */
837 if (cause & IF_SDIO_H_INT_DNLD) { 837 if (cause & IF_SDIO_H_INT_DNLD) {
838 if ((card->priv->dnld_sent == DNLD_DATA_SENT) && 838 if ((card->priv->dnld_sent == DNLD_DATA_SENT) &&
839 (card->priv->adapter->connect_status == LIBERTAS_CONNECTED)) 839 (card->priv->adapter->connect_status == LBS_CONNECTED))
840 netif_wake_queue(card->priv->dev); 840 netif_wake_queue(card->priv->dev);
841 card->priv->dnld_sent = DNLD_RES_RECEIVED; 841 card->priv->dnld_sent = DNLD_RES_RECEIVED;
842 } 842 }
@@ -857,7 +857,7 @@ static int if_sdio_probe(struct sdio_func *func,
857 const struct sdio_device_id *id) 857 const struct sdio_device_id *id)
858{ 858{
859 struct if_sdio_card *card; 859 struct if_sdio_card *card;
860 wlan_private *priv; 860 lbs_private *priv;
861 int ret, i; 861 int ret, i;
862 unsigned int model; 862 unsigned int model;
863 struct if_sdio_packet *packet; 863 struct if_sdio_packet *packet;
@@ -905,15 +905,15 @@ static int if_sdio_probe(struct sdio_func *func,
905 card->helper = if_sdio_models[i].helper; 905 card->helper = if_sdio_models[i].helper;
906 card->firmware = if_sdio_models[i].firmware; 906 card->firmware = if_sdio_models[i].firmware;
907 907
908 if (libertas_helper_name) { 908 if (lbs_helper_name) {
909 lbs_deb_sdio("overriding helper firmware: %s\n", 909 lbs_deb_sdio("overriding helper firmware: %s\n",
910 libertas_helper_name); 910 lbs_helper_name);
911 card->helper = libertas_helper_name; 911 card->helper = lbs_helper_name;
912 } 912 }
913 913
914 if (libertas_fw_name) { 914 if (lbs_fw_name) {
915 lbs_deb_sdio("overriding firmware: %s\n", libertas_fw_name); 915 lbs_deb_sdio("overriding firmware: %s\n", lbs_fw_name);
916 card->firmware = libertas_fw_name; 916 card->firmware = lbs_fw_name;
917 } 917 }
918 918
919 sdio_claim_host(func); 919 sdio_claim_host(func);
@@ -951,7 +951,7 @@ static int if_sdio_probe(struct sdio_func *func,
951 if (ret) 951 if (ret)
952 goto reclaim; 952 goto reclaim;
953 953
954 priv = libertas_add_card(card, &func->dev); 954 priv = lbs_add_card(card, &func->dev);
955 if (!priv) { 955 if (!priv) {
956 ret = -ENOMEM; 956 ret = -ENOMEM;
957 goto reclaim; 957 goto reclaim;
@@ -975,7 +975,7 @@ static int if_sdio_probe(struct sdio_func *func,
975 if (ret) 975 if (ret)
976 goto reclaim; 976 goto reclaim;
977 977
978 ret = libertas_start_card(priv); 978 ret = lbs_start_card(priv);
979 if (ret) 979 if (ret)
980 goto err_activate_card; 980 goto err_activate_card;
981 981
@@ -1020,8 +1020,8 @@ static void if_sdio_remove(struct sdio_func *func)
1020 card->priv->adapter->surpriseremoved = 1; 1020 card->priv->adapter->surpriseremoved = 1;
1021 1021
1022 lbs_deb_sdio("call remove card\n"); 1022 lbs_deb_sdio("call remove card\n");
1023 libertas_stop_card(card->priv); 1023 lbs_stop_card(card->priv);
1024 libertas_remove_card(card->priv); 1024 lbs_remove_card(card->priv);
1025 1025
1026 flush_scheduled_work(); 1026 flush_scheduled_work();
1027 1027
diff --git a/drivers/net/wireless/libertas/if_sdio.h b/drivers/net/wireless/libertas/if_sdio.h
index dfcaea7b168f..533bdfbf5d2a 100644
--- a/drivers/net/wireless/libertas/if_sdio.h
+++ b/drivers/net/wireless/libertas/if_sdio.h
@@ -9,8 +9,8 @@
9 * your option) any later version. 9 * your option) any later version.
10 */ 10 */
11 11
12#ifndef LIBERTAS_IF_SDIO_H 12#ifndef _LBS_IF_SDIO_H
13#define LIBERTAS_IF_SDIO_H 13#define _LBS_IF_SDIO_H
14 14
15#define IF_SDIO_IOPORT 0x00 15#define IF_SDIO_IOPORT 0x00
16 16
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index cb59f46ed126..797d3fbf7154 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -21,8 +21,8 @@
21static const char usbdriver_name[] = "usb8xxx"; 21static const char usbdriver_name[] = "usb8xxx";
22static u8 *default_fw_name = "usb8388.bin"; 22static u8 *default_fw_name = "usb8388.bin";
23 23
24static char *libertas_fw_name = NULL; 24static char *lbs_fw_name;
25module_param_named(fw_name, libertas_fw_name, charp, 0644); 25module_param_named(fw_name, lbs_fw_name, charp, 0644);
26 26
27/* 27/*
28 * We need to send a RESET command to all USB devices before 28 * We need to send a RESET command to all USB devices before
@@ -45,9 +45,9 @@ MODULE_DEVICE_TABLE(usb, if_usb_table);
45static void if_usb_receive(struct urb *urb); 45static void if_usb_receive(struct urb *urb);
46static void if_usb_receive_fwload(struct urb *urb); 46static void if_usb_receive_fwload(struct urb *urb);
47static int if_usb_prog_firmware(struct usb_card_rec *cardp); 47static int if_usb_prog_firmware(struct usb_card_rec *cardp);
48static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 nb); 48static int if_usb_host_to_card(lbs_private *priv, u8 type, u8 *payload, u16 nb);
49static int if_usb_get_int_status(wlan_private * priv, u8 *); 49static int if_usb_get_int_status(lbs_private *priv, u8 *);
50static int if_usb_read_event_cause(wlan_private *); 50static int if_usb_read_event_cause(lbs_private *);
51static int usb_tx_block(struct usb_card_rec *cardp, u8 *payload, u16 nb); 51static int usb_tx_block(struct usb_card_rec *cardp, u8 *payload, u16 nb);
52static void if_usb_free(struct usb_card_rec *cardp); 52static void if_usb_free(struct usb_card_rec *cardp);
53static int if_usb_submit_rx_urb(struct usb_card_rec *cardp); 53static int if_usb_submit_rx_urb(struct usb_card_rec *cardp);
@@ -65,7 +65,7 @@ static void if_usb_write_bulk_callback(struct urb *urb)
65 /* handle the transmission complete validations */ 65 /* handle the transmission complete validations */
66 66
67 if (urb->status == 0) { 67 if (urb->status == 0) {
68 wlan_private *priv = cardp->priv; 68 lbs_private *priv = cardp->priv;
69 69
70 /* 70 /*
71 lbs_deb_usbd(&urb->dev->dev, "URB status is successfull\n"); 71 lbs_deb_usbd(&urb->dev->dev, "URB status is successfull\n");
@@ -77,7 +77,7 @@ static void if_usb_write_bulk_callback(struct urb *urb)
77 * valid at firmware load time. 77 * valid at firmware load time.
78 */ 78 */
79 if (priv) { 79 if (priv) {
80 wlan_adapter *adapter = priv->adapter; 80 lbs_adapter *adapter = priv->adapter;
81 struct net_device *dev = priv->dev; 81 struct net_device *dev = priv->dev;
82 82
83 priv->dnld_sent = DNLD_RES_RECEIVED; 83 priv->dnld_sent = DNLD_RES_RECEIVED;
@@ -86,7 +86,7 @@ static void if_usb_write_bulk_callback(struct urb *urb)
86 if (!adapter->cur_cmd) 86 if (!adapter->cur_cmd)
87 wake_up_interruptible(&priv->waitq); 87 wake_up_interruptible(&priv->waitq);
88 88
89 if ((adapter->connect_status == LIBERTAS_CONNECTED)) { 89 if ((adapter->connect_status == LBS_CONNECTED)) {
90 netif_wake_queue(dev); 90 netif_wake_queue(dev);
91 netif_wake_queue(priv->mesh_dev); 91 netif_wake_queue(priv->mesh_dev);
92 } 92 }
@@ -136,7 +136,7 @@ static int if_usb_probe(struct usb_interface *intf,
136 struct usb_device *udev; 136 struct usb_device *udev;
137 struct usb_host_interface *iface_desc; 137 struct usb_host_interface *iface_desc;
138 struct usb_endpoint_descriptor *endpoint; 138 struct usb_endpoint_descriptor *endpoint;
139 wlan_private *priv; 139 lbs_private *priv;
140 struct usb_card_rec *cardp; 140 struct usb_card_rec *cardp;
141 int i; 141 int i;
142 142
@@ -222,12 +222,12 @@ static int if_usb_probe(struct usb_interface *intf,
222 goto err_prog_firmware; 222 goto err_prog_firmware;
223 } 223 }
224 224
225 if (!(priv = libertas_add_card(cardp, &udev->dev))) 225 if (!(priv = lbs_add_card(cardp, &udev->dev)))
226 goto err_prog_firmware; 226 goto err_prog_firmware;
227 227
228 cardp->priv = priv; 228 cardp->priv = priv;
229 229
230 if (libertas_add_mesh(priv, &udev->dev)) 230 if (lbs_add_mesh(priv, &udev->dev))
231 goto err_add_mesh; 231 goto err_add_mesh;
232 232
233 cardp->eth_dev = priv->dev; 233 cardp->eth_dev = priv->dev;
@@ -242,7 +242,7 @@ static int if_usb_probe(struct usb_interface *intf,
242 msleep_interruptible(200); 242 msleep_interruptible(200);
243 priv->adapter->fw_ready = 1; 243 priv->adapter->fw_ready = 1;
244 244
245 if (libertas_start_card(priv)) 245 if (lbs_start_card(priv))
246 goto err_start_card; 246 goto err_start_card;
247 247
248 list_add_tail(&cardp->list, &usb_devices); 248 list_add_tail(&cardp->list, &usb_devices);
@@ -253,9 +253,9 @@ static int if_usb_probe(struct usb_interface *intf,
253 return 0; 253 return 0;
254 254
255err_start_card: 255err_start_card:
256 libertas_remove_mesh(priv); 256 lbs_remove_mesh(priv);
257err_add_mesh: 257err_add_mesh:
258 libertas_remove_card(priv); 258 lbs_remove_card(priv);
259err_prog_firmware: 259err_prog_firmware:
260 if_usb_reset_device(cardp); 260 if_usb_reset_device(cardp);
261dealloc: 261dealloc:
@@ -273,7 +273,7 @@ error:
273static void if_usb_disconnect(struct usb_interface *intf) 273static void if_usb_disconnect(struct usb_interface *intf)
274{ 274{
275 struct usb_card_rec *cardp = usb_get_intfdata(intf); 275 struct usb_card_rec *cardp = usb_get_intfdata(intf);
276 wlan_private *priv = (wlan_private *) cardp->priv; 276 lbs_private *priv = (lbs_private *) cardp->priv;
277 277
278 lbs_deb_enter(LBS_DEB_MAIN); 278 lbs_deb_enter(LBS_DEB_MAIN);
279 279
@@ -283,12 +283,12 @@ static void if_usb_disconnect(struct usb_interface *intf)
283 list_del(&cardp->list); 283 list_del(&cardp->list);
284 284
285 if (priv) { 285 if (priv) {
286 wlan_adapter *adapter = priv->adapter; 286 lbs_adapter *adapter = priv->adapter;
287 287
288 adapter->surpriseremoved = 1; 288 adapter->surpriseremoved = 1;
289 libertas_stop_card(priv); 289 lbs_stop_card(priv);
290 libertas_remove_mesh(priv); 290 lbs_remove_mesh(priv);
291 libertas_remove_card(priv); 291 lbs_remove_card(priv);
292 } 292 }
293 293
294 /* Unlink and free urb */ 294 /* Unlink and free urb */
@@ -302,7 +302,7 @@ static void if_usb_disconnect(struct usb_interface *intf)
302 302
303/** 303/**
304 * @brief This function download FW 304 * @brief This function download FW
305 * @param priv pointer to wlan_private 305 * @param priv pointer to lbs_private
306 * @return 0 306 * @return 0
307 */ 307 */
308static int if_prog_firmware(struct usb_card_rec *cardp) 308static int if_prog_firmware(struct usb_card_rec *cardp)
@@ -385,7 +385,7 @@ static int if_prog_firmware(struct usb_card_rec *cardp)
385static int if_usb_reset_device(struct usb_card_rec *cardp) 385static int if_usb_reset_device(struct usb_card_rec *cardp)
386{ 386{
387 int ret; 387 int ret;
388 wlan_private * priv = cardp->priv; 388 lbs_private * priv = cardp->priv;
389 389
390 lbs_deb_enter(LBS_DEB_USB); 390 lbs_deb_enter(LBS_DEB_USB);
391 391
@@ -395,7 +395,7 @@ static int if_usb_reset_device(struct usb_card_rec *cardp)
395 ret = usb_reset_device(cardp->udev); 395 ret = usb_reset_device(cardp->udev);
396 if (!ret && priv) { 396 if (!ret && priv) {
397 msleep(10); 397 msleep(10);
398 ret = libertas_reset_device(priv); 398 ret = lbs_reset_device(priv);
399 msleep(10); 399 msleep(10);
400 } 400 }
401 401
@@ -406,7 +406,7 @@ static int if_usb_reset_device(struct usb_card_rec *cardp)
406 406
407/** 407/**
408 * @brief This function transfer the data to the device. 408 * @brief This function transfer the data to the device.
409 * @param priv pointer to wlan_private 409 * @param priv pointer to lbs_private
410 * @param payload pointer to payload data 410 * @param payload pointer to payload data
411 * @param nb data length 411 * @param nb data length
412 * @return 0 or -1 412 * @return 0 or -1
@@ -583,7 +583,7 @@ exit:
583 583
584static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb, 584static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb,
585 struct usb_card_rec *cardp, 585 struct usb_card_rec *cardp,
586 wlan_private *priv) 586 lbs_private *priv)
587{ 587{
588 if (recvlength > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE + 588 if (recvlength > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE +
589 MESSAGE_HEADER_LEN || recvlength < MRVDRV_MIN_PKT_LEN) { 589 MESSAGE_HEADER_LEN || recvlength < MRVDRV_MIN_PKT_LEN) {
@@ -596,14 +596,14 @@ static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb,
596 skb_reserve(skb, IPFIELD_ALIGN_OFFSET); 596 skb_reserve(skb, IPFIELD_ALIGN_OFFSET);
597 skb_put(skb, recvlength); 597 skb_put(skb, recvlength);
598 skb_pull(skb, MESSAGE_HEADER_LEN); 598 skb_pull(skb, MESSAGE_HEADER_LEN);
599 libertas_process_rxed_packet(priv, skb); 599 lbs_process_rxed_packet(priv, skb);
600 priv->upld_len = (recvlength - MESSAGE_HEADER_LEN); 600 priv->upld_len = (recvlength - MESSAGE_HEADER_LEN);
601} 601}
602 602
603static inline void process_cmdrequest(int recvlength, u8 *recvbuff, 603static inline void process_cmdrequest(int recvlength, u8 *recvbuff,
604 struct sk_buff *skb, 604 struct sk_buff *skb,
605 struct usb_card_rec *cardp, 605 struct usb_card_rec *cardp,
606 wlan_private *priv) 606 lbs_private *priv)
607{ 607{
608 u8 *cmdbuf; 608 u8 *cmdbuf;
609 if (recvlength > MRVDRV_SIZE_OF_CMD_BUFFER) { 609 if (recvlength > MRVDRV_SIZE_OF_CMD_BUFFER) {
@@ -631,7 +631,7 @@ static inline void process_cmdrequest(int recvlength, u8 *recvbuff,
631 priv->upld_len); 631 priv->upld_len);
632 632
633 kfree_skb(skb); 633 kfree_skb(skb);
634 libertas_interrupt(priv->dev); 634 lbs_interrupt(priv->dev);
635 spin_unlock(&priv->adapter->driver_lock); 635 spin_unlock(&priv->adapter->driver_lock);
636 636
637 lbs_deb_usbd(&cardp->udev->dev, 637 lbs_deb_usbd(&cardp->udev->dev,
@@ -652,7 +652,7 @@ static void if_usb_receive(struct urb *urb)
652 struct read_cb_info *rinfo = (struct read_cb_info *)urb->context; 652 struct read_cb_info *rinfo = (struct read_cb_info *)urb->context;
653 struct sk_buff *skb = rinfo->skb; 653 struct sk_buff *skb = rinfo->skb;
654 struct usb_card_rec *cardp = (struct usb_card_rec *) rinfo->cardp; 654 struct usb_card_rec *cardp = (struct usb_card_rec *) rinfo->cardp;
655 wlan_private * priv = cardp->priv; 655 lbs_private * priv = cardp->priv;
656 656
657 int recvlength = urb->actual_length; 657 int recvlength = urb->actual_length;
658 u8 *recvbuff = NULL; 658 u8 *recvbuff = NULL;
@@ -695,14 +695,14 @@ static void if_usb_receive(struct urb *urb)
695 lbs_deb_usbd(&cardp->udev->dev,"**EVENT** 0x%X\n", 695 lbs_deb_usbd(&cardp->udev->dev,"**EVENT** 0x%X\n",
696 cardp->usb_event_cause); 696 cardp->usb_event_cause);
697 if (cardp->usb_event_cause & 0xffff0000) { 697 if (cardp->usb_event_cause & 0xffff0000) {
698 libertas_send_tx_feedback(priv); 698 lbs_send_tx_feedback(priv);
699 spin_unlock(&priv->adapter->driver_lock); 699 spin_unlock(&priv->adapter->driver_lock);
700 break; 700 break;
701 } 701 }
702 cardp->usb_event_cause <<= 3; 702 cardp->usb_event_cause <<= 3;
703 cardp->usb_int_cause |= MRVDRV_CARDEVENT; 703 cardp->usb_int_cause |= MRVDRV_CARDEVENT;
704 kfree_skb(skb); 704 kfree_skb(skb);
705 libertas_interrupt(priv->dev); 705 lbs_interrupt(priv->dev);
706 spin_unlock(&priv->adapter->driver_lock); 706 spin_unlock(&priv->adapter->driver_lock);
707 goto rx_exit; 707 goto rx_exit;
708 default: 708 default:
@@ -720,13 +720,13 @@ rx_exit:
720 720
721/** 721/**
722 * @brief This function downloads data to FW 722 * @brief This function downloads data to FW
723 * @param priv pointer to wlan_private structure 723 * @param priv pointer to lbs_private structure
724 * @param type type of data 724 * @param type type of data
725 * @param buf pointer to data buffer 725 * @param buf pointer to data buffer
726 * @param len number of bytes 726 * @param len number of bytes
727 * @return 0 or -1 727 * @return 0 or -1
728 */ 728 */
729static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 nb) 729static int if_usb_host_to_card(lbs_private *priv, u8 type, u8 *payload, u16 nb)
730{ 730{
731 struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card; 731 struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card;
732 732
@@ -753,7 +753,7 @@ static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 n
753} 753}
754 754
755/* called with adapter->driver_lock held */ 755/* called with adapter->driver_lock held */
756static int if_usb_get_int_status(wlan_private * priv, u8 * ireg) 756static int if_usb_get_int_status(lbs_private *priv, u8 *ireg)
757{ 757{
758 struct usb_card_rec *cardp = priv->card; 758 struct usb_card_rec *cardp = priv->card;
759 759
@@ -765,7 +765,7 @@ static int if_usb_get_int_status(wlan_private * priv, u8 * ireg)
765 return 0; 765 return 0;
766} 766}
767 767
768static int if_usb_read_event_cause(wlan_private * priv) 768static int if_usb_read_event_cause(lbs_private * priv)
769{ 769{
770 struct usb_card_rec *cardp = priv->card; 770 struct usb_card_rec *cardp = priv->card;
771 771
@@ -856,10 +856,10 @@ static int if_usb_prog_firmware(struct usb_card_rec *cardp)
856 856
857 lbs_deb_enter(LBS_DEB_USB); 857 lbs_deb_enter(LBS_DEB_USB);
858 858
859 if ((ret = request_firmware(&cardp->fw, libertas_fw_name, 859 if ((ret = request_firmware(&cardp->fw, lbs_fw_name,
860 &cardp->udev->dev)) < 0) { 860 &cardp->udev->dev)) < 0) {
861 lbs_pr_err("request_firmware() failed with %#x\n", ret); 861 lbs_pr_err("request_firmware() failed with %#x\n", ret);
862 lbs_pr_err("firmware %s not found\n", libertas_fw_name); 862 lbs_pr_err("firmware %s not found\n", lbs_fw_name);
863 goto done; 863 goto done;
864 } 864 }
865 865
@@ -940,7 +940,7 @@ done:
940static int if_usb_suspend(struct usb_interface *intf, pm_message_t message) 940static int if_usb_suspend(struct usb_interface *intf, pm_message_t message)
941{ 941{
942 struct usb_card_rec *cardp = usb_get_intfdata(intf); 942 struct usb_card_rec *cardp = usb_get_intfdata(intf);
943 wlan_private *priv = cardp->priv; 943 lbs_private *priv = cardp->priv;
944 944
945 lbs_deb_enter(LBS_DEB_USB); 945 lbs_deb_enter(LBS_DEB_USB);
946 946
@@ -954,7 +954,7 @@ static int if_usb_suspend(struct usb_interface *intf, pm_message_t message)
954 struct cmd_ds_mesh_access mesh_access; 954 struct cmd_ds_mesh_access mesh_access;
955 memset(&mesh_access, 0, sizeof(mesh_access)); 955 memset(&mesh_access, 0, sizeof(mesh_access));
956 mesh_access.data[0] = cpu_to_le32(1); 956 mesh_access.data[0] = cpu_to_le32(1);
957 libertas_prepare_and_send_command(priv, 957 lbs_prepare_and_send_command(priv,
958 CMD_MESH_ACCESS, 958 CMD_MESH_ACCESS,
959 CMD_ACT_MESH_SET_AUTOSTART_ENABLED, 959 CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
960 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); 960 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
@@ -976,7 +976,7 @@ static int if_usb_suspend(struct usb_interface *intf, pm_message_t message)
976static int if_usb_resume(struct usb_interface *intf) 976static int if_usb_resume(struct usb_interface *intf)
977{ 977{
978 struct usb_card_rec *cardp = usb_get_intfdata(intf); 978 struct usb_card_rec *cardp = usb_get_intfdata(intf);
979 wlan_private *priv = cardp->priv; 979 lbs_private *priv = cardp->priv;
980 980
981 lbs_deb_enter(LBS_DEB_USB); 981 lbs_deb_enter(LBS_DEB_USB);
982 982
@@ -994,7 +994,7 @@ static int if_usb_resume(struct usb_interface *intf)
994 struct cmd_ds_mesh_access mesh_access; 994 struct cmd_ds_mesh_access mesh_access;
995 memset(&mesh_access, 0, sizeof(mesh_access)); 995 memset(&mesh_access, 0, sizeof(mesh_access));
996 mesh_access.data[0] = cpu_to_le32(0); 996 mesh_access.data[0] = cpu_to_le32(0);
997 libertas_prepare_and_send_command(priv, 997 lbs_prepare_and_send_command(priv,
998 CMD_MESH_ACCESS, 998 CMD_MESH_ACCESS,
999 CMD_ACT_MESH_SET_AUTOSTART_ENABLED, 999 CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
1000 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); 1000 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
@@ -1027,8 +1027,8 @@ static int if_usb_init_module(void)
1027 1027
1028 lbs_deb_enter(LBS_DEB_MAIN); 1028 lbs_deb_enter(LBS_DEB_MAIN);
1029 1029
1030 if (libertas_fw_name == NULL) { 1030 if (lbs_fw_name == NULL) {
1031 libertas_fw_name = default_fw_name; 1031 lbs_fw_name = default_fw_name;
1032 } 1032 }
1033 1033
1034 ret = usb_register(&if_usb_driver); 1034 ret = usb_register(&if_usb_driver);
@@ -1044,7 +1044,7 @@ static void if_usb_exit_module(void)
1044 lbs_deb_enter(LBS_DEB_MAIN); 1044 lbs_deb_enter(LBS_DEB_MAIN);
1045 1045
1046 list_for_each_entry_safe(cardp, cardp_temp, &usb_devices, list) { 1046 list_for_each_entry_safe(cardp, cardp_temp, &usb_devices, list) {
1047 libertas_prepare_and_send_command(cardp->priv, CMD_802_11_RESET, 1047 lbs_prepare_and_send_command(cardp->priv, CMD_802_11_RESET,
1048 CMD_ACT_HALT, 0, 0, NULL); 1048 CMD_ACT_HALT, 0, 0, NULL);
1049 } 1049 }
1050 1050
diff --git a/drivers/net/wireless/libertas/if_usb.h b/drivers/net/wireless/libertas/if_usb.h
index e07a10ed28b5..9b4230864c43 100644
--- a/drivers/net/wireless/libertas/if_usb.h
+++ b/drivers/net/wireless/libertas/if_usb.h
@@ -1,5 +1,5 @@
1#ifndef _LIBERTAS_IF_USB_H 1#ifndef _LBS_IF_USB_H
2#define _LIBERTAS_IF_USB_H 2#define _LBS_IF_USB_H
3 3
4#include <linux/list.h> 4#include <linux/list.h>
5 5
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c
index dc24a05c9447..90c25f478123 100644
--- a/drivers/net/wireless/libertas/join.c
+++ b/drivers/net/wireless/libertas/join.c
@@ -30,16 +30,16 @@
30 * NOTE: Setting the MSB of the basic rates need to be taken 30 * NOTE: Setting the MSB of the basic rates need to be taken
31 * care, either before or after calling this function 31 * care, either before or after calling this function
32 * 32 *
33 * @param adapter A pointer to wlan_adapter structure 33 * @param adapter A pointer to lbs_adapter structure
34 * @param rate1 the buffer which keeps input and output 34 * @param rate1 the buffer which keeps input and output
35 * @param rate1_size the size of rate1 buffer; new size of buffer on return 35 * @param rate1_size the size of rate1 buffer; new size of buffer on return
36 * 36 *
37 * @return 0 or -1 37 * @return 0 or -1
38 */ 38 */
39static int get_common_rates(wlan_adapter * adapter, u8 * rates, u16 *rates_size) 39static int get_common_rates(lbs_adapter *adapter, u8 *rates, u16 *rates_size)
40{ 40{
41 u8 *card_rates = libertas_bg_rates; 41 u8 *card_rates = lbs_bg_rates;
42 size_t num_card_rates = sizeof(libertas_bg_rates); 42 size_t num_card_rates = sizeof(lbs_bg_rates);
43 int ret = 0, i, j; 43 int ret = 0, i, j;
44 u8 tmp[30]; 44 u8 tmp[30];
45 size_t tmp_size = 0; 45 size_t tmp_size = 0;
@@ -85,7 +85,7 @@ done:
85 * @param rates buffer of data rates 85 * @param rates buffer of data rates
86 * @param len size of buffer 86 * @param len size of buffer
87 */ 87 */
88static void libertas_set_basic_rate_flags(u8 * rates, size_t len) 88static void lbs_set_basic_rate_flags(u8 *rates, size_t len)
89{ 89{
90 int i; 90 int i;
91 91
@@ -104,7 +104,7 @@ static void libertas_set_basic_rate_flags(u8 * rates, size_t len)
104 * @param rates buffer of data rates 104 * @param rates buffer of data rates
105 * @param len size of buffer 105 * @param len size of buffer
106 */ 106 */
107void libertas_unset_basic_rate_flags(u8 * rates, size_t len) 107void lbs_unset_basic_rate_flags(u8 *rates, size_t len)
108{ 108{
109 int i; 109 int i;
110 110
@@ -116,19 +116,19 @@ void libertas_unset_basic_rate_flags(u8 * rates, size_t len)
116/** 116/**
117 * @brief Associate to a specific BSS discovered in a scan 117 * @brief Associate to a specific BSS discovered in a scan
118 * 118 *
119 * @param priv A pointer to wlan_private structure 119 * @param priv A pointer to lbs_private structure
120 * @param pbssdesc Pointer to the BSS descriptor to associate with. 120 * @param pbssdesc Pointer to the BSS descriptor to associate with.
121 * 121 *
122 * @return 0-success, otherwise fail 122 * @return 0-success, otherwise fail
123 */ 123 */
124int wlan_associate(wlan_private * priv, struct assoc_request * assoc_req) 124int lbs_associate(lbs_private *priv, struct assoc_request *assoc_req)
125{ 125{
126 wlan_adapter *adapter = priv->adapter; 126 lbs_adapter *adapter = priv->adapter;
127 int ret; 127 int ret;
128 128
129 lbs_deb_enter(LBS_DEB_JOIN); 129 lbs_deb_enter(LBS_DEB_JOIN);
130 130
131 ret = libertas_prepare_and_send_command(priv, CMD_802_11_AUTHENTICATE, 131 ret = lbs_prepare_and_send_command(priv, CMD_802_11_AUTHENTICATE,
132 0, CMD_OPTION_WAITFORRSP, 132 0, CMD_OPTION_WAITFORRSP,
133 0, assoc_req->bss.bssid); 133 0, assoc_req->bss.bssid);
134 134
@@ -142,9 +142,9 @@ int wlan_associate(wlan_private * priv, struct assoc_request * assoc_req)
142 else 142 else
143 adapter->preamble = CMD_TYPE_LONG_PREAMBLE; 143 adapter->preamble = CMD_TYPE_LONG_PREAMBLE;
144 144
145 libertas_set_radio_control(priv); 145 lbs_set_radio_control(priv);
146 146
147 ret = libertas_prepare_and_send_command(priv, CMD_802_11_ASSOCIATE, 147 ret = lbs_prepare_and_send_command(priv, CMD_802_11_ASSOCIATE,
148 0, CMD_OPTION_WAITFORRSP, 0, assoc_req); 148 0, CMD_OPTION_WAITFORRSP, 0, assoc_req);
149 149
150done: 150done:
@@ -155,13 +155,13 @@ done:
155/** 155/**
156 * @brief Start an Adhoc Network 156 * @brief Start an Adhoc Network
157 * 157 *
158 * @param priv A pointer to wlan_private structure 158 * @param priv A pointer to lbs_private structure
159 * @param adhocssid The ssid of the Adhoc Network 159 * @param adhocssid The ssid of the Adhoc Network
160 * @return 0--success, -1--fail 160 * @return 0--success, -1--fail
161 */ 161 */
162int libertas_start_adhoc_network(wlan_private * priv, struct assoc_request * assoc_req) 162int lbs_start_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req)
163{ 163{
164 wlan_adapter *adapter = priv->adapter; 164 lbs_adapter *adapter = priv->adapter;
165 int ret = 0; 165 int ret = 0;
166 166
167 adapter->adhoccreate = 1; 167 adapter->adhoccreate = 1;
@@ -174,12 +174,12 @@ int libertas_start_adhoc_network(wlan_private * priv, struct assoc_request * ass
174 adapter->preamble = CMD_TYPE_LONG_PREAMBLE; 174 adapter->preamble = CMD_TYPE_LONG_PREAMBLE;
175 } 175 }
176 176
177 libertas_set_radio_control(priv); 177 lbs_set_radio_control(priv);
178 178
179 lbs_deb_join("AdhocStart: channel = %d\n", assoc_req->channel); 179 lbs_deb_join("AdhocStart: channel = %d\n", assoc_req->channel);
180 lbs_deb_join("AdhocStart: band = %d\n", assoc_req->band); 180 lbs_deb_join("AdhocStart: band = %d\n", assoc_req->band);
181 181
182 ret = libertas_prepare_and_send_command(priv, CMD_802_11_AD_HOC_START, 182 ret = lbs_prepare_and_send_command(priv, CMD_802_11_AD_HOC_START,
183 0, CMD_OPTION_WAITFORRSP, 0, assoc_req); 183 0, CMD_OPTION_WAITFORRSP, 0, assoc_req);
184 184
185 return ret; 185 return ret;
@@ -188,15 +188,15 @@ int libertas_start_adhoc_network(wlan_private * priv, struct assoc_request * ass
188/** 188/**
189 * @brief Join an adhoc network found in a previous scan 189 * @brief Join an adhoc network found in a previous scan
190 * 190 *
191 * @param priv A pointer to wlan_private structure 191 * @param priv A pointer to lbs_private structure
192 * @param pbssdesc Pointer to a BSS descriptor found in a previous scan 192 * @param pbssdesc Pointer to a BSS descriptor found in a previous scan
193 * to attempt to join 193 * to attempt to join
194 * 194 *
195 * @return 0--success, -1--fail 195 * @return 0--success, -1--fail
196 */ 196 */
197int libertas_join_adhoc_network(wlan_private * priv, struct assoc_request * assoc_req) 197int lbs_join_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req)
198{ 198{
199 wlan_adapter *adapter = priv->adapter; 199 lbs_adapter *adapter = priv->adapter;
200 struct bss_descriptor * bss = &assoc_req->bss; 200 struct bss_descriptor * bss = &assoc_req->bss;
201 int ret = 0; 201 int ret = 0;
202 202
@@ -211,11 +211,11 @@ int libertas_join_adhoc_network(wlan_private * priv, struct assoc_request * asso
211 211
212 /* check if the requested SSID is already joined */ 212 /* check if the requested SSID is already joined */
213 if ( adapter->curbssparams.ssid_len 213 if ( adapter->curbssparams.ssid_len
214 && !libertas_ssid_cmp(adapter->curbssparams.ssid, 214 && !lbs_ssid_cmp(adapter->curbssparams.ssid,
215 adapter->curbssparams.ssid_len, 215 adapter->curbssparams.ssid_len,
216 bss->ssid, bss->ssid_len) 216 bss->ssid, bss->ssid_len)
217 && (adapter->mode == IW_MODE_ADHOC) 217 && (adapter->mode == IW_MODE_ADHOC)
218 && (adapter->connect_status == LIBERTAS_CONNECTED)) { 218 && (adapter->connect_status == LBS_CONNECTED)) {
219 union iwreq_data wrqu; 219 union iwreq_data wrqu;
220 220
221 lbs_deb_join("ADHOC_J_CMD: New ad-hoc SSID is the same as " 221 lbs_deb_join("ADHOC_J_CMD: New ad-hoc SSID is the same as "
@@ -243,14 +243,14 @@ int libertas_join_adhoc_network(wlan_private * priv, struct assoc_request * asso
243 adapter->preamble = CMD_TYPE_SHORT_PREAMBLE; 243 adapter->preamble = CMD_TYPE_SHORT_PREAMBLE;
244 } 244 }
245 245
246 libertas_set_radio_control(priv); 246 lbs_set_radio_control(priv);
247 247
248 lbs_deb_join("AdhocJoin: channel = %d\n", assoc_req->channel); 248 lbs_deb_join("AdhocJoin: channel = %d\n", assoc_req->channel);
249 lbs_deb_join("AdhocJoin: band = %c\n", assoc_req->band); 249 lbs_deb_join("AdhocJoin: band = %c\n", assoc_req->band);
250 250
251 adapter->adhoccreate = 0; 251 adapter->adhoccreate = 0;
252 252
253 ret = libertas_prepare_and_send_command(priv, CMD_802_11_AD_HOC_JOIN, 253 ret = lbs_prepare_and_send_command(priv, CMD_802_11_AD_HOC_JOIN,
254 0, CMD_OPTION_WAITFORRSP, 254 0, CMD_OPTION_WAITFORRSP,
255 OID_802_11_SSID, assoc_req); 255 OID_802_11_SSID, assoc_req);
256 256
@@ -258,38 +258,38 @@ out:
258 return ret; 258 return ret;
259} 259}
260 260
261int libertas_stop_adhoc_network(wlan_private * priv) 261int lbs_stop_adhoc_network(lbs_private * priv)
262{ 262{
263 return libertas_prepare_and_send_command(priv, CMD_802_11_AD_HOC_STOP, 263 return lbs_prepare_and_send_command(priv, CMD_802_11_AD_HOC_STOP,
264 0, CMD_OPTION_WAITFORRSP, 0, NULL); 264 0, CMD_OPTION_WAITFORRSP, 0, NULL);
265} 265}
266 266
267/** 267/**
268 * @brief Send Deauthentication Request 268 * @brief Send Deauthentication Request
269 * 269 *
270 * @param priv A pointer to wlan_private structure 270 * @param priv A pointer to lbs_private structure
271 * @return 0--success, -1--fail 271 * @return 0--success, -1--fail
272 */ 272 */
273int libertas_send_deauthentication(wlan_private * priv) 273int lbs_send_deauthentication(lbs_private *priv)
274{ 274{
275 return libertas_prepare_and_send_command(priv, CMD_802_11_DEAUTHENTICATE, 275 return lbs_prepare_and_send_command(priv, CMD_802_11_DEAUTHENTICATE,
276 0, CMD_OPTION_WAITFORRSP, 0, NULL); 276 0, CMD_OPTION_WAITFORRSP, 0, NULL);
277} 277}
278 278
279/** 279/**
280 * @brief This function prepares command of authenticate. 280 * @brief This function prepares command of authenticate.
281 * 281 *
282 * @param priv A pointer to wlan_private structure 282 * @param priv A pointer to lbs_private structure
283 * @param cmd A pointer to cmd_ds_command structure 283 * @param cmd A pointer to cmd_ds_command structure
284 * @param pdata_buf Void cast of pointer to a BSSID to authenticate with 284 * @param pdata_buf Void cast of pointer to a BSSID to authenticate with
285 * 285 *
286 * @return 0 or -1 286 * @return 0 or -1
287 */ 287 */
288int libertas_cmd_80211_authenticate(wlan_private * priv, 288int lbs_cmd_80211_authenticate(lbs_private *priv,
289 struct cmd_ds_command *cmd, 289 struct cmd_ds_command *cmd,
290 void *pdata_buf) 290 void *pdata_buf)
291{ 291{
292 wlan_adapter *adapter = priv->adapter; 292 lbs_adapter *adapter = priv->adapter;
293 struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth; 293 struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth;
294 int ret = -1; 294 int ret = -1;
295 u8 *bssid = pdata_buf; 295 u8 *bssid = pdata_buf;
@@ -329,10 +329,10 @@ out:
329 return ret; 329 return ret;
330} 330}
331 331
332int libertas_cmd_80211_deauthenticate(wlan_private * priv, 332int lbs_cmd_80211_deauthenticate(lbs_private *priv,
333 struct cmd_ds_command *cmd) 333 struct cmd_ds_command *cmd)
334{ 334{
335 wlan_adapter *adapter = priv->adapter; 335 lbs_adapter *adapter = priv->adapter;
336 struct cmd_ds_802_11_deauthenticate *dauth = &cmd->params.deauth; 336 struct cmd_ds_802_11_deauthenticate *dauth = &cmd->params.deauth;
337 337
338 lbs_deb_enter(LBS_DEB_JOIN); 338 lbs_deb_enter(LBS_DEB_JOIN);
@@ -352,10 +352,10 @@ int libertas_cmd_80211_deauthenticate(wlan_private * priv,
352 return 0; 352 return 0;
353} 353}
354 354
355int libertas_cmd_80211_associate(wlan_private * priv, 355int lbs_cmd_80211_associate(lbs_private *priv,
356 struct cmd_ds_command *cmd, void *pdata_buf) 356 struct cmd_ds_command *cmd, void *pdata_buf)
357{ 357{
358 wlan_adapter *adapter = priv->adapter; 358 lbs_adapter *adapter = priv->adapter;
359 struct cmd_ds_802_11_associate *passo = &cmd->params.associate; 359 struct cmd_ds_802_11_associate *passo = &cmd->params.associate;
360 int ret = 0; 360 int ret = 0;
361 struct assoc_request * assoc_req = pdata_buf; 361 struct assoc_request * assoc_req = pdata_buf;
@@ -431,7 +431,7 @@ int libertas_cmd_80211_associate(wlan_private * priv,
431 /* Set MSB on basic rates as the firmware requires, but _after_ 431 /* Set MSB on basic rates as the firmware requires, but _after_
432 * copying to current bss rates. 432 * copying to current bss rates.
433 */ 433 */
434 libertas_set_basic_rate_flags(rates->rates, tmplen); 434 lbs_set_basic_rate_flags(rates->rates, tmplen);
435 435
436 if (assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled) { 436 if (assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled) {
437 rsn = (struct mrvlietypes_rsnparamset *) pos; 437 rsn = (struct mrvlietypes_rsnparamset *) pos;
@@ -448,7 +448,7 @@ int libertas_cmd_80211_associate(wlan_private * priv,
448 /* update curbssparams */ 448 /* update curbssparams */
449 adapter->curbssparams.channel = bss->phyparamset.dsparamset.currentchan; 449 adapter->curbssparams.channel = bss->phyparamset.dsparamset.currentchan;
450 450
451 if (libertas_parse_dnld_countryinfo_11d(priv, bss)) { 451 if (lbs_parse_dnld_countryinfo_11d(priv, bss)) {
452 ret = -1; 452 ret = -1;
453 goto done; 453 goto done;
454 } 454 }
@@ -468,10 +468,10 @@ done:
468 return ret; 468 return ret;
469} 469}
470 470
471int libertas_cmd_80211_ad_hoc_start(wlan_private * priv, 471int lbs_cmd_80211_ad_hoc_start(lbs_private *priv,
472 struct cmd_ds_command *cmd, void *pdata_buf) 472 struct cmd_ds_command *cmd, void *pdata_buf)
473{ 473{
474 wlan_adapter *adapter = priv->adapter; 474 lbs_adapter *adapter = priv->adapter;
475 struct cmd_ds_802_11_ad_hoc_start *adhs = &cmd->params.ads; 475 struct cmd_ds_802_11_ad_hoc_start *adhs = &cmd->params.ads;
476 int ret = 0; 476 int ret = 0;
477 int cmdappendsize = 0; 477 int cmdappendsize = 0;
@@ -548,8 +548,8 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
548 adhs->probedelay = cpu_to_le16(CMD_SCAN_PROBE_DELAY_TIME); 548 adhs->probedelay = cpu_to_le16(CMD_SCAN_PROBE_DELAY_TIME);
549 549
550 memset(adhs->rates, 0, sizeof(adhs->rates)); 550 memset(adhs->rates, 0, sizeof(adhs->rates));
551 ratesize = min(sizeof(adhs->rates), sizeof(libertas_bg_rates)); 551 ratesize = min(sizeof(adhs->rates), sizeof(lbs_bg_rates));
552 memcpy(adhs->rates, libertas_bg_rates, ratesize); 552 memcpy(adhs->rates, lbs_bg_rates, ratesize);
553 553
554 /* Copy the ad-hoc creating rates into Current BSS state structure */ 554 /* Copy the ad-hoc creating rates into Current BSS state structure */
555 memset(&adapter->curbssparams.rates, 0, sizeof(adapter->curbssparams.rates)); 555 memset(&adapter->curbssparams.rates, 0, sizeof(adapter->curbssparams.rates));
@@ -558,14 +558,14 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
558 /* Set MSB on basic rates as the firmware requires, but _after_ 558 /* Set MSB on basic rates as the firmware requires, but _after_
559 * copying to current bss rates. 559 * copying to current bss rates.
560 */ 560 */
561 libertas_set_basic_rate_flags(adhs->rates, ratesize); 561 lbs_set_basic_rate_flags(adhs->rates, ratesize);
562 562
563 lbs_deb_join("ADHOC_S_CMD: rates=%02x %02x %02x %02x \n", 563 lbs_deb_join("ADHOC_S_CMD: rates=%02x %02x %02x %02x \n",
564 adhs->rates[0], adhs->rates[1], adhs->rates[2], adhs->rates[3]); 564 adhs->rates[0], adhs->rates[1], adhs->rates[2], adhs->rates[3]);
565 565
566 lbs_deb_join("ADHOC_S_CMD: AD HOC Start command is ready\n"); 566 lbs_deb_join("ADHOC_S_CMD: AD HOC Start command is ready\n");
567 567
568 if (libertas_create_dnld_countryinfo_11d(priv)) { 568 if (lbs_create_dnld_countryinfo_11d(priv)) {
569 lbs_deb_join("ADHOC_S_CMD: dnld_countryinfo_11d failed\n"); 569 lbs_deb_join("ADHOC_S_CMD: dnld_countryinfo_11d failed\n");
570 ret = -1; 570 ret = -1;
571 goto done; 571 goto done;
@@ -580,7 +580,7 @@ done:
580 return ret; 580 return ret;
581} 581}
582 582
583int libertas_cmd_80211_ad_hoc_stop(wlan_private * priv, 583int lbs_cmd_80211_ad_hoc_stop(lbs_private *priv,
584 struct cmd_ds_command *cmd) 584 struct cmd_ds_command *cmd)
585{ 585{
586 cmd->command = cpu_to_le16(CMD_802_11_AD_HOC_STOP); 586 cmd->command = cpu_to_le16(CMD_802_11_AD_HOC_STOP);
@@ -589,10 +589,10 @@ int libertas_cmd_80211_ad_hoc_stop(wlan_private * priv,
589 return 0; 589 return 0;
590} 590}
591 591
592int libertas_cmd_80211_ad_hoc_join(wlan_private * priv, 592int lbs_cmd_80211_ad_hoc_join(lbs_private *priv,
593 struct cmd_ds_command *cmd, void *pdata_buf) 593 struct cmd_ds_command *cmd, void *pdata_buf)
594{ 594{
595 wlan_adapter *adapter = priv->adapter; 595 lbs_adapter *adapter = priv->adapter;
596 struct cmd_ds_802_11_ad_hoc_join *join_cmd = &cmd->params.adj; 596 struct cmd_ds_802_11_ad_hoc_join *join_cmd = &cmd->params.adj;
597 struct assoc_request * assoc_req = pdata_buf; 597 struct assoc_request * assoc_req = pdata_buf;
598 struct bss_descriptor *bss = &assoc_req->bss; 598 struct bss_descriptor *bss = &assoc_req->bss;
@@ -652,7 +652,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
652 /* Set MSB on basic rates as the firmware requires, but _after_ 652 /* Set MSB on basic rates as the firmware requires, but _after_
653 * copying to current bss rates. 653 * copying to current bss rates.
654 */ 654 */
655 libertas_set_basic_rate_flags(join_cmd->bss.rates, ratesize); 655 lbs_set_basic_rate_flags(join_cmd->bss.rates, ratesize);
656 656
657 join_cmd->bss.ssparamset.ibssparamset.atimwindow = 657 join_cmd->bss.ssparamset.ibssparamset.atimwindow =
658 cpu_to_le16(bss->atimwindow); 658 cpu_to_le16(bss->atimwindow);
@@ -663,12 +663,12 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
663 join_cmd->bss.capability = cpu_to_le16(tmp); 663 join_cmd->bss.capability = cpu_to_le16(tmp);
664 } 664 }
665 665
666 if (adapter->psmode == WLAN802_11POWERMODEMAX_PSP) { 666 if (adapter->psmode == LBS802_11POWERMODEMAX_PSP) {
667 /* wake up first */ 667 /* wake up first */
668 __le32 Localpsmode; 668 __le32 Localpsmode;
669 669
670 Localpsmode = cpu_to_le32(WLAN802_11POWERMODECAM); 670 Localpsmode = cpu_to_le32(LBS802_11POWERMODECAM);
671 ret = libertas_prepare_and_send_command(priv, 671 ret = lbs_prepare_and_send_command(priv,
672 CMD_802_11_PS_MODE, 672 CMD_802_11_PS_MODE,
673 CMD_ACT_SET, 673 CMD_ACT_SET,
674 0, 0, &Localpsmode); 674 0, 0, &Localpsmode);
@@ -679,7 +679,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
679 } 679 }
680 } 680 }
681 681
682 if (libertas_parse_dnld_countryinfo_11d(priv, bss)) { 682 if (lbs_parse_dnld_countryinfo_11d(priv, bss)) {
683 ret = -1; 683 ret = -1;
684 goto done; 684 goto done;
685 } 685 }
@@ -692,10 +692,10 @@ done:
692 return ret; 692 return ret;
693} 693}
694 694
695int libertas_ret_80211_associate(wlan_private * priv, 695int lbs_ret_80211_associate(lbs_private *priv,
696 struct cmd_ds_command *resp) 696 struct cmd_ds_command *resp)
697{ 697{
698 wlan_adapter *adapter = priv->adapter; 698 lbs_adapter *adapter = priv->adapter;
699 int ret = 0; 699 int ret = 0;
700 union iwreq_data wrqu; 700 union iwreq_data wrqu;
701 struct ieeetypes_assocrsp *passocrsp; 701 struct ieeetypes_assocrsp *passocrsp;
@@ -762,7 +762,7 @@ int libertas_ret_80211_associate(wlan_private * priv,
762 } 762 }
763 763
764 if (status_code) { 764 if (status_code) {
765 libertas_mac_event_disconnected(priv); 765 lbs_mac_event_disconnected(priv);
766 ret = -1; 766 ret = -1;
767 goto done; 767 goto done;
768 } 768 }
@@ -771,7 +771,7 @@ int libertas_ret_80211_associate(wlan_private * priv,
771 le16_to_cpu(resp->size) - S_DS_GEN); 771 le16_to_cpu(resp->size) - S_DS_GEN);
772 772
773 /* Send a Media Connected event, according to the Spec */ 773 /* Send a Media Connected event, according to the Spec */
774 adapter->connect_status = LIBERTAS_CONNECTED; 774 adapter->connect_status = LBS_CONNECTED;
775 775
776 lbs_deb_join("ASSOC_RESP: assocated to '%s'\n", 776 lbs_deb_join("ASSOC_RESP: assocated to '%s'\n",
777 escape_essid(bss->ssid, bss->ssid_len)); 777 escape_essid(bss->ssid, bss->ssid_len));
@@ -809,21 +809,21 @@ done:
809 return ret; 809 return ret;
810} 810}
811 811
812int libertas_ret_80211_disassociate(wlan_private * priv, 812int lbs_ret_80211_disassociate(lbs_private *priv,
813 struct cmd_ds_command *resp) 813 struct cmd_ds_command *resp)
814{ 814{
815 lbs_deb_enter(LBS_DEB_JOIN); 815 lbs_deb_enter(LBS_DEB_JOIN);
816 816
817 libertas_mac_event_disconnected(priv); 817 lbs_mac_event_disconnected(priv);
818 818
819 lbs_deb_leave(LBS_DEB_JOIN); 819 lbs_deb_leave(LBS_DEB_JOIN);
820 return 0; 820 return 0;
821} 821}
822 822
823int libertas_ret_80211_ad_hoc_start(wlan_private * priv, 823int lbs_ret_80211_ad_hoc_start(lbs_private *priv,
824 struct cmd_ds_command *resp) 824 struct cmd_ds_command *resp)
825{ 825{
826 wlan_adapter *adapter = priv->adapter; 826 lbs_adapter *adapter = priv->adapter;
827 int ret = 0; 827 int ret = 0;
828 u16 command = le16_to_cpu(resp->command); 828 u16 command = le16_to_cpu(resp->command);
829 u16 result = le16_to_cpu(resp->result); 829 u16 result = le16_to_cpu(resp->result);
@@ -852,8 +852,8 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
852 */ 852 */
853 if (result) { 853 if (result) {
854 lbs_deb_join("ADHOC_RESP: failed\n"); 854 lbs_deb_join("ADHOC_RESP: failed\n");
855 if (adapter->connect_status == LIBERTAS_CONNECTED) { 855 if (adapter->connect_status == LBS_CONNECTED) {
856 libertas_mac_event_disconnected(priv); 856 lbs_mac_event_disconnected(priv);
857 } 857 }
858 ret = -1; 858 ret = -1;
859 goto done; 859 goto done;
@@ -867,7 +867,7 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
867 escape_essid(bss->ssid, bss->ssid_len)); 867 escape_essid(bss->ssid, bss->ssid_len));
868 868
869 /* Send a Media Connected event, according to the Spec */ 869 /* Send a Media Connected event, according to the Spec */
870 adapter->connect_status = LIBERTAS_CONNECTED; 870 adapter->connect_status = LBS_CONNECTED;
871 871
872 if (command == CMD_RET(CMD_802_11_AD_HOC_START)) { 872 if (command == CMD_RET(CMD_802_11_AD_HOC_START)) {
873 /* Update the created network descriptor with the new BSSID */ 873 /* Update the created network descriptor with the new BSSID */
@@ -904,12 +904,12 @@ done:
904 return ret; 904 return ret;
905} 905}
906 906
907int libertas_ret_80211_ad_hoc_stop(wlan_private * priv, 907int lbs_ret_80211_ad_hoc_stop(lbs_private *priv,
908 struct cmd_ds_command *resp) 908 struct cmd_ds_command *resp)
909{ 909{
910 lbs_deb_enter(LBS_DEB_JOIN); 910 lbs_deb_enter(LBS_DEB_JOIN);
911 911
912 libertas_mac_event_disconnected(priv); 912 lbs_mac_event_disconnected(priv);
913 913
914 lbs_deb_leave(LBS_DEB_JOIN); 914 lbs_deb_leave(LBS_DEB_JOIN);
915 return 0; 915 return 0;
diff --git a/drivers/net/wireless/libertas/join.h b/drivers/net/wireless/libertas/join.h
index 894a072b9f8d..5c2b2df5e577 100644
--- a/drivers/net/wireless/libertas/join.h
+++ b/drivers/net/wireless/libertas/join.h
@@ -2,52 +2,52 @@
2 * Interface for the wlan infrastructure and adhoc join routines 2 * Interface for the wlan infrastructure and adhoc join routines
3 * 3 *
4 * Driver interface functions and type declarations for the join module 4 * Driver interface functions and type declarations for the join module
5 * implemented in wlan_join.c. Process all start/join requests for 5 * implemented in join.c. Process all start/join requests for
6 * both adhoc and infrastructure networks 6 * both adhoc and infrastructure networks
7 */ 7 */
8#ifndef _WLAN_JOIN_H 8#ifndef _LBS_JOIN_H
9#define _WLAN_JOIN_H 9#define _LBS_JOIN_H
10 10
11#include "defs.h" 11#include "defs.h"
12#include "dev.h" 12#include "dev.h"
13 13
14struct cmd_ds_command; 14struct cmd_ds_command;
15int libertas_cmd_80211_authenticate(wlan_private * priv, 15int lbs_cmd_80211_authenticate(lbs_private *priv,
16 struct cmd_ds_command *cmd, 16 struct cmd_ds_command *cmd,
17 void *pdata_buf); 17 void *pdata_buf);
18int libertas_cmd_80211_ad_hoc_join(wlan_private * priv, 18int lbs_cmd_80211_ad_hoc_join(lbs_private *priv,
19 struct cmd_ds_command *cmd, 19 struct cmd_ds_command *cmd,
20 void *pdata_buf); 20 void *pdata_buf);
21int libertas_cmd_80211_ad_hoc_stop(wlan_private * priv, 21int lbs_cmd_80211_ad_hoc_stop(lbs_private *priv,
22 struct cmd_ds_command *cmd); 22 struct cmd_ds_command *cmd);
23int libertas_cmd_80211_ad_hoc_start(wlan_private * priv, 23int lbs_cmd_80211_ad_hoc_start(lbs_private *priv,
24 struct cmd_ds_command *cmd, 24 struct cmd_ds_command *cmd,
25 void *pdata_buf); 25 void *pdata_buf);
26int libertas_cmd_80211_deauthenticate(wlan_private * priv, 26int lbs_cmd_80211_deauthenticate(lbs_private *priv,
27 struct cmd_ds_command *cmd); 27 struct cmd_ds_command *cmd);
28int libertas_cmd_80211_associate(wlan_private * priv, 28int lbs_cmd_80211_associate(lbs_private *priv,
29 struct cmd_ds_command *cmd, 29 struct cmd_ds_command *cmd,
30 void *pdata_buf); 30 void *pdata_buf);
31 31
32int libertas_ret_80211_ad_hoc_start(wlan_private * priv, 32int lbs_ret_80211_ad_hoc_start(lbs_private *priv,
33 struct cmd_ds_command *resp); 33 struct cmd_ds_command *resp);
34int libertas_ret_80211_ad_hoc_stop(wlan_private * priv, 34int lbs_ret_80211_ad_hoc_stop(lbs_private *priv,
35 struct cmd_ds_command *resp); 35 struct cmd_ds_command *resp);
36int libertas_ret_80211_disassociate(wlan_private * priv, 36int lbs_ret_80211_disassociate(lbs_private *priv,
37 struct cmd_ds_command *resp); 37 struct cmd_ds_command *resp);
38int libertas_ret_80211_associate(wlan_private * priv, 38int lbs_ret_80211_associate(lbs_private *priv,
39 struct cmd_ds_command *resp); 39 struct cmd_ds_command *resp);
40 40
41int libertas_start_adhoc_network(wlan_private * priv, 41int lbs_start_adhoc_network(lbs_private *priv,
42 struct assoc_request * assoc_req); 42 struct assoc_request * assoc_req);
43int libertas_join_adhoc_network(wlan_private * priv, 43int lbs_join_adhoc_network(lbs_private *priv,
44 struct assoc_request * assoc_req); 44 struct assoc_request * assoc_req);
45int libertas_stop_adhoc_network(wlan_private * priv); 45int lbs_stop_adhoc_network(lbs_private *priv);
46 46
47int libertas_send_deauthentication(wlan_private * priv); 47int lbs_send_deauthentication(lbs_private *priv);
48 48
49int wlan_associate(wlan_private * priv, struct assoc_request * assoc_req); 49int lbs_associate(lbs_private *priv, struct assoc_request *assoc_req);
50 50
51void libertas_unset_basic_rate_flags(u8 * rates, size_t len); 51void lbs_unset_basic_rate_flags(u8 *rates, size_t len);
52 52
53#endif 53#endif
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 1823b48a8ba7..825970af3419 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -24,7 +24,7 @@
24#include "join.h" 24#include "join.h"
25 25
26#define DRIVER_RELEASE_VERSION "323.p0" 26#define DRIVER_RELEASE_VERSION "323.p0"
27const char libertas_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION 27const char lbs_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION
28#ifdef DEBUG 28#ifdef DEBUG
29 "-dbg" 29 "-dbg"
30#endif 30#endif
@@ -32,80 +32,80 @@ const char libertas_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION
32 32
33 33
34/* Module parameters */ 34/* Module parameters */
35unsigned int libertas_debug = 0; 35unsigned int lbs_debug;
36module_param(libertas_debug, int, 0644); 36EXPORT_SYMBOL_GPL(lbs_debug);
37EXPORT_SYMBOL_GPL(libertas_debug); 37module_param_named(libertas_debug, lbs_debug, int, 0644);
38 38
39 39
40#define WLAN_TX_PWR_DEFAULT 20 /*100mW */ 40#define LBS_TX_PWR_DEFAULT 20 /*100mW */
41#define WLAN_TX_PWR_US_DEFAULT 20 /*100mW */ 41#define LBS_TX_PWR_US_DEFAULT 20 /*100mW */
42#define WLAN_TX_PWR_JP_DEFAULT 16 /*50mW */ 42#define LBS_TX_PWR_JP_DEFAULT 16 /*50mW */
43#define WLAN_TX_PWR_FR_DEFAULT 20 /*100mW */ 43#define LBS_TX_PWR_FR_DEFAULT 20 /*100mW */
44#define WLAN_TX_PWR_EMEA_DEFAULT 20 /*100mW */ 44#define LBS_TX_PWR_EMEA_DEFAULT 20 /*100mW */
45 45
46/* Format { channel, frequency (MHz), maxtxpower } */ 46/* Format { channel, frequency (MHz), maxtxpower } */
47/* band: 'B/G', region: USA FCC/Canada IC */ 47/* band: 'B/G', region: USA FCC/Canada IC */
48static struct chan_freq_power channel_freq_power_US_BG[] = { 48static struct chan_freq_power channel_freq_power_US_BG[] = {
49 {1, 2412, WLAN_TX_PWR_US_DEFAULT}, 49 {1, 2412, LBS_TX_PWR_US_DEFAULT},
50 {2, 2417, WLAN_TX_PWR_US_DEFAULT}, 50 {2, 2417, LBS_TX_PWR_US_DEFAULT},
51 {3, 2422, WLAN_TX_PWR_US_DEFAULT}, 51 {3, 2422, LBS_TX_PWR_US_DEFAULT},
52 {4, 2427, WLAN_TX_PWR_US_DEFAULT}, 52 {4, 2427, LBS_TX_PWR_US_DEFAULT},
53 {5, 2432, WLAN_TX_PWR_US_DEFAULT}, 53 {5, 2432, LBS_TX_PWR_US_DEFAULT},
54 {6, 2437, WLAN_TX_PWR_US_DEFAULT}, 54 {6, 2437, LBS_TX_PWR_US_DEFAULT},
55 {7, 2442, WLAN_TX_PWR_US_DEFAULT}, 55 {7, 2442, LBS_TX_PWR_US_DEFAULT},
56 {8, 2447, WLAN_TX_PWR_US_DEFAULT}, 56 {8, 2447, LBS_TX_PWR_US_DEFAULT},
57 {9, 2452, WLAN_TX_PWR_US_DEFAULT}, 57 {9, 2452, LBS_TX_PWR_US_DEFAULT},
58 {10, 2457, WLAN_TX_PWR_US_DEFAULT}, 58 {10, 2457, LBS_TX_PWR_US_DEFAULT},
59 {11, 2462, WLAN_TX_PWR_US_DEFAULT} 59 {11, 2462, LBS_TX_PWR_US_DEFAULT}
60}; 60};
61 61
62/* band: 'B/G', region: Europe ETSI */ 62/* band: 'B/G', region: Europe ETSI */
63static struct chan_freq_power channel_freq_power_EU_BG[] = { 63static struct chan_freq_power channel_freq_power_EU_BG[] = {
64 {1, 2412, WLAN_TX_PWR_EMEA_DEFAULT}, 64 {1, 2412, LBS_TX_PWR_EMEA_DEFAULT},
65 {2, 2417, WLAN_TX_PWR_EMEA_DEFAULT}, 65 {2, 2417, LBS_TX_PWR_EMEA_DEFAULT},
66 {3, 2422, WLAN_TX_PWR_EMEA_DEFAULT}, 66 {3, 2422, LBS_TX_PWR_EMEA_DEFAULT},
67 {4, 2427, WLAN_TX_PWR_EMEA_DEFAULT}, 67 {4, 2427, LBS_TX_PWR_EMEA_DEFAULT},
68 {5, 2432, WLAN_TX_PWR_EMEA_DEFAULT}, 68 {5, 2432, LBS_TX_PWR_EMEA_DEFAULT},
69 {6, 2437, WLAN_TX_PWR_EMEA_DEFAULT}, 69 {6, 2437, LBS_TX_PWR_EMEA_DEFAULT},
70 {7, 2442, WLAN_TX_PWR_EMEA_DEFAULT}, 70 {7, 2442, LBS_TX_PWR_EMEA_DEFAULT},
71 {8, 2447, WLAN_TX_PWR_EMEA_DEFAULT}, 71 {8, 2447, LBS_TX_PWR_EMEA_DEFAULT},
72 {9, 2452, WLAN_TX_PWR_EMEA_DEFAULT}, 72 {9, 2452, LBS_TX_PWR_EMEA_DEFAULT},
73 {10, 2457, WLAN_TX_PWR_EMEA_DEFAULT}, 73 {10, 2457, LBS_TX_PWR_EMEA_DEFAULT},
74 {11, 2462, WLAN_TX_PWR_EMEA_DEFAULT}, 74 {11, 2462, LBS_TX_PWR_EMEA_DEFAULT},
75 {12, 2467, WLAN_TX_PWR_EMEA_DEFAULT}, 75 {12, 2467, LBS_TX_PWR_EMEA_DEFAULT},
76 {13, 2472, WLAN_TX_PWR_EMEA_DEFAULT} 76 {13, 2472, LBS_TX_PWR_EMEA_DEFAULT}
77}; 77};
78 78
79/* band: 'B/G', region: Spain */ 79/* band: 'B/G', region: Spain */
80static struct chan_freq_power channel_freq_power_SPN_BG[] = { 80static struct chan_freq_power channel_freq_power_SPN_BG[] = {
81 {10, 2457, WLAN_TX_PWR_DEFAULT}, 81 {10, 2457, LBS_TX_PWR_DEFAULT},
82 {11, 2462, WLAN_TX_PWR_DEFAULT} 82 {11, 2462, LBS_TX_PWR_DEFAULT}
83}; 83};
84 84
85/* band: 'B/G', region: France */ 85/* band: 'B/G', region: France */
86static struct chan_freq_power channel_freq_power_FR_BG[] = { 86static struct chan_freq_power channel_freq_power_FR_BG[] = {
87 {10, 2457, WLAN_TX_PWR_FR_DEFAULT}, 87 {10, 2457, LBS_TX_PWR_FR_DEFAULT},
88 {11, 2462, WLAN_TX_PWR_FR_DEFAULT}, 88 {11, 2462, LBS_TX_PWR_FR_DEFAULT},
89 {12, 2467, WLAN_TX_PWR_FR_DEFAULT}, 89 {12, 2467, LBS_TX_PWR_FR_DEFAULT},
90 {13, 2472, WLAN_TX_PWR_FR_DEFAULT} 90 {13, 2472, LBS_TX_PWR_FR_DEFAULT}
91}; 91};
92 92
93/* band: 'B/G', region: Japan */ 93/* band: 'B/G', region: Japan */
94static struct chan_freq_power channel_freq_power_JPN_BG[] = { 94static struct chan_freq_power channel_freq_power_JPN_BG[] = {
95 {1, 2412, WLAN_TX_PWR_JP_DEFAULT}, 95 {1, 2412, LBS_TX_PWR_JP_DEFAULT},
96 {2, 2417, WLAN_TX_PWR_JP_DEFAULT}, 96 {2, 2417, LBS_TX_PWR_JP_DEFAULT},
97 {3, 2422, WLAN_TX_PWR_JP_DEFAULT}, 97 {3, 2422, LBS_TX_PWR_JP_DEFAULT},
98 {4, 2427, WLAN_TX_PWR_JP_DEFAULT}, 98 {4, 2427, LBS_TX_PWR_JP_DEFAULT},
99 {5, 2432, WLAN_TX_PWR_JP_DEFAULT}, 99 {5, 2432, LBS_TX_PWR_JP_DEFAULT},
100 {6, 2437, WLAN_TX_PWR_JP_DEFAULT}, 100 {6, 2437, LBS_TX_PWR_JP_DEFAULT},
101 {7, 2442, WLAN_TX_PWR_JP_DEFAULT}, 101 {7, 2442, LBS_TX_PWR_JP_DEFAULT},
102 {8, 2447, WLAN_TX_PWR_JP_DEFAULT}, 102 {8, 2447, LBS_TX_PWR_JP_DEFAULT},
103 {9, 2452, WLAN_TX_PWR_JP_DEFAULT}, 103 {9, 2452, LBS_TX_PWR_JP_DEFAULT},
104 {10, 2457, WLAN_TX_PWR_JP_DEFAULT}, 104 {10, 2457, LBS_TX_PWR_JP_DEFAULT},
105 {11, 2462, WLAN_TX_PWR_JP_DEFAULT}, 105 {11, 2462, LBS_TX_PWR_JP_DEFAULT},
106 {12, 2467, WLAN_TX_PWR_JP_DEFAULT}, 106 {12, 2467, LBS_TX_PWR_JP_DEFAULT},
107 {13, 2472, WLAN_TX_PWR_JP_DEFAULT}, 107 {13, 2472, LBS_TX_PWR_JP_DEFAULT},
108 {14, 2484, WLAN_TX_PWR_JP_DEFAULT} 108 {14, 2484, LBS_TX_PWR_JP_DEFAULT}
109}; 109};
110 110
111/** 111/**
@@ -153,13 +153,13 @@ static struct region_cfp_table region_cfp_table[] = {
153/** 153/**
154 * the table to keep region code 154 * the table to keep region code
155 */ 155 */
156u16 libertas_region_code_to_index[MRVDRV_MAX_REGION_CODE] = 156u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE] =
157 { 0x10, 0x20, 0x30, 0x31, 0x32, 0x40 }; 157 { 0x10, 0x20, 0x30, 0x31, 0x32, 0x40 };
158 158
159/** 159/**
160 * 802.11b/g supported bitrates (in 500Kb/s units) 160 * 802.11b/g supported bitrates (in 500Kb/s units)
161 */ 161 */
162u8 libertas_bg_rates[MAX_RATES] = 162u8 lbs_bg_rates[MAX_RATES] =
163 { 0x02, 0x04, 0x0b, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c, 163 { 0x02, 0x04, 0x0b, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c,
1640x00, 0x00 }; 1640x00, 0x00 };
165 165
@@ -179,7 +179,7 @@ static u8 fw_data_rates[MAX_RATES] =
179 * @param idx The index of data rate 179 * @param idx The index of data rate
180 * @return data rate or 0 180 * @return data rate or 0
181 */ 181 */
182u32 libertas_fw_index_to_data_rate(u8 idx) 182u32 lbs_fw_index_to_data_rate(u8 idx)
183{ 183{
184 if (idx >= sizeof(fw_data_rates)) 184 if (idx >= sizeof(fw_data_rates))
185 idx = 0; 185 idx = 0;
@@ -192,7 +192,7 @@ u32 libertas_fw_index_to_data_rate(u8 idx)
192 * @param rate data rate 192 * @param rate data rate
193 * @return index or 0 193 * @return index or 0
194 */ 194 */
195u8 libertas_data_rate_to_fw_index(u32 rate) 195u8 lbs_data_rate_to_fw_index(u32 rate)
196{ 196{
197 u8 i; 197 u8 i;
198 198
@@ -213,13 +213,13 @@ u8 libertas_data_rate_to_fw_index(u32 rate)
213/** 213/**
214 * @brief Get function for sysfs attribute anycast_mask 214 * @brief Get function for sysfs attribute anycast_mask
215 */ 215 */
216static ssize_t libertas_anycast_get(struct device * dev, 216static ssize_t lbs_anycast_get(struct device *dev,
217 struct device_attribute *attr, char * buf) 217 struct device_attribute *attr, char * buf)
218{ 218{
219 struct cmd_ds_mesh_access mesh_access; 219 struct cmd_ds_mesh_access mesh_access;
220 220
221 memset(&mesh_access, 0, sizeof(mesh_access)); 221 memset(&mesh_access, 0, sizeof(mesh_access));
222 libertas_prepare_and_send_command(to_net_dev(dev)->priv, 222 lbs_prepare_and_send_command(to_net_dev(dev)->priv,
223 CMD_MESH_ACCESS, 223 CMD_MESH_ACCESS,
224 CMD_ACT_MESH_GET_ANYCAST, 224 CMD_ACT_MESH_GET_ANYCAST,
225 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); 225 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
@@ -230,7 +230,7 @@ static ssize_t libertas_anycast_get(struct device * dev,
230/** 230/**
231 * @brief Set function for sysfs attribute anycast_mask 231 * @brief Set function for sysfs attribute anycast_mask
232 */ 232 */
233static ssize_t libertas_anycast_set(struct device * dev, 233static ssize_t lbs_anycast_set(struct device *dev,
234 struct device_attribute *attr, const char * buf, size_t count) 234 struct device_attribute *attr, const char * buf, size_t count)
235{ 235{
236 struct cmd_ds_mesh_access mesh_access; 236 struct cmd_ds_mesh_access mesh_access;
@@ -240,86 +240,86 @@ static ssize_t libertas_anycast_set(struct device * dev,
240 sscanf(buf, "%x", &datum); 240 sscanf(buf, "%x", &datum);
241 mesh_access.data[0] = cpu_to_le32(datum); 241 mesh_access.data[0] = cpu_to_le32(datum);
242 242
243 libertas_prepare_and_send_command((to_net_dev(dev))->priv, 243 lbs_prepare_and_send_command((to_net_dev(dev))->priv,
244 CMD_MESH_ACCESS, 244 CMD_MESH_ACCESS,
245 CMD_ACT_MESH_SET_ANYCAST, 245 CMD_ACT_MESH_SET_ANYCAST,
246 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); 246 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
247 return strlen(buf); 247 return strlen(buf);
248} 248}
249 249
250int libertas_add_rtap(wlan_private *priv); 250int lbs_add_rtap(lbs_private *priv);
251void libertas_remove_rtap(wlan_private *priv); 251void lbs_remove_rtap(lbs_private *priv);
252 252
253/** 253/**
254 * Get function for sysfs attribute rtap 254 * Get function for sysfs attribute rtap
255 */ 255 */
256static ssize_t libertas_rtap_get(struct device * dev, 256static ssize_t lbs_rtap_get(struct device *dev,
257 struct device_attribute *attr, char * buf) 257 struct device_attribute *attr, char * buf)
258{ 258{
259 wlan_private *priv = (wlan_private *) (to_net_dev(dev))->priv; 259 lbs_private *priv = (lbs_private *) (to_net_dev(dev))->priv;
260 wlan_adapter *adapter = priv->adapter; 260 lbs_adapter *adapter = priv->adapter;
261 return snprintf(buf, 5, "0x%X\n", adapter->monitormode); 261 return snprintf(buf, 5, "0x%X\n", adapter->monitormode);
262} 262}
263 263
264/** 264/**
265 * Set function for sysfs attribute rtap 265 * Set function for sysfs attribute rtap
266 */ 266 */
267static ssize_t libertas_rtap_set(struct device * dev, 267static ssize_t lbs_rtap_set(struct device *dev,
268 struct device_attribute *attr, const char * buf, size_t count) 268 struct device_attribute *attr, const char * buf, size_t count)
269{ 269{
270 int monitor_mode; 270 int monitor_mode;
271 wlan_private *priv = (wlan_private *) (to_net_dev(dev))->priv; 271 lbs_private *priv = (lbs_private *) (to_net_dev(dev))->priv;
272 wlan_adapter *adapter = priv->adapter; 272 lbs_adapter *adapter = priv->adapter;
273 273
274 sscanf(buf, "%x", &monitor_mode); 274 sscanf(buf, "%x", &monitor_mode);
275 if (monitor_mode != WLAN_MONITOR_OFF) { 275 if (monitor_mode != LBS_MONITOR_OFF) {
276 if(adapter->monitormode == monitor_mode) 276 if(adapter->monitormode == monitor_mode)
277 return strlen(buf); 277 return strlen(buf);
278 if (adapter->monitormode == WLAN_MONITOR_OFF) { 278 if (adapter->monitormode == LBS_MONITOR_OFF) {
279 if (adapter->mode == IW_MODE_INFRA) 279 if (adapter->mode == IW_MODE_INFRA)
280 libertas_send_deauthentication(priv); 280 lbs_send_deauthentication(priv);
281 else if (adapter->mode == IW_MODE_ADHOC) 281 else if (adapter->mode == IW_MODE_ADHOC)
282 libertas_stop_adhoc_network(priv); 282 lbs_stop_adhoc_network(priv);
283 libertas_add_rtap(priv); 283 lbs_add_rtap(priv);
284 } 284 }
285 adapter->monitormode = monitor_mode; 285 adapter->monitormode = monitor_mode;
286 } 286 }
287 287
288 else { 288 else {
289 if(adapter->monitormode == WLAN_MONITOR_OFF) 289 if (adapter->monitormode == LBS_MONITOR_OFF)
290 return strlen(buf); 290 return strlen(buf);
291 adapter->monitormode = WLAN_MONITOR_OFF; 291 adapter->monitormode = LBS_MONITOR_OFF;
292 libertas_remove_rtap(priv); 292 lbs_remove_rtap(priv);
293 netif_wake_queue(priv->dev); 293 netif_wake_queue(priv->dev);
294 netif_wake_queue(priv->mesh_dev); 294 netif_wake_queue(priv->mesh_dev);
295 } 295 }
296 296
297 libertas_prepare_and_send_command(priv, 297 lbs_prepare_and_send_command(priv,
298 CMD_802_11_MONITOR_MODE, CMD_ACT_SET, 298 CMD_802_11_MONITOR_MODE, CMD_ACT_SET,
299 CMD_OPTION_WAITFORRSP, 0, &adapter->monitormode); 299 CMD_OPTION_WAITFORRSP, 0, &adapter->monitormode);
300 return strlen(buf); 300 return strlen(buf);
301} 301}
302 302
303/** 303/**
304 * libertas_rtap attribute to be exported per mshX interface 304 * lbs_rtap attribute to be exported per mshX interface
305 * through sysfs (/sys/class/net/mshX/libertas-rtap) 305 * through sysfs (/sys/class/net/mshX/libertas-rtap)
306 */ 306 */
307static DEVICE_ATTR(libertas_rtap, 0644, libertas_rtap_get, 307static DEVICE_ATTR(lbs_rtap, 0644, lbs_rtap_get,
308 libertas_rtap_set ); 308 lbs_rtap_set );
309 309
310/** 310/**
311 * anycast_mask attribute to be exported per mshX interface 311 * anycast_mask attribute to be exported per mshX interface
312 * through sysfs (/sys/class/net/mshX/anycast_mask) 312 * through sysfs (/sys/class/net/mshX/anycast_mask)
313 */ 313 */
314static DEVICE_ATTR(anycast_mask, 0644, libertas_anycast_get, libertas_anycast_set); 314static DEVICE_ATTR(anycast_mask, 0644, lbs_anycast_get, lbs_anycast_set);
315 315
316static ssize_t libertas_autostart_enabled_get(struct device * dev, 316static ssize_t lbs_autostart_enabled_get(struct device *dev,
317 struct device_attribute *attr, char * buf) 317 struct device_attribute *attr, char * buf)
318{ 318{
319 struct cmd_ds_mesh_access mesh_access; 319 struct cmd_ds_mesh_access mesh_access;
320 320
321 memset(&mesh_access, 0, sizeof(mesh_access)); 321 memset(&mesh_access, 0, sizeof(mesh_access));
322 libertas_prepare_and_send_command(to_net_dev(dev)->priv, 322 lbs_prepare_and_send_command(to_net_dev(dev)->priv,
323 CMD_MESH_ACCESS, 323 CMD_MESH_ACCESS,
324 CMD_ACT_MESH_GET_AUTOSTART_ENABLED, 324 CMD_ACT_MESH_GET_AUTOSTART_ENABLED,
325 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); 325 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
@@ -327,19 +327,19 @@ static ssize_t libertas_autostart_enabled_get(struct device * dev,
327 return sprintf(buf, "%d\n", le32_to_cpu(mesh_access.data[0])); 327 return sprintf(buf, "%d\n", le32_to_cpu(mesh_access.data[0]));
328} 328}
329 329
330static ssize_t libertas_autostart_enabled_set(struct device * dev, 330static ssize_t lbs_autostart_enabled_set(struct device *dev,
331 struct device_attribute *attr, const char * buf, size_t count) 331 struct device_attribute *attr, const char * buf, size_t count)
332{ 332{
333 struct cmd_ds_mesh_access mesh_access; 333 struct cmd_ds_mesh_access mesh_access;
334 uint32_t datum; 334 uint32_t datum;
335 wlan_private * priv = (to_net_dev(dev))->priv; 335 lbs_private *priv = (to_net_dev(dev))->priv;
336 int ret; 336 int ret;
337 337
338 memset(&mesh_access, 0, sizeof(mesh_access)); 338 memset(&mesh_access, 0, sizeof(mesh_access));
339 sscanf(buf, "%d", &datum); 339 sscanf(buf, "%d", &datum);
340 mesh_access.data[0] = cpu_to_le32(datum); 340 mesh_access.data[0] = cpu_to_le32(datum);
341 341
342 ret = libertas_prepare_and_send_command(priv, 342 ret = lbs_prepare_and_send_command(priv,
343 CMD_MESH_ACCESS, 343 CMD_MESH_ACCESS,
344 CMD_ACT_MESH_SET_AUTOSTART_ENABLED, 344 CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
345 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); 345 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
@@ -350,16 +350,16 @@ static ssize_t libertas_autostart_enabled_set(struct device * dev,
350} 350}
351 351
352static DEVICE_ATTR(autostart_enabled, 0644, 352static DEVICE_ATTR(autostart_enabled, 0644,
353 libertas_autostart_enabled_get, libertas_autostart_enabled_set); 353 lbs_autostart_enabled_get, lbs_autostart_enabled_set);
354 354
355static struct attribute *libertas_mesh_sysfs_entries[] = { 355static struct attribute *lbs_mesh_sysfs_entries[] = {
356 &dev_attr_anycast_mask.attr, 356 &dev_attr_anycast_mask.attr,
357 &dev_attr_autostart_enabled.attr, 357 &dev_attr_autostart_enabled.attr,
358 NULL, 358 NULL,
359}; 359};
360 360
361static struct attribute_group libertas_mesh_attr_group = { 361static struct attribute_group lbs_mesh_attr_group = {
362 .attrs = libertas_mesh_sysfs_entries, 362 .attrs = lbs_mesh_sysfs_entries,
363}; 363};
364 364
365/** 365/**
@@ -375,8 +375,8 @@ static struct attribute_group libertas_mesh_attr_group = {
375 */ 375 */
376static int pre_open_check(struct net_device *dev) 376static int pre_open_check(struct net_device *dev)
377{ 377{
378 wlan_private *priv = (wlan_private *) dev->priv; 378 lbs_private *priv = (lbs_private *) dev->priv;
379 wlan_adapter *adapter = priv->adapter; 379 lbs_adapter *adapter = priv->adapter;
380 int i = 0; 380 int i = 0;
381 381
382 while (!adapter->fw_ready && i < 20) { 382 while (!adapter->fw_ready && i < 20) {
@@ -397,16 +397,16 @@ static int pre_open_check(struct net_device *dev)
397 * @param dev A pointer to net_device structure 397 * @param dev A pointer to net_device structure
398 * @return 0 398 * @return 0
399 */ 399 */
400static int libertas_dev_open(struct net_device *dev) 400static int lbs_dev_open(struct net_device *dev)
401{ 401{
402 wlan_private *priv = (wlan_private *) dev->priv; 402 lbs_private *priv = (lbs_private *) dev->priv;
403 wlan_adapter *adapter = priv->adapter; 403 lbs_adapter *adapter = priv->adapter;
404 404
405 lbs_deb_enter(LBS_DEB_NET); 405 lbs_deb_enter(LBS_DEB_NET);
406 406
407 priv->open = 1; 407 priv->open = 1;
408 408
409 if (adapter->connect_status == LIBERTAS_CONNECTED) { 409 if (adapter->connect_status == LBS_CONNECTED) {
410 netif_carrier_on(priv->dev); 410 netif_carrier_on(priv->dev);
411 if (priv->mesh_dev) 411 if (priv->mesh_dev)
412 netif_carrier_on(priv->mesh_dev); 412 netif_carrier_on(priv->mesh_dev);
@@ -425,16 +425,16 @@ static int libertas_dev_open(struct net_device *dev)
425 * @param dev A pointer to net_device structure 425 * @param dev A pointer to net_device structure
426 * @return 0 426 * @return 0
427 */ 427 */
428static int libertas_mesh_open(struct net_device *dev) 428static int lbs_mesh_open(struct net_device *dev)
429{ 429{
430 wlan_private *priv = (wlan_private *) dev->priv ; 430 lbs_private *priv = (lbs_private *) dev->priv ;
431 431
432 if (pre_open_check(dev) == -1) 432 if (pre_open_check(dev) == -1)
433 return -1; 433 return -1;
434 priv->mesh_open = 1 ; 434 priv->mesh_open = 1 ;
435 netif_wake_queue(priv->mesh_dev); 435 netif_wake_queue(priv->mesh_dev);
436 if (priv->infra_open == 0) 436 if (priv->infra_open == 0)
437 return libertas_dev_open(priv->dev) ; 437 return lbs_dev_open(priv->dev) ;
438 return 0; 438 return 0;
439} 439}
440 440
@@ -444,22 +444,22 @@ static int libertas_mesh_open(struct net_device *dev)
444 * @param dev A pointer to net_device structure 444 * @param dev A pointer to net_device structure
445 * @return 0 445 * @return 0
446 */ 446 */
447static int libertas_open(struct net_device *dev) 447static int lbs_open(struct net_device *dev)
448{ 448{
449 wlan_private *priv = (wlan_private *) dev->priv ; 449 lbs_private *priv = (lbs_private *) dev->priv ;
450 450
451 if(pre_open_check(dev) == -1) 451 if(pre_open_check(dev) == -1)
452 return -1; 452 return -1;
453 priv->infra_open = 1 ; 453 priv->infra_open = 1 ;
454 netif_wake_queue(priv->dev); 454 netif_wake_queue(priv->dev);
455 if (priv->open == 0) 455 if (priv->open == 0)
456 return libertas_dev_open(priv->dev) ; 456 return lbs_dev_open(priv->dev) ;
457 return 0; 457 return 0;
458} 458}
459 459
460static int libertas_dev_close(struct net_device *dev) 460static int lbs_dev_close(struct net_device *dev)
461{ 461{
462 wlan_private *priv = dev->priv; 462 lbs_private *priv = dev->priv;
463 463
464 lbs_deb_enter(LBS_DEB_NET); 464 lbs_deb_enter(LBS_DEB_NET);
465 465
@@ -476,14 +476,14 @@ static int libertas_dev_close(struct net_device *dev)
476 * @param dev A pointer to net_device structure 476 * @param dev A pointer to net_device structure
477 * @return 0 477 * @return 0
478 */ 478 */
479static int libertas_mesh_close(struct net_device *dev) 479static int lbs_mesh_close(struct net_device *dev)
480{ 480{
481 wlan_private *priv = (wlan_private *) (dev->priv); 481 lbs_private *priv = (lbs_private *) (dev->priv);
482 482
483 priv->mesh_open = 0; 483 priv->mesh_open = 0;
484 netif_stop_queue(priv->mesh_dev); 484 netif_stop_queue(priv->mesh_dev);
485 if (priv->infra_open == 0) 485 if (priv->infra_open == 0)
486 return libertas_dev_close(dev); 486 return lbs_dev_close(dev);
487 else 487 else
488 return 0; 488 return 0;
489} 489}
@@ -494,23 +494,23 @@ static int libertas_mesh_close(struct net_device *dev)
494 * @param dev A pointer to net_device structure 494 * @param dev A pointer to net_device structure
495 * @return 0 495 * @return 0
496 */ 496 */
497static int libertas_close(struct net_device *dev) 497static int lbs_close(struct net_device *dev)
498{ 498{
499 wlan_private *priv = (wlan_private *) dev->priv; 499 lbs_private *priv = (lbs_private *) dev->priv;
500 500
501 netif_stop_queue(dev); 501 netif_stop_queue(dev);
502 priv->infra_open = 0; 502 priv->infra_open = 0;
503 if (priv->mesh_open == 0) 503 if (priv->mesh_open == 0)
504 return libertas_dev_close(dev); 504 return lbs_dev_close(dev);
505 else 505 else
506 return 0; 506 return 0;
507} 507}
508 508
509 509
510static int libertas_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) 510static int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
511{ 511{
512 int ret = 0; 512 int ret = 0;
513 wlan_private *priv = dev->priv; 513 lbs_private *priv = dev->priv;
514 514
515 lbs_deb_enter(LBS_DEB_NET); 515 lbs_deb_enter(LBS_DEB_NET);
516 516
@@ -523,7 +523,7 @@ static int libertas_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
523 if (priv->mesh_dev) 523 if (priv->mesh_dev)
524 netif_stop_queue(priv->mesh_dev); 524 netif_stop_queue(priv->mesh_dev);
525 525
526 if (libertas_process_tx(priv, skb) == 0) 526 if (lbs_process_tx(priv, skb) == 0)
527 dev->trans_start = jiffies; 527 dev->trans_start = jiffies;
528done: 528done:
529 lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret); 529 lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret);
@@ -531,54 +531,54 @@ done:
531} 531}
532 532
533/** 533/**
534 * @brief Mark mesh packets and handover them to libertas_hard_start_xmit 534 * @brief Mark mesh packets and handover them to lbs_hard_start_xmit
535 * 535 *
536 */ 536 */
537static int libertas_mesh_pre_start_xmit(struct sk_buff *skb, 537static int lbs_mesh_pre_start_xmit(struct sk_buff *skb,
538 struct net_device *dev) 538 struct net_device *dev)
539{ 539{
540 wlan_private *priv = dev->priv; 540 lbs_private *priv = dev->priv;
541 int ret; 541 int ret;
542 542
543 lbs_deb_enter(LBS_DEB_MESH); 543 lbs_deb_enter(LBS_DEB_MESH);
544 if(priv->adapter->monitormode != WLAN_MONITOR_OFF) { 544 if (priv->adapter->monitormode != LBS_MONITOR_OFF) {
545 netif_stop_queue(dev); 545 netif_stop_queue(dev);
546 return -EOPNOTSUPP; 546 return -EOPNOTSUPP;
547 } 547 }
548 548
549 SET_MESH_FRAME(skb); 549 SET_MESH_FRAME(skb);
550 550
551 ret = libertas_hard_start_xmit(skb, priv->dev); 551 ret = lbs_hard_start_xmit(skb, priv->dev);
552 lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret); 552 lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret);
553 return ret; 553 return ret;
554} 554}
555 555
556/** 556/**
557 * @brief Mark non-mesh packets and handover them to libertas_hard_start_xmit 557 * @brief Mark non-mesh packets and handover them to lbs_hard_start_xmit
558 * 558 *
559 */ 559 */
560static int libertas_pre_start_xmit(struct sk_buff *skb, struct net_device *dev) 560static int lbs_pre_start_xmit(struct sk_buff *skb, struct net_device *dev)
561{ 561{
562 wlan_private *priv = dev->priv; 562 lbs_private *priv = dev->priv;
563 int ret; 563 int ret;
564 564
565 lbs_deb_enter(LBS_DEB_NET); 565 lbs_deb_enter(LBS_DEB_NET);
566 566
567 if(priv->adapter->monitormode != WLAN_MONITOR_OFF) { 567 if (priv->adapter->monitormode != LBS_MONITOR_OFF) {
568 netif_stop_queue(dev); 568 netif_stop_queue(dev);
569 return -EOPNOTSUPP; 569 return -EOPNOTSUPP;
570 } 570 }
571 571
572 UNSET_MESH_FRAME(skb); 572 UNSET_MESH_FRAME(skb);
573 573
574 ret = libertas_hard_start_xmit(skb, dev); 574 ret = lbs_hard_start_xmit(skb, dev);
575 lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret); 575 lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret);
576 return ret; 576 return ret;
577} 577}
578 578
579static void libertas_tx_timeout(struct net_device *dev) 579static void lbs_tx_timeout(struct net_device *dev)
580{ 580{
581 wlan_private *priv = (wlan_private *) dev->priv; 581 lbs_private *priv = (lbs_private *) dev->priv;
582 582
583 lbs_deb_enter(LBS_DEB_TX); 583 lbs_deb_enter(LBS_DEB_TX);
584 584
@@ -588,14 +588,14 @@ static void libertas_tx_timeout(struct net_device *dev)
588 dev->trans_start = jiffies; 588 dev->trans_start = jiffies;
589 589
590 if (priv->adapter->currenttxskb) { 590 if (priv->adapter->currenttxskb) {
591 if (priv->adapter->monitormode != WLAN_MONITOR_OFF) { 591 if (priv->adapter->monitormode != LBS_MONITOR_OFF) {
592 /* If we are here, we have not received feedback from 592 /* If we are here, we have not received feedback from
593 the previous packet. Assume TX_FAIL and move on. */ 593 the previous packet. Assume TX_FAIL and move on. */
594 priv->adapter->eventcause = 0x01000000; 594 priv->adapter->eventcause = 0x01000000;
595 libertas_send_tx_feedback(priv); 595 lbs_send_tx_feedback(priv);
596 } else 596 } else
597 wake_up_interruptible(&priv->waitq); 597 wake_up_interruptible(&priv->waitq);
598 } else if (priv->adapter->connect_status == LIBERTAS_CONNECTED) { 598 } else if (priv->adapter->connect_status == LBS_CONNECTED) {
599 netif_wake_queue(priv->dev); 599 netif_wake_queue(priv->dev);
600 if (priv->mesh_dev) 600 if (priv->mesh_dev)
601 netif_wake_queue(priv->mesh_dev); 601 netif_wake_queue(priv->mesh_dev);
@@ -607,21 +607,21 @@ static void libertas_tx_timeout(struct net_device *dev)
607/** 607/**
608 * @brief This function returns the network statistics 608 * @brief This function returns the network statistics
609 * 609 *
610 * @param dev A pointer to wlan_private structure 610 * @param dev A pointer to lbs_private structure
611 * @return A pointer to net_device_stats structure 611 * @return A pointer to net_device_stats structure
612 */ 612 */
613static struct net_device_stats *libertas_get_stats(struct net_device *dev) 613static struct net_device_stats *lbs_get_stats(struct net_device *dev)
614{ 614{
615 wlan_private *priv = (wlan_private *) dev->priv; 615 lbs_private *priv = (lbs_private *) dev->priv;
616 616
617 return &priv->stats; 617 return &priv->stats;
618} 618}
619 619
620static int libertas_set_mac_address(struct net_device *dev, void *addr) 620static int lbs_set_mac_address(struct net_device *dev, void *addr)
621{ 621{
622 int ret = 0; 622 int ret = 0;
623 wlan_private *priv = (wlan_private *) dev->priv; 623 lbs_private *priv = (lbs_private *) dev->priv;
624 wlan_adapter *adapter = priv->adapter; 624 lbs_adapter *adapter = priv->adapter;
625 struct sockaddr *phwaddr = addr; 625 struct sockaddr *phwaddr = addr;
626 626
627 lbs_deb_enter(LBS_DEB_NET); 627 lbs_deb_enter(LBS_DEB_NET);
@@ -637,7 +637,7 @@ static int libertas_set_mac_address(struct net_device *dev, void *addr)
637 lbs_deb_hex(LBS_DEB_NET, "addr", phwaddr->sa_data, ETH_ALEN); 637 lbs_deb_hex(LBS_DEB_NET, "addr", phwaddr->sa_data, ETH_ALEN);
638 memcpy(adapter->current_addr, phwaddr->sa_data, ETH_ALEN); 638 memcpy(adapter->current_addr, phwaddr->sa_data, ETH_ALEN);
639 639
640 ret = libertas_prepare_and_send_command(priv, CMD_802_11_MAC_ADDRESS, 640 ret = lbs_prepare_and_send_command(priv, CMD_802_11_MAC_ADDRESS,
641 CMD_ACT_SET, 641 CMD_ACT_SET,
642 CMD_OPTION_WAITFORRSP, 0, NULL); 642 CMD_OPTION_WAITFORRSP, 0, NULL);
643 643
@@ -657,7 +657,7 @@ done:
657 return ret; 657 return ret;
658} 658}
659 659
660static int libertas_copy_multicast_address(wlan_adapter * adapter, 660static int lbs_copy_multicast_address(lbs_adapter *adapter,
661 struct net_device *dev) 661 struct net_device *dev)
662{ 662{
663 int i = 0; 663 int i = 0;
@@ -672,10 +672,10 @@ static int libertas_copy_multicast_address(wlan_adapter * adapter,
672 672
673} 673}
674 674
675static void libertas_set_multicast_list(struct net_device *dev) 675static void lbs_set_multicast_list(struct net_device *dev)
676{ 676{
677 wlan_private *priv = dev->priv; 677 lbs_private *priv = dev->priv;
678 wlan_adapter *adapter = priv->adapter; 678 lbs_adapter *adapter = priv->adapter;
679 int oldpacketfilter; 679 int oldpacketfilter;
680 DECLARE_MAC_BUF(mac); 680 DECLARE_MAC_BUF(mac);
681 681
@@ -718,7 +718,7 @@ static void libertas_set_multicast_list(struct net_device *dev)
718 CMD_ACT_MAC_MULTICAST_ENABLE; 718 CMD_ACT_MAC_MULTICAST_ENABLE;
719 719
720 adapter->nr_of_multicastmacaddr = 720 adapter->nr_of_multicastmacaddr =
721 libertas_copy_multicast_address(adapter, dev); 721 lbs_copy_multicast_address(adapter, dev);
722 722
723 lbs_deb_net("multicast addresses: %d\n", 723 lbs_deb_net("multicast addresses: %d\n",
724 dev->mc_count); 724 dev->mc_count);
@@ -729,7 +729,7 @@ static void libertas_set_multicast_list(struct net_device *dev)
729 adapter->multicastlist[i])); 729 adapter->multicastlist[i]));
730 } 730 }
731 /* send multicast addresses to firmware */ 731 /* send multicast addresses to firmware */
732 libertas_prepare_and_send_command(priv, 732 lbs_prepare_and_send_command(priv,
733 CMD_MAC_MULTICAST_ADR, 733 CMD_MAC_MULTICAST_ADR,
734 CMD_ACT_SET, 0, 0, 734 CMD_ACT_SET, 0, 0,
735 NULL); 735 NULL);
@@ -738,25 +738,25 @@ static void libertas_set_multicast_list(struct net_device *dev)
738 } 738 }
739 739
740 if (adapter->currentpacketfilter != oldpacketfilter) { 740 if (adapter->currentpacketfilter != oldpacketfilter) {
741 libertas_set_mac_packet_filter(priv); 741 lbs_set_mac_packet_filter(priv);
742 } 742 }
743 743
744 lbs_deb_leave(LBS_DEB_NET); 744 lbs_deb_leave(LBS_DEB_NET);
745} 745}
746 746
747/** 747/**
748 * @brief This function handles the major jobs in the WLAN driver. 748 * @brief This function handles the major jobs in the LBS driver.
749 * It handles all events generated by firmware, RX data received 749 * It handles all events generated by firmware, RX data received
750 * from firmware and TX data sent from kernel. 750 * from firmware and TX data sent from kernel.
751 * 751 *
752 * @param data A pointer to wlan_thread structure 752 * @param data A pointer to lbs_thread structure
753 * @return 0 753 * @return 0
754 */ 754 */
755static int libertas_thread(void *data) 755static int lbs_thread(void *data)
756{ 756{
757 struct net_device *dev = data; 757 struct net_device *dev = data;
758 wlan_private *priv = dev->priv; 758 lbs_private *priv = dev->priv;
759 wlan_adapter *adapter = priv->adapter; 759 lbs_adapter *adapter = priv->adapter;
760 wait_queue_t wait; 760 wait_queue_t wait;
761 u8 ireg = 0; 761 u8 ireg = 0;
762 762
@@ -836,7 +836,7 @@ static int libertas_thread(void *data)
836 836
837 adapter->hisregcpy &= ~MRVDRV_CMD_UPLD_RDY; 837 adapter->hisregcpy &= ~MRVDRV_CMD_UPLD_RDY;
838 spin_unlock_irq(&adapter->driver_lock); 838 spin_unlock_irq(&adapter->driver_lock);
839 libertas_process_rx_command(priv); 839 lbs_process_rx_command(priv);
840 spin_lock_irq(&adapter->driver_lock); 840 spin_lock_irq(&adapter->driver_lock);
841 } 841 }
842 842
@@ -853,7 +853,7 @@ static int libertas_thread(void *data)
853 continue; 853 continue;
854 } 854 }
855 spin_unlock_irq(&adapter->driver_lock); 855 spin_unlock_irq(&adapter->driver_lock);
856 libertas_process_event(priv); 856 lbs_process_event(priv);
857 } else 857 } else
858 spin_unlock_irq(&adapter->driver_lock); 858 spin_unlock_irq(&adapter->driver_lock);
859 859
@@ -861,7 +861,7 @@ static int libertas_thread(void *data)
861 if (adapter->psstate == PS_STATE_PRE_SLEEP) { 861 if (adapter->psstate == PS_STATE_PRE_SLEEP) {
862 if (!priv->dnld_sent && !adapter->cur_cmd) { 862 if (!priv->dnld_sent && !adapter->cur_cmd) {
863 if (adapter->connect_status == 863 if (adapter->connect_status ==
864 LIBERTAS_CONNECTED) { 864 LBS_CONNECTED) {
865 lbs_deb_thread( 865 lbs_deb_thread(
866 "main_thread: PRE_SLEEP--intcounter=%d currenttxskb=%p " 866 "main_thread: PRE_SLEEP--intcounter=%d currenttxskb=%p "
867 "dnld_sent=%d cur_cmd=%p, confirm now\n", 867 "dnld_sent=%d cur_cmd=%p, confirm now\n",
@@ -870,7 +870,7 @@ static int libertas_thread(void *data)
870 priv->dnld_sent, 870 priv->dnld_sent,
871 adapter->cur_cmd); 871 adapter->cur_cmd);
872 872
873 libertas_ps_confirm_sleep(priv, 873 lbs_ps_confirm_sleep(priv,
874 (u16) adapter->psmode); 874 (u16) adapter->psmode);
875 } else { 875 } else {
876 /* workaround for firmware sending 876 /* workaround for firmware sending
@@ -894,15 +894,15 @@ static int libertas_thread(void *data)
894 894
895 /* Execute the next command */ 895 /* Execute the next command */
896 if (!priv->dnld_sent && !priv->adapter->cur_cmd) 896 if (!priv->dnld_sent && !priv->adapter->cur_cmd)
897 libertas_execute_next_command(priv); 897 lbs_execute_next_command(priv);
898 898
899 /* Wake-up command waiters which can't sleep in 899 /* Wake-up command waiters which can't sleep in
900 * libertas_prepare_and_send_command 900 * lbs_prepare_and_send_command
901 */ 901 */
902 if (!adapter->nr_cmd_pending) 902 if (!adapter->nr_cmd_pending)
903 wake_up_all(&adapter->cmd_pending); 903 wake_up_all(&adapter->cmd_pending);
904 904
905 libertas_tx_runqueue(priv); 905 lbs_tx_runqueue(priv);
906 } 906 }
907 907
908 del_timer(&adapter->command_timer); 908 del_timer(&adapter->command_timer);
@@ -918,13 +918,13 @@ static int libertas_thread(void *data)
918 * HW spec from firmware and set basic parameters to 918 * HW spec from firmware and set basic parameters to
919 * firmware. 919 * firmware.
920 * 920 *
921 * @param priv A pointer to wlan_private structure 921 * @param priv A pointer to lbs_private structure
922 * @return 0 or -1 922 * @return 0 or -1
923 */ 923 */
924static int wlan_setup_firmware(wlan_private * priv) 924static int lbs_setup_firmware(lbs_private *priv)
925{ 925{
926 int ret = -1; 926 int ret = -1;
927 wlan_adapter *adapter = priv->adapter; 927 lbs_adapter *adapter = priv->adapter;
928 struct cmd_ds_mesh_access mesh_access; 928 struct cmd_ds_mesh_access mesh_access;
929 929
930 lbs_deb_enter(LBS_DEB_FW); 930 lbs_deb_enter(LBS_DEB_FW);
@@ -934,7 +934,7 @@ static int wlan_setup_firmware(wlan_private * priv)
934 */ 934 */
935 memset(adapter->current_addr, 0xff, ETH_ALEN); 935 memset(adapter->current_addr, 0xff, ETH_ALEN);
936 936
937 ret = libertas_prepare_and_send_command(priv, CMD_GET_HW_SPEC, 937 ret = lbs_prepare_and_send_command(priv, CMD_GET_HW_SPEC,
938 0, CMD_OPTION_WAITFORRSP, 0, NULL); 938 0, CMD_OPTION_WAITFORRSP, 0, NULL);
939 939
940 if (ret) { 940 if (ret) {
@@ -942,10 +942,10 @@ static int wlan_setup_firmware(wlan_private * priv)
942 goto done; 942 goto done;
943 } 943 }
944 944
945 libertas_set_mac_packet_filter(priv); 945 lbs_set_mac_packet_filter(priv);
946 946
947 /* Get the supported Data rates */ 947 /* Get the supported Data rates */
948 ret = libertas_prepare_and_send_command(priv, CMD_802_11_DATA_RATE, 948 ret = lbs_prepare_and_send_command(priv, CMD_802_11_DATA_RATE,
949 CMD_ACT_GET_TX_RATE, 949 CMD_ACT_GET_TX_RATE,
950 CMD_OPTION_WAITFORRSP, 0, NULL); 950 CMD_OPTION_WAITFORRSP, 0, NULL);
951 951
@@ -958,7 +958,7 @@ static int wlan_setup_firmware(wlan_private * priv)
958 if (priv->mesh_dev) { 958 if (priv->mesh_dev) {
959 memset(&mesh_access, 0, sizeof(mesh_access)); 959 memset(&mesh_access, 0, sizeof(mesh_access));
960 mesh_access.data[0] = cpu_to_le32(0); 960 mesh_access.data[0] = cpu_to_le32(0);
961 ret = libertas_prepare_and_send_command(priv, 961 ret = lbs_prepare_and_send_command(priv,
962 CMD_MESH_ACCESS, 962 CMD_MESH_ACCESS,
963 CMD_ACT_MESH_SET_AUTOSTART_ENABLED, 963 CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
964 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access); 964 CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
@@ -970,7 +970,7 @@ static int wlan_setup_firmware(wlan_private * priv)
970 } 970 }
971 971
972 /* Set the boot2 version in firmware */ 972 /* Set the boot2 version in firmware */
973 ret = libertas_prepare_and_send_command(priv, CMD_SET_BOOT2_VER, 973 ret = lbs_prepare_and_send_command(priv, CMD_SET_BOOT2_VER,
974 0, CMD_OPTION_WAITFORRSP, 0, NULL); 974 0, CMD_OPTION_WAITFORRSP, 0, NULL);
975 975
976 ret = 0; 976 ret = 0;
@@ -985,8 +985,8 @@ done:
985 */ 985 */
986static void command_timer_fn(unsigned long data) 986static void command_timer_fn(unsigned long data)
987{ 987{
988 wlan_private *priv = (wlan_private *)data; 988 lbs_private *priv = (lbs_private *)data;
989 wlan_adapter *adapter = priv->adapter; 989 lbs_adapter *adapter = priv->adapter;
990 struct cmd_ctrl_node *ptempnode; 990 struct cmd_ctrl_node *ptempnode;
991 struct cmd_ds_command *cmd; 991 struct cmd_ds_command *cmd;
992 unsigned long flags; 992 unsigned long flags;
@@ -1013,16 +1013,16 @@ static void command_timer_fn(unsigned long data)
1013 spin_unlock_irqrestore(&adapter->driver_lock, flags); 1013 spin_unlock_irqrestore(&adapter->driver_lock, flags);
1014 1014
1015 lbs_deb_fw("re-sending same command because of timeout\n"); 1015 lbs_deb_fw("re-sending same command because of timeout\n");
1016 libertas_queue_cmd(adapter, ptempnode, 0); 1016 lbs_queue_cmd(adapter, ptempnode, 0);
1017 1017
1018 wake_up_interruptible(&priv->waitq); 1018 wake_up_interruptible(&priv->waitq);
1019 1019
1020 return; 1020 return;
1021} 1021}
1022 1022
1023static int libertas_init_adapter(wlan_private * priv) 1023static int lbs_init_adapter(lbs_private *priv)
1024{ 1024{
1025 wlan_adapter *adapter = priv->adapter; 1025 lbs_adapter *adapter = priv->adapter;
1026 size_t bufsize; 1026 size_t bufsize;
1027 int i, ret = 0; 1027 int i, ret = 0;
1028 1028
@@ -1043,17 +1043,17 @@ static int libertas_init_adapter(wlan_private * priv)
1043 &adapter->network_free_list); 1043 &adapter->network_free_list);
1044 } 1044 }
1045 1045
1046 adapter->libertas_ps_confirm_sleep.seqnum = cpu_to_le16(++adapter->seqnum); 1046 adapter->lbs_ps_confirm_sleep.seqnum = cpu_to_le16(++adapter->seqnum);
1047 adapter->libertas_ps_confirm_sleep.command = 1047 adapter->lbs_ps_confirm_sleep.command =
1048 cpu_to_le16(CMD_802_11_PS_MODE); 1048 cpu_to_le16(CMD_802_11_PS_MODE);
1049 adapter->libertas_ps_confirm_sleep.size = 1049 adapter->lbs_ps_confirm_sleep.size =
1050 cpu_to_le16(sizeof(struct PS_CMD_ConfirmSleep)); 1050 cpu_to_le16(sizeof(struct PS_CMD_ConfirmSleep));
1051 adapter->libertas_ps_confirm_sleep.action = 1051 adapter->lbs_ps_confirm_sleep.action =
1052 cpu_to_le16(CMD_SUBCMD_SLEEP_CONFIRMED); 1052 cpu_to_le16(CMD_SUBCMD_SLEEP_CONFIRMED);
1053 1053
1054 memset(adapter->current_addr, 0xff, ETH_ALEN); 1054 memset(adapter->current_addr, 0xff, ETH_ALEN);
1055 1055
1056 adapter->connect_status = LIBERTAS_DISCONNECTED; 1056 adapter->connect_status = LBS_DISCONNECTED;
1057 adapter->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; 1057 adapter->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
1058 adapter->mode = IW_MODE_INFRA; 1058 adapter->mode = IW_MODE_INFRA;
1059 adapter->curbssparams.channel = DEFAULT_AD_HOC_CHANNEL; 1059 adapter->curbssparams.channel = DEFAULT_AD_HOC_CHANNEL;
@@ -1061,7 +1061,7 @@ static int libertas_init_adapter(wlan_private * priv)
1061 adapter->radioon = RADIO_ON; 1061 adapter->radioon = RADIO_ON;
1062 adapter->auto_rate = 1; 1062 adapter->auto_rate = 1;
1063 adapter->capability = WLAN_CAPABILITY_SHORT_PREAMBLE; 1063 adapter->capability = WLAN_CAPABILITY_SHORT_PREAMBLE;
1064 adapter->psmode = WLAN802_11POWERMODECAM; 1064 adapter->psmode = LBS802_11POWERMODECAM;
1065 adapter->psstate = PS_STATE_FULL_POWER; 1065 adapter->psstate = PS_STATE_FULL_POWER;
1066 1066
1067 mutex_init(&adapter->lock); 1067 mutex_init(&adapter->lock);
@@ -1081,7 +1081,7 @@ static int libertas_init_adapter(wlan_private * priv)
1081 adapter->nr_cmd_pending = 0; 1081 adapter->nr_cmd_pending = 0;
1082 1082
1083 /* Allocate the command buffers */ 1083 /* Allocate the command buffers */
1084 if (libertas_allocate_cmd_buffer(priv)) { 1084 if (lbs_allocate_cmd_buffer(priv)) {
1085 lbs_pr_err("Out of memory allocating command buffers\n"); 1085 lbs_pr_err("Out of memory allocating command buffers\n");
1086 ret = -1; 1086 ret = -1;
1087 } 1087 }
@@ -1090,9 +1090,9 @@ out:
1090 return ret; 1090 return ret;
1091} 1091}
1092 1092
1093static void libertas_free_adapter(wlan_private * priv) 1093static void lbs_free_adapter(lbs_private *priv)
1094{ 1094{
1095 wlan_adapter *adapter = priv->adapter; 1095 lbs_adapter *adapter = priv->adapter;
1096 1096
1097 if (!adapter) { 1097 if (!adapter) {
1098 lbs_deb_fw("why double free adapter?\n"); 1098 lbs_deb_fw("why double free adapter?\n");
@@ -1100,7 +1100,7 @@ static void libertas_free_adapter(wlan_private * priv)
1100 } 1100 }
1101 1101
1102 lbs_deb_fw("free command buffer\n"); 1102 lbs_deb_fw("free command buffer\n");
1103 libertas_free_cmd_buffer(priv); 1103 lbs_free_cmd_buffer(priv);
1104 1104
1105 lbs_deb_fw("free command_timer\n"); 1105 lbs_deb_fw("free command_timer\n");
1106 del_timer(&adapter->command_timer); 1106 del_timer(&adapter->command_timer);
@@ -1117,32 +1117,32 @@ static void libertas_free_adapter(wlan_private * priv)
1117 1117
1118/** 1118/**
1119 * @brief This function adds the card. it will probe the 1119 * @brief This function adds the card. it will probe the
1120 * card, allocate the wlan_priv and initialize the device. 1120 * card, allocate the lbs_priv and initialize the device.
1121 * 1121 *
1122 * @param card A pointer to card 1122 * @param card A pointer to card
1123 * @return A pointer to wlan_private structure 1123 * @return A pointer to lbs_private structure
1124 */ 1124 */
1125wlan_private *libertas_add_card(void *card, struct device *dmdev) 1125lbs_private *lbs_add_card(void *card, struct device *dmdev)
1126{ 1126{
1127 struct net_device *dev = NULL; 1127 struct net_device *dev = NULL;
1128 wlan_private *priv = NULL; 1128 lbs_private *priv = NULL;
1129 1129
1130 lbs_deb_enter(LBS_DEB_NET); 1130 lbs_deb_enter(LBS_DEB_NET);
1131 1131
1132 /* Allocate an Ethernet device and register it */ 1132 /* Allocate an Ethernet device and register it */
1133 if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { 1133 if (!(dev = alloc_etherdev(sizeof(lbs_private)))) {
1134 lbs_pr_err("init ethX device failed\n"); 1134 lbs_pr_err("init ethX device failed\n");
1135 goto done; 1135 goto done;
1136 } 1136 }
1137 priv = dev->priv; 1137 priv = dev->priv;
1138 1138
1139 /* allocate buffer for wlan_adapter */ 1139 /* allocate buffer for lbs_adapter */
1140 if (!(priv->adapter = kzalloc(sizeof(wlan_adapter), GFP_KERNEL))) { 1140 if (!(priv->adapter = kzalloc(sizeof(lbs_adapter), GFP_KERNEL))) {
1141 lbs_pr_err("allocate buffer for wlan_adapter failed\n"); 1141 lbs_pr_err("allocate buffer for lbs_adapter failed\n");
1142 goto err_kzalloc; 1142 goto err_kzalloc;
1143 } 1143 }
1144 1144
1145 if (libertas_init_adapter(priv)) { 1145 if (lbs_init_adapter(priv)) {
1146 lbs_pr_err("failed to initialize adapter structure.\n"); 1146 lbs_pr_err("failed to initialize adapter structure.\n");
1147 goto err_init_adapter; 1147 goto err_init_adapter;
1148 } 1148 }
@@ -1154,46 +1154,46 @@ wlan_private *libertas_add_card(void *card, struct device *dmdev)
1154 priv->hotplug_device = dmdev; 1154 priv->hotplug_device = dmdev;
1155 1155
1156 /* Setup the OS Interface to our functions */ 1156 /* Setup the OS Interface to our functions */
1157 dev->open = libertas_open; 1157 dev->open = lbs_open;
1158 dev->hard_start_xmit = libertas_pre_start_xmit; 1158 dev->hard_start_xmit = lbs_pre_start_xmit;
1159 dev->stop = libertas_close; 1159 dev->stop = lbs_close;
1160 dev->set_mac_address = libertas_set_mac_address; 1160 dev->set_mac_address = lbs_set_mac_address;
1161 dev->tx_timeout = libertas_tx_timeout; 1161 dev->tx_timeout = lbs_tx_timeout;
1162 dev->get_stats = libertas_get_stats; 1162 dev->get_stats = lbs_get_stats;
1163 dev->watchdog_timeo = 5 * HZ; 1163 dev->watchdog_timeo = 5 * HZ;
1164 dev->ethtool_ops = &libertas_ethtool_ops; 1164 dev->ethtool_ops = &lbs_ethtool_ops;
1165#ifdef WIRELESS_EXT 1165#ifdef WIRELESS_EXT
1166 dev->wireless_handlers = (struct iw_handler_def *)&libertas_handler_def; 1166 dev->wireless_handlers = (struct iw_handler_def *)&lbs_handler_def;
1167#endif 1167#endif
1168 dev->flags |= IFF_BROADCAST | IFF_MULTICAST; 1168 dev->flags |= IFF_BROADCAST | IFF_MULTICAST;
1169 dev->set_multicast_list = libertas_set_multicast_list; 1169 dev->set_multicast_list = lbs_set_multicast_list;
1170 1170
1171 SET_NETDEV_DEV(dev, dmdev); 1171 SET_NETDEV_DEV(dev, dmdev);
1172 1172
1173 priv->rtap_net_dev = NULL; 1173 priv->rtap_net_dev = NULL;
1174 if (device_create_file(dmdev, &dev_attr_libertas_rtap)) 1174 if (device_create_file(dmdev, &dev_attr_lbs_rtap))
1175 goto err_init_adapter; 1175 goto err_init_adapter;
1176 1176
1177 lbs_deb_thread("Starting main thread...\n"); 1177 lbs_deb_thread("Starting main thread...\n");
1178 init_waitqueue_head(&priv->waitq); 1178 init_waitqueue_head(&priv->waitq);
1179 priv->main_thread = kthread_run(libertas_thread, dev, "libertas_main"); 1179 priv->main_thread = kthread_run(lbs_thread, dev, "lbs_main");
1180 if (IS_ERR(priv->main_thread)) { 1180 if (IS_ERR(priv->main_thread)) {
1181 lbs_deb_thread("Error creating main thread.\n"); 1181 lbs_deb_thread("Error creating main thread.\n");
1182 goto err_kthread_run; 1182 goto err_kthread_run;
1183 } 1183 }
1184 1184
1185 priv->work_thread = create_singlethread_workqueue("libertas_worker"); 1185 priv->work_thread = create_singlethread_workqueue("lbs_worker");
1186 INIT_DELAYED_WORK(&priv->assoc_work, libertas_association_worker); 1186 INIT_DELAYED_WORK(&priv->assoc_work, lbs_association_worker);
1187 INIT_DELAYED_WORK(&priv->scan_work, libertas_scan_worker); 1187 INIT_DELAYED_WORK(&priv->scan_work, lbs_scan_worker);
1188 INIT_WORK(&priv->sync_channel, libertas_sync_channel); 1188 INIT_WORK(&priv->sync_channel, lbs_sync_channel);
1189 1189
1190 goto done; 1190 goto done;
1191 1191
1192err_kthread_run: 1192err_kthread_run:
1193 device_remove_file(dmdev, &dev_attr_libertas_rtap); 1193 device_remove_file(dmdev, &dev_attr_lbs_rtap);
1194 1194
1195err_init_adapter: 1195err_init_adapter:
1196 libertas_free_adapter(priv); 1196 lbs_free_adapter(priv);
1197 1197
1198err_kzalloc: 1198err_kzalloc:
1199 free_netdev(dev); 1199 free_netdev(dev);
@@ -1203,29 +1203,29 @@ done:
1203 lbs_deb_leave_args(LBS_DEB_NET, "priv %p", priv); 1203 lbs_deb_leave_args(LBS_DEB_NET, "priv %p", priv);
1204 return priv; 1204 return priv;
1205} 1205}
1206EXPORT_SYMBOL_GPL(libertas_add_card); 1206EXPORT_SYMBOL_GPL(lbs_add_card);
1207 1207
1208 1208
1209int libertas_remove_card(wlan_private *priv) 1209int lbs_remove_card(lbs_private *priv)
1210{ 1210{
1211 wlan_adapter *adapter = priv->adapter; 1211 lbs_adapter *adapter = priv->adapter;
1212 struct net_device *dev = priv->dev; 1212 struct net_device *dev = priv->dev;
1213 union iwreq_data wrqu; 1213 union iwreq_data wrqu;
1214 1214
1215 lbs_deb_enter(LBS_DEB_MAIN); 1215 lbs_deb_enter(LBS_DEB_MAIN);
1216 1216
1217 libertas_remove_rtap(priv); 1217 lbs_remove_rtap(priv);
1218 1218
1219 dev = priv->dev; 1219 dev = priv->dev;
1220 device_remove_file(priv->hotplug_device, &dev_attr_libertas_rtap); 1220 device_remove_file(priv->hotplug_device, &dev_attr_lbs_rtap);
1221 1221
1222 cancel_delayed_work(&priv->scan_work); 1222 cancel_delayed_work(&priv->scan_work);
1223 cancel_delayed_work(&priv->assoc_work); 1223 cancel_delayed_work(&priv->assoc_work);
1224 destroy_workqueue(priv->work_thread); 1224 destroy_workqueue(priv->work_thread);
1225 1225
1226 if (adapter->psmode == WLAN802_11POWERMODEMAX_PSP) { 1226 if (adapter->psmode == LBS802_11POWERMODEMAX_PSP) {
1227 adapter->psmode = WLAN802_11POWERMODECAM; 1227 adapter->psmode = LBS802_11POWERMODECAM;
1228 libertas_ps_wakeup(priv, CMD_OPTION_WAITFORRSP); 1228 lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
1229 } 1229 }
1230 1230
1231 memset(wrqu.ap_addr.sa_data, 0xaa, ETH_ALEN); 1231 memset(wrqu.ap_addr.sa_data, 0xaa, ETH_ALEN);
@@ -1236,7 +1236,7 @@ int libertas_remove_card(wlan_private *priv)
1236 adapter->surpriseremoved = 1; 1236 adapter->surpriseremoved = 1;
1237 kthread_stop(priv->main_thread); 1237 kthread_stop(priv->main_thread);
1238 1238
1239 libertas_free_adapter(priv); 1239 lbs_free_adapter(priv);
1240 1240
1241 priv->dev = NULL; 1241 priv->dev = NULL;
1242 free_netdev(dev); 1242 free_netdev(dev);
@@ -1244,10 +1244,10 @@ int libertas_remove_card(wlan_private *priv)
1244 lbs_deb_leave(LBS_DEB_MAIN); 1244 lbs_deb_leave(LBS_DEB_MAIN);
1245 return 0; 1245 return 0;
1246} 1246}
1247EXPORT_SYMBOL_GPL(libertas_remove_card); 1247EXPORT_SYMBOL_GPL(lbs_remove_card);
1248 1248
1249 1249
1250int libertas_start_card(wlan_private *priv) 1250int lbs_start_card(lbs_private *priv)
1251{ 1251{
1252 struct net_device *dev = priv->dev; 1252 struct net_device *dev = priv->dev;
1253 int ret = -1; 1253 int ret = -1;
@@ -1255,19 +1255,19 @@ int libertas_start_card(wlan_private *priv)
1255 lbs_deb_enter(LBS_DEB_MAIN); 1255 lbs_deb_enter(LBS_DEB_MAIN);
1256 1256
1257 /* poke the firmware */ 1257 /* poke the firmware */
1258 ret = wlan_setup_firmware(priv); 1258 ret = lbs_setup_firmware(priv);
1259 if (ret) 1259 if (ret)
1260 goto done; 1260 goto done;
1261 1261
1262 /* init 802.11d */ 1262 /* init 802.11d */
1263 libertas_init_11d(priv); 1263 lbs_init_11d(priv);
1264 1264
1265 if (register_netdev(dev)) { 1265 if (register_netdev(dev)) {
1266 lbs_pr_err("cannot register ethX device\n"); 1266 lbs_pr_err("cannot register ethX device\n");
1267 goto done; 1267 goto done;
1268 } 1268 }
1269 1269
1270 libertas_debugfs_init_one(priv, dev); 1270 lbs_debugfs_init_one(priv, dev);
1271 1271
1272 lbs_pr_info("%s: Marvell WLAN 802.11 adapter\n", dev->name); 1272 lbs_pr_info("%s: Marvell WLAN 802.11 adapter\n", dev->name);
1273 1273
@@ -1277,10 +1277,10 @@ done:
1277 lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret); 1277 lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret);
1278 return ret; 1278 return ret;
1279} 1279}
1280EXPORT_SYMBOL_GPL(libertas_start_card); 1280EXPORT_SYMBOL_GPL(lbs_start_card);
1281 1281
1282 1282
1283int libertas_stop_card(wlan_private *priv) 1283int lbs_stop_card(lbs_private *priv)
1284{ 1284{
1285 struct net_device *dev = priv->dev; 1285 struct net_device *dev = priv->dev;
1286 int ret = -1; 1286 int ret = -1;
@@ -1292,7 +1292,7 @@ int libertas_stop_card(wlan_private *priv)
1292 netif_stop_queue(priv->dev); 1292 netif_stop_queue(priv->dev);
1293 netif_carrier_off(priv->dev); 1293 netif_carrier_off(priv->dev);
1294 1294
1295 libertas_debugfs_remove_one(priv); 1295 lbs_debugfs_remove_one(priv);
1296 1296
1297 /* Flush pending command nodes */ 1297 /* Flush pending command nodes */
1298 spin_lock_irqsave(&priv->adapter->driver_lock, flags); 1298 spin_lock_irqsave(&priv->adapter->driver_lock, flags);
@@ -1307,16 +1307,16 @@ int libertas_stop_card(wlan_private *priv)
1307 lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret); 1307 lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret);
1308 return ret; 1308 return ret;
1309} 1309}
1310EXPORT_SYMBOL_GPL(libertas_stop_card); 1310EXPORT_SYMBOL_GPL(lbs_stop_card);
1311 1311
1312 1312
1313/** 1313/**
1314 * @brief This function adds mshX interface 1314 * @brief This function adds mshX interface
1315 * 1315 *
1316 * @param priv A pointer to the wlan_private structure 1316 * @param priv A pointer to the lbs_private structure
1317 * @return 0 if successful, -X otherwise 1317 * @return 0 if successful, -X otherwise
1318 */ 1318 */
1319int libertas_add_mesh(wlan_private *priv, struct device *dev) 1319int lbs_add_mesh(lbs_private *priv, struct device *dev)
1320{ 1320{
1321 struct net_device *mesh_dev = NULL; 1321 struct net_device *mesh_dev = NULL;
1322 int ret = 0; 1322 int ret = 0;
@@ -1332,12 +1332,12 @@ int libertas_add_mesh(wlan_private *priv, struct device *dev)
1332 mesh_dev->priv = priv; 1332 mesh_dev->priv = priv;
1333 priv->mesh_dev = mesh_dev; 1333 priv->mesh_dev = mesh_dev;
1334 1334
1335 mesh_dev->open = libertas_mesh_open; 1335 mesh_dev->open = lbs_mesh_open;
1336 mesh_dev->hard_start_xmit = libertas_mesh_pre_start_xmit; 1336 mesh_dev->hard_start_xmit = lbs_mesh_pre_start_xmit;
1337 mesh_dev->stop = libertas_mesh_close; 1337 mesh_dev->stop = lbs_mesh_close;
1338 mesh_dev->get_stats = libertas_get_stats; 1338 mesh_dev->get_stats = lbs_get_stats;
1339 mesh_dev->set_mac_address = libertas_set_mac_address; 1339 mesh_dev->set_mac_address = lbs_set_mac_address;
1340 mesh_dev->ethtool_ops = &libertas_ethtool_ops; 1340 mesh_dev->ethtool_ops = &lbs_ethtool_ops;
1341 memcpy(mesh_dev->dev_addr, priv->dev->dev_addr, 1341 memcpy(mesh_dev->dev_addr, priv->dev->dev_addr,
1342 sizeof(priv->dev->dev_addr)); 1342 sizeof(priv->dev->dev_addr));
1343 1343
@@ -1353,7 +1353,7 @@ int libertas_add_mesh(wlan_private *priv, struct device *dev)
1353 goto err_free; 1353 goto err_free;
1354 } 1354 }
1355 1355
1356 ret = sysfs_create_group(&(mesh_dev->dev.kobj), &libertas_mesh_attr_group); 1356 ret = sysfs_create_group(&(mesh_dev->dev.kobj), &lbs_mesh_attr_group);
1357 if (ret) 1357 if (ret)
1358 goto err_unregister; 1358 goto err_unregister;
1359 1359
@@ -1371,10 +1371,10 @@ done:
1371 lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret); 1371 lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret);
1372 return ret; 1372 return ret;
1373} 1373}
1374EXPORT_SYMBOL_GPL(libertas_add_mesh); 1374EXPORT_SYMBOL_GPL(lbs_add_mesh);
1375 1375
1376 1376
1377void libertas_remove_mesh(wlan_private *priv) 1377void lbs_remove_mesh(lbs_private *priv)
1378{ 1378{
1379 struct net_device *mesh_dev; 1379 struct net_device *mesh_dev;
1380 1380
@@ -1388,7 +1388,7 @@ void libertas_remove_mesh(wlan_private *priv)
1388 netif_stop_queue(mesh_dev); 1388 netif_stop_queue(mesh_dev);
1389 netif_carrier_off(priv->mesh_dev); 1389 netif_carrier_off(priv->mesh_dev);
1390 1390
1391 sysfs_remove_group(&(mesh_dev->dev.kobj), &libertas_mesh_attr_group); 1391 sysfs_remove_group(&(mesh_dev->dev.kobj), &lbs_mesh_attr_group);
1392 unregister_netdev(mesh_dev); 1392 unregister_netdev(mesh_dev);
1393 1393
1394 priv->mesh_dev = NULL ; 1394 priv->mesh_dev = NULL ;
@@ -1397,7 +1397,7 @@ void libertas_remove_mesh(wlan_private *priv)
1397out: 1397out:
1398 lbs_deb_leave(LBS_DEB_MAIN); 1398 lbs_deb_leave(LBS_DEB_MAIN);
1399} 1399}
1400EXPORT_SYMBOL_GPL(libertas_remove_mesh); 1400EXPORT_SYMBOL_GPL(lbs_remove_mesh);
1401 1401
1402/** 1402/**
1403 * @brief This function finds the CFP in 1403 * @brief This function finds the CFP in
@@ -1408,7 +1408,7 @@ EXPORT_SYMBOL_GPL(libertas_remove_mesh);
1408 * @param cfp_no A pointer to CFP number 1408 * @param cfp_no A pointer to CFP number
1409 * @return A pointer to CFP 1409 * @return A pointer to CFP
1410 */ 1410 */
1411struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band, int *cfp_no) 1411struct chan_freq_power *lbs_get_region_cfp_table(u8 region, u8 band, int *cfp_no)
1412{ 1412{
1413 int i, end; 1413 int i, end;
1414 1414
@@ -1430,9 +1430,9 @@ struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band, int *c
1430 return NULL; 1430 return NULL;
1431} 1431}
1432 1432
1433int libertas_set_regiontable(wlan_private * priv, u8 region, u8 band) 1433int lbs_set_regiontable(lbs_private *priv, u8 region, u8 band)
1434{ 1434{
1435 wlan_adapter *adapter = priv->adapter; 1435 lbs_adapter *adapter = priv->adapter;
1436 int ret = 0; 1436 int ret = 0;
1437 int i = 0; 1437 int i = 0;
1438 1438
@@ -1444,7 +1444,7 @@ int libertas_set_regiontable(wlan_private * priv, u8 region, u8 band)
1444 memset(adapter->region_channel, 0, sizeof(adapter->region_channel)); 1444 memset(adapter->region_channel, 0, sizeof(adapter->region_channel));
1445 1445
1446 { 1446 {
1447 cfp = libertas_get_region_cfp_table(region, band, &cfp_no); 1447 cfp = lbs_get_region_cfp_table(region, band, &cfp_no);
1448 if (cfp != NULL) { 1448 if (cfp != NULL) {
1449 adapter->region_channel[i].nrcfp = cfp_no; 1449 adapter->region_channel[i].nrcfp = cfp_no;
1450 adapter->region_channel[i].CFP = cfp; 1450 adapter->region_channel[i].CFP = cfp;
@@ -1472,13 +1472,13 @@ out:
1472 * @param dev A pointer to net_device structure 1472 * @param dev A pointer to net_device structure
1473 * @return n/a 1473 * @return n/a
1474 */ 1474 */
1475void libertas_interrupt(struct net_device *dev) 1475void lbs_interrupt(struct net_device *dev)
1476{ 1476{
1477 wlan_private *priv = dev->priv; 1477 lbs_private *priv = dev->priv;
1478 1478
1479 lbs_deb_enter(LBS_DEB_THREAD); 1479 lbs_deb_enter(LBS_DEB_THREAD);
1480 1480
1481 lbs_deb_thread("libertas_interrupt: intcounter=%d\n", 1481 lbs_deb_thread("lbs_interrupt: intcounter=%d\n",
1482 priv->adapter->intcounter); 1482 priv->adapter->intcounter);
1483 1483
1484 priv->adapter->intcounter++; 1484 priv->adapter->intcounter++;
@@ -1494,35 +1494,35 @@ void libertas_interrupt(struct net_device *dev)
1494 1494
1495 lbs_deb_leave(LBS_DEB_THREAD); 1495 lbs_deb_leave(LBS_DEB_THREAD);
1496} 1496}
1497EXPORT_SYMBOL_GPL(libertas_interrupt); 1497EXPORT_SYMBOL_GPL(lbs_interrupt);
1498 1498
1499int libertas_reset_device(wlan_private *priv) 1499int lbs_reset_device(lbs_private *priv)
1500{ 1500{
1501 int ret; 1501 int ret;
1502 1502
1503 lbs_deb_enter(LBS_DEB_MAIN); 1503 lbs_deb_enter(LBS_DEB_MAIN);
1504 ret = libertas_prepare_and_send_command(priv, CMD_802_11_RESET, 1504 ret = lbs_prepare_and_send_command(priv, CMD_802_11_RESET,
1505 CMD_ACT_HALT, 0, 0, NULL); 1505 CMD_ACT_HALT, 0, 0, NULL);
1506 msleep_interruptible(10); 1506 msleep_interruptible(10);
1507 1507
1508 lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret); 1508 lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret);
1509 return ret; 1509 return ret;
1510} 1510}
1511EXPORT_SYMBOL_GPL(libertas_reset_device); 1511EXPORT_SYMBOL_GPL(lbs_reset_device);
1512 1512
1513static int libertas_init_module(void) 1513static int lbs_init_module(void)
1514{ 1514{
1515 lbs_deb_enter(LBS_DEB_MAIN); 1515 lbs_deb_enter(LBS_DEB_MAIN);
1516 libertas_debugfs_init(); 1516 lbs_debugfs_init();
1517 lbs_deb_leave(LBS_DEB_MAIN); 1517 lbs_deb_leave(LBS_DEB_MAIN);
1518 return 0; 1518 return 0;
1519} 1519}
1520 1520
1521static void libertas_exit_module(void) 1521static void lbs_exit_module(void)
1522{ 1522{
1523 lbs_deb_enter(LBS_DEB_MAIN); 1523 lbs_deb_enter(LBS_DEB_MAIN);
1524 1524
1525 libertas_debugfs_remove(); 1525 lbs_debugfs_remove();
1526 1526
1527 lbs_deb_leave(LBS_DEB_MAIN); 1527 lbs_deb_leave(LBS_DEB_MAIN);
1528} 1528}
@@ -1531,32 +1531,32 @@ static void libertas_exit_module(void)
1531 * rtap interface support fuctions 1531 * rtap interface support fuctions
1532 */ 1532 */
1533 1533
1534static int libertas_rtap_open(struct net_device *dev) 1534static int lbs_rtap_open(struct net_device *dev)
1535{ 1535{
1536 netif_carrier_off(dev); 1536 netif_carrier_off(dev);
1537 netif_stop_queue(dev); 1537 netif_stop_queue(dev);
1538 return 0; 1538 return 0;
1539} 1539}
1540 1540
1541static int libertas_rtap_stop(struct net_device *dev) 1541static int lbs_rtap_stop(struct net_device *dev)
1542{ 1542{
1543 return 0; 1543 return 0;
1544} 1544}
1545 1545
1546static int libertas_rtap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) 1546static int lbs_rtap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
1547{ 1547{
1548 netif_stop_queue(dev); 1548 netif_stop_queue(dev);
1549 return -EOPNOTSUPP; 1549 return -EOPNOTSUPP;
1550} 1550}
1551 1551
1552static struct net_device_stats *libertas_rtap_get_stats(struct net_device *dev) 1552static struct net_device_stats *lbs_rtap_get_stats(struct net_device *dev)
1553{ 1553{
1554 wlan_private *priv = dev->priv; 1554 lbs_private *priv = dev->priv;
1555 return &priv->ieee->stats; 1555 return &priv->ieee->stats;
1556} 1556}
1557 1557
1558 1558
1559void libertas_remove_rtap(wlan_private *priv) 1559void lbs_remove_rtap(lbs_private *priv)
1560{ 1560{
1561 if (priv->rtap_net_dev == NULL) 1561 if (priv->rtap_net_dev == NULL)
1562 return; 1562 return;
@@ -1565,7 +1565,7 @@ void libertas_remove_rtap(wlan_private *priv)
1565 priv->rtap_net_dev = NULL; 1565 priv->rtap_net_dev = NULL;
1566} 1566}
1567 1567
1568int libertas_add_rtap(wlan_private *priv) 1568int lbs_add_rtap(lbs_private *priv)
1569{ 1569{
1570 int rc = 0; 1570 int rc = 0;
1571 1571
@@ -1582,11 +1582,11 @@ int libertas_add_rtap(wlan_private *priv)
1582 strcpy(priv->rtap_net_dev->name, "rtap%d"); 1582 strcpy(priv->rtap_net_dev->name, "rtap%d");
1583 1583
1584 priv->rtap_net_dev->type = ARPHRD_IEEE80211_RADIOTAP; 1584 priv->rtap_net_dev->type = ARPHRD_IEEE80211_RADIOTAP;
1585 priv->rtap_net_dev->open = libertas_rtap_open; 1585 priv->rtap_net_dev->open = lbs_rtap_open;
1586 priv->rtap_net_dev->stop = libertas_rtap_stop; 1586 priv->rtap_net_dev->stop = lbs_rtap_stop;
1587 priv->rtap_net_dev->get_stats = libertas_rtap_get_stats; 1587 priv->rtap_net_dev->get_stats = lbs_rtap_get_stats;
1588 priv->rtap_net_dev->hard_start_xmit = libertas_rtap_hard_start_xmit; 1588 priv->rtap_net_dev->hard_start_xmit = lbs_rtap_hard_start_xmit;
1589 priv->rtap_net_dev->set_multicast_list = libertas_set_multicast_list; 1589 priv->rtap_net_dev->set_multicast_list = lbs_set_multicast_list;
1590 priv->rtap_net_dev->priv = priv; 1590 priv->rtap_net_dev->priv = priv;
1591 1591
1592 priv->ieee->iw_mode = IW_MODE_MONITOR; 1592 priv->ieee->iw_mode = IW_MODE_MONITOR;
@@ -1602,8 +1602,8 @@ int libertas_add_rtap(wlan_private *priv)
1602} 1602}
1603 1603
1604 1604
1605module_init(libertas_init_module); 1605module_init(lbs_init_module);
1606module_exit(libertas_exit_module); 1606module_exit(lbs_exit_module);
1607 1607
1608MODULE_DESCRIPTION("Libertas WLAN Driver Library"); 1608MODULE_DESCRIPTION("Libertas WLAN Driver Library");
1609MODULE_AUTHOR("Marvell International Ltd."); 1609MODULE_AUTHOR("Marvell International Ltd.");
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c
index 0420e5b9ff9b..204955904340 100644
--- a/drivers/net/wireless/libertas/rx.c
+++ b/drivers/net/wireless/libertas/rx.c
@@ -35,19 +35,19 @@ struct rx80211packethdr {
35 void *eth80211_hdr; 35 void *eth80211_hdr;
36} __attribute__ ((packed)); 36} __attribute__ ((packed));
37 37
38static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb); 38static int process_rxed_802_11_packet(lbs_private *priv, struct sk_buff *skb);
39 39
40/** 40/**
41 * @brief This function computes the avgSNR . 41 * @brief This function computes the avgSNR .
42 * 42 *
43 * @param priv A pointer to wlan_private structure 43 * @param priv A pointer to lbs_private structure
44 * @return avgSNR 44 * @return avgSNR
45 */ 45 */
46static u8 wlan_getavgsnr(wlan_private * priv) 46static u8 lbs_getavgsnr(lbs_private *priv)
47{ 47{
48 u8 i; 48 u8 i;
49 u16 temp = 0; 49 u16 temp = 0;
50 wlan_adapter *adapter = priv->adapter; 50 lbs_adapter *adapter = priv->adapter;
51 if (adapter->numSNRNF == 0) 51 if (adapter->numSNRNF == 0)
52 return 0; 52 return 0;
53 for (i = 0; i < adapter->numSNRNF; i++) 53 for (i = 0; i < adapter->numSNRNF; i++)
@@ -59,14 +59,14 @@ static u8 wlan_getavgsnr(wlan_private * priv)
59/** 59/**
60 * @brief This function computes the AvgNF 60 * @brief This function computes the AvgNF
61 * 61 *
62 * @param priv A pointer to wlan_private structure 62 * @param priv A pointer to lbs_private structure
63 * @return AvgNF 63 * @return AvgNF
64 */ 64 */
65static u8 wlan_getavgnf(wlan_private * priv) 65static u8 lbs_getavgnf(lbs_private *priv)
66{ 66{
67 u8 i; 67 u8 i;
68 u16 temp = 0; 68 u16 temp = 0;
69 wlan_adapter *adapter = priv->adapter; 69 lbs_adapter *adapter = priv->adapter;
70 if (adapter->numSNRNF == 0) 70 if (adapter->numSNRNF == 0)
71 return 0; 71 return 0;
72 for (i = 0; i < adapter->numSNRNF; i++) 72 for (i = 0; i < adapter->numSNRNF; i++)
@@ -78,13 +78,13 @@ static u8 wlan_getavgnf(wlan_private * priv)
78/** 78/**
79 * @brief This function save the raw SNR/NF to our internel buffer 79 * @brief This function save the raw SNR/NF to our internel buffer
80 * 80 *
81 * @param priv A pointer to wlan_private structure 81 * @param priv A pointer to lbs_private structure
82 * @param prxpd A pointer to rxpd structure of received packet 82 * @param prxpd A pointer to rxpd structure of received packet
83 * @return n/a 83 * @return n/a
84 */ 84 */
85static void wlan_save_rawSNRNF(wlan_private * priv, struct rxpd *p_rx_pd) 85static void lbs_save_rawSNRNF(lbs_private *priv, struct rxpd *p_rx_pd)
86{ 86{
87 wlan_adapter *adapter = priv->adapter; 87 lbs_adapter *adapter = priv->adapter;
88 if (adapter->numSNRNF < DEFAULT_DATA_AVG_FACTOR) 88 if (adapter->numSNRNF < DEFAULT_DATA_AVG_FACTOR)
89 adapter->numSNRNF++; 89 adapter->numSNRNF++;
90 adapter->rawSNR[adapter->nextSNRNF] = p_rx_pd->snr; 90 adapter->rawSNR[adapter->nextSNRNF] = p_rx_pd->snr;
@@ -98,13 +98,13 @@ static void wlan_save_rawSNRNF(wlan_private * priv, struct rxpd *p_rx_pd)
98/** 98/**
99 * @brief This function computes the RSSI in received packet. 99 * @brief This function computes the RSSI in received packet.
100 * 100 *
101 * @param priv A pointer to wlan_private structure 101 * @param priv A pointer to lbs_private structure
102 * @param prxpd A pointer to rxpd structure of received packet 102 * @param prxpd A pointer to rxpd structure of received packet
103 * @return n/a 103 * @return n/a
104 */ 104 */
105static void wlan_compute_rssi(wlan_private * priv, struct rxpd *p_rx_pd) 105static void lbs_compute_rssi(lbs_private *priv, struct rxpd *p_rx_pd)
106{ 106{
107 wlan_adapter *adapter = priv->adapter; 107 lbs_adapter *adapter = priv->adapter;
108 108
109 lbs_deb_enter(LBS_DEB_RX); 109 lbs_deb_enter(LBS_DEB_RX);
110 110
@@ -115,10 +115,10 @@ static void wlan_compute_rssi(wlan_private * priv, struct rxpd *p_rx_pd)
115 115
116 adapter->SNR[TYPE_RXPD][TYPE_NOAVG] = p_rx_pd->snr; 116 adapter->SNR[TYPE_RXPD][TYPE_NOAVG] = p_rx_pd->snr;
117 adapter->NF[TYPE_RXPD][TYPE_NOAVG] = p_rx_pd->nf; 117 adapter->NF[TYPE_RXPD][TYPE_NOAVG] = p_rx_pd->nf;
118 wlan_save_rawSNRNF(priv, p_rx_pd); 118 lbs_save_rawSNRNF(priv, p_rx_pd);
119 119
120 adapter->SNR[TYPE_RXPD][TYPE_AVG] = wlan_getavgsnr(priv) * AVG_SCALE; 120 adapter->SNR[TYPE_RXPD][TYPE_AVG] = lbs_getavgsnr(priv) * AVG_SCALE;
121 adapter->NF[TYPE_RXPD][TYPE_AVG] = wlan_getavgnf(priv) * AVG_SCALE; 121 adapter->NF[TYPE_RXPD][TYPE_AVG] = lbs_getavgnf(priv) * AVG_SCALE;
122 lbs_deb_rx("after computing SNR: SNR-avg = %d, NF-avg = %d\n", 122 lbs_deb_rx("after computing SNR: SNR-avg = %d, NF-avg = %d\n",
123 adapter->SNR[TYPE_RXPD][TYPE_AVG] / AVG_SCALE, 123 adapter->SNR[TYPE_RXPD][TYPE_AVG] / AVG_SCALE,
124 adapter->NF[TYPE_RXPD][TYPE_AVG] / AVG_SCALE); 124 adapter->NF[TYPE_RXPD][TYPE_AVG] / AVG_SCALE);
@@ -134,11 +134,11 @@ static void wlan_compute_rssi(wlan_private * priv, struct rxpd *p_rx_pd)
134 lbs_deb_leave(LBS_DEB_RX); 134 lbs_deb_leave(LBS_DEB_RX);
135} 135}
136 136
137void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb) 137void lbs_upload_rx_packet(lbs_private *priv, struct sk_buff *skb)
138{ 138{
139 lbs_deb_rx("skb->data %p\n", skb->data); 139 lbs_deb_rx("skb->data %p\n", skb->data);
140 140
141 if (priv->adapter->monitormode != WLAN_MONITOR_OFF) { 141 if (priv->adapter->monitormode != LBS_MONITOR_OFF) {
142 skb->protocol = eth_type_trans(skb, priv->rtap_net_dev); 142 skb->protocol = eth_type_trans(skb, priv->rtap_net_dev);
143 } else { 143 } else {
144 if (priv->mesh_dev && IS_MESH_FRAME(skb)) 144 if (priv->mesh_dev && IS_MESH_FRAME(skb))
@@ -154,13 +154,13 @@ void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb)
154 * @brief This function processes received packet and forwards it 154 * @brief This function processes received packet and forwards it
155 * to kernel/upper layer 155 * to kernel/upper layer
156 * 156 *
157 * @param priv A pointer to wlan_private 157 * @param priv A pointer to lbs_private
158 * @param skb A pointer to skb which includes the received packet 158 * @param skb A pointer to skb which includes the received packet
159 * @return 0 or -1 159 * @return 0 or -1
160 */ 160 */
161int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb) 161int lbs_process_rxed_packet(lbs_private *priv, struct sk_buff *skb)
162{ 162{
163 wlan_adapter *adapter = priv->adapter; 163 lbs_adapter *adapter = priv->adapter;
164 int ret = 0; 164 int ret = 0;
165 165
166 struct rxpackethdr *p_rx_pkt; 166 struct rxpackethdr *p_rx_pkt;
@@ -173,7 +173,7 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb)
173 173
174 lbs_deb_enter(LBS_DEB_RX); 174 lbs_deb_enter(LBS_DEB_RX);
175 175
176 if (priv->adapter->monitormode != WLAN_MONITOR_OFF) 176 if (priv->adapter->monitormode != LBS_MONITOR_OFF)
177 return process_rxed_802_11_packet(priv, skb); 177 return process_rxed_802_11_packet(priv, skb);
178 178
179 p_rx_pkt = (struct rxpackethdr *) skb->data; 179 p_rx_pkt = (struct rxpackethdr *) skb->data;
@@ -258,22 +258,22 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb)
258 * only if the rate is auto 258 * only if the rate is auto
259 */ 259 */
260 if (adapter->auto_rate) 260 if (adapter->auto_rate)
261 adapter->cur_rate = libertas_fw_index_to_data_rate(p_rx_pd->rx_rate); 261 adapter->cur_rate = lbs_fw_index_to_data_rate(p_rx_pd->rx_rate);
262 262
263 wlan_compute_rssi(priv, p_rx_pd); 263 lbs_compute_rssi(priv, p_rx_pd);
264 264
265 lbs_deb_rx("rx data: size of actual packet %d\n", skb->len); 265 lbs_deb_rx("rx data: size of actual packet %d\n", skb->len);
266 priv->stats.rx_bytes += skb->len; 266 priv->stats.rx_bytes += skb->len;
267 priv->stats.rx_packets++; 267 priv->stats.rx_packets++;
268 268
269 libertas_upload_rx_packet(priv, skb); 269 lbs_upload_rx_packet(priv, skb);
270 270
271 ret = 0; 271 ret = 0;
272done: 272done:
273 lbs_deb_leave_args(LBS_DEB_RX, "ret %d", ret); 273 lbs_deb_leave_args(LBS_DEB_RX, "ret %d", ret);
274 return ret; 274 return ret;
275} 275}
276EXPORT_SYMBOL_GPL(libertas_process_rxed_packet); 276EXPORT_SYMBOL_GPL(lbs_process_rxed_packet);
277 277
278/** 278/**
279 * @brief This function converts Tx/Rx rates from the Marvell WLAN format 279 * @brief This function converts Tx/Rx rates from the Marvell WLAN format
@@ -319,13 +319,13 @@ static u8 convert_mv_rate_to_radiotap(u8 rate)
319 * @brief This function processes a received 802.11 packet and forwards it 319 * @brief This function processes a received 802.11 packet and forwards it
320 * to kernel/upper layer 320 * to kernel/upper layer
321 * 321 *
322 * @param priv A pointer to wlan_private 322 * @param priv A pointer to lbs_private
323 * @param skb A pointer to skb which includes the received packet 323 * @param skb A pointer to skb which includes the received packet
324 * @return 0 or -1 324 * @return 0 or -1
325 */ 325 */
326static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb) 326static int process_rxed_802_11_packet(lbs_private *priv, struct sk_buff *skb)
327{ 327{
328 wlan_adapter *adapter = priv->adapter; 328 lbs_adapter *adapter = priv->adapter;
329 int ret = 0; 329 int ret = 0;
330 330
331 struct rx80211packethdr *p_rx_pkt; 331 struct rx80211packethdr *p_rx_pkt;
@@ -359,7 +359,7 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb)
359 skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd)); 359 skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd));
360 360
361 /* create the exported radio header */ 361 /* create the exported radio header */
362 if(priv->adapter->monitormode == WLAN_MONITOR_OFF) { 362 if (priv->adapter->monitormode == LBS_MONITOR_OFF) {
363 /* no radio header */ 363 /* no radio header */
364 /* chop the rxpd */ 364 /* chop the rxpd */
365 skb_pull(skb, sizeof(struct rxpd)); 365 skb_pull(skb, sizeof(struct rxpd));
@@ -409,15 +409,15 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb)
409 * only if the rate is auto 409 * only if the rate is auto
410 */ 410 */
411 if (adapter->auto_rate) 411 if (adapter->auto_rate)
412 adapter->cur_rate = libertas_fw_index_to_data_rate(prxpd->rx_rate); 412 adapter->cur_rate = lbs_fw_index_to_data_rate(prxpd->rx_rate);
413 413
414 wlan_compute_rssi(priv, prxpd); 414 lbs_compute_rssi(priv, prxpd);
415 415
416 lbs_deb_rx("rx data: size of actual packet %d\n", skb->len); 416 lbs_deb_rx("rx data: size of actual packet %d\n", skb->len);
417 priv->stats.rx_bytes += skb->len; 417 priv->stats.rx_bytes += skb->len;
418 priv->stats.rx_packets++; 418 priv->stats.rx_packets++;
419 419
420 libertas_upload_rx_packet(priv, skb); 420 lbs_upload_rx_packet(priv, skb);
421 421
422 ret = 0; 422 ret = 0;
423 423
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index ad1e67d984ce..30e1a8e8a16a 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -39,8 +39,8 @@
39//! Memory needed to store a max number/size SSID TLV for a firmware scan 39//! Memory needed to store a max number/size SSID TLV for a firmware scan
40#define SSID_TLV_MAX_SIZE (1 * sizeof(struct mrvlietypes_ssidparamset)) 40#define SSID_TLV_MAX_SIZE (1 * sizeof(struct mrvlietypes_ssidparamset))
41 41
42//! Maximum memory needed for a wlan_scan_cmd_config with all TLVs at max 42//! Maximum memory needed for a lbs_scan_cmd_config with all TLVs at max
43#define MAX_SCAN_CFG_ALLOC (sizeof(struct wlan_scan_cmd_config) \ 43#define MAX_SCAN_CFG_ALLOC (sizeof(struct lbs_scan_cmd_config) \
44 + sizeof(struct mrvlietypes_numprobes) \ 44 + sizeof(struct mrvlietypes_numprobes) \
45 + CHAN_TLV_MAX_SIZE \ 45 + CHAN_TLV_MAX_SIZE \
46 + SSID_TLV_MAX_SIZE) 46 + SSID_TLV_MAX_SIZE)
@@ -80,7 +80,7 @@ static inline void clear_bss_descriptor (struct bss_descriptor * bss)
80 memset(bss, 0, offsetof(struct bss_descriptor, list)); 80 memset(bss, 0, offsetof(struct bss_descriptor, list));
81} 81}
82 82
83static inline int match_bss_no_security(struct wlan_802_11_security * secinfo, 83static inline int match_bss_no_security(struct lbs_802_11_security *secinfo,
84 struct bss_descriptor * match_bss) 84 struct bss_descriptor * match_bss)
85{ 85{
86 if ( !secinfo->wep_enabled 86 if ( !secinfo->wep_enabled
@@ -94,7 +94,7 @@ static inline int match_bss_no_security(struct wlan_802_11_security * secinfo,
94 return 0; 94 return 0;
95} 95}
96 96
97static inline int match_bss_static_wep(struct wlan_802_11_security * secinfo, 97static inline int match_bss_static_wep(struct lbs_802_11_security *secinfo,
98 struct bss_descriptor * match_bss) 98 struct bss_descriptor * match_bss)
99{ 99{
100 if ( secinfo->wep_enabled 100 if ( secinfo->wep_enabled
@@ -106,7 +106,7 @@ static inline int match_bss_static_wep(struct wlan_802_11_security * secinfo,
106 return 0; 106 return 0;
107} 107}
108 108
109static inline int match_bss_wpa(struct wlan_802_11_security * secinfo, 109static inline int match_bss_wpa(struct lbs_802_11_security *secinfo,
110 struct bss_descriptor * match_bss) 110 struct bss_descriptor * match_bss)
111{ 111{
112 if ( !secinfo->wep_enabled 112 if ( !secinfo->wep_enabled
@@ -121,7 +121,7 @@ static inline int match_bss_wpa(struct wlan_802_11_security * secinfo,
121 return 0; 121 return 0;
122} 122}
123 123
124static inline int match_bss_wpa2(struct wlan_802_11_security * secinfo, 124static inline int match_bss_wpa2(struct lbs_802_11_security *secinfo,
125 struct bss_descriptor * match_bss) 125 struct bss_descriptor * match_bss)
126{ 126{
127 if ( !secinfo->wep_enabled 127 if ( !secinfo->wep_enabled
@@ -136,7 +136,7 @@ static inline int match_bss_wpa2(struct wlan_802_11_security * secinfo,
136 return 0; 136 return 0;
137} 137}
138 138
139static inline int match_bss_dynamic_wep(struct wlan_802_11_security * secinfo, 139static inline int match_bss_dynamic_wep(struct lbs_802_11_security *secinfo,
140 struct bss_descriptor * match_bss) 140 struct bss_descriptor * match_bss)
141{ 141{
142 if ( !secinfo->wep_enabled 142 if ( !secinfo->wep_enabled
@@ -163,13 +163,13 @@ static inline int match_bss_dynamic_wep(struct wlan_802_11_security * secinfo,
163 * 0 0 0 0 !=NONE 1 0 0 yes Dynamic WEP 163 * 0 0 0 0 !=NONE 1 0 0 yes Dynamic WEP
164 * 164 *
165 * 165 *
166 * @param adapter A pointer to wlan_adapter 166 * @param adapter A pointer to lbs_adapter
167 * @param index Index in scantable to check against current driver settings 167 * @param index Index in scantable to check against current driver settings
168 * @param mode Network mode: Infrastructure or IBSS 168 * @param mode Network mode: Infrastructure or IBSS
169 * 169 *
170 * @return Index in scantable, or error code if negative 170 * @return Index in scantable, or error code if negative
171 */ 171 */
172static int is_network_compatible(wlan_adapter * adapter, 172static int is_network_compatible(lbs_adapter *adapter,
173 struct bss_descriptor * bss, u8 mode) 173 struct bss_descriptor * bss, u8 mode)
174{ 174{
175 int matched = 0; 175 int matched = 0;
@@ -235,7 +235,7 @@ done:
235 * 235 *
236 * @return 0--ssid is same, otherwise is different 236 * @return 0--ssid is same, otherwise is different
237 */ 237 */
238int libertas_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len) 238int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len)
239{ 239{
240 if (ssid1_len != ssid2_len) 240 if (ssid1_len != ssid2_len)
241 return -1; 241 return -1;
@@ -256,13 +256,13 @@ int libertas_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len)
256/** 256/**
257 * @brief Create a channel list for the driver to scan based on region info 257 * @brief Create a channel list for the driver to scan based on region info
258 * 258 *
259 * Only used from wlan_scan_setup_scan_config() 259 * Only used from lbs_scan_setup_scan_config()
260 * 260 *
261 * Use the driver region/band information to construct a comprehensive list 261 * Use the driver region/band information to construct a comprehensive list
262 * of channels to scan. This routine is used for any scan that is not 262 * of channels to scan. This routine is used for any scan that is not
263 * provided a specific channel list to scan. 263 * provided a specific channel list to scan.
264 * 264 *
265 * @param priv A pointer to wlan_private structure 265 * @param priv A pointer to lbs_private structure
266 * @param scanchanlist Output parameter: resulting channel list to scan 266 * @param scanchanlist Output parameter: resulting channel list to scan
267 * @param filteredscan Flag indicating whether or not a BSSID or SSID filter 267 * @param filteredscan Flag indicating whether or not a BSSID or SSID filter
268 * is being sent in the command to firmware. Used to 268 * is being sent in the command to firmware. Used to
@@ -272,12 +272,12 @@ int libertas_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len)
272 * 272 *
273 * @return void 273 * @return void
274 */ 274 */
275static void wlan_scan_create_channel_list(wlan_private * priv, 275static void lbs_scan_create_channel_list(lbs_private *priv,
276 struct chanscanparamset * scanchanlist, 276 struct chanscanparamset * scanchanlist,
277 u8 filteredscan) 277 u8 filteredscan)
278{ 278{
279 279
280 wlan_adapter *adapter = priv->adapter; 280 lbs_adapter *adapter = priv->adapter;
281 struct region_channel *scanregion; 281 struct region_channel *scanregion;
282 struct chan_freq_power *cfp; 282 struct chan_freq_power *cfp;
283 int rgnidx; 283 int rgnidx;
@@ -297,7 +297,7 @@ static void wlan_scan_create_channel_list(wlan_private * priv,
297 297
298 for (rgnidx = 0; rgnidx < ARRAY_SIZE(adapter->region_channel); rgnidx++) { 298 for (rgnidx = 0; rgnidx < ARRAY_SIZE(adapter->region_channel); rgnidx++) {
299 if (priv->adapter->enable11d && 299 if (priv->adapter->enable11d &&
300 adapter->connect_status != LIBERTAS_CONNECTED) { 300 adapter->connect_status != LBS_CONNECTED) {
301 /* Scan all the supported chan for the first scan */ 301 /* Scan all the supported chan for the first scan */
302 if (!adapter->universal_channel[rgnidx].valid) 302 if (!adapter->universal_channel[rgnidx].valid)
303 continue; 303 continue;
@@ -319,7 +319,7 @@ static void wlan_scan_create_channel_list(wlan_private * priv,
319 319
320 if (priv->adapter->enable11d) { 320 if (priv->adapter->enable11d) {
321 scantype = 321 scantype =
322 libertas_get_scan_type_11d(cfp->channel, 322 lbs_get_scan_type_11d(cfp->channel,
323 &adapter-> 323 &adapter->
324 parsed_region_chan); 324 parsed_region_chan);
325 } 325 }
@@ -357,24 +357,24 @@ static void wlan_scan_create_channel_list(wlan_private * priv,
357 357
358 358
359/* Delayed partial scan worker */ 359/* Delayed partial scan worker */
360void libertas_scan_worker(struct work_struct *work) 360void lbs_scan_worker(struct work_struct *work)
361{ 361{
362 wlan_private *priv = container_of(work, wlan_private, scan_work.work); 362 lbs_private *priv = container_of(work, lbs_private, scan_work.work);
363 363
364 wlan_scan_networks(priv, NULL, 0); 364 lbs_scan_networks(priv, NULL, 0);
365} 365}
366 366
367 367
368/** 368/**
369 * @brief Construct a wlan_scan_cmd_config structure to use in issue scan cmds 369 * @brief Construct a lbs_scan_cmd_config structure to use in issue scan cmds
370 * 370 *
371 * Application layer or other functions can invoke wlan_scan_networks 371 * Application layer or other functions can invoke lbs_scan_networks
372 * with a scan configuration supplied in a wlan_ioctl_user_scan_cfg struct. 372 * with a scan configuration supplied in a lbs_ioctl_user_scan_cfg struct.
373 * This structure is used as the basis of one or many wlan_scan_cmd_config 373 * This structure is used as the basis of one or many lbs_scan_cmd_config
374 * commands that are sent to the command processing module and sent to 374 * commands that are sent to the command processing module and sent to
375 * firmware. 375 * firmware.
376 * 376 *
377 * Create a wlan_scan_cmd_config based on the following user supplied 377 * Create a lbs_scan_cmd_config based on the following user supplied
378 * parameters (if present): 378 * parameters (if present):
379 * - SSID filter 379 * - SSID filter
380 * - BSSID filter 380 * - BSSID filter
@@ -385,7 +385,7 @@ void libertas_scan_worker(struct work_struct *work)
385 * If the number of probes is not set, use the adapter default setting 385 * If the number of probes is not set, use the adapter default setting
386 * Qualify the channel 386 * Qualify the channel
387 * 387 *
388 * @param priv A pointer to wlan_private structure 388 * @param priv A pointer to lbs_private structure
389 * @param puserscanin NULL or pointer to scan configuration parameters 389 * @param puserscanin NULL or pointer to scan configuration parameters
390 * @param ppchantlvout Output parameter: Pointer to the start of the 390 * @param ppchantlvout Output parameter: Pointer to the start of the
391 * channel TLV portion of the output scan config 391 * channel TLV portion of the output scan config
@@ -403,9 +403,9 @@ void libertas_scan_worker(struct work_struct *work)
403 * 403 *
404 * @return resulting scan configuration 404 * @return resulting scan configuration
405 */ 405 */
406static struct wlan_scan_cmd_config * 406static struct lbs_scan_cmd_config *
407wlan_scan_setup_scan_config(wlan_private * priv, 407lbs_scan_setup_scan_config(lbs_private *priv,
408 const struct wlan_ioctl_user_scan_cfg * puserscanin, 408 const struct lbs_ioctl_user_scan_cfg *puserscanin,
409 struct mrvlietypes_chanlistparamset ** ppchantlvout, 409 struct mrvlietypes_chanlistparamset ** ppchantlvout,
410 struct chanscanparamset * pscanchanlist, 410 struct chanscanparamset * pscanchanlist,
411 int *pmaxchanperscan, 411 int *pmaxchanperscan,
@@ -414,7 +414,7 @@ wlan_scan_setup_scan_config(wlan_private * priv,
414{ 414{
415 struct mrvlietypes_numprobes *pnumprobestlv; 415 struct mrvlietypes_numprobes *pnumprobestlv;
416 struct mrvlietypes_ssidparamset *pssidtlv; 416 struct mrvlietypes_ssidparamset *pssidtlv;
417 struct wlan_scan_cmd_config * pscancfgout = NULL; 417 struct lbs_scan_cmd_config *pscancfgout = NULL;
418 u8 *ptlvpos; 418 u8 *ptlvpos;
419 u16 numprobes; 419 u16 numprobes;
420 int chanidx; 420 int chanidx;
@@ -523,13 +523,13 @@ wlan_scan_setup_scan_config(wlan_private * priv,
523 if (!puserscanin || !puserscanin->chanlist[0].channumber) { 523 if (!puserscanin || !puserscanin->chanlist[0].channumber) {
524 /* Create a default channel scan list */ 524 /* Create a default channel scan list */
525 lbs_deb_scan("creating full region channel list\n"); 525 lbs_deb_scan("creating full region channel list\n");
526 wlan_scan_create_channel_list(priv, pscanchanlist, 526 lbs_scan_create_channel_list(priv, pscanchanlist,
527 *pfilteredscan); 527 *pfilteredscan);
528 goto out; 528 goto out;
529 } 529 }
530 530
531 for (chanidx = 0; 531 for (chanidx = 0;
532 chanidx < WLAN_IOCTL_USER_SCAN_CHAN_MAX 532 chanidx < LBS_IOCTL_USER_SCAN_CHAN_MAX
533 && puserscanin->chanlist[chanidx].channumber; chanidx++) { 533 && puserscanin->chanlist[chanidx].channumber; chanidx++) {
534 534
535 channel = puserscanin->chanlist[chanidx].channumber; 535 channel = puserscanin->chanlist[chanidx].channumber;
@@ -579,14 +579,14 @@ out:
579/** 579/**
580 * @brief Construct and send multiple scan config commands to the firmware 580 * @brief Construct and send multiple scan config commands to the firmware
581 * 581 *
582 * Only used from wlan_scan_networks() 582 * Only used from lbs_scan_networks()
583 * 583 *
584 * Previous routines have created a wlan_scan_cmd_config with any requested 584 * Previous routines have created a lbs_scan_cmd_config with any requested
585 * TLVs. This function splits the channel TLV into maxchanperscan lists 585 * TLVs. This function splits the channel TLV into maxchanperscan lists
586 * and sends the portion of the channel TLV along with the other TLVs 586 * and sends the portion of the channel TLV along with the other TLVs
587 * to the wlan_cmd routines for execution in the firmware. 587 * to the lbs_cmd routines for execution in the firmware.
588 * 588 *
589 * @param priv A pointer to wlan_private structure 589 * @param priv A pointer to lbs_private structure
590 * @param maxchanperscan Maximum number channels to be included in each 590 * @param maxchanperscan Maximum number channels to be included in each
591 * scan command sent to firmware 591 * scan command sent to firmware
592 * @param filteredscan Flag indicating whether or not a BSSID or SSID 592 * @param filteredscan Flag indicating whether or not a BSSID or SSID
@@ -600,13 +600,13 @@ out:
600 * 600 *
601 * @return 0 or error return otherwise 601 * @return 0 or error return otherwise
602 */ 602 */
603static int wlan_scan_channel_list(wlan_private * priv, 603static int lbs_scan_channel_list(lbs_private *priv,
604 int maxchanperscan, 604 int maxchanperscan,
605 u8 filteredscan, 605 u8 filteredscan,
606 struct wlan_scan_cmd_config * pscancfgout, 606 struct lbs_scan_cmd_config *pscancfgout,
607 struct mrvlietypes_chanlistparamset * pchantlvout, 607 struct mrvlietypes_chanlistparamset * pchantlvout,
608 struct chanscanparamset * pscanchanlist, 608 struct chanscanparamset * pscanchanlist,
609 const struct wlan_ioctl_user_scan_cfg * puserscanin, 609 const struct lbs_ioctl_user_scan_cfg *puserscanin,
610 int full_scan) 610 int full_scan)
611{ 611{
612 struct chanscanparamset *ptmpchan; 612 struct chanscanparamset *ptmpchan;
@@ -720,7 +720,7 @@ static int wlan_scan_channel_list(wlan_private * priv,
720 } 720 }
721 721
722 /* Send the scan command to the firmware with the specified cfg */ 722 /* Send the scan command to the firmware with the specified cfg */
723 ret = libertas_prepare_and_send_command(priv, CMD_802_11_SCAN, 0, 723 ret = lbs_prepare_and_send_command(priv, CMD_802_11_SCAN, 0,
724 0, 0, pscancfgout); 724 0, 0, pscancfgout);
725 if (scanned >= 2 && !full_scan) { 725 if (scanned >= 2 && !full_scan) {
726 ret = 0; 726 ret = 0;
@@ -751,10 +751,10 @@ out:
751} 751}
752 752
753/* 753/*
754 * Only used from wlan_scan_networks() 754 * Only used from lbs_scan_networks()
755*/ 755*/
756static void clear_selected_scan_list_entries(wlan_adapter *adapter, 756static void clear_selected_scan_list_entries(lbs_adapter *adapter,
757 const struct wlan_ioctl_user_scan_cfg *scan_cfg) 757 const struct lbs_ioctl_user_scan_cfg *scan_cfg)
758{ 758{
759 struct bss_descriptor *bss; 759 struct bss_descriptor *bss;
760 struct bss_descriptor *safe; 760 struct bss_descriptor *safe;
@@ -812,21 +812,21 @@ out:
812 * order to send the appropriate scan commands to firmware to populate or 812 * order to send the appropriate scan commands to firmware to populate or
813 * update the internal driver scan table 813 * update the internal driver scan table
814 * 814 *
815 * @param priv A pointer to wlan_private structure 815 * @param priv A pointer to lbs_private structure
816 * @param puserscanin Pointer to the input configuration for the requested 816 * @param puserscanin Pointer to the input configuration for the requested
817 * scan. 817 * scan.
818 * @param full_scan ??? 818 * @param full_scan ???
819 * 819 *
820 * @return 0 or < 0 if error 820 * @return 0 or < 0 if error
821 */ 821 */
822int wlan_scan_networks(wlan_private * priv, 822int lbs_scan_networks(lbs_private *priv,
823 const struct wlan_ioctl_user_scan_cfg * puserscanin, 823 const struct lbs_ioctl_user_scan_cfg *puserscanin,
824 int full_scan) 824 int full_scan)
825{ 825{
826 wlan_adapter * adapter = priv->adapter; 826 lbs_adapter *adapter = priv->adapter;
827 struct mrvlietypes_chanlistparamset *pchantlvout; 827 struct mrvlietypes_chanlistparamset *pchantlvout;
828 struct chanscanparamset * scan_chan_list = NULL; 828 struct chanscanparamset * scan_chan_list = NULL;
829 struct wlan_scan_cmd_config * scan_cfg = NULL; 829 struct lbs_scan_cmd_config *scan_cfg = NULL;
830 u8 filteredscan; 830 u8 filteredscan;
831 u8 scancurrentchanonly; 831 u8 scancurrentchanonly;
832 int maxchanperscan; 832 int maxchanperscan;
@@ -846,13 +846,13 @@ int wlan_scan_networks(wlan_private * priv,
846 cancel_delayed_work(&priv->scan_work); 846 cancel_delayed_work(&priv->scan_work);
847 847
848 scan_chan_list = kzalloc(sizeof(struct chanscanparamset) * 848 scan_chan_list = kzalloc(sizeof(struct chanscanparamset) *
849 WLAN_IOCTL_USER_SCAN_CHAN_MAX, GFP_KERNEL); 849 LBS_IOCTL_USER_SCAN_CHAN_MAX, GFP_KERNEL);
850 if (scan_chan_list == NULL) { 850 if (scan_chan_list == NULL) {
851 ret = -ENOMEM; 851 ret = -ENOMEM;
852 goto out; 852 goto out;
853 } 853 }
854 854
855 scan_cfg = wlan_scan_setup_scan_config(priv, 855 scan_cfg = lbs_scan_setup_scan_config(priv,
856 puserscanin, 856 puserscanin,
857 &pchantlvout, 857 &pchantlvout,
858 scan_chan_list, 858 scan_chan_list,
@@ -876,7 +876,7 @@ int wlan_scan_networks(wlan_private * priv,
876 } 876 }
877 } 877 }
878 878
879 ret = wlan_scan_channel_list(priv, 879 ret = lbs_scan_channel_list(priv,
880 maxchanperscan, 880 maxchanperscan,
881 filteredscan, 881 filteredscan,
882 scan_cfg, 882 scan_cfg,
@@ -897,7 +897,7 @@ int wlan_scan_networks(wlan_private * priv,
897 mutex_unlock(&adapter->lock); 897 mutex_unlock(&adapter->lock);
898#endif 898#endif
899 899
900 if (priv->adapter->connect_status == LIBERTAS_CONNECTED) { 900 if (priv->adapter->connect_status == LBS_CONNECTED) {
901 netif_carrier_on(priv->dev); 901 netif_carrier_on(priv->dev);
902 netif_wake_queue(priv->dev); 902 netif_wake_queue(priv->dev);
903 if (priv->mesh_dev) { 903 if (priv->mesh_dev) {
@@ -928,7 +928,7 @@ out:
928 * 928 *
929 * @return 0 or -1 929 * @return 0 or -1
930 */ 930 */
931static int libertas_process_bss(struct bss_descriptor * bss, 931static int lbs_process_bss(struct bss_descriptor *bss,
932 u8 ** pbeaconinfo, int *bytesleft) 932 u8 ** pbeaconinfo, int *bytesleft)
933{ 933{
934 struct ieeetypes_fhparamset *pFH; 934 struct ieeetypes_fhparamset *pFH;
@@ -1139,7 +1139,7 @@ static int libertas_process_bss(struct bss_descriptor * bss,
1139 1139
1140 /* Timestamp */ 1140 /* Timestamp */
1141 bss->last_scanned = jiffies; 1141 bss->last_scanned = jiffies;
1142 libertas_unset_basic_rate_flags(bss->rates, sizeof(bss->rates)); 1142 lbs_unset_basic_rate_flags(bss->rates, sizeof(bss->rates));
1143 1143
1144 ret = 0; 1144 ret = 0;
1145 1145
@@ -1153,13 +1153,13 @@ done:
1153 * 1153 *
1154 * Used in association code 1154 * Used in association code
1155 * 1155 *
1156 * @param adapter A pointer to wlan_adapter 1156 * @param adapter A pointer to lbs_adapter
1157 * @param bssid BSSID to find in the scan list 1157 * @param bssid BSSID to find in the scan list
1158 * @param mode Network mode: Infrastructure or IBSS 1158 * @param mode Network mode: Infrastructure or IBSS
1159 * 1159 *
1160 * @return index in BSSID list, or error return code (< 0) 1160 * @return index in BSSID list, or error return code (< 0)
1161 */ 1161 */
1162struct bss_descriptor *libertas_find_bssid_in_list(wlan_adapter * adapter, 1162struct bss_descriptor *lbs_find_bssid_in_list(lbs_adapter *adapter,
1163 u8 * bssid, u8 mode) 1163 u8 * bssid, u8 mode)
1164{ 1164{
1165 struct bss_descriptor * iter_bss; 1165 struct bss_descriptor * iter_bss;
@@ -1205,14 +1205,14 @@ out:
1205 * 1205 *
1206 * Used in association code 1206 * Used in association code
1207 * 1207 *
1208 * @param adapter A pointer to wlan_adapter 1208 * @param adapter A pointer to lbs_adapter
1209 * @param ssid SSID to find in the list 1209 * @param ssid SSID to find in the list
1210 * @param bssid BSSID to qualify the SSID selection (if provided) 1210 * @param bssid BSSID to qualify the SSID selection (if provided)
1211 * @param mode Network mode: Infrastructure or IBSS 1211 * @param mode Network mode: Infrastructure or IBSS
1212 * 1212 *
1213 * @return index in BSSID list 1213 * @return index in BSSID list
1214 */ 1214 */
1215struct bss_descriptor * libertas_find_ssid_in_list(wlan_adapter * adapter, 1215struct bss_descriptor *lbs_find_ssid_in_list(lbs_adapter *adapter,
1216 u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode, 1216 u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode,
1217 int channel) 1217 int channel)
1218{ 1218{
@@ -1230,7 +1230,7 @@ struct bss_descriptor * libertas_find_ssid_in_list(wlan_adapter * adapter,
1230 || (iter_bss->last_scanned < tmp_oldest->last_scanned)) 1230 || (iter_bss->last_scanned < tmp_oldest->last_scanned))
1231 tmp_oldest = iter_bss; 1231 tmp_oldest = iter_bss;
1232 1232
1233 if (libertas_ssid_cmp(iter_bss->ssid, iter_bss->ssid_len, 1233 if (lbs_ssid_cmp(iter_bss->ssid, iter_bss->ssid_len,
1234 ssid, ssid_len) != 0) 1234 ssid, ssid_len) != 0)
1235 continue; /* ssid doesn't match */ 1235 continue; /* ssid doesn't match */
1236 if (bssid && compare_ether_addr(iter_bss->bssid, bssid) != 0) 1236 if (bssid && compare_ether_addr(iter_bss->bssid, bssid) != 0)
@@ -1277,11 +1277,11 @@ out:
1277 * Search the scan table for the best SSID that also matches the current 1277 * Search the scan table for the best SSID that also matches the current
1278 * adapter network preference (infrastructure or adhoc) 1278 * adapter network preference (infrastructure or adhoc)
1279 * 1279 *
1280 * @param adapter A pointer to wlan_adapter 1280 * @param adapter A pointer to lbs_adapter
1281 * 1281 *
1282 * @return index in BSSID list 1282 * @return index in BSSID list
1283 */ 1283 */
1284static struct bss_descriptor * libertas_find_best_ssid_in_list(wlan_adapter * adapter, 1284static struct bss_descriptor *lbs_find_best_ssid_in_list(lbs_adapter *adapter,
1285 u8 mode) 1285 u8 mode)
1286{ 1286{
1287 u8 bestrssi = 0; 1287 u8 bestrssi = 0;
@@ -1323,27 +1323,27 @@ static struct bss_descriptor * libertas_find_best_ssid_in_list(wlan_adapter * ad
1323 * 1323 *
1324 * Used from association worker. 1324 * Used from association worker.
1325 * 1325 *
1326 * @param priv A pointer to wlan_private structure 1326 * @param priv A pointer to lbs_private structure
1327 * @param pSSID A pointer to AP's ssid 1327 * @param pSSID A pointer to AP's ssid
1328 * 1328 *
1329 * @return 0--success, otherwise--fail 1329 * @return 0--success, otherwise--fail
1330 */ 1330 */
1331int libertas_find_best_network_ssid(wlan_private * priv, 1331int lbs_find_best_network_ssid(lbs_private *priv,
1332 u8 *out_ssid, u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode) 1332 u8 *out_ssid, u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode)
1333{ 1333{
1334 wlan_adapter *adapter = priv->adapter; 1334 lbs_adapter *adapter = priv->adapter;
1335 int ret = -1; 1335 int ret = -1;
1336 struct bss_descriptor * found; 1336 struct bss_descriptor * found;
1337 1337
1338 lbs_deb_enter(LBS_DEB_SCAN); 1338 lbs_deb_enter(LBS_DEB_SCAN);
1339 1339
1340 wlan_scan_networks(priv, NULL, 1); 1340 lbs_scan_networks(priv, NULL, 1);
1341 if (adapter->surpriseremoved) 1341 if (adapter->surpriseremoved)
1342 goto out; 1342 goto out;
1343 1343
1344 wait_event_interruptible(adapter->cmd_pending, !adapter->nr_cmd_pending); 1344 wait_event_interruptible(adapter->cmd_pending, !adapter->nr_cmd_pending);
1345 1345
1346 found = libertas_find_best_ssid_in_list(adapter, preferred_mode); 1346 found = lbs_find_best_ssid_in_list(adapter, preferred_mode);
1347 if (found && (found->ssid_len > 0)) { 1347 if (found && (found->ssid_len > 0)) {
1348 memcpy(out_ssid, &found->ssid, IW_ESSID_MAX_SIZE); 1348 memcpy(out_ssid, &found->ssid, IW_ESSID_MAX_SIZE);
1349 *out_ssid_len = found->ssid_len; 1349 *out_ssid_len = found->ssid_len;
@@ -1366,11 +1366,11 @@ out:
1366 * 1366 *
1367 * @return 0 --success, otherwise fail 1367 * @return 0 --success, otherwise fail
1368 */ 1368 */
1369int libertas_set_scan(struct net_device *dev, struct iw_request_info *info, 1369int lbs_set_scan(struct net_device *dev, struct iw_request_info *info,
1370 struct iw_param *vwrq, char *extra) 1370 struct iw_param *vwrq, char *extra)
1371{ 1371{
1372 wlan_private *priv = dev->priv; 1372 lbs_private *priv = dev->priv;
1373 wlan_adapter *adapter = priv->adapter; 1373 lbs_adapter *adapter = priv->adapter;
1374 1374
1375 lbs_deb_enter(LBS_DEB_SCAN); 1375 lbs_deb_enter(LBS_DEB_SCAN);
1376 1376
@@ -1392,7 +1392,7 @@ int libertas_set_scan(struct net_device *dev, struct iw_request_info *info,
1392 * 1392 *
1393 * Used in association code and from debugfs 1393 * Used in association code and from debugfs
1394 * 1394 *
1395 * @param priv A pointer to wlan_private structure 1395 * @param priv A pointer to lbs_private structure
1396 * @param ssid A pointer to the SSID to scan for 1396 * @param ssid A pointer to the SSID to scan for
1397 * @param ssid_len Length of the SSID 1397 * @param ssid_len Length of the SSID
1398 * @param clear_ssid Should existing scan results with this SSID 1398 * @param clear_ssid Should existing scan results with this SSID
@@ -1402,11 +1402,11 @@ int libertas_set_scan(struct net_device *dev, struct iw_request_info *info,
1402 * 1402 *
1403 * @return 0-success, otherwise fail 1403 * @return 0-success, otherwise fail
1404 */ 1404 */
1405int libertas_send_specific_ssid_scan(wlan_private * priv, 1405int lbs_send_specific_ssid_scan(lbs_private *priv,
1406 u8 *ssid, u8 ssid_len, u8 clear_ssid) 1406 u8 *ssid, u8 ssid_len, u8 clear_ssid)
1407{ 1407{
1408 wlan_adapter *adapter = priv->adapter; 1408 lbs_adapter *adapter = priv->adapter;
1409 struct wlan_ioctl_user_scan_cfg scancfg; 1409 struct lbs_ioctl_user_scan_cfg scancfg;
1410 int ret = 0; 1410 int ret = 0;
1411 1411
1412 lbs_deb_enter_args(LBS_DEB_SCAN, "SSID '%s', clear %d", 1412 lbs_deb_enter_args(LBS_DEB_SCAN, "SSID '%s', clear %d",
@@ -1420,7 +1420,7 @@ int libertas_send_specific_ssid_scan(wlan_private * priv,
1420 scancfg.ssid_len = ssid_len; 1420 scancfg.ssid_len = ssid_len;
1421 scancfg.clear_ssid = clear_ssid; 1421 scancfg.clear_ssid = clear_ssid;
1422 1422
1423 wlan_scan_networks(priv, &scancfg, 1); 1423 lbs_scan_networks(priv, &scancfg, 1);
1424 if (adapter->surpriseremoved) { 1424 if (adapter->surpriseremoved) {
1425 ret = -1; 1425 ret = -1;
1426 goto out; 1426 goto out;
@@ -1443,11 +1443,11 @@ out:
1443 1443
1444#define MAX_CUSTOM_LEN 64 1444#define MAX_CUSTOM_LEN 64
1445 1445
1446static inline char *libertas_translate_scan(wlan_private *priv, 1446static inline char *lbs_translate_scan(lbs_private *priv,
1447 char *start, char *stop, 1447 char *start, char *stop,
1448 struct bss_descriptor *bss) 1448 struct bss_descriptor *bss)
1449{ 1449{
1450 wlan_adapter *adapter = priv->adapter; 1450 lbs_adapter *adapter = priv->adapter;
1451 struct chan_freq_power *cfp; 1451 struct chan_freq_power *cfp;
1452 char *current_val; /* For rates */ 1452 char *current_val; /* For rates */
1453 struct iw_event iwe; /* Temporary buffer */ 1453 struct iw_event iwe; /* Temporary buffer */
@@ -1459,7 +1459,7 @@ static inline char *libertas_translate_scan(wlan_private *priv,
1459 1459
1460 lbs_deb_enter(LBS_DEB_SCAN); 1460 lbs_deb_enter(LBS_DEB_SCAN);
1461 1461
1462 cfp = libertas_find_cfp_by_band_and_channel(adapter, 0, bss->channel); 1462 cfp = lbs_find_cfp_by_band_and_channel(adapter, 0, bss->channel);
1463 if (!cfp) { 1463 if (!cfp) {
1464 lbs_deb_scan("Invalid channel number %d\n", bss->channel); 1464 lbs_deb_scan("Invalid channel number %d\n", bss->channel);
1465 start = NULL; 1465 start = NULL;
@@ -1515,7 +1515,7 @@ static inline char *libertas_translate_scan(wlan_private *priv,
1515 */ 1515 */
1516 if ((adapter->mode == IW_MODE_ADHOC) 1516 if ((adapter->mode == IW_MODE_ADHOC)
1517 && adapter->adhoccreate 1517 && adapter->adhoccreate
1518 && !libertas_ssid_cmp(adapter->curbssparams.ssid, 1518 && !lbs_ssid_cmp(adapter->curbssparams.ssid,
1519 adapter->curbssparams.ssid_len, 1519 adapter->curbssparams.ssid_len,
1520 bss->ssid, bss->ssid_len)) { 1520 bss->ssid, bss->ssid_len)) {
1521 int snr, nf; 1521 int snr, nf;
@@ -1549,7 +1549,7 @@ static inline char *libertas_translate_scan(wlan_private *priv,
1549 stop, &iwe, IW_EV_PARAM_LEN); 1549 stop, &iwe, IW_EV_PARAM_LEN);
1550 } 1550 }
1551 if ((bss->mode == IW_MODE_ADHOC) 1551 if ((bss->mode == IW_MODE_ADHOC)
1552 && !libertas_ssid_cmp(adapter->curbssparams.ssid, 1552 && !lbs_ssid_cmp(adapter->curbssparams.ssid,
1553 adapter->curbssparams.ssid_len, 1553 adapter->curbssparams.ssid_len,
1554 bss->ssid, bss->ssid_len) 1554 bss->ssid, bss->ssid_len)
1555 && adapter->adhoccreate) { 1555 && adapter->adhoccreate) {
@@ -1606,12 +1606,12 @@ out:
1606 * 1606 *
1607 * @return 0 --success, otherwise fail 1607 * @return 0 --success, otherwise fail
1608 */ 1608 */
1609int libertas_get_scan(struct net_device *dev, struct iw_request_info *info, 1609int lbs_get_scan(struct net_device *dev, struct iw_request_info *info,
1610 struct iw_point *dwrq, char *extra) 1610 struct iw_point *dwrq, char *extra)
1611{ 1611{
1612#define SCAN_ITEM_SIZE 128 1612#define SCAN_ITEM_SIZE 128
1613 wlan_private *priv = dev->priv; 1613 lbs_private *priv = dev->priv;
1614 wlan_adapter *adapter = priv->adapter; 1614 lbs_adapter *adapter = priv->adapter;
1615 int err = 0; 1615 int err = 0;
1616 char *ev = extra; 1616 char *ev = extra;
1617 char *stop = ev + dwrq->length; 1617 char *stop = ev + dwrq->length;
@@ -1622,7 +1622,7 @@ int libertas_get_scan(struct net_device *dev, struct iw_request_info *info,
1622 1622
1623 /* Update RSSI if current BSS is a locally created ad-hoc BSS */ 1623 /* Update RSSI if current BSS is a locally created ad-hoc BSS */
1624 if ((adapter->mode == IW_MODE_ADHOC) && adapter->adhoccreate) { 1624 if ((adapter->mode == IW_MODE_ADHOC) && adapter->adhoccreate) {
1625 libertas_prepare_and_send_command(priv, CMD_802_11_RSSI, 0, 1625 lbs_prepare_and_send_command(priv, CMD_802_11_RSSI, 0,
1626 CMD_OPTION_WAITFORRSP, 0, NULL); 1626 CMD_OPTION_WAITFORRSP, 0, NULL);
1627 } 1627 }
1628 1628
@@ -1650,7 +1650,7 @@ int libertas_get_scan(struct net_device *dev, struct iw_request_info *info,
1650 } 1650 }
1651 1651
1652 /* Translate to WE format this entry */ 1652 /* Translate to WE format this entry */
1653 next_ev = libertas_translate_scan(priv, ev, stop, iter_bss); 1653 next_ev = lbs_translate_scan(priv, ev, stop, iter_bss);
1654 if (next_ev == NULL) 1654 if (next_ev == NULL)
1655 continue; 1655 continue;
1656 ev = next_ev; 1656 ev = next_ev;
@@ -1677,24 +1677,24 @@ int libertas_get_scan(struct net_device *dev, struct iw_request_info *info,
1677/** 1677/**
1678 * @brief Prepare a scan command to be sent to the firmware 1678 * @brief Prepare a scan command to be sent to the firmware
1679 * 1679 *
1680 * Called from libertas_prepare_and_send_command() in cmd.c 1680 * Called from lbs_prepare_and_send_command() in cmd.c
1681 * 1681 *
1682 * Sends a fixed lenght data part (specifying the BSS type and BSSID filters) 1682 * Sends a fixed lenght data part (specifying the BSS type and BSSID filters)
1683 * as well as a variable number/length of TLVs to the firmware. 1683 * as well as a variable number/length of TLVs to the firmware.
1684 * 1684 *
1685 * @param priv A pointer to wlan_private structure 1685 * @param priv A pointer to lbs_private structure
1686 * @param cmd A pointer to cmd_ds_command structure to be sent to 1686 * @param cmd A pointer to cmd_ds_command structure to be sent to
1687 * firmware with the cmd_DS_801_11_SCAN structure 1687 * firmware with the cmd_DS_801_11_SCAN structure
1688 * @param pdata_buf Void pointer cast of a wlan_scan_cmd_config struct used 1688 * @param pdata_buf Void pointer cast of a lbs_scan_cmd_config struct used
1689 * to set the fields/TLVs for the command sent to firmware 1689 * to set the fields/TLVs for the command sent to firmware
1690 * 1690 *
1691 * @return 0 or -1 1691 * @return 0 or -1
1692 */ 1692 */
1693int libertas_cmd_80211_scan(wlan_private * priv, 1693int lbs_cmd_80211_scan(lbs_private *priv,
1694 struct cmd_ds_command *cmd, void *pdata_buf) 1694 struct cmd_ds_command *cmd, void *pdata_buf)
1695{ 1695{
1696 struct cmd_ds_802_11_scan *pscan = &cmd->params.scan; 1696 struct cmd_ds_802_11_scan *pscan = &cmd->params.scan;
1697 struct wlan_scan_cmd_config *pscancfg = pdata_buf; 1697 struct lbs_scan_cmd_config *pscancfg = pdata_buf;
1698 1698
1699 lbs_deb_enter(LBS_DEB_SCAN); 1699 lbs_deb_enter(LBS_DEB_SCAN);
1700 1700
@@ -1750,14 +1750,14 @@ static inline int is_same_network(struct bss_descriptor *src,
1750 * | bufsize and sizeof the fixed fields above) | 1750 * | bufsize and sizeof the fixed fields above) |
1751 * .-----------------------------------------------------------. 1751 * .-----------------------------------------------------------.
1752 * 1752 *
1753 * @param priv A pointer to wlan_private structure 1753 * @param priv A pointer to lbs_private structure
1754 * @param resp A pointer to cmd_ds_command 1754 * @param resp A pointer to cmd_ds_command
1755 * 1755 *
1756 * @return 0 or -1 1756 * @return 0 or -1
1757 */ 1757 */
1758int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp) 1758int lbs_ret_80211_scan(lbs_private *priv, struct cmd_ds_command *resp)
1759{ 1759{
1760 wlan_adapter *adapter = priv->adapter; 1760 lbs_adapter *adapter = priv->adapter;
1761 struct cmd_ds_802_11_scan_rsp *pscan; 1761 struct cmd_ds_802_11_scan_rsp *pscan;
1762 struct bss_descriptor * iter_bss; 1762 struct bss_descriptor * iter_bss;
1763 struct bss_descriptor * safe; 1763 struct bss_descriptor * safe;
@@ -1821,7 +1821,7 @@ int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp)
1821 1821
1822 /* Process the data fields and IEs returned for this BSS */ 1822 /* Process the data fields and IEs returned for this BSS */
1823 memset(&new, 0, sizeof (struct bss_descriptor)); 1823 memset(&new, 0, sizeof (struct bss_descriptor));
1824 if (libertas_process_bss(&new, &pbssinfo, &bytesleft) != 0) { 1824 if (lbs_process_bss(&new, &pbssinfo, &bytesleft) != 0) {
1825 /* error parsing the scan response, skipped */ 1825 /* error parsing the scan response, skipped */
1826 lbs_deb_scan("SCAN_RESP: process_bss returned ERROR\n"); 1826 lbs_deb_scan("SCAN_RESP: process_bss returned ERROR\n");
1827 continue; 1827 continue;
diff --git a/drivers/net/wireless/libertas/scan.h b/drivers/net/wireless/libertas/scan.h
index c29c031bef8c..7ed66f40d181 100644
--- a/drivers/net/wireless/libertas/scan.h
+++ b/drivers/net/wireless/libertas/scan.h
@@ -2,10 +2,10 @@
2 * Interface for the wlan network scan routines 2 * Interface for the wlan network scan routines
3 * 3 *
4 * Driver interface functions and type declarations for the scan module 4 * Driver interface functions and type declarations for the scan module
5 * implemented in wlan_scan.c. 5 * implemented in scan.c.
6 */ 6 */
7#ifndef _WLAN_SCAN_H 7#ifndef _LBS_SCAN_H
8#define _WLAN_SCAN_H 8#define _LBS_SCAN_H
9 9
10#include <net/ieee80211.h> 10#include <net/ieee80211.h>
11#include "hostcmd.h" 11#include "hostcmd.h"
@@ -13,38 +13,38 @@
13/** 13/**
14 * @brief Maximum number of channels that can be sent in a setuserscan ioctl 14 * @brief Maximum number of channels that can be sent in a setuserscan ioctl
15 * 15 *
16 * @sa wlan_ioctl_user_scan_cfg 16 * @sa lbs_ioctl_user_scan_cfg
17 */ 17 */
18#define WLAN_IOCTL_USER_SCAN_CHAN_MAX 50 18#define LBS_IOCTL_USER_SCAN_CHAN_MAX 50
19 19
20//! Infrastructure BSS scan type in wlan_scan_cmd_config 20//! Infrastructure BSS scan type in lbs_scan_cmd_config
21#define WLAN_SCAN_BSS_TYPE_BSS 1 21#define LBS_SCAN_BSS_TYPE_BSS 1
22 22
23//! Adhoc BSS scan type in wlan_scan_cmd_config 23//! Adhoc BSS scan type in lbs_scan_cmd_config
24#define WLAN_SCAN_BSS_TYPE_IBSS 2 24#define LBS_SCAN_BSS_TYPE_IBSS 2
25 25
26//! Adhoc or Infrastructure BSS scan type in wlan_scan_cmd_config, no filter 26//! Adhoc or Infrastructure BSS scan type in lbs_scan_cmd_config, no filter
27#define WLAN_SCAN_BSS_TYPE_ANY 3 27#define LBS_SCAN_BSS_TYPE_ANY 3
28 28
29/** 29/**
30 * @brief Structure used internally in the wlan driver to configure a scan. 30 * @brief Structure used internally in the wlan driver to configure a scan.
31 * 31 *
32 * Sent to the command processing module to configure the firmware 32 * Sent to the command processing module to configure the firmware
33 * scan command prepared by libertas_cmd_80211_scan. 33 * scan command prepared by lbs_cmd_80211_scan.
34 * 34 *
35 * @sa wlan_scan_networks 35 * @sa lbs_scan_networks
36 * 36 *
37 */ 37 */
38struct wlan_scan_cmd_config { 38struct lbs_scan_cmd_config {
39 /** 39 /**
40 * @brief BSS type to be sent in the firmware command 40 * @brief BSS type to be sent in the firmware command
41 * 41 *
42 * Field can be used to restrict the types of networks returned in the 42 * Field can be used to restrict the types of networks returned in the
43 * scan. valid settings are: 43 * scan. valid settings are:
44 * 44 *
45 * - WLAN_SCAN_BSS_TYPE_BSS (infrastructure) 45 * - LBS_SCAN_BSS_TYPE_BSS (infrastructure)
46 * - WLAN_SCAN_BSS_TYPE_IBSS (adhoc) 46 * - LBS_SCAN_BSS_TYPE_IBSS (adhoc)
47 * - WLAN_SCAN_BSS_TYPE_ANY (unrestricted, adhoc and infrastructure) 47 * - LBS_SCAN_BSS_TYPE_ANY (unrestricted, adhoc and infrastructure)
48 */ 48 */
49 u8 bsstype; 49 u8 bsstype;
50 50
@@ -68,12 +68,12 @@ struct wlan_scan_cmd_config {
68}; 68};
69 69
70/** 70/**
71 * @brief IOCTL channel sub-structure sent in wlan_ioctl_user_scan_cfg 71 * @brief IOCTL channel sub-structure sent in lbs_ioctl_user_scan_cfg
72 * 72 *
73 * Multiple instances of this structure are included in the IOCTL command 73 * Multiple instances of this structure are included in the IOCTL command
74 * to configure a instance of a scan on the specific channel. 74 * to configure a instance of a scan on the specific channel.
75 */ 75 */
76struct wlan_ioctl_user_scan_chan { 76struct lbs_ioctl_user_scan_chan {
77 u8 channumber; //!< channel Number to scan 77 u8 channumber; //!< channel Number to scan
78 u8 radiotype; //!< Radio type: 'B/G' band = 0, 'A' band = 1 78 u8 radiotype; //!< Radio type: 'B/G' band = 0, 'A' band = 1
79 u8 scantype; //!< Scan type: Active = 0, Passive = 1 79 u8 scantype; //!< Scan type: Active = 0, Passive = 1
@@ -83,23 +83,23 @@ struct wlan_ioctl_user_scan_chan {
83/** 83/**
84 * @brief IOCTL input structure to configure an immediate scan cmd to firmware 84 * @brief IOCTL input structure to configure an immediate scan cmd to firmware
85 * 85 *
86 * Used in the setuserscan (WLAN_SET_USER_SCAN) private ioctl. Specifies 86 * Used in the setuserscan (LBS_SET_USER_SCAN) private ioctl. Specifies
87 * a number of parameters to be used in general for the scan as well 87 * a number of parameters to be used in general for the scan as well
88 * as a channel list (wlan_ioctl_user_scan_chan) for each scan period 88 * as a channel list (lbs_ioctl_user_scan_chan) for each scan period
89 * desired. 89 * desired.
90 * 90 *
91 * @sa libertas_set_user_scan_ioctl 91 * @sa lbs_set_user_scan_ioctl
92 */ 92 */
93struct wlan_ioctl_user_scan_cfg { 93struct lbs_ioctl_user_scan_cfg {
94 /** 94 /**
95 * @brief BSS type to be sent in the firmware command 95 * @brief BSS type to be sent in the firmware command
96 * 96 *
97 * Field can be used to restrict the types of networks returned in the 97 * Field can be used to restrict the types of networks returned in the
98 * scan. valid settings are: 98 * scan. valid settings are:
99 * 99 *
100 * - WLAN_SCAN_BSS_TYPE_BSS (infrastructure) 100 * - LBS_SCAN_BSS_TYPE_BSS (infrastructure)
101 * - WLAN_SCAN_BSS_TYPE_IBSS (adhoc) 101 * - LBS_SCAN_BSS_TYPE_IBSS (adhoc)
102 * - WLAN_SCAN_BSS_TYPE_ANY (unrestricted, adhoc and infrastructure) 102 * - LBS_SCAN_BSS_TYPE_ANY (unrestricted, adhoc and infrastructure)
103 */ 103 */
104 u8 bsstype; 104 u8 bsstype;
105 105
@@ -128,7 +128,7 @@ struct wlan_ioctl_user_scan_cfg {
128 /** 128 /**
129 * @brief Variable number (fixed maximum) of channels to scan up 129 * @brief Variable number (fixed maximum) of channels to scan up
130 */ 130 */
131 struct wlan_ioctl_user_scan_chan chanlist[WLAN_IOCTL_USER_SCAN_CHAN_MAX]; 131 struct lbs_ioctl_user_scan_chan chanlist[LBS_IOCTL_USER_SCAN_CHAN_MAX];
132}; 132};
133 133
134/** 134/**
@@ -174,30 +174,30 @@ struct bss_descriptor {
174 struct list_head list; 174 struct list_head list;
175}; 175};
176 176
177int libertas_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len); 177int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len);
178 178
179struct bss_descriptor * libertas_find_ssid_in_list(wlan_adapter * adapter, 179struct bss_descriptor *lbs_find_ssid_in_list(lbs_adapter *adapter,
180 u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode, 180 u8 *ssid, u8 ssid_len, u8 *bssid, u8 mode,
181 int channel); 181 int channel);
182 182
183struct bss_descriptor * libertas_find_bssid_in_list(wlan_adapter * adapter, 183struct bss_descriptor *lbs_find_bssid_in_list(lbs_adapter *adapter,
184 u8 * bssid, u8 mode); 184 u8 *bssid, u8 mode);
185 185
186int libertas_find_best_network_ssid(wlan_private * priv, u8 *out_ssid, 186int lbs_find_best_network_ssid(lbs_private *priv, u8 *out_ssid,
187 u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode); 187 u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode);
188 188
189int libertas_send_specific_ssid_scan(wlan_private * priv, u8 *ssid, 189int lbs_send_specific_ssid_scan(lbs_private *priv, u8 *ssid,
190 u8 ssid_len, u8 clear_ssid); 190 u8 ssid_len, u8 clear_ssid);
191 191
192int libertas_cmd_80211_scan(wlan_private * priv, 192int lbs_cmd_80211_scan(lbs_private *priv,
193 struct cmd_ds_command *cmd, 193 struct cmd_ds_command *cmd,
194 void *pdata_buf); 194 void *pdata_buf);
195 195
196int libertas_ret_80211_scan(wlan_private * priv, 196int lbs_ret_80211_scan(lbs_private *priv,
197 struct cmd_ds_command *resp); 197 struct cmd_ds_command *resp);
198 198
199int wlan_scan_networks(wlan_private * priv, 199int lbs_scan_networks(lbs_private *priv,
200 const struct wlan_ioctl_user_scan_cfg * puserscanin, 200 const struct lbs_ioctl_user_scan_cfg *puserscanin,
201 int full_scan); 201 int full_scan);
202 202
203struct ifreq; 203struct ifreq;
@@ -205,11 +205,11 @@ struct ifreq;
205struct iw_point; 205struct iw_point;
206struct iw_param; 206struct iw_param;
207struct iw_request_info; 207struct iw_request_info;
208int libertas_get_scan(struct net_device *dev, struct iw_request_info *info, 208int lbs_get_scan(struct net_device *dev, struct iw_request_info *info,
209 struct iw_point *dwrq, char *extra); 209 struct iw_point *dwrq, char *extra);
210int libertas_set_scan(struct net_device *dev, struct iw_request_info *info, 210int lbs_set_scan(struct net_device *dev, struct iw_request_info *info,
211 struct iw_param *vwrq, char *extra); 211 struct iw_param *vwrq, char *extra);
212 212
213void libertas_scan_worker(struct work_struct *work); 213void lbs_scan_worker(struct work_struct *work);
214 214
215#endif /* _WLAN_SCAN_H */ 215#endif
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c
index fbec06c10dd7..93725ce55b10 100644
--- a/drivers/net/wireless/libertas/tx.c
+++ b/drivers/net/wireless/libertas/tx.c
@@ -52,11 +52,11 @@ static u32 convert_radiotap_rate_to_mv(u8 rate)
52 * @brief This function processes a single packet and sends 52 * @brief This function processes a single packet and sends
53 * to IF layer 53 * to IF layer
54 * 54 *
55 * @param priv A pointer to wlan_private structure 55 * @param priv A pointer to lbs_private structure
56 * @param skb A pointer to skb which includes TX packet 56 * @param skb A pointer to skb which includes TX packet
57 * @return 0 or -1 57 * @return 0 or -1
58 */ 58 */
59static int SendSinglePacket(wlan_private * priv, struct sk_buff *skb) 59static int SendSinglePacket(lbs_private *priv, struct sk_buff *skb)
60{ 60{
61 int ret = 0; 61 int ret = 0;
62 struct txpd localtxpd; 62 struct txpd localtxpd;
@@ -86,7 +86,7 @@ static int SendSinglePacket(wlan_private * priv, struct sk_buff *skb)
86 plocaltxpd->tx_packet_location = cpu_to_le32(sizeof(struct txpd)); 86 plocaltxpd->tx_packet_location = cpu_to_le32(sizeof(struct txpd));
87 87
88 p802x_hdr = skb->data; 88 p802x_hdr = skb->data;
89 if (priv->adapter->monitormode != WLAN_MONITOR_OFF) { 89 if (priv->adapter->monitormode != LBS_MONITOR_OFF) {
90 90
91 /* locate radiotap header */ 91 /* locate radiotap header */
92 pradiotap_hdr = (struct tx_radiotap_hdr *)skb->data; 92 pradiotap_hdr = (struct tx_radiotap_hdr *)skb->data;
@@ -106,7 +106,7 @@ static int SendSinglePacket(wlan_private * priv, struct sk_buff *skb)
106 106
107 } 107 }
108 /* copy destination address from 802.3 or 802.11 header */ 108 /* copy destination address from 802.3 or 802.11 header */
109 if (priv->adapter->monitormode != WLAN_MONITOR_OFF) 109 if (priv->adapter->monitormode != LBS_MONITOR_OFF)
110 memcpy(plocaltxpd->tx_dest_addr_high, p802x_hdr + 4, ETH_ALEN); 110 memcpy(plocaltxpd->tx_dest_addr_high, p802x_hdr + 4, ETH_ALEN);
111 else 111 else
112 memcpy(plocaltxpd->tx_dest_addr_high, p802x_hdr, ETH_ALEN); 112 memcpy(plocaltxpd->tx_dest_addr_high, p802x_hdr, ETH_ALEN);
@@ -144,7 +144,7 @@ done:
144 priv->stats.tx_errors++; 144 priv->stats.tx_errors++;
145 } 145 }
146 146
147 if (!ret && priv->adapter->monitormode != WLAN_MONITOR_OFF) { 147 if (!ret && priv->adapter->monitormode != LBS_MONITOR_OFF) {
148 /* Keep the skb to echo it back once Tx feedback is 148 /* Keep the skb to echo it back once Tx feedback is
149 received from FW */ 149 received from FW */
150 skb_orphan(skb); 150 skb_orphan(skb);
@@ -164,9 +164,9 @@ done:
164} 164}
165 165
166 166
167void libertas_tx_runqueue(wlan_private *priv) 167void lbs_tx_runqueue(lbs_private *priv)
168{ 168{
169 wlan_adapter *adapter = priv->adapter; 169 lbs_adapter *adapter = priv->adapter;
170 int i; 170 int i;
171 171
172 spin_lock(&adapter->txqueue_lock); 172 spin_lock(&adapter->txqueue_lock);
@@ -180,9 +180,9 @@ void libertas_tx_runqueue(wlan_private *priv)
180 spin_unlock(&adapter->txqueue_lock); 180 spin_unlock(&adapter->txqueue_lock);
181} 181}
182 182
183static void wlan_tx_queue(wlan_private *priv, struct sk_buff *skb) 183static void lbs_tx_queue(lbs_private *priv, struct sk_buff *skb)
184{ 184{
185 wlan_adapter *adapter = priv->adapter; 185 lbs_adapter *adapter = priv->adapter;
186 186
187 spin_lock(&adapter->txqueue_lock); 187 spin_lock(&adapter->txqueue_lock);
188 188
@@ -205,10 +205,10 @@ static void wlan_tx_queue(wlan_private *priv, struct sk_buff *skb)
205 * @brief This function checks the conditions and sends packet to IF 205 * @brief This function checks the conditions and sends packet to IF
206 * layer if everything is ok. 206 * layer if everything is ok.
207 * 207 *
208 * @param priv A pointer to wlan_private structure 208 * @param priv A pointer to lbs_private structure
209 * @return n/a 209 * @return n/a
210 */ 210 */
211int libertas_process_tx(wlan_private * priv, struct sk_buff *skb) 211int lbs_process_tx(lbs_private *priv, struct sk_buff *skb)
212{ 212{
213 int ret = -1; 213 int ret = -1;
214 214
@@ -223,7 +223,7 @@ int libertas_process_tx(wlan_private * priv, struct sk_buff *skb)
223 223
224 if ((priv->adapter->psstate == PS_STATE_SLEEP) || 224 if ((priv->adapter->psstate == PS_STATE_SLEEP) ||
225 (priv->adapter->psstate == PS_STATE_PRE_SLEEP)) { 225 (priv->adapter->psstate == PS_STATE_PRE_SLEEP)) {
226 wlan_tx_queue(priv, skb); 226 lbs_tx_queue(priv, skb);
227 return ret; 227 return ret;
228 } 228 }
229 229
@@ -239,20 +239,20 @@ done:
239 * @brief This function sends to the host the last transmitted packet, 239 * @brief This function sends to the host the last transmitted packet,
240 * filling the radiotap headers with transmission information. 240 * filling the radiotap headers with transmission information.
241 * 241 *
242 * @param priv A pointer to wlan_private structure 242 * @param priv A pointer to lbs_private structure
243 * @param status A 32 bit value containing transmission status. 243 * @param status A 32 bit value containing transmission status.
244 * 244 *
245 * @returns void 245 * @returns void
246 */ 246 */
247void libertas_send_tx_feedback(wlan_private * priv) 247void lbs_send_tx_feedback(lbs_private *priv)
248{ 248{
249 wlan_adapter *adapter = priv->adapter; 249 lbs_adapter *adapter = priv->adapter;
250 struct tx_radiotap_hdr *radiotap_hdr; 250 struct tx_radiotap_hdr *radiotap_hdr;
251 u32 status = adapter->eventcause; 251 u32 status = adapter->eventcause;
252 int txfail; 252 int txfail;
253 int try_count; 253 int try_count;
254 254
255 if (adapter->monitormode == WLAN_MONITOR_OFF || 255 if (adapter->monitormode == LBS_MONITOR_OFF ||
256 adapter->currenttxskb == NULL) 256 adapter->currenttxskb == NULL)
257 return; 257 return;
258 258
@@ -270,13 +270,13 @@ void libertas_send_tx_feedback(wlan_private * priv)
270 try_count = (status >> 16) & 0xff; 270 try_count = (status >> 16) & 0xff;
271 radiotap_hdr->data_retries = (try_count) ? 271 radiotap_hdr->data_retries = (try_count) ?
272 (1 + adapter->txretrycount - try_count) : 0; 272 (1 + adapter->txretrycount - try_count) : 0;
273 libertas_upload_rx_packet(priv, adapter->currenttxskb); 273 lbs_upload_rx_packet(priv, adapter->currenttxskb);
274 adapter->currenttxskb = NULL; 274 adapter->currenttxskb = NULL;
275 priv->adapter->TxLockFlag = 0; 275 priv->adapter->TxLockFlag = 0;
276 if (priv->adapter->connect_status == LIBERTAS_CONNECTED) { 276 if (priv->adapter->connect_status == LBS_CONNECTED) {
277 netif_wake_queue(priv->dev); 277 netif_wake_queue(priv->dev);
278 if (priv->mesh_dev) 278 if (priv->mesh_dev)
279 netif_wake_queue(priv->mesh_dev); 279 netif_wake_queue(priv->mesh_dev);
280 } 280 }
281} 281}
282EXPORT_SYMBOL_GPL(libertas_send_tx_feedback); 282EXPORT_SYMBOL_GPL(lbs_send_tx_feedback);
diff --git a/drivers/net/wireless/libertas/types.h b/drivers/net/wireless/libertas/types.h
index a43a5f63c879..8a454454e2a9 100644
--- a/drivers/net/wireless/libertas/types.h
+++ b/drivers/net/wireless/libertas/types.h
@@ -1,8 +1,8 @@
1/** 1/**
2 * This header file contains definition for global types 2 * This header file contains definition for global types
3 */ 3 */
4#ifndef _WLAN_TYPES_ 4#ifndef _LBS_TYPES_H_
5#define _WLAN_TYPES_ 5#define _LBS_TYPES_H_
6 6
7#include <linux/if_ether.h> 7#include <linux/if_ether.h>
8#include <asm/byteorder.h> 8#include <asm/byteorder.h>
@@ -250,4 +250,4 @@ struct mrvlietypes_ledgpio {
250 struct led_pin ledpin[1]; 250 struct led_pin ledpin[1];
251} __attribute__ ((packed)); 251} __attribute__ ((packed));
252 252
253#endif /* _WLAN_TYPES_ */ 253#endif
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
24static inline void libertas_postpone_association_work(wlan_private *priv) 24static 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
32static inline void libertas_cancel_association_work(wlan_private *priv) 32static 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 */
48struct chan_freq_power *libertas_find_cfp_by_band_and_channel(wlan_adapter * adapter, 48struct 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 */
87static struct chan_freq_power *find_cfp_by_band_and_freq(wlan_adapter * adapter, 87static 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 */
126static int wlan_radio_ioctl(wlan_private * priv, u8 option) 126static 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 */
153static void copy_active_data_rates(wlan_adapter * adapter, u8 * rates) 153static 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
165static int wlan_get_name(struct net_device *dev, struct iw_request_info *info, 165static 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
178static int wlan_get_freq(struct net_device *dev, struct iw_request_info *info, 178static 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
205static int wlan_get_wap(struct net_device *dev, struct iw_request_info *info, 205static 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
224static int wlan_set_nick(struct net_device *dev, struct iw_request_info *info, 224static 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
249static int wlan_get_nick(struct net_device *dev, struct iw_request_info *info, 249static 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,
267static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info, 267static 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
292static int wlan_set_rts(struct net_device *dev, struct iw_request_info *info, 292static 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
318static int wlan_get_rts(struct net_device *dev, struct iw_request_info *info, 318static 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
344static int wlan_set_frag(struct net_device *dev, struct iw_request_info *info, 344static 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
371static int wlan_get_frag(struct net_device *dev, struct iw_request_info *info, 371static 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
398static int wlan_get_mode(struct net_device *dev, 398static 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
424static int wlan_get_txpow(struct net_device *dev, 424static 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
457static int wlan_set_retry(struct net_device *dev, struct iw_request_info *info, 457static 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
493static int wlan_get_retry(struct net_device *dev, struct iw_request_info *info, 493static 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 */
561static int wlan_get_range(struct net_device *dev, struct iw_request_info *info, 561static 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
738static int wlan_set_power(struct net_device *dev, struct iw_request_info *info, 738static 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
782static int wlan_get_power(struct net_device *dev, struct iw_request_info *info, 782static 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
806static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev) 806static 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);
897out: 897out:
898 if (!stats_valid) { 898 if (!stats_valid) {
@@ -912,19 +912,19 @@ out:
912 912
913} 913}
914 914
915static int wlan_set_freq(struct net_device *dev, struct iw_request_info *info, 915static 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,
960out: 960out:
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
973static int wlan_set_rate(struct net_device *dev, struct iw_request_info *info, 973static 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
1012out: 1012out:
@@ -1014,15 +1014,15 @@ out:
1014 return ret; 1014 return ret;
1015} 1015}
1016 1016
1017static int wlan_get_rate(struct net_device *dev, struct iw_request_info *info, 1017static 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
1042static int wlan_set_mode(struct net_device *dev, 1042static 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 */
1088static int wlan_get_encode(struct net_device *dev, 1088static 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 */
1174static int wlan_set_wep_key(struct assoc_request *assoc_req, 1174static 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 */
1292static int wlan_set_encode(struct net_device *dev, 1292static 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,
1346out: 1346out:
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 */
1368static int wlan_get_encodeext(struct net_device *dev, 1368static 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 */
1475static int wlan_set_encodeext(struct net_device *dev, 1475static 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
1588out: 1588out:
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
1601static int wlan_set_genie(struct net_device *dev, 1601static 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,
1634out: 1634out:
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
1647static int wlan_get_genie(struct net_device *dev, 1647static 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
1677static int wlan_set_auth(struct net_device *dev, 1677static 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
1776static int wlan_get_auth(struct net_device *dev, 1776static 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
1816static int wlan_set_txpow(struct net_device *dev, struct iw_request_info *info, 1816static 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
1859static int wlan_get_essid(struct net_device *dev, struct iw_request_info *info, 1859static 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
1895static int wlan_set_essid(struct net_device *dev, struct iw_request_info *info, 1895static 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 */
1967static int wlan_set_wap(struct net_device *dev, struct iw_request_info *info, 1967static 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
2002void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen) 2002void 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 */
2028static const iw_handler wlan_handler[] = { 2028static 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
2086static const iw_handler mesh_wlan_handler[] = { 2086static 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};
2143struct iw_handler_def libertas_handler_def = { 2143struct 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
2149struct iw_handler_def mesh_handler_def = { 2149struct 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};
diff --git a/drivers/net/wireless/libertas/wext.h b/drivers/net/wireless/libertas/wext.h
index 6aa444c7de8d..a563d9a231b6 100644
--- a/drivers/net/wireless/libertas/wext.h
+++ b/drivers/net/wireless/libertas/wext.h
@@ -1,11 +1,11 @@
1/** 1/**
2 * This file contains definition for IOCTL call. 2 * This file contains definition for IOCTL call.
3 */ 3 */
4#ifndef _WLAN_WEXT_H_ 4#ifndef _LBS_WEXT_H_
5#define _WLAN_WEXT_H_ 5#define _LBS_WEXT_H_
6 6
7/** wlan_ioctl_regrdwr */ 7/** lbs_ioctl_regrdwr */
8struct wlan_ioctl_regrdwr { 8struct lbs_ioctl_regrdwr {
9 /** Which register to access */ 9 /** Which register to access */
10 u16 whichreg; 10 u16 whichreg;
11 /** Read or Write */ 11 /** Read or Write */
@@ -15,9 +15,9 @@ struct wlan_ioctl_regrdwr {
15 u32 value; 15 u32 value;
16}; 16};
17 17
18#define WLAN_MONITOR_OFF 0 18#define LBS_MONITOR_OFF 0
19 19
20extern struct iw_handler_def libertas_handler_def; 20extern struct iw_handler_def lbs_handler_def;
21extern struct iw_handler_def mesh_handler_def; 21extern struct iw_handler_def mesh_handler_def;
22 22
23#endif /* _WLAN_WEXT_H_ */ 23#endif