libertas: move to uniform lbs_/LBS_ namespace
authorHolger Schurig <hs4233@mail.mn-solutions.de>
Thu, 15 Nov 2007 23:05:47 +0000 (18:05 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:04:46 +0000 (15:04 -0800)
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>
29 files changed:
drivers/net/wireless/libertas/11d.c
drivers/net/wireless/libertas/11d.h
drivers/net/wireless/libertas/assoc.c
drivers/net/wireless/libertas/assoc.h
drivers/net/wireless/libertas/cmd.c
drivers/net/wireless/libertas/cmdresp.c
drivers/net/wireless/libertas/debugfs.c
drivers/net/wireless/libertas/debugfs.h
drivers/net/wireless/libertas/decl.h
drivers/net/wireless/libertas/defs.h
drivers/net/wireless/libertas/dev.h
drivers/net/wireless/libertas/ethtool.c
drivers/net/wireless/libertas/host.h
drivers/net/wireless/libertas/hostcmd.h
drivers/net/wireless/libertas/if_cs.c
drivers/net/wireless/libertas/if_sdio.c
drivers/net/wireless/libertas/if_sdio.h
drivers/net/wireless/libertas/if_usb.c
drivers/net/wireless/libertas/if_usb.h
drivers/net/wireless/libertas/join.c
drivers/net/wireless/libertas/join.h
drivers/net/wireless/libertas/main.c
drivers/net/wireless/libertas/rx.c
drivers/net/wireless/libertas/scan.c
drivers/net/wireless/libertas/scan.h
drivers/net/wireless/libertas/tx.c
drivers/net/wireless/libertas/types.h
drivers/net/wireless/libertas/wext.c
drivers/net/wireless/libertas/wext.h

index 8bbd3227e6fb4c49dcf93a1b8fc27415d09573e2..d16f566e878b7371438dc163fa696c8c222314f9 100644 (file)
@@ -43,7 +43,7 @@ static struct chan_freq_power channel_freq_power_UN_BG[] = {
        {14, 2484, TX_PWR_DEFAULT}
 };
 
-static u8 wlan_region_2_code(u8 * region)
+static u8 lbs_region_2_code(u8 *region)
 {
        u8 i;
 
@@ -60,7 +60,7 @@ static u8 wlan_region_2_code(u8 * region)
        return (region_code_mapping[0].code);
 }
 
-static u8 *wlan_code_2_region(u8 code)
+static u8 *lbs_code_2_region(u8 code)
 {
        u8 i;
 
@@ -79,7 +79,7 @@ static u8 *wlan_code_2_region(u8 code)
  *  @param nrchan   number of channels
  *  @return          the nrchan-th chan number
 */
-static u8 wlan_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 * chan)
+static u8 lbs_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 *chan)
 /*find the nrchan-th chan after the firstchan*/
 {
        u8 i;
@@ -113,7 +113,7 @@ static u8 wlan_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 * chan)
  *  @param parsed_region_chan   pointer to parsed_region_chan_11d
  *  @return                    TRUE; FALSE
 */
-static u8 wlan_channel_known_11d(u8 chan,
+static u8 lbs_channel_known_11d(u8 chan,
                          struct parsed_region_chan_11d * parsed_region_chan)
 {
        struct chan_power_11d *chanpwr = parsed_region_chan->chanpwr;
@@ -134,7 +134,7 @@ static u8 wlan_channel_known_11d(u8 chan,
        return 0;
 }
 
-u32 libertas_chan_2_freq(u8 chan, u8 band)
+u32 lbs_chan_2_freq(u8 chan, u8 band)
 {
        struct chan_freq_power *cf;
        u16 i;
@@ -152,7 +152,7 @@ u32 libertas_chan_2_freq(u8 chan, u8 band)
 
 static int generate_domain_info_11d(struct parsed_region_chan_11d
                                  *parsed_region_chan,
-                                 struct wlan_802_11d_domain_reg * domaininfo)
+                                 struct lbs_802_11d_domain_reg *domaininfo)
 {
        u8 nr_subband = 0;
 
@@ -217,7 +217,7 @@ static int generate_domain_info_11d(struct parsed_region_chan_11d
  *  @param *parsed_region_chan  pointer to parsed_region_chan_11d
  *  @return                    N/A
 */
-static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_chan,
+static void lbs_generate_parsed_region_chan_11d(struct region_channel *region_chan,
                                          struct parsed_region_chan_11d *
                                          parsed_region_chan)
 {
@@ -238,7 +238,7 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_
        parsed_region_chan->band = region_chan->band;
        parsed_region_chan->region = region_chan->region;
        memcpy(parsed_region_chan->countrycode,
-              wlan_code_2_region(region_chan->region), COUNTRY_CODE_LEN);
+              lbs_code_2_region(region_chan->region), COUNTRY_CODE_LEN);
 
        lbs_deb_11d("region 0x%x, band %d\n", parsed_region_chan->region,
               parsed_region_chan->band);
@@ -264,7 +264,7 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_
  *  @param chan                 chan
  *  @return                    TRUE;FALSE
 */
-static u8 wlan_region_chan_supported_11d(u8 region, u8 band, u8 chan)
+static u8 lbs_region_chan_supported_11d(u8 region, u8 band, u8 chan)
 {
        struct chan_freq_power *cfp;
        int cfp_no;
@@ -273,7 +273,7 @@ static u8 wlan_region_chan_supported_11d(u8 region, u8 band, u8 chan)
 
        lbs_deb_enter(LBS_DEB_11D);
 
-       cfp = libertas_get_region_cfp_table(region, band, &cfp_no);
+       cfp = lbs_get_region_cfp_table(region, band, &cfp_no);
        if (cfp == NULL)
                return 0;
 
@@ -338,7 +338,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
 
        /*Step1: check region_code */
        parsed_region_chan->region = region =
-           wlan_region_2_code(countryinfo->countrycode);
+           lbs_region_2_code(countryinfo->countrycode);
 
        lbs_deb_11d("regioncode=%x\n", (u8) parsed_region_chan->region);
        lbs_deb_hex(LBS_DEB_11D, "countrycode", (char *)countryinfo->countrycode,
@@ -367,7 +367,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
                for (i = 0; idx < MAX_NO_OF_CHAN && i < nrchan; i++) {
                        /*step4: channel is supported? */
 
-                       if (!wlan_get_chan_11d(band, firstchan, i, &curchan)) {
+                       if (!lbs_get_chan_11d(band, firstchan, i, &curchan)) {
                                /* Chan is not found in UN table */
                                lbs_deb_11d("chan is not supported: %d \n", i);
                                break;
@@ -375,7 +375,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
 
                        lastchan = curchan;
 
-                       if (wlan_region_chan_supported_11d
+                       if (lbs_region_chan_supported_11d
                            (region, band, curchan)) {
                                /*step5: Check if curchan is supported by mrvl in region */
                                parsed_region_chan->chanpwr[idx].chan = curchan;
@@ -411,14 +411,14 @@ done:
  *  @param parsed_region_chan   pointer to parsed_region_chan_11d
  *  @return                    PASSIVE if chan is unknown; ACTIVE if chan is known
 */
-u8 libertas_get_scan_type_11d(u8 chan,
+u8 lbs_get_scan_type_11d(u8 chan,
                          struct parsed_region_chan_11d * parsed_region_chan)
 {
        u8 scan_type = CMD_SCAN_TYPE_PASSIVE;
 
        lbs_deb_enter(LBS_DEB_11D);
 
-       if (wlan_channel_known_11d(chan, parsed_region_chan)) {
+       if (lbs_channel_known_11d(chan, parsed_region_chan)) {
                lbs_deb_11d("found, do active scan\n");
                scan_type = CMD_SCAN_TYPE_ACTIVE;
        } else {
@@ -430,7 +430,7 @@ u8 libertas_get_scan_type_11d(u8 chan,
 
 }
 
-void libertas_init_11d(wlan_private * priv)
+void lbs_init_11d(lbs_private * priv)
 {
        priv->adapter->enable11d = 0;
        memset(&(priv->adapter->parsed_region_chan), 0,
@@ -440,10 +440,10 @@ void libertas_init_11d(wlan_private * priv)
 
 /**
  *  @brief This function sets DOMAIN INFO to FW
- *  @param priv       pointer to wlan_private
+ *  @param priv       pointer to lbs_private
  *  @return          0; -1
 */
-static int set_domain_info_11d(wlan_private * priv)
+static int set_domain_info_11d(lbs_private * priv)
 {
        int ret;
 
@@ -452,7 +452,7 @@ static int set_domain_info_11d(wlan_private * priv)
                return 0;
        }
 
-       ret = libertas_prepare_and_send_command(priv, CMD_802_11D_DOMAIN_INFO,
+       ret = lbs_prepare_and_send_command(priv, CMD_802_11D_DOMAIN_INFO,
                                    CMD_ACT_SET,
                                    CMD_OPTION_WAITFORRSP, 0, NULL);
        if (ret)
@@ -463,13 +463,13 @@ static int set_domain_info_11d(wlan_private * priv)
 
 /**
  *  @brief This function setups scan channels
- *  @param priv       pointer to wlan_private
+ *  @param priv       pointer to lbs_private
  *  @param band       band
  *  @return          0
 */
-int libertas_set_universaltable(wlan_private * priv, u8 band)
+int lbs_set_universaltable(lbs_private * priv, u8 band)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        u16 size = sizeof(struct chan_freq_power);
        u16 i = 0;
 
@@ -492,20 +492,20 @@ int libertas_set_universaltable(wlan_private * priv, u8 band)
 
 /**
  *  @brief This function implements command CMD_802_11D_DOMAIN_INFO
- *  @param priv       pointer to wlan_private
+ *  @param priv       pointer to lbs_private
  *  @param cmd        pointer to cmd buffer
  *  @param cmdno      cmd ID
  *  @param cmdOption  cmd action
  *  @return          0
 */
-int libertas_cmd_802_11d_domain_info(wlan_private * priv,
+int lbs_cmd_802_11d_domain_info(lbs_private * priv,
                                 struct cmd_ds_command *cmd, u16 cmdno,
                                 u16 cmdoption)
 {
        struct cmd_ds_802_11d_domain_info *pdomaininfo =
            &cmd->params.domaininfo;
        struct mrvlietypes_domainparamset *domain = &pdomaininfo->domain;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        u8 nr_subband = adapter->domainreg.nr_subband;
 
        lbs_deb_enter(LBS_DEB_11D);
@@ -552,11 +552,11 @@ done:
 
 /**
  *  @brief This function parses countryinfo from AP and download country info to FW
- *  @param priv    pointer to wlan_private
+ *  @param priv    pointer to lbs_private
  *  @param resp    pointer to command response buffer
  *  @return       0; -1
  */
-int libertas_ret_802_11d_domain_info(wlan_private * priv,
+int lbs_ret_802_11d_domain_info(lbs_private * priv,
                                 struct cmd_ds_command *resp)
 {
        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,
 
 /**
  *  @brief This function parses countryinfo from AP and download country info to FW
- *  @param priv    pointer to wlan_private
+ *  @param priv    pointer to lbs_private
  *  @return       0; -1
  */
-int libertas_parse_dnld_countryinfo_11d(wlan_private * priv,
+int lbs_parse_dnld_countryinfo_11d(lbs_private * priv,
                                         struct bss_descriptor * bss)
 {
        int ret;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_11D);
        if (priv->adapter->enable11d) {
@@ -620,7 +620,7 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv,
                }
 
                memset(&adapter->domainreg, 0,
-                      sizeof(struct wlan_802_11d_domain_reg));
+                      sizeof(struct lbs_802_11d_domain_reg));
                generate_domain_info_11d(&adapter->parsed_region_chan,
                                      &adapter->domainreg);
 
@@ -640,13 +640,13 @@ done:
 
 /**
  *  @brief This function generates 11D info from user specified regioncode and download to FW
- *  @param priv    pointer to wlan_private
+ *  @param priv    pointer to lbs_private
  *  @return       0; -1
  */
-int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
+int lbs_create_dnld_countryinfo_11d(lbs_private * priv)
 {
        int ret;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        struct region_channel *region_chan;
        u8 j;
 
@@ -679,12 +679,12 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
 
                memset(&adapter->parsed_region_chan, 0,
                       sizeof(struct parsed_region_chan_11d));
-               wlan_generate_parsed_region_chan_11d(region_chan,
+               lbs_generate_parsed_region_chan_11d(region_chan,
                                                     &adapter->
                                                     parsed_region_chan);
 
                memset(&adapter->domainreg, 0,
-                      sizeof(struct wlan_802_11d_domain_reg));
+                      sizeof(struct lbs_802_11d_domain_reg));
                generate_domain_info_11d(&adapter->parsed_region_chan,
                                         &adapter->domainreg);
 
index 3a6d1f8db78fcaee88e6bf81bf7e7049d811ffad..4f7f0deb6c849306af7b57b79c670376dfb23b85 100644 (file)
@@ -2,8 +2,8 @@
   * This header file contains data structures and
   * function declarations of 802.11d
   */
-#ifndef _WLAN_11D_
-#define _WLAN_11D_
+#ifndef _LBS_11D_
+#define _LBS_11D_
 
 #include "types.h"
 #include "defs.h"
@@ -52,7 +52,7 @@ struct cmd_ds_802_11d_domain_info {
 } __attribute__ ((packed));
 
 /** domain regulatory information */
-struct wlan_802_11d_domain_reg {
+struct lbs_802_11d_domain_reg {
        /** country Code*/
        u8 countrycode[COUNTRY_CODE_LEN];
        /** No. of subband*/
@@ -78,26 +78,26 @@ struct region_code_mapping {
        u8 code;
 };
 
-u8 libertas_get_scan_type_11d(u8 chan,
+u8 lbs_get_scan_type_11d(u8 chan,
                          struct parsed_region_chan_11d *parsed_region_chan);
 
-u32 libertas_chan_2_freq(u8 chan, u8 band);
+u32 lbs_chan_2_freq(u8 chan, u8 band);
 
-void libertas_init_11d(wlan_private * priv);
+void lbs_init_11d(lbs_private * priv);
 
-int libertas_set_universaltable(wlan_private * priv, u8 band);
+int lbs_set_universaltable(lbs_private * priv, u8 band);
 
-int libertas_cmd_802_11d_domain_info(wlan_private * priv,
+int lbs_cmd_802_11d_domain_info(lbs_private * priv,
                                 struct cmd_ds_command *cmd, u16 cmdno,
                                 u16 cmdOption);
 
-int libertas_ret_802_11d_domain_info(wlan_private * priv,
+int lbs_ret_802_11d_domain_info(lbs_private * priv,
                                 struct cmd_ds_command *resp);
 
 struct bss_descriptor;
-int libertas_parse_dnld_countryinfo_11d(wlan_private * priv,
+int lbs_parse_dnld_countryinfo_11d(lbs_private * priv,
                                         struct bss_descriptor * bss);
 
-int libertas_create_dnld_countryinfo_11d(wlan_private * priv);
+int lbs_create_dnld_countryinfo_11d(lbs_private * priv);
 
-#endif                         /* _WLAN_11D_ */
+#endif
index b61b176e9d07a9e234f41444db7c618030772bb4..e52b1eead288e03aca2a69c317ea81269dec3e6f 100644 (file)
@@ -38,10 +38,10 @@ static void print_assoc_req(const char * extra, struct assoc_request * assoc_req
 }
 
 
-static int assoc_helper_essid(wlan_private *priv,
+static int assoc_helper_essid(lbs_private *priv,
                               struct assoc_request * assoc_req)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret = 0;
        struct bss_descriptor * bss;
        int channel = -1;
@@ -58,15 +58,15 @@ static int assoc_helper_essid(wlan_private *priv,
        lbs_deb_assoc("New SSID requested: '%s'\n",
                      escape_essid(assoc_req->ssid, assoc_req->ssid_len));
        if (assoc_req->mode == IW_MODE_INFRA) {
-               libertas_send_specific_ssid_scan(priv, assoc_req->ssid,
+               lbs_send_specific_ssid_scan(priv, assoc_req->ssid,
                        assoc_req->ssid_len, 0);
 
-               bss = libertas_find_ssid_in_list(adapter, assoc_req->ssid,
+               bss = lbs_find_ssid_in_list(adapter, assoc_req->ssid,
                                assoc_req->ssid_len, NULL, IW_MODE_INFRA, channel);
                if (bss != NULL) {
                        lbs_deb_assoc("SSID found in scan list, associating\n");
                        memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor));
-                       ret = wlan_associate(priv, assoc_req);
+                       ret = lbs_associate(priv, assoc_req);
                } else {
                        lbs_deb_assoc("SSID not found; cannot associate\n");
                }
@@ -74,23 +74,23 @@ static int assoc_helper_essid(wlan_private *priv,
                /* Scan for the network, do not save previous results.  Stale
                 *   scan data will cause us to join a non-existant adhoc network
                 */
-               libertas_send_specific_ssid_scan(priv, assoc_req->ssid,
+               lbs_send_specific_ssid_scan(priv, assoc_req->ssid,
                        assoc_req->ssid_len, 1);
 
                /* Search for the requested SSID in the scan table */
-               bss = libertas_find_ssid_in_list(adapter, assoc_req->ssid,
+               bss = lbs_find_ssid_in_list(adapter, assoc_req->ssid,
                                assoc_req->ssid_len, NULL, IW_MODE_ADHOC, channel);
                if (bss != NULL) {
                        lbs_deb_assoc("SSID found, will join\n");
                        memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor));
-                       libertas_join_adhoc_network(priv, assoc_req);
+                       lbs_join_adhoc_network(priv, assoc_req);
                } else {
                        /* else send START command */
                        lbs_deb_assoc("SSID not found, creating adhoc network\n");
                        memcpy(&assoc_req->bss.ssid, &assoc_req->ssid,
                                IW_ESSID_MAX_SIZE);
                        assoc_req->bss.ssid_len = assoc_req->ssid_len;
-                       libertas_start_adhoc_network(priv, assoc_req);
+                       lbs_start_adhoc_network(priv, assoc_req);
                }
        }
 
@@ -99,10 +99,10 @@ static int assoc_helper_essid(wlan_private *priv,
 }
 
 
-static int assoc_helper_bssid(wlan_private *priv,
+static int assoc_helper_bssid(lbs_private *priv,
                               struct assoc_request * assoc_req)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret = 0;
        struct bss_descriptor * bss;
        DECLARE_MAC_BUF(mac);
@@ -111,7 +111,7 @@ static int assoc_helper_bssid(wlan_private *priv,
                print_mac(mac, assoc_req->bssid));
 
        /* Search for index position in list for requested MAC */
-       bss = libertas_find_bssid_in_list(adapter, assoc_req->bssid,
+       bss = lbs_find_bssid_in_list(adapter, assoc_req->bssid,
                            assoc_req->mode);
        if (bss == NULL) {
                lbs_deb_assoc("ASSOC: WAP: BSSID %s not found, "
@@ -121,10 +121,10 @@ static int assoc_helper_bssid(wlan_private *priv,
 
        memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor));
        if (assoc_req->mode == IW_MODE_INFRA) {
-               ret = wlan_associate(priv, assoc_req);
-               lbs_deb_assoc("ASSOC: wlan_associate(bssid) returned %d\n", ret);
+               ret = lbs_associate(priv, assoc_req);
+               lbs_deb_assoc("ASSOC: lbs_associate(bssid) returned %d\n", ret);
        } else if (assoc_req->mode == IW_MODE_ADHOC) {
-               libertas_join_adhoc_network(priv, assoc_req);
+               lbs_join_adhoc_network(priv, assoc_req);
        }
 
 out:
@@ -133,7 +133,7 @@ out:
 }
 
 
-static int assoc_helper_associate(wlan_private *priv,
+static int assoc_helper_associate(lbs_private *priv,
                                   struct assoc_request * assoc_req)
 {
        int ret = 0, done = 0;
@@ -162,10 +162,10 @@ static int assoc_helper_associate(wlan_private *priv,
 }
 
 
-static int assoc_helper_mode(wlan_private *priv,
+static int assoc_helper_mode(lbs_private *priv,
                              struct assoc_request * assoc_req)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret = 0;
 
        lbs_deb_enter(LBS_DEB_ASSOC);
@@ -175,12 +175,12 @@ static int assoc_helper_mode(wlan_private *priv,
 
        if (assoc_req->mode == IW_MODE_INFRA) {
                if (adapter->psstate != PS_STATE_FULL_POWER)
-                       libertas_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
-               adapter->psmode = WLAN802_11POWERMODECAM;
+                       lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
+               adapter->psmode = LBS802_11POWERMODECAM;
        }
 
        adapter->mode = assoc_req->mode;
-       ret = libertas_prepare_and_send_command(priv,
+       ret = lbs_prepare_and_send_command(priv,
                                    CMD_802_11_SNMP_MIB,
                                    0, CMD_OPTION_WAITFORRSP,
                                    OID_802_11_INFRASTRUCTURE_MODE,
@@ -192,26 +192,26 @@ done:
 }
 
 
-static int update_channel(wlan_private * priv)
+static int update_channel(lbs_private * priv)
 {
        /* the channel in f/w could be out of sync, get the current channel */
-       return libertas_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL,
+       return lbs_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL,
                                    CMD_OPT_802_11_RF_CHANNEL_GET,
                                    CMD_OPTION_WAITFORRSP, 0, NULL);
 }
 
-void libertas_sync_channel(struct work_struct *work)
+void lbs_sync_channel(struct work_struct *work)
 {
-       wlan_private *priv = container_of(work, wlan_private, sync_channel);
+       lbs_private *priv = container_of(work, lbs_private, sync_channel);
 
        if (update_channel(priv) != 0)
                lbs_pr_info("Channel synchronization failed.");
 }
 
-static int assoc_helper_channel(wlan_private *priv,
+static int assoc_helper_channel(lbs_private *priv,
                                 struct assoc_request * assoc_req)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret = 0;
 
        lbs_deb_enter(LBS_DEB_ASSOC);
@@ -227,7 +227,7 @@ static int assoc_helper_channel(wlan_private *priv,
        lbs_deb_assoc("ASSOC: channel: %d -> %d\n",
               adapter->curbssparams.channel, assoc_req->channel);
 
-       ret = libertas_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL,
+       ret = lbs_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL,
                                CMD_OPT_802_11_RF_CHANNEL_SET,
                                CMD_OPTION_WAITFORRSP, 0, &assoc_req->channel);
        if (ret < 0) {
@@ -263,10 +263,10 @@ done:
 }
 
 
-static int assoc_helper_wep_keys(wlan_private *priv,
+static int assoc_helper_wep_keys(lbs_private *priv,
                                  struct assoc_request * assoc_req)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int i;
        int ret = 0;
 
@@ -277,13 +277,13 @@ static int assoc_helper_wep_keys(wlan_private *priv,
            || assoc_req->wep_keys[1].len
            || assoc_req->wep_keys[2].len
            || assoc_req->wep_keys[3].len) {
-               ret = libertas_prepare_and_send_command(priv,
+               ret = lbs_prepare_and_send_command(priv,
                                            CMD_802_11_SET_WEP,
                                            CMD_ACT_ADD,
                                            CMD_OPTION_WAITFORRSP,
                                            0, assoc_req);
        } else {
-               ret = libertas_prepare_and_send_command(priv,
+               ret = lbs_prepare_and_send_command(priv,
                                            CMD_802_11_SET_WEP,
                                            CMD_ACT_REMOVE,
                                            CMD_OPTION_WAITFORRSP,
@@ -298,7 +298,7 @@ static int assoc_helper_wep_keys(wlan_private *priv,
                adapter->currentpacketfilter |= CMD_ACT_MAC_WEP_ENABLE;
        else
                adapter->currentpacketfilter &= ~CMD_ACT_MAC_WEP_ENABLE;
-       ret = libertas_set_mac_packet_filter(priv);
+       ret = lbs_set_mac_packet_filter(priv);
        if (ret)
                goto out;
 
@@ -318,10 +318,10 @@ out:
        return ret;
 }
 
-static int assoc_helper_secinfo(wlan_private *priv,
+static int assoc_helper_secinfo(lbs_private *priv,
                                 struct assoc_request * assoc_req)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret = 0;
        u32 do_wpa;
        u32 rsn = 0;
@@ -329,9 +329,9 @@ static int assoc_helper_secinfo(wlan_private *priv,
        lbs_deb_enter(LBS_DEB_ASSOC);
 
        memcpy(&adapter->secinfo, &assoc_req->secinfo,
-               sizeof(struct wlan_802_11_security));
+               sizeof(struct lbs_802_11_security));
 
-       ret = libertas_set_mac_packet_filter(priv);
+       ret = lbs_set_mac_packet_filter(priv);
        if (ret)
                goto out;
 
@@ -341,7 +341,7 @@ static int assoc_helper_secinfo(wlan_private *priv,
         */
 
        /* Get RSN enabled/disabled */
-       ret = libertas_prepare_and_send_command(priv,
+       ret = lbs_prepare_and_send_command(priv,
                                    CMD_802_11_ENABLE_RSN,
                                    CMD_ACT_GET,
                                    CMD_OPTION_WAITFORRSP,
@@ -358,7 +358,7 @@ static int assoc_helper_secinfo(wlan_private *priv,
 
        /* Set RSN enabled/disabled */
        rsn = do_wpa;
-       ret = libertas_prepare_and_send_command(priv,
+       ret = lbs_prepare_and_send_command(priv,
                                    CMD_802_11_ENABLE_RSN,
                                    CMD_ACT_SET,
                                    CMD_OPTION_WAITFORRSP,
@@ -370,7 +370,7 @@ out:
 }
 
 
-static int assoc_helper_wpa_keys(wlan_private *priv,
+static int assoc_helper_wpa_keys(lbs_private *priv,
                                  struct assoc_request * assoc_req)
 {
        int ret = 0;
@@ -385,7 +385,7 @@ static int assoc_helper_wpa_keys(wlan_private *priv,
 
        if (test_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags)) {
                clear_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags);
-               ret = libertas_prepare_and_send_command(priv,
+               ret = lbs_prepare_and_send_command(priv,
                                        CMD_802_11_KEY_MATERIAL,
                                        CMD_ACT_SET,
                                        CMD_OPTION_WAITFORRSP,
@@ -399,7 +399,7 @@ static int assoc_helper_wpa_keys(wlan_private *priv,
        if (test_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags)) {
                clear_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags);
 
-               ret = libertas_prepare_and_send_command(priv,
+               ret = lbs_prepare_and_send_command(priv,
                                        CMD_802_11_KEY_MATERIAL,
                                        CMD_ACT_SET,
                                        CMD_OPTION_WAITFORRSP,
@@ -413,10 +413,10 @@ out:
 }
 
 
-static int assoc_helper_wpa_ie(wlan_private *priv,
+static int assoc_helper_wpa_ie(lbs_private *priv,
                                struct assoc_request * assoc_req)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret = 0;
 
        lbs_deb_enter(LBS_DEB_ASSOC);
@@ -434,10 +434,10 @@ static int assoc_helper_wpa_ie(wlan_private *priv,
 }
 
 
-static int should_deauth_infrastructure(wlan_adapter *adapter,
+static int should_deauth_infrastructure(lbs_adapter *adapter,
                                         struct assoc_request * assoc_req)
 {
-       if (adapter->connect_status != LIBERTAS_CONNECTED)
+       if (adapter->connect_status != LBS_CONNECTED)
                return 0;
 
        if (test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) {
@@ -475,13 +475,13 @@ static int should_deauth_infrastructure(wlan_adapter *adapter,
 }
 
 
-static int should_stop_adhoc(wlan_adapter *adapter,
+static int should_stop_adhoc(lbs_adapter *adapter,
                              struct assoc_request * assoc_req)
 {
-       if (adapter->connect_status != LIBERTAS_CONNECTED)
+       if (adapter->connect_status != LBS_CONNECTED)
                return 0;
 
-       if (libertas_ssid_cmp(adapter->curbssparams.ssid,
+       if (lbs_ssid_cmp(adapter->curbssparams.ssid,
                              adapter->curbssparams.ssid_len,
                              assoc_req->ssid, assoc_req->ssid_len) != 0)
                return 1;
@@ -501,10 +501,10 @@ static int should_stop_adhoc(wlan_adapter *adapter,
 }
 
 
-void libertas_association_worker(struct work_struct *work)
+void lbs_association_worker(struct work_struct *work)
 {
-       wlan_private *priv = container_of(work, wlan_private, assoc_work.work);
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = container_of(work, lbs_private, assoc_work.work);
+       lbs_adapter *adapter = priv->adapter;
        struct assoc_request * assoc_req = NULL;
        int ret = 0;
        int find_any_ssid = 0;
@@ -538,7 +538,7 @@ void libertas_association_worker(struct work_struct *work)
        if (find_any_ssid) {
                u8 new_mode;
 
-               ret = libertas_find_best_network_ssid(priv, assoc_req->ssid,
+               ret = lbs_find_best_network_ssid(priv, assoc_req->ssid,
                                &assoc_req->ssid_len, assoc_req->mode, &new_mode);
                if (ret) {
                        lbs_deb_assoc("Could not find best network\n");
@@ -559,7 +559,7 @@ void libertas_association_worker(struct work_struct *work)
         */
        if (adapter->mode == IW_MODE_INFRA) {
                if (should_deauth_infrastructure(adapter, assoc_req)) {
-                       ret = libertas_send_deauthentication(priv);
+                       ret = lbs_send_deauthentication(priv);
                        if (ret) {
                                lbs_deb_assoc("Deauthentication due to new "
                                        "configuration request failed: %d\n",
@@ -568,7 +568,7 @@ void libertas_association_worker(struct work_struct *work)
                }
        } else if (adapter->mode == IW_MODE_ADHOC) {
                if (should_stop_adhoc(adapter, assoc_req)) {
-                       ret = libertas_stop_adhoc_network(priv);
+                       ret = lbs_stop_adhoc_network(priv);
                        if (ret) {
                                lbs_deb_assoc("Teardown of AdHoc network due to "
                                        "new configuration request failed: %d\n",
@@ -649,7 +649,7 @@ void libertas_association_worker(struct work_struct *work)
                        success = 0;
                }
 
-               if (adapter->connect_status != LIBERTAS_CONNECTED) {
+               if (adapter->connect_status != LBS_CONNECTED) {
                        lbs_deb_assoc("ASSOC: association attempt unsuccessful, "
                                "not connected.\n");
                        success = 0;
@@ -661,11 +661,11 @@ void libertas_association_worker(struct work_struct *work)
                                escape_essid(adapter->curbssparams.ssid,
                                             adapter->curbssparams.ssid_len),
                                print_mac(mac, adapter->curbssparams.bssid));
-                       libertas_prepare_and_send_command(priv,
+                       lbs_prepare_and_send_command(priv,
                                CMD_802_11_RSSI,
                                0, CMD_OPTION_WAITFORRSP, 0, NULL);
 
-                       libertas_prepare_and_send_command(priv,
+                       lbs_prepare_and_send_command(priv,
                                CMD_802_11_GET_LOG,
                                0, CMD_OPTION_WAITFORRSP, 0, NULL);
                } else {
@@ -692,7 +692,7 @@ done:
 /*
  * Caller MUST hold any necessary locks
  */
-struct assoc_request * wlan_get_association_request(wlan_adapter *adapter)
+struct assoc_request *lbs_get_association_request(lbs_adapter *adapter)
 {
        struct assoc_request * assoc_req;
 
@@ -753,7 +753,7 @@ struct assoc_request * wlan_get_association_request(wlan_adapter *adapter)
 
        if (!test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) {
                memcpy(&assoc_req->secinfo, &adapter->secinfo,
-                       sizeof(struct wlan_802_11_security));
+                       sizeof(struct lbs_802_11_security));
        }
 
        if (!test_bit(ASSOC_FLAG_WPA_IE, &assoc_req->flags)) {
index ed737eb995c0cfb9004d93b20f2802a0816142d7..462931cbf3becda04ba5131f2062d8a2ed4436dd 100644 (file)
@@ -1,14 +1,14 @@
 /* Copyright (C) 2006, Red Hat, Inc. */
 
-#ifndef _WLAN_ASSOC_H_
-#define _WLAN_ASSOC_H_
+#ifndef _LBS_ASSOC_H_
+#define _LBS_ASSOC_H_
 
 #include "dev.h"
 
-void libertas_association_worker(struct work_struct *work);
+void lbs_association_worker(struct work_struct *work);
 
-struct assoc_request * wlan_get_association_request(wlan_adapter *adapter);
+struct assoc_request * lbs_get_association_request(lbs_adapter *adapter);
 
-void libertas_sync_channel(struct work_struct *work);
+void lbs_sync_channel(struct work_struct *work);
 
-#endif /* _WLAN_ASSOC_H */
+#endif /* _LBS_ASSOC_H */
index be5cfd8402c7bae331e2105b08f946484d2cd729..5b2a1c7c5f0590f030fee64a4a4416e171835316 100644 (file)
@@ -37,7 +37,7 @@ static u8 is_command_allowed_in_ps(__le16 command)
        return 0;
 }
 
-static int wlan_cmd_hw_spec(wlan_private * priv, struct cmd_ds_command *cmd)
+static int lbs_cmd_hw_spec(lbs_private * priv, struct cmd_ds_command *cmd)
 {
        struct cmd_ds_get_hw_spec *hwspec = &cmd->params.hwspec;
 
@@ -51,7 +51,7 @@ static int wlan_cmd_hw_spec(wlan_private * priv, struct cmd_ds_command *cmd)
        return 0;
 }
 
-static int wlan_cmd_802_11_ps_mode(wlan_private * priv,
+static int lbs_cmd_802_11_ps_mode(lbs_private * priv,
                                   struct cmd_ds_command *cmd,
                                   u16 cmd_action)
 {
@@ -90,7 +90,7 @@ static int wlan_cmd_802_11_ps_mode(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_802_11_inactivity_timeout(wlan_private * priv,
+static int lbs_cmd_802_11_inactivity_timeout(lbs_private * priv,
                                              struct cmd_ds_command *cmd,
                                              u16 cmd_action, void *pdata_buf)
 {
@@ -114,11 +114,11 @@ static int wlan_cmd_802_11_inactivity_timeout(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_802_11_sleep_params(wlan_private * priv,
+static int lbs_cmd_802_11_sleep_params(lbs_private * priv,
                                        struct cmd_ds_command *cmd,
                                        u16 cmd_action)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ds_802_11_sleep_params *sp = &cmd->params.sleep_params;
 
        lbs_deb_enter(LBS_DEB_CMD);
@@ -145,13 +145,13 @@ static int wlan_cmd_802_11_sleep_params(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_802_11_set_wep(wlan_private * priv,
+static int lbs_cmd_802_11_set_wep(lbs_private * priv,
                                    struct cmd_ds_command *cmd,
                                    u32 cmd_act,
                                    void * pdata_buf)
 {
        struct cmd_ds_802_11_set_wep *wep = &cmd->params.wep;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret = 0;
        struct assoc_request * assoc_req = pdata_buf;
 
@@ -219,7 +219,7 @@ done:
        return ret;
 }
 
-static int wlan_cmd_802_11_enable_rsn(wlan_private * priv,
+static int lbs_cmd_802_11_enable_rsn(lbs_private * priv,
                                      struct cmd_ds_command *cmd,
                                      u16 cmd_action,
                                      void * pdata_buf)
@@ -272,7 +272,7 @@ static void set_one_wpa_key(struct MrvlIEtype_keyParamSet * pkeyparamset,
        lbs_deb_leave(LBS_DEB_CMD);
 }
 
-static int wlan_cmd_802_11_key_material(wlan_private * priv,
+static int lbs_cmd_802_11_key_material(lbs_private * priv,
                                        struct cmd_ds_command *cmd,
                                        u16 cmd_action,
                                        u32 cmd_oid, void *pdata_buf)
@@ -319,7 +319,7 @@ done:
        return ret;
 }
 
-static int wlan_cmd_802_11_reset(wlan_private * priv,
+static int lbs_cmd_802_11_reset(lbs_private * priv,
                                 struct cmd_ds_command *cmd, int cmd_action)
 {
        struct cmd_ds_802_11_reset *reset = &cmd->params.reset;
@@ -334,7 +334,7 @@ static int wlan_cmd_802_11_reset(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_802_11_get_log(wlan_private * priv,
+static int lbs_cmd_802_11_get_log(lbs_private * priv,
                                   struct cmd_ds_command *cmd)
 {
        lbs_deb_enter(LBS_DEB_CMD);
@@ -346,7 +346,7 @@ static int wlan_cmd_802_11_get_log(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_802_11_get_stat(wlan_private * priv,
+static int lbs_cmd_802_11_get_stat(lbs_private * priv,
                                    struct cmd_ds_command *cmd)
 {
        lbs_deb_enter(LBS_DEB_CMD);
@@ -358,13 +358,13 @@ static int wlan_cmd_802_11_get_stat(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_802_11_snmp_mib(wlan_private * priv,
+static int lbs_cmd_802_11_snmp_mib(lbs_private * priv,
                                    struct cmd_ds_command *cmd,
                                    int cmd_action,
                                    int cmd_oid, void *pdata_buf)
 {
        struct cmd_ds_802_11_snmp_mib *pSNMPMIB = &cmd->params.smib;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        u8 ucTemp;
 
        lbs_deb_enter(LBS_DEB_CMD);
@@ -479,11 +479,11 @@ static int wlan_cmd_802_11_snmp_mib(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_802_11_radio_control(wlan_private * priv,
+static int lbs_cmd_802_11_radio_control(lbs_private * priv,
                                         struct cmd_ds_command *cmd,
                                         int cmd_action)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ds_802_11_radio_control *pradiocontrol = &cmd->params.radio;
 
        lbs_deb_enter(LBS_DEB_CMD);
@@ -519,7 +519,7 @@ static int wlan_cmd_802_11_radio_control(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_802_11_rf_tx_power(wlan_private * priv,
+static int lbs_cmd_802_11_rf_tx_power(lbs_private * priv,
                                       struct cmd_ds_command *cmd,
                                       u16 cmd_action, void *pdata_buf)
 {
@@ -563,7 +563,7 @@ static int wlan_cmd_802_11_rf_tx_power(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_802_11_monitor_mode(wlan_private * priv,
+static int lbs_cmd_802_11_monitor_mode(lbs_private * priv,
                                      struct cmd_ds_command *cmd,
                                      u16 cmd_action, void *pdata_buf)
 {
@@ -583,13 +583,13 @@ static int wlan_cmd_802_11_monitor_mode(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_802_11_rate_adapt_rateset(wlan_private * priv,
+static int lbs_cmd_802_11_rate_adapt_rateset(lbs_private * priv,
                                              struct cmd_ds_command *cmd,
                                              u16 cmd_action)
 {
        struct cmd_ds_802_11_rate_adapt_rateset
        *rateadapt = &cmd->params.rateset;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_CMD);
        cmd->size =
@@ -605,12 +605,12 @@ static int wlan_cmd_802_11_rate_adapt_rateset(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_802_11_data_rate(wlan_private * priv,
+static int lbs_cmd_802_11_data_rate(lbs_private * priv,
                                     struct cmd_ds_command *cmd,
                                     u16 cmd_action)
 {
        struct cmd_ds_802_11_data_rate *pdatarate = &cmd->params.drate;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_CMD);
 
@@ -621,7 +621,7 @@ static int wlan_cmd_802_11_data_rate(wlan_private * priv,
        pdatarate->action = cpu_to_le16(cmd_action);
 
        if (cmd_action == CMD_ACT_SET_TX_FIX_RATE) {
-               pdatarate->rates[0] = libertas_data_rate_to_fw_index(adapter->cur_rate);
+               pdatarate->rates[0] = lbs_data_rate_to_fw_index(adapter->cur_rate);
                lbs_deb_cmd("DATA_RATE: set fixed 0x%02X\n",
                       adapter->cur_rate);
        } else if (cmd_action == CMD_ACT_SET_TX_AUTO) {
@@ -632,12 +632,12 @@ static int wlan_cmd_802_11_data_rate(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_mac_multicast_adr(wlan_private * priv,
+static int lbs_cmd_mac_multicast_adr(lbs_private * priv,
                                      struct cmd_ds_command *cmd,
                                      u16 cmd_action)
 {
        struct cmd_ds_mac_multicast_adr *pMCastAdr = &cmd->params.madr;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_CMD);
        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,
        return 0;
 }
 
-static int wlan_cmd_802_11_rf_channel(wlan_private * priv,
+static int lbs_cmd_802_11_rf_channel(lbs_private * priv,
                                      struct cmd_ds_command *cmd,
                                      int option, void *pdata_buf)
 {
@@ -676,10 +676,10 @@ static int wlan_cmd_802_11_rf_channel(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_802_11_rssi(wlan_private * priv,
+static int lbs_cmd_802_11_rssi(lbs_private * priv,
                                struct cmd_ds_command *cmd)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_CMD);
        cmd->command = cpu_to_le16(CMD_802_11_RSSI);
@@ -698,15 +698,15 @@ static int wlan_cmd_802_11_rssi(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_reg_access(wlan_private * priv,
+static int lbs_cmd_reg_access(lbs_private * priv,
                               struct cmd_ds_command *cmdptr,
                               u8 cmd_action, void *pdata_buf)
 {
-       struct wlan_offset_value *offval;
+       struct lbs_offset_value *offval;
 
        lbs_deb_enter(LBS_DEB_CMD);
 
-       offval = (struct wlan_offset_value *)pdata_buf;
+       offval = (struct lbs_offset_value *)pdata_buf;
 
        switch (cmdptr->command) {
        case CMD_MAC_REG_ACCESS:
@@ -773,11 +773,11 @@ static int wlan_cmd_reg_access(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_802_11_mac_address(wlan_private * priv,
+static int lbs_cmd_802_11_mac_address(lbs_private * priv,
                                       struct cmd_ds_command *cmd,
                                       u16 cmd_action)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_CMD);
        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,
        return 0;
 }
 
-static int wlan_cmd_802_11_eeprom_access(wlan_private * priv,
+static int lbs_cmd_802_11_eeprom_access(lbs_private * priv,
                                         struct cmd_ds_command *cmd,
                                         int cmd_action, void *pdata_buf)
 {
-       struct wlan_ioctl_regrdwr *ea = pdata_buf;
+       struct lbs_ioctl_regrdwr *ea = pdata_buf;
 
        lbs_deb_enter(LBS_DEB_CMD);
 
@@ -819,7 +819,7 @@ static int wlan_cmd_802_11_eeprom_access(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_bt_access(wlan_private * priv,
+static int lbs_cmd_bt_access(lbs_private * priv,
                               struct cmd_ds_command *cmd,
                               u16 cmd_action, void *pdata_buf)
 {
@@ -857,7 +857,7 @@ static int wlan_cmd_bt_access(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_fwt_access(wlan_private * priv,
+static int lbs_cmd_fwt_access(lbs_private * priv,
                               struct cmd_ds_command *cmd,
                               u16 cmd_action, void *pdata_buf)
 {
@@ -879,7 +879,7 @@ static int wlan_cmd_fwt_access(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_mesh_access(wlan_private * priv,
+static int lbs_cmd_mesh_access(lbs_private * priv,
                                struct cmd_ds_command *cmd,
                                u16 cmd_action, void *pdata_buf)
 {
@@ -901,7 +901,7 @@ static int wlan_cmd_mesh_access(wlan_private * priv,
        return 0;
 }
 
-static int wlan_cmd_set_boot2_ver(wlan_private * priv,
+static int lbs_cmd_set_boot2_ver(lbs_private * priv,
                                struct cmd_ds_command *cmd,
                                u16 cmd_action, void *pdata_buf)
 {
@@ -913,10 +913,10 @@ static int wlan_cmd_set_boot2_ver(wlan_private * priv,
 }
 
 /*
- * Note: NEVER use libertas_queue_cmd() with addtail==0 other than for
+ * Note: NEVER use lbs_queue_cmd() with addtail==0 other than for
  * the command timer, because it does not account for queued commands.
  */
-void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail)
+void lbs_queue_cmd(lbs_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail)
 {
        unsigned long flags;
        struct cmd_ds_command *cmdptr;
@@ -968,12 +968,12 @@ done:
  * For now - we are not performing the endian conversion the second time - but
  * for PS and DEEP_SLEEP we need to worry
  */
-static int DownloadcommandToStation(wlan_private * priv,
+static int DownloadcommandToStation(lbs_private * priv,
                                    struct cmd_ctrl_node *cmdnode)
 {
        unsigned long flags;
        struct cmd_ds_command *cmdptr;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret = -1;
        u16 cmdsize;
        u16 command;
@@ -990,7 +990,7 @@ static int DownloadcommandToStation(wlan_private * priv,
        spin_lock_irqsave(&adapter->driver_lock, flags);
        if (!cmdptr || !cmdptr->size) {
                lbs_deb_host("DNLD_CMD: cmdptr is NULL or zero\n");
-               __libertas_cleanup_and_insert_cmd(priv, cmdnode);
+               __lbs_cleanup_and_insert_cmd(priv, cmdnode);
                spin_unlock_irqrestore(&adapter->driver_lock, flags);
                goto done;
        }
@@ -1015,7 +1015,7 @@ static int DownloadcommandToStation(wlan_private * priv,
                lbs_deb_host("DNLD_CMD: hw_host_to_card failed\n");
                spin_lock_irqsave(&adapter->driver_lock, flags);
                adapter->cur_cmd_retcode = ret;
-               __libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
+               __lbs_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
                adapter->nr_cmd_pending--;
                adapter->cur_cmd = NULL;
                spin_unlock_irqrestore(&adapter->driver_lock, flags);
@@ -1038,7 +1038,7 @@ done:
        return ret;
 }
 
-static int wlan_cmd_mac_control(wlan_private * priv,
+static int lbs_cmd_mac_control(lbs_private * priv,
                                struct cmd_ds_command *cmd)
 {
        struct cmd_ds_mac_control *mac = &cmd->params.macctrl;
@@ -1060,9 +1060,9 @@ static int wlan_cmd_mac_control(wlan_private * priv,
  *  This function inserts command node to cmdfreeq
  *  after cleans it. Requires adapter->driver_lock held.
  */
-void __libertas_cleanup_and_insert_cmd(wlan_private * priv, struct cmd_ctrl_node *ptempcmd)
+void __lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptempcmd)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        if (!ptempcmd)
                return;
@@ -1071,22 +1071,22 @@ void __libertas_cleanup_and_insert_cmd(wlan_private * priv, struct cmd_ctrl_node
        list_add_tail((struct list_head *)ptempcmd, &adapter->cmdfreeq);
 }
 
-static void libertas_cleanup_and_insert_cmd(wlan_private * priv, struct cmd_ctrl_node *ptempcmd)
+static void lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptempcmd)
 {
        unsigned long flags;
 
        spin_lock_irqsave(&priv->adapter->driver_lock, flags);
-       __libertas_cleanup_and_insert_cmd(priv, ptempcmd);
+       __lbs_cleanup_and_insert_cmd(priv, ptempcmd);
        spin_unlock_irqrestore(&priv->adapter->driver_lock, flags);
 }
 
-int libertas_set_radio_control(wlan_private * priv)
+int lbs_set_radio_control(lbs_private * priv)
 {
        int ret = 0;
 
        lbs_deb_enter(LBS_DEB_CMD);
 
-       ret = libertas_prepare_and_send_command(priv,
+       ret = lbs_prepare_and_send_command(priv,
                                    CMD_802_11_RADIO_CONTROL,
                                    CMD_ACT_SET,
                                    CMD_OPTION_WAITFORRSP, 0, NULL);
@@ -1098,14 +1098,14 @@ int libertas_set_radio_control(wlan_private * priv)
        return ret;
 }
 
-int libertas_set_mac_packet_filter(wlan_private * priv)
+int lbs_set_mac_packet_filter(lbs_private * priv)
 {
        int ret = 0;
 
        lbs_deb_enter(LBS_DEB_CMD);
 
        /* Send MAC control command to station */
-       ret = libertas_prepare_and_send_command(priv,
+       ret = lbs_prepare_and_send_command(priv,
                                    CMD_MAC_CONTROL, 0, 0, 0, NULL);
 
        lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret);
@@ -1115,7 +1115,7 @@ int libertas_set_mac_packet_filter(wlan_private * priv)
 /**
  *  @brief This function prepare the command before send to firmware.
  *
- *  @param priv                A pointer to wlan_private structure
+ *  @param priv                A pointer to lbs_private structure
  *  @param cmd_no      command number
  *  @param cmd_action  command action: GET or SET
  *  @param wait_option wait option: wait response or not
@@ -1123,13 +1123,13 @@ int libertas_set_mac_packet_filter(wlan_private * priv)
  *  @param pdata_buf   A pointer to informaion buffer
  *  @return            0 or -1
  */
-int libertas_prepare_and_send_command(wlan_private * priv,
+int lbs_prepare_and_send_command(lbs_private * priv,
                          u16 cmd_no,
                          u16 cmd_action,
                          u16 wait_option, u32 cmd_oid, void *pdata_buf)
 {
        int ret = 0;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ctrl_node *cmdnode;
        struct cmd_ds_command *cmdptr;
        unsigned long flags;
@@ -1148,7 +1148,7 @@ int libertas_prepare_and_send_command(wlan_private * priv,
                goto done;
        }
 
-       cmdnode = libertas_get_free_cmd_ctrl_node(priv);
+       cmdnode = lbs_get_free_cmd_ctrl_node(priv);
 
        if (cmdnode == NULL) {
                lbs_deb_host("PREP_CMD: cmdnode is NULL\n");
@@ -1159,7 +1159,7 @@ int libertas_prepare_and_send_command(wlan_private * priv,
                goto done;
        }
 
-       libertas_set_cmd_ctrl_node(priv, cmdnode, cmd_oid, wait_option, pdata_buf);
+       lbs_set_cmd_ctrl_node(priv, cmdnode, cmd_oid, wait_option, pdata_buf);
 
        cmdptr = (struct cmd_ds_command *)cmdnode->bufvirtualaddr;
 
@@ -1167,7 +1167,7 @@ int libertas_prepare_and_send_command(wlan_private * priv,
 
        if (!cmdptr) {
                lbs_deb_host("PREP_CMD: cmdptr is NULL\n");
-               libertas_cleanup_and_insert_cmd(priv, cmdnode);
+               lbs_cleanup_and_insert_cmd(priv, cmdnode);
                ret = -1;
                goto done;
        }
@@ -1181,116 +1181,116 @@ int libertas_prepare_and_send_command(wlan_private * priv,
 
        switch (cmd_no) {
        case CMD_GET_HW_SPEC:
-               ret = wlan_cmd_hw_spec(priv, cmdptr);
+               ret = lbs_cmd_hw_spec(priv, cmdptr);
                break;
        case CMD_802_11_PS_MODE:
-               ret = wlan_cmd_802_11_ps_mode(priv, cmdptr, cmd_action);
+               ret = lbs_cmd_802_11_ps_mode(priv, cmdptr, cmd_action);
                break;
 
        case CMD_802_11_SCAN:
-               ret = libertas_cmd_80211_scan(priv, cmdptr, pdata_buf);
+               ret = lbs_cmd_80211_scan(priv, cmdptr, pdata_buf);
                break;
 
        case CMD_MAC_CONTROL:
-               ret = wlan_cmd_mac_control(priv, cmdptr);
+               ret = lbs_cmd_mac_control(priv, cmdptr);
                break;
 
        case CMD_802_11_ASSOCIATE:
        case CMD_802_11_REASSOCIATE:
-               ret = libertas_cmd_80211_associate(priv, cmdptr, pdata_buf);
+               ret = lbs_cmd_80211_associate(priv, cmdptr, pdata_buf);
                break;
 
        case CMD_802_11_DEAUTHENTICATE:
-               ret = libertas_cmd_80211_deauthenticate(priv, cmdptr);
+               ret = lbs_cmd_80211_deauthenticate(priv, cmdptr);
                break;
 
        case CMD_802_11_SET_WEP:
-               ret = wlan_cmd_802_11_set_wep(priv, cmdptr, cmd_action, pdata_buf);
+               ret = lbs_cmd_802_11_set_wep(priv, cmdptr, cmd_action, pdata_buf);
                break;
 
        case CMD_802_11_AD_HOC_START:
-               ret = libertas_cmd_80211_ad_hoc_start(priv, cmdptr, pdata_buf);
+               ret = lbs_cmd_80211_ad_hoc_start(priv, cmdptr, pdata_buf);
                break;
        case CMD_CODE_DNLD:
                break;
 
        case CMD_802_11_RESET:
-               ret = wlan_cmd_802_11_reset(priv, cmdptr, cmd_action);
+               ret = lbs_cmd_802_11_reset(priv, cmdptr, cmd_action);
                break;
 
        case CMD_802_11_GET_LOG:
-               ret = wlan_cmd_802_11_get_log(priv, cmdptr);
+               ret = lbs_cmd_802_11_get_log(priv, cmdptr);
                break;
 
        case CMD_802_11_AUTHENTICATE:
-               ret = libertas_cmd_80211_authenticate(priv, cmdptr, pdata_buf);
+               ret = lbs_cmd_80211_authenticate(priv, cmdptr, pdata_buf);
                break;
 
        case CMD_802_11_GET_STAT:
-               ret = wlan_cmd_802_11_get_stat(priv, cmdptr);
+               ret = lbs_cmd_802_11_get_stat(priv, cmdptr);
                break;
 
        case CMD_802_11_SNMP_MIB:
-               ret = wlan_cmd_802_11_snmp_mib(priv, cmdptr,
+               ret = lbs_cmd_802_11_snmp_mib(priv, cmdptr,
                                               cmd_action, cmd_oid, pdata_buf);
                break;
 
        case CMD_MAC_REG_ACCESS:
        case CMD_BBP_REG_ACCESS:
        case CMD_RF_REG_ACCESS:
-               ret = wlan_cmd_reg_access(priv, cmdptr, cmd_action, pdata_buf);
+               ret = lbs_cmd_reg_access(priv, cmdptr, cmd_action, pdata_buf);
                break;
 
        case CMD_802_11_RF_CHANNEL:
-               ret = wlan_cmd_802_11_rf_channel(priv, cmdptr,
+               ret = lbs_cmd_802_11_rf_channel(priv, cmdptr,
                                                 cmd_action, pdata_buf);
                break;
 
        case CMD_802_11_RF_TX_POWER:
-               ret = wlan_cmd_802_11_rf_tx_power(priv, cmdptr,
+               ret = lbs_cmd_802_11_rf_tx_power(priv, cmdptr,
                                                  cmd_action, pdata_buf);
                break;
 
        case CMD_802_11_RADIO_CONTROL:
-               ret = wlan_cmd_802_11_radio_control(priv, cmdptr, cmd_action);
+               ret = lbs_cmd_802_11_radio_control(priv, cmdptr, cmd_action);
                break;
 
        case CMD_802_11_DATA_RATE:
-               ret = wlan_cmd_802_11_data_rate(priv, cmdptr, cmd_action);
+               ret = lbs_cmd_802_11_data_rate(priv, cmdptr, cmd_action);
                break;
        case CMD_802_11_RATE_ADAPT_RATESET:
-               ret = wlan_cmd_802_11_rate_adapt_rateset(priv,
+               ret = lbs_cmd_802_11_rate_adapt_rateset(priv,
                                                         cmdptr, cmd_action);
                break;
 
        case CMD_MAC_MULTICAST_ADR:
-               ret = wlan_cmd_mac_multicast_adr(priv, cmdptr, cmd_action);
+               ret = lbs_cmd_mac_multicast_adr(priv, cmdptr, cmd_action);
                break;
 
        case CMD_802_11_MONITOR_MODE:
-               ret = wlan_cmd_802_11_monitor_mode(priv, cmdptr,
+               ret = lbs_cmd_802_11_monitor_mode(priv, cmdptr,
                                          cmd_action, pdata_buf);
                break;
 
        case CMD_802_11_AD_HOC_JOIN:
-               ret = libertas_cmd_80211_ad_hoc_join(priv, cmdptr, pdata_buf);
+               ret = lbs_cmd_80211_ad_hoc_join(priv, cmdptr, pdata_buf);
                break;
 
        case CMD_802_11_RSSI:
-               ret = wlan_cmd_802_11_rssi(priv, cmdptr);
+               ret = lbs_cmd_802_11_rssi(priv, cmdptr);
                break;
 
        case CMD_802_11_AD_HOC_STOP:
-               ret = libertas_cmd_80211_ad_hoc_stop(priv, cmdptr);
+               ret = lbs_cmd_80211_ad_hoc_stop(priv, cmdptr);
                break;
 
        case CMD_802_11_ENABLE_RSN:
-               ret = wlan_cmd_802_11_enable_rsn(priv, cmdptr, cmd_action,
+               ret = lbs_cmd_802_11_enable_rsn(priv, cmdptr, cmd_action,
                                pdata_buf);
                break;
 
        case CMD_802_11_KEY_MATERIAL:
-               ret = wlan_cmd_802_11_key_material(priv, cmdptr, cmd_action,
+               ret = lbs_cmd_802_11_key_material(priv, cmdptr, cmd_action,
                                cmd_oid, pdata_buf);
                break;
 
@@ -1300,11 +1300,11 @@ int libertas_prepare_and_send_command(wlan_private * priv,
                break;
 
        case CMD_802_11_MAC_ADDRESS:
-               ret = wlan_cmd_802_11_mac_address(priv, cmdptr, cmd_action);
+               ret = lbs_cmd_802_11_mac_address(priv, cmdptr, cmd_action);
                break;
 
        case CMD_802_11_EEPROM_ACCESS:
-               ret = wlan_cmd_802_11_eeprom_access(priv, cmdptr,
+               ret = lbs_cmd_802_11_eeprom_access(priv, cmdptr,
                                                    cmd_action, pdata_buf);
                break;
 
@@ -1322,17 +1322,17 @@ int libertas_prepare_and_send_command(wlan_private * priv,
                goto done;
 
        case CMD_802_11D_DOMAIN_INFO:
-               ret = libertas_cmd_802_11d_domain_info(priv, cmdptr,
+               ret = lbs_cmd_802_11d_domain_info(priv, cmdptr,
                                                   cmd_no, cmd_action);
                break;
 
        case CMD_802_11_SLEEP_PARAMS:
-               ret = wlan_cmd_802_11_sleep_params(priv, cmdptr, cmd_action);
+               ret = lbs_cmd_802_11_sleep_params(priv, cmdptr, cmd_action);
                break;
        case CMD_802_11_INACTIVITY_TIMEOUT:
-               ret = wlan_cmd_802_11_inactivity_timeout(priv, cmdptr,
+               ret = lbs_cmd_802_11_inactivity_timeout(priv, cmdptr,
                                                         cmd_action, pdata_buf);
-               libertas_set_cmd_ctrl_node(priv, cmdnode, 0, 0, pdata_buf);
+               lbs_set_cmd_ctrl_node(priv, cmdnode, 0, 0, pdata_buf);
                break;
 
        case CMD_802_11_TPC_CFG:
@@ -1379,19 +1379,19 @@ int libertas_prepare_and_send_command(wlan_private * priv,
                ret = 0;
                break;
        case CMD_BT_ACCESS:
-               ret = wlan_cmd_bt_access(priv, cmdptr, cmd_action, pdata_buf);
+               ret = lbs_cmd_bt_access(priv, cmdptr, cmd_action, pdata_buf);
                break;
 
        case CMD_FWT_ACCESS:
-               ret = wlan_cmd_fwt_access(priv, cmdptr, cmd_action, pdata_buf);
+               ret = lbs_cmd_fwt_access(priv, cmdptr, cmd_action, pdata_buf);
                break;
 
        case CMD_MESH_ACCESS:
-               ret = wlan_cmd_mesh_access(priv, cmdptr, cmd_action, pdata_buf);
+               ret = lbs_cmd_mesh_access(priv, cmdptr, cmd_action, pdata_buf);
                break;
 
        case CMD_SET_BOOT2_VER:
-               ret = wlan_cmd_set_boot2_ver(priv, cmdptr, cmd_action, pdata_buf);
+               ret = lbs_cmd_set_boot2_ver(priv, cmdptr, cmd_action, pdata_buf);
                break;
 
        case CMD_GET_TSF:
@@ -1409,14 +1409,14 @@ int libertas_prepare_and_send_command(wlan_private * priv,
        /* return error, since the command preparation failed */
        if (ret != 0) {
                lbs_deb_host("PREP_CMD: command preparation failed\n");
-               libertas_cleanup_and_insert_cmd(priv, cmdnode);
+               lbs_cleanup_and_insert_cmd(priv, cmdnode);
                ret = -1;
                goto done;
        }
 
        cmdnode->cmdwaitqwoken = 0;
 
-       libertas_queue_cmd(adapter, cmdnode, 1);
+       lbs_queue_cmd(adapter, cmdnode, 1);
        wake_up_interruptible(&priv->waitq);
 
        if (wait_option & CMD_OPTION_WAITFORRSP) {
@@ -1439,23 +1439,23 @@ done:
        lbs_deb_leave_args(LBS_DEB_HOST, "ret %d", ret);
        return ret;
 }
-EXPORT_SYMBOL_GPL(libertas_prepare_and_send_command);
+EXPORT_SYMBOL_GPL(lbs_prepare_and_send_command);
 
 /**
  *  @brief This function allocates the command buffer and link
  *  it to command free queue.
  *
- *  @param priv                A pointer to wlan_private structure
+ *  @param priv                A pointer to lbs_private structure
  *  @return            0 or -1
  */
-int libertas_allocate_cmd_buffer(wlan_private * priv)
+int lbs_allocate_cmd_buffer(lbs_private * priv)
 {
        int ret = 0;
        u32 ulbufsize;
        u32 i;
        struct cmd_ctrl_node *tempcmd_array;
        u8 *ptempvirtualaddr;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_HOST);
 
@@ -1484,7 +1484,7 @@ int libertas_allocate_cmd_buffer(wlan_private * priv)
 
        for (i = 0; i < MRVDRV_NUM_OF_CMD_BUFFER; i++) {
                init_waitqueue_head(&tempcmd_array[i].cmdwait_q);
-               libertas_cleanup_and_insert_cmd(priv, &tempcmd_array[i]);
+               lbs_cleanup_and_insert_cmd(priv, &tempcmd_array[i]);
        }
 
        ret = 0;
@@ -1497,15 +1497,15 @@ done:
 /**
  *  @brief This function frees the command buffer.
  *
- *  @param priv                A pointer to wlan_private structure
+ *  @param priv                A pointer to lbs_private structure
  *  @return            0 or -1
  */
-int libertas_free_cmd_buffer(wlan_private * priv)
+int lbs_free_cmd_buffer(lbs_private * priv)
 {
        u32 ulbufsize; /* Someone needs to die for this. Slowly and painfully */
        unsigned int i;
        struct cmd_ctrl_node *tempcmd_array;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_HOST);
 
@@ -1541,13 +1541,13 @@ done:
  *  @brief This function gets a free command node if available in
  *  command free queue.
  *
- *  @param priv                A pointer to wlan_private structure
+ *  @param priv                A pointer to lbs_private structure
  *  @return cmd_ctrl_node A pointer to cmd_ctrl_node structure or NULL
  */
-struct cmd_ctrl_node *libertas_get_free_cmd_ctrl_node(wlan_private * priv)
+struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(lbs_private * priv)
 {
        struct cmd_ctrl_node *tempnode;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        unsigned long flags;
 
        lbs_deb_enter(LBS_DEB_HOST);
@@ -1602,14 +1602,14 @@ static void cleanup_cmdnode(struct cmd_ctrl_node *ptempnode)
 /**
  *  @brief This function initializes the command node.
  *
- *  @param priv                A pointer to wlan_private structure
+ *  @param priv                A pointer to lbs_private structure
  *  @param ptempnode   A pointer to cmd_ctrl_node structure
  *  @param cmd_oid     cmd oid: treated as sub command
  *  @param wait_option wait option: wait response or not
  *  @param pdata_buf   A pointer to informaion buffer
  *  @return            0 or -1
  */
-void libertas_set_cmd_ctrl_node(wlan_private * priv,
+void lbs_set_cmd_ctrl_node(lbs_private * priv,
                    struct cmd_ctrl_node *ptempnode,
                    u32 cmd_oid, u16 wait_option, void *pdata_buf)
 {
@@ -1630,19 +1630,19 @@ void libertas_set_cmd_ctrl_node(wlan_private * priv,
  *  pending queue. It will put fimware back to PS mode
  *  if applicable.
  *
- *  @param priv     A pointer to wlan_private structure
+ *  @param priv     A pointer to lbs_private structure
  *  @return       0 or -1
  */
-int libertas_execute_next_command(wlan_private * priv)
+int lbs_execute_next_command(lbs_private * priv)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ctrl_node *cmdnode = NULL;
        struct cmd_ds_command *cmdptr;
        unsigned long flags;
        int ret = 0;
 
        // Debug group is LBS_DEB_THREAD and not LBS_DEB_HOST, because the
-       // only caller to us is libertas_thread() and we get even when a
+       // only caller to us is lbs_thread() and we get even when a
        // data packet is received
        lbs_deb_enter(LBS_DEB_THREAD);
 
@@ -1683,7 +1683,7 @@ int libertas_execute_next_command(wlan_private * priv)
                        /*
                         * 1. Non-PS command:
                         * Queue it. set needtowakeup to TRUE if current state
-                        * is SLEEP, otherwise call libertas_ps_wakeup to send Exit_PS.
+                        * is SLEEP, otherwise call lbs_ps_wakeup to send Exit_PS.
                         * 2. PS command but not Exit_PS:
                         * Ignore it.
                         * 3. PS command Exit_PS:
@@ -1702,7 +1702,7 @@ int libertas_execute_next_command(wlan_private * priv)
                                           since it is blocked in main_thread. */
                                        adapter->needtowakeup = 1;
                                } else
-                                       libertas_ps_wakeup(priv, 0);
+                                       lbs_ps_wakeup(priv, 0);
 
                                ret = 0;
                                goto done;
@@ -1722,7 +1722,7 @@ int libertas_execute_next_command(wlan_private * priv)
                                        lbs_deb_host(
                                               "EXEC_NEXT_CMD: ignore ENTER_PS cmd\n");
                                        list_del((struct list_head *)cmdnode);
-                                       libertas_cleanup_and_insert_cmd(priv, cmdnode);
+                                       lbs_cleanup_and_insert_cmd(priv, cmdnode);
 
                                        ret = 0;
                                        goto done;
@@ -1733,7 +1733,7 @@ int libertas_execute_next_command(wlan_private * priv)
                                        lbs_deb_host(
                                               "EXEC_NEXT_CMD: ignore EXIT_PS cmd in sleep\n");
                                        list_del((struct list_head *)cmdnode);
-                                       libertas_cleanup_and_insert_cmd(priv, cmdnode);
+                                       lbs_cleanup_and_insert_cmd(priv, cmdnode);
                                        adapter->needtowakeup = 1;
 
                                        ret = 0;
@@ -1753,9 +1753,9 @@ int libertas_execute_next_command(wlan_private * priv)
                 * check if in power save mode, if yes, put the device back
                 * to PS mode
                 */
-               if ((adapter->psmode != WLAN802_11POWERMODECAM) &&
+               if ((adapter->psmode != LBS802_11POWERMODECAM) &&
                    (adapter->psstate == PS_STATE_FULL_POWER) &&
-                   (adapter->connect_status == LIBERTAS_CONNECTED)) {
+                   (adapter->connect_status == LBS_CONNECTED)) {
                        if (adapter->secinfo.WPAenabled ||
                            adapter->secinfo.WPA2enabled) {
                                /* check for valid WPA group keys */
@@ -1764,13 +1764,13 @@ int libertas_execute_next_command(wlan_private * priv)
                                        lbs_deb_host(
                                               "EXEC_NEXT_CMD: WPA enabled and GTK_SET"
                                               " go back to PS_SLEEP");
-                                       libertas_ps_sleep(priv, 0);
+                                       lbs_ps_sleep(priv, 0);
                                }
                        } else {
                                lbs_deb_host(
                                       "EXEC_NEXT_CMD: cmdpendingq empty, "
                                       "go back to PS_SLEEP");
-                               libertas_ps_sleep(priv, 0);
+                               lbs_ps_sleep(priv, 0);
                        }
                }
        }
@@ -1781,7 +1781,7 @@ done:
        return ret;
 }
 
-void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str)
+void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str)
 {
        union iwreq_data iwrq;
        u8 buf[50];
@@ -1805,10 +1805,10 @@ void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str)
        lbs_deb_leave(LBS_DEB_WEXT);
 }
 
-static int sendconfirmsleep(wlan_private * priv, u8 * cmdptr, u16 size)
+static int sendconfirmsleep(lbs_private *priv, u8 *cmdptr, u16 size)
 {
        unsigned long flags;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret = 0;
 
        lbs_deb_enter(LBS_DEB_HOST);
@@ -1847,7 +1847,7 @@ static int sendconfirmsleep(wlan_private * priv, u8 * cmdptr, u16 size)
        return ret;
 }
 
-void libertas_ps_sleep(wlan_private * priv, int wait_option)
+void lbs_ps_sleep(lbs_private * priv, int wait_option)
 {
        lbs_deb_enter(LBS_DEB_HOST);
 
@@ -1856,7 +1856,7 @@ void libertas_ps_sleep(wlan_private * priv, int wait_option)
         * Remove this check if it is to be supported in IBSS mode also
         */
 
-       libertas_prepare_and_send_command(priv, CMD_802_11_PS_MODE,
+       lbs_prepare_and_send_command(priv, CMD_802_11_PS_MODE,
                              CMD_SUBCMD_ENTER_PS, wait_option, 0, NULL);
 
        lbs_deb_leave(LBS_DEB_HOST);
@@ -1865,19 +1865,19 @@ void libertas_ps_sleep(wlan_private * priv, int wait_option)
 /**
  *  @brief This function sends Exit_PS command to firmware.
  *
- *  @param priv        A pointer to wlan_private structure
+ *  @param priv        A pointer to lbs_private structure
  *  @param wait_option wait response or not
  *  @return            n/a
  */
-void libertas_ps_wakeup(wlan_private * priv, int wait_option)
+void lbs_ps_wakeup(lbs_private * priv, int wait_option)
 {
        __le32 Localpsmode;
 
        lbs_deb_enter(LBS_DEB_HOST);
 
-       Localpsmode = cpu_to_le32(WLAN802_11POWERMODECAM);
+       Localpsmode = cpu_to_le32(LBS802_11POWERMODECAM);
 
-       libertas_prepare_and_send_command(priv, CMD_802_11_PS_MODE,
+       lbs_prepare_and_send_command(priv, CMD_802_11_PS_MODE,
                              CMD_SUBCMD_EXIT_PS,
                              wait_option, 0, &Localpsmode);
 
@@ -1888,14 +1888,14 @@ void libertas_ps_wakeup(wlan_private * priv, int wait_option)
  *  @brief This function checks condition and prepares to
  *  send sleep confirm command to firmware if ok.
  *
- *  @param priv        A pointer to wlan_private structure
+ *  @param priv        A pointer to lbs_private structure
  *  @param psmode      Power Saving mode
  *  @return            n/a
  */
-void libertas_ps_confirm_sleep(wlan_private * priv, u16 psmode)
+void lbs_ps_confirm_sleep(lbs_private * priv, u16 psmode)
 {
        unsigned long flags =0;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        u8 allowed = 1;
 
        lbs_deb_enter(LBS_DEB_HOST);
@@ -1917,8 +1917,8 @@ void libertas_ps_confirm_sleep(wlan_private * priv, u16 psmode)
        spin_unlock_irqrestore(&adapter->driver_lock, flags);
 
        if (allowed) {
-               lbs_deb_host("sending libertas_ps_confirm_sleep\n");
-               sendconfirmsleep(priv, (u8 *) & adapter->libertas_ps_confirm_sleep,
+               lbs_deb_host("sending lbs_ps_confirm_sleep\n");
+               sendconfirmsleep(priv, (u8 *) & adapter->lbs_ps_confirm_sleep,
                                 sizeof(struct PS_CMD_ConfirmSleep));
        } else {
                lbs_deb_host("sleep confirm has been delayed\n");
index 8f90892ea22ee7b39cb0a17620b6800e4512704a..6c1fdb8f11fb203ee0f457bfffef8b0a5ea7669f 100644 (file)
  *  reports disconnect to upper layer, clean tx/rx packets,
  *  reset link state etc.
  *
- *  @param priv    A pointer to wlan_private structure
+ *  @param priv    A pointer to lbs_private structure
  *  @return       n/a
  */
-void libertas_mac_event_disconnected(wlan_private * priv)
+void lbs_mac_event_disconnected(lbs_private * priv)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        union iwreq_data wrqu;
 
-       if (adapter->connect_status != LIBERTAS_CONNECTED)
+       if (adapter->connect_status != LBS_CONNECTED)
                return;
 
        lbs_deb_enter(LBS_DEB_CMD);
@@ -65,7 +65,7 @@ void libertas_mac_event_disconnected(wlan_private * priv)
                                 adapter->curbssparams.ssid_len),
                    adapter->curbssparams.ssid_len);
 
-       adapter->connect_status = LIBERTAS_DISCONNECTED;
+       adapter->connect_status = LBS_DISCONNECTED;
 
        /* Clear out associated SSID and BSSID since connection is
         * no longer valid.
@@ -77,7 +77,7 @@ void libertas_mac_event_disconnected(wlan_private * priv)
        if (adapter->psstate != PS_STATE_FULL_POWER) {
                /* make firmware to exit PS mode */
                lbs_deb_cmd("disconnected, so exit PS mode\n");
-               libertas_ps_wakeup(priv, 0);
+               lbs_ps_wakeup(priv, 0);
        }
        lbs_deb_leave(LBS_DEB_CMD);
 }
@@ -85,11 +85,11 @@ void libertas_mac_event_disconnected(wlan_private * priv)
 /**
  *  @brief This function handles MIC failure event.
  *
- *  @param priv    A pointer to wlan_private structure
+ *  @param priv    A pointer to lbs_private structure
  *  @para  event   the event id
  *  @return       n/a
  */
-static void handle_mic_failureevent(wlan_private * priv, u32 event)
+static void handle_mic_failureevent(lbs_private * priv, u32 event)
 {
        char buf[50];
 
@@ -104,15 +104,15 @@ static void handle_mic_failureevent(wlan_private * priv, u32 event)
                strcat(buf, "multicast ");
        }
 
-       libertas_send_iwevcustom_event(priv, buf);
+       lbs_send_iwevcustom_event(priv, buf);
        lbs_deb_leave(LBS_DEB_CMD);
 }
 
-static int wlan_ret_reg_access(wlan_private * priv,
+static int lbs_ret_reg_access(lbs_private * priv,
                               u16 type, struct cmd_ds_command *resp)
 {
        int ret = 0;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_CMD);
 
@@ -152,12 +152,12 @@ static int wlan_ret_reg_access(wlan_private * priv,
        return ret;
 }
 
-static int wlan_ret_get_hw_spec(wlan_private * priv,
+static int lbs_ret_get_hw_spec(lbs_private * priv,
                                struct cmd_ds_command *resp)
 {
        u32 i;
        struct cmd_ds_get_hw_spec *hwspec = &resp->params.hwspec;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret = 0;
        DECLARE_MAC_BUF(mac);
 
@@ -183,7 +183,7 @@ static int wlan_ret_get_hw_spec(wlan_private * priv,
 
        for (i = 0; i < MRVDRV_MAX_REGION_CODE; i++) {
                /* use the region code to search for the index */
-               if (adapter->regioncode == libertas_region_code_to_index[i]) {
+               if (adapter->regioncode == lbs_region_code_to_index[i]) {
                        break;
                }
        }
@@ -201,12 +201,12 @@ static int wlan_ret_get_hw_spec(wlan_private * priv,
        if (priv->mesh_dev)
                memcpy(priv->mesh_dev->dev_addr, adapter->current_addr, ETH_ALEN);
 
-       if (libertas_set_regiontable(priv, adapter->regioncode, 0)) {
+       if (lbs_set_regiontable(priv, adapter->regioncode, 0)) {
                ret = -1;
                goto done;
        }
 
-       if (libertas_set_universaltable(priv, 0)) {
+       if (lbs_set_universaltable(priv, 0)) {
                ret = -1;
                goto done;
        }
@@ -216,11 +216,11 @@ done:
        return ret;
 }
 
-static int wlan_ret_802_11_sleep_params(wlan_private * priv,
+static int lbs_ret_802_11_sleep_params(lbs_private * priv,
                                        struct cmd_ds_command *resp)
 {
        struct cmd_ds_802_11_sleep_params *sp = &resp->params.sleep_params;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_CMD);
 
@@ -240,14 +240,14 @@ static int wlan_ret_802_11_sleep_params(wlan_private * priv,
        return 0;
 }
 
-static int wlan_ret_802_11_stat(wlan_private * priv,
+static int lbs_ret_802_11_stat(lbs_private * priv,
                                struct cmd_ds_command *resp)
 {
        lbs_deb_enter(LBS_DEB_CMD);
 /*     currently adapter->wlan802_11Stat is unused
 
        struct cmd_ds_802_11_get_stat *p11Stat = &resp->params.gstat;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        // TODO Convert it to Big endian befor copy
        memcpy(&adapter->wlan802_11Stat,
@@ -257,7 +257,7 @@ static int wlan_ret_802_11_stat(wlan_private * priv,
        return 0;
 }
 
-static int wlan_ret_802_11_snmp_mib(wlan_private * priv,
+static int lbs_ret_802_11_snmp_mib(lbs_private * priv,
                                    struct cmd_ds_command *resp)
 {
        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,
        return 0;
 }
 
-static int wlan_ret_802_11_key_material(wlan_private * priv,
+static int lbs_ret_802_11_key_material(lbs_private * priv,
                                        struct cmd_ds_command *resp)
 {
        struct cmd_ds_802_11_key_material *pkeymaterial =
            &resp->params.keymaterial;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        u16 action = le16_to_cpu(pkeymaterial->action);
 
        lbs_deb_enter(LBS_DEB_CMD);
@@ -355,11 +355,11 @@ static int wlan_ret_802_11_key_material(wlan_private * priv,
        return 0;
 }
 
-static int wlan_ret_802_11_mac_address(wlan_private * priv,
+static int lbs_ret_802_11_mac_address(lbs_private * priv,
                                       struct cmd_ds_command *resp)
 {
        struct cmd_ds_802_11_mac_address *macadd = &resp->params.macadd;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_CMD);
 
@@ -369,11 +369,11 @@ static int wlan_ret_802_11_mac_address(wlan_private * priv,
        return 0;
 }
 
-static int wlan_ret_802_11_rf_tx_power(wlan_private * priv,
+static int lbs_ret_802_11_rf_tx_power(lbs_private * priv,
                                       struct cmd_ds_command *resp)
 {
        struct cmd_ds_802_11_rf_tx_power *rtp = &resp->params.txp;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_CMD);
 
@@ -385,11 +385,11 @@ static int wlan_ret_802_11_rf_tx_power(wlan_private * priv,
        return 0;
 }
 
-static int wlan_ret_802_11_rate_adapt_rateset(wlan_private * priv,
+static int lbs_ret_802_11_rate_adapt_rateset(lbs_private * priv,
                                              struct cmd_ds_command *resp)
 {
        struct cmd_ds_802_11_rate_adapt_rateset *rates = &resp->params.rateset;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_CMD);
 
@@ -402,11 +402,11 @@ static int wlan_ret_802_11_rate_adapt_rateset(wlan_private * priv,
        return 0;
 }
 
-static int wlan_ret_802_11_data_rate(wlan_private * priv,
+static int lbs_ret_802_11_data_rate(lbs_private * priv,
                                     struct cmd_ds_command *resp)
 {
        struct cmd_ds_802_11_data_rate *pdatarate = &resp->params.drate;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_CMD);
 
@@ -416,18 +416,18 @@ static int wlan_ret_802_11_data_rate(wlan_private * priv,
        /* FIXME: get actual rates FW can do if this command actually returns
         * all data rates supported.
         */
-       adapter->cur_rate = libertas_fw_index_to_data_rate(pdatarate->rates[0]);
+       adapter->cur_rate = lbs_fw_index_to_data_rate(pdatarate->rates[0]);
        lbs_deb_cmd("DATA_RATE: current rate 0x%02x\n", adapter->cur_rate);
 
        lbs_deb_leave(LBS_DEB_CMD);
        return 0;
 }
 
-static int wlan_ret_802_11_rf_channel(wlan_private * priv,
+static int lbs_ret_802_11_rf_channel(lbs_private * priv,
                                      struct cmd_ds_command *resp)
 {
        struct cmd_ds_802_11_rf_channel *rfchannel = &resp->params.rfchannel;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        u16 action = le16_to_cpu(rfchannel->action);
        u16 newchannel = le16_to_cpu(rfchannel->currentchannel);
 
@@ -446,11 +446,11 @@ static int wlan_ret_802_11_rf_channel(wlan_private * priv,
        return 0;
 }
 
-static int wlan_ret_802_11_rssi(wlan_private * priv,
+static int lbs_ret_802_11_rssi(lbs_private * priv,
                                struct cmd_ds_command *resp)
 {
        struct cmd_ds_802_11_rssi_rsp *rssirsp = &resp->params.rssirsp;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_CMD);
 
@@ -477,12 +477,12 @@ static int wlan_ret_802_11_rssi(wlan_private * priv,
        return 0;
 }
 
-static int wlan_ret_802_11_eeprom_access(wlan_private * priv,
+static int lbs_ret_802_11_eeprom_access(lbs_private * priv,
                                  struct cmd_ds_command *resp)
 {
-       wlan_adapter *adapter = priv->adapter;
-       struct wlan_ioctl_regrdwr *pbuf;
-       pbuf = (struct wlan_ioctl_regrdwr *) adapter->prdeeprom;
+       lbs_adapter *adapter = priv->adapter;
+       struct lbs_ioctl_regrdwr *pbuf;
+       pbuf = (struct lbs_ioctl_regrdwr *) adapter->prdeeprom;
 
        lbs_deb_enter_args(LBS_DEB_CMD, "len %d",
               le16_to_cpu(resp->params.rdeeprom.bytecount));
@@ -503,11 +503,11 @@ static int wlan_ret_802_11_eeprom_access(wlan_private * priv,
        return 0;
 }
 
-static int wlan_ret_get_log(wlan_private * priv,
+static int lbs_ret_get_log(lbs_private * priv,
                            struct cmd_ds_command *resp)
 {
        struct cmd_ds_802_11_get_log *logmessage = &resp->params.glog;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_CMD);
 
@@ -518,11 +518,11 @@ static int wlan_ret_get_log(wlan_private * priv,
        return 0;
 }
 
-static int libertas_ret_802_11_enable_rsn(wlan_private * priv,
+static int lbs_ret_802_11_enable_rsn(lbs_private * priv,
                                           struct cmd_ds_command *resp)
 {
        struct cmd_ds_802_11_enable_rsn *enable_rsn = &resp->params.enbrsn;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        u32 * pdata_buf = adapter->cur_cmd->pdata_buf;
 
        lbs_deb_enter(LBS_DEB_CMD);
@@ -538,11 +538,11 @@ static int libertas_ret_802_11_enable_rsn(wlan_private * priv,
 
 static inline int handle_cmd_response(u16 respcmd,
                                      struct cmd_ds_command *resp,
-                                     wlan_private *priv)
+                                     lbs_private *priv)
 {
        int ret = 0;
        unsigned long flags;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_HOST);
 
@@ -550,47 +550,47 @@ static inline int handle_cmd_response(u16 respcmd,
        case CMD_RET(CMD_MAC_REG_ACCESS):
        case CMD_RET(CMD_BBP_REG_ACCESS):
        case CMD_RET(CMD_RF_REG_ACCESS):
-               ret = wlan_ret_reg_access(priv, respcmd, resp);
+               ret = lbs_ret_reg_access(priv, respcmd, resp);
                break;
 
        case CMD_RET(CMD_GET_HW_SPEC):
-               ret = wlan_ret_get_hw_spec(priv, resp);
+               ret = lbs_ret_get_hw_spec(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11_SCAN):
-               ret = libertas_ret_80211_scan(priv, resp);
+               ret = lbs_ret_80211_scan(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11_GET_LOG):
-               ret = wlan_ret_get_log(priv, resp);
+               ret = lbs_ret_get_log(priv, resp);
                break;
 
        case CMD_RET_802_11_ASSOCIATE:
        case CMD_RET(CMD_802_11_ASSOCIATE):
        case CMD_RET(CMD_802_11_REASSOCIATE):
-               ret = libertas_ret_80211_associate(priv, resp);
+               ret = lbs_ret_80211_associate(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11_DISASSOCIATE):
        case CMD_RET(CMD_802_11_DEAUTHENTICATE):
-               ret = libertas_ret_80211_disassociate(priv, resp);
+               ret = lbs_ret_80211_disassociate(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11_AD_HOC_START):
        case CMD_RET(CMD_802_11_AD_HOC_JOIN):
-               ret = libertas_ret_80211_ad_hoc_start(priv, resp);
+               ret = lbs_ret_80211_ad_hoc_start(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11_GET_STAT):
-               ret = wlan_ret_802_11_stat(priv, resp);
+               ret = lbs_ret_802_11_stat(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11_SNMP_MIB):
-               ret = wlan_ret_802_11_snmp_mib(priv, resp);
+               ret = lbs_ret_802_11_snmp_mib(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11_RF_TX_POWER):
-               ret = wlan_ret_802_11_rf_tx_power(priv, resp);
+               ret = lbs_ret_802_11_rf_tx_power(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11_SET_AFC):
@@ -612,45 +612,45 @@ static inline int handle_cmd_response(u16 respcmd,
                break;
 
        case CMD_RET(CMD_802_11_ENABLE_RSN):
-               ret = libertas_ret_802_11_enable_rsn(priv, resp);
+               ret = lbs_ret_802_11_enable_rsn(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11_DATA_RATE):
-               ret = wlan_ret_802_11_data_rate(priv, resp);
+               ret = lbs_ret_802_11_data_rate(priv, resp);
                break;
        case CMD_RET(CMD_802_11_RATE_ADAPT_RATESET):
-               ret = wlan_ret_802_11_rate_adapt_rateset(priv, resp);
+               ret = lbs_ret_802_11_rate_adapt_rateset(priv, resp);
                break;
        case CMD_RET(CMD_802_11_RF_CHANNEL):
-               ret = wlan_ret_802_11_rf_channel(priv, resp);
+               ret = lbs_ret_802_11_rf_channel(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11_RSSI):
-               ret = wlan_ret_802_11_rssi(priv, resp);
+               ret = lbs_ret_802_11_rssi(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11_MAC_ADDRESS):
-               ret = wlan_ret_802_11_mac_address(priv, resp);
+               ret = lbs_ret_802_11_mac_address(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11_AD_HOC_STOP):
-               ret = libertas_ret_80211_ad_hoc_stop(priv, resp);
+               ret = lbs_ret_80211_ad_hoc_stop(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11_KEY_MATERIAL):
-               ret = wlan_ret_802_11_key_material(priv, resp);
+               ret = lbs_ret_802_11_key_material(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11_EEPROM_ACCESS):
-               ret = wlan_ret_802_11_eeprom_access(priv, resp);
+               ret = lbs_ret_802_11_eeprom_access(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11D_DOMAIN_INFO):
-               ret = libertas_ret_802_11d_domain_info(priv, resp);
+               ret = lbs_ret_802_11d_domain_info(priv, resp);
                break;
 
        case CMD_RET(CMD_802_11_SLEEP_PARAMS):
-               ret = wlan_ret_802_11_sleep_params(priv, resp);
+               ret = lbs_ret_802_11_sleep_params(priv, resp);
                break;
        case CMD_RET(CMD_802_11_INACTIVITY_TIMEOUT):
                spin_lock_irqsave(&adapter->driver_lock, flags);
@@ -713,11 +713,11 @@ static inline int handle_cmd_response(u16 respcmd,
        return ret;
 }
 
-int libertas_process_rx_command(wlan_private * priv)
+int lbs_process_rx_command(lbs_private * priv)
 {
        u16 respcmd;
        struct cmd_ds_command *resp;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret = 0;
        ulong flags;
        u16 result;
@@ -749,7 +749,7 @@ int libertas_process_rx_command(wlan_private * priv)
        if (!(respcmd & 0x8000)) {
                lbs_deb_host("invalid response!\n");
                adapter->cur_cmd_retcode = -1;
-               __libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
+               __lbs_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
                adapter->nr_cmd_pending--;
                adapter->cur_cmd = NULL;
                spin_unlock_irqrestore(&adapter->driver_lock, flags);
@@ -774,27 +774,27 @@ int libertas_process_rx_command(wlan_private * priv)
                        /*
                         * We should not re-try enter-ps command in
                         * ad-hoc mode. It takes place in
-                        * libertas_execute_next_command().
+                        * lbs_execute_next_command().
                         */
                        if (adapter->mode == IW_MODE_ADHOC &&
                            action == CMD_SUBCMD_ENTER_PS)
-                               adapter->psmode = WLAN802_11POWERMODECAM;
+                               adapter->psmode = LBS802_11POWERMODECAM;
                } else if (action == CMD_SUBCMD_ENTER_PS) {
                        adapter->needtowakeup = 0;
                        adapter->psstate = PS_STATE_AWAKE;
 
                        lbs_deb_host("CMD_RESP: ENTER_PS command response\n");
-                       if (adapter->connect_status != LIBERTAS_CONNECTED) {
+                       if (adapter->connect_status != LBS_CONNECTED) {
                                /*
                                 * When Deauth Event received before Enter_PS command
                                 * response, We need to wake up the firmware.
                                 */
                                lbs_deb_host(
-                                      "disconnected, invoking libertas_ps_wakeup\n");
+                                      "disconnected, invoking lbs_ps_wakeup\n");
 
                                spin_unlock_irqrestore(&adapter->driver_lock, flags);
                                mutex_unlock(&adapter->lock);
-                               libertas_ps_wakeup(priv, 0);
+                               lbs_ps_wakeup(priv, 0);
                                mutex_lock(&adapter->lock);
                                spin_lock_irqsave(&adapter->driver_lock, flags);
                        }
@@ -806,7 +806,7 @@ int libertas_process_rx_command(wlan_private * priv)
                        lbs_deb_host("CMD_RESP: PS action 0x%X\n", action);
                }
 
-               __libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
+               __lbs_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
                adapter->nr_cmd_pending--;
                adapter->cur_cmd = NULL;
                spin_unlock_irqrestore(&adapter->driver_lock, flags);
@@ -837,7 +837,7 @@ int libertas_process_rx_command(wlan_private * priv)
 
                }
 
-               __libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
+               __lbs_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
                adapter->nr_cmd_pending--;
                adapter->cur_cmd = NULL;
                spin_unlock_irqrestore(&adapter->driver_lock, flags);
@@ -853,7 +853,7 @@ int libertas_process_rx_command(wlan_private * priv)
        spin_lock_irqsave(&adapter->driver_lock, flags);
        if (adapter->cur_cmd) {
                /* Clean up and Put current command back to cmdfreeq */
-               __libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
+               __lbs_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
                adapter->nr_cmd_pending--;
                WARN_ON(adapter->nr_cmd_pending > 128);
                adapter->cur_cmd = NULL;
@@ -866,10 +866,10 @@ done:
        return ret;
 }
 
-int libertas_process_event(wlan_private * priv)
+int lbs_process_event(lbs_private * priv)
 {
        int ret = 0;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        u32 eventcause;
 
        lbs_deb_enter(LBS_DEB_CMD);
@@ -887,17 +887,17 @@ int libertas_process_event(wlan_private * priv)
 
        case MACREG_INT_CODE_DEAUTHENTICATED:
                lbs_deb_cmd("EVENT: deauthenticated\n");
-               libertas_mac_event_disconnected(priv);
+               lbs_mac_event_disconnected(priv);
                break;
 
        case MACREG_INT_CODE_DISASSOCIATED:
                lbs_deb_cmd("EVENT: disassociated\n");
-               libertas_mac_event_disconnected(priv);
+               lbs_mac_event_disconnected(priv);
                break;
 
        case MACREG_INT_CODE_LINK_LOSE_NO_SCAN:
                lbs_deb_cmd("EVENT: link lost\n");
-               libertas_mac_event_disconnected(priv);
+               lbs_mac_event_disconnected(priv);
                break;
 
        case MACREG_INT_CODE_PS_SLEEP:
@@ -911,7 +911,7 @@ int libertas_process_event(wlan_private * priv)
                }
                adapter->psstate = PS_STATE_PRE_SLEEP;
 
-               libertas_ps_confirm_sleep(priv, (u16) adapter->psmode);
+               lbs_ps_confirm_sleep(priv, (u16) adapter->psmode);
 
                break;
 
@@ -932,10 +932,10 @@ int libertas_process_event(wlan_private * priv)
                         * wait for the command processing to finish
                         * before resuming sending
                         * adapter->needtowakeup will be set to FALSE
-                        * in libertas_ps_wakeup()
+                        * in lbs_ps_wakeup()
                         */
                        lbs_deb_cmd("waking up ...\n");
-                       libertas_ps_wakeup(priv, 0);
+                       lbs_ps_wakeup(priv, 0);
                }
                break;
 
@@ -979,7 +979,7 @@ int libertas_process_event(wlan_private * priv)
                        break;
                }
                lbs_pr_info("EVENT: MESH_AUTO_STARTED\n");
-               adapter->connect_status = LIBERTAS_CONNECTED;
+               adapter->connect_status = LBS_CONNECTED;
                if (priv->mesh_open == 1) {
                        netif_wake_queue(priv->mesh_dev);
                        netif_carrier_on(priv->mesh_dev);
index 95dd4edf64cf6f539026f3a6110d7253b27ad52d..1b382cfaf37ad661cacb0f1199061950a5aadb9a 100644 (file)
 #include "host.h"
 #include "debugfs.h"
 
-static struct dentry *libertas_dir = NULL;
+static struct dentry *lbs_dir;
 static char *szStates[] = {
        "Connected",
        "Disconnected"
 };
 
 #ifdef PROC_DEBUG
-static void libertas_debug_init(wlan_private * priv, struct net_device *dev);
+static void lbs_debug_init(lbs_private * priv, struct net_device *dev);
 #endif
 
 static 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,
 
 static const size_t len = PAGE_SIZE;
 
-static ssize_t libertas_dev_info(struct file *file, char __user *userbuf,
+static ssize_t lbs_dev_info(struct file *file, char __user *userbuf,
                                  size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
+       lbs_private *priv = file->private_data;
        size_t pos = 0;
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
        char *buf = (char *)addr;
@@ -56,10 +56,10 @@ static ssize_t libertas_dev_info(struct file *file, char __user *userbuf,
 }
 
 
-static ssize_t libertas_getscantable(struct file *file, char __user *userbuf,
+static ssize_t lbs_getscantable(struct file *file, char __user *userbuf,
                                  size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
+       lbs_private *priv = file->private_data;
        size_t pos = 0;
        int numscansdone = 0, res;
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
@@ -98,11 +98,11 @@ static ssize_t libertas_getscantable(struct file *file, char __user *userbuf,
        return res;
 }
 
-static ssize_t libertas_sleepparams_write(struct file *file,
+static ssize_t lbs_sleepparams_write(struct file *file,
                                const char __user *user_buf, size_t count,
                                loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
+       lbs_private *priv = file->private_data;
        ssize_t buf_size, res;
        int p1, p2, p3, p4, p5, p6;
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
@@ -125,7 +125,7 @@ static ssize_t libertas_sleepparams_write(struct file *file,
        priv->adapter->sp.sp_extsleepclk = p5;
        priv->adapter->sp.sp_reserved = p6;
 
-        res = libertas_prepare_and_send_command(priv,
+       res = lbs_prepare_and_send_command(priv,
                                CMD_802_11_SLEEP_PARAMS,
                                CMD_ACT_SET,
                                CMD_OPTION_WAITFORRSP, 0, NULL);
@@ -140,17 +140,17 @@ out_unlock:
        return res;
 }
 
-static ssize_t libertas_sleepparams_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_sleepparams_read(struct file *file, char __user *userbuf,
                                  size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
        ssize_t res;
        size_t pos = 0;
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
        char *buf = (char *)addr;
 
-        res = libertas_prepare_and_send_command(priv,
+       res = lbs_prepare_and_send_command(priv,
                                CMD_802_11_SLEEP_PARAMS,
                                CMD_ACT_GET,
                                CMD_OPTION_WAITFORRSP, 0, NULL);
@@ -171,10 +171,10 @@ out_unlock:
        return res;
 }
 
-static ssize_t libertas_extscan(struct file *file, const char __user *userbuf,
+static ssize_t lbs_extscan(struct file *file, const char __user *userbuf,
                                  size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
+       lbs_private *priv = file->private_data;
        ssize_t res, buf_size;
        union iwreq_data wrqu;
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
@@ -186,7 +186,7 @@ static ssize_t libertas_extscan(struct file *file, const char __user *userbuf,
                goto out_unlock;
        }
 
-       libertas_send_specific_ssid_scan(priv, buf, strlen(buf)-1, 0);
+       lbs_send_specific_ssid_scan(priv, buf, strlen(buf)-1, 0);
 
        memset(&wrqu, 0, sizeof(union iwreq_data));
        wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL);
@@ -196,8 +196,8 @@ out_unlock:
        return count;
 }
 
-static int libertas_parse_chan(char *buf, size_t count,
-                       struct wlan_ioctl_user_scan_cfg *scan_cfg, int dur)
+static int lbs_parse_chan(char *buf, size_t count,
+                       struct lbs_ioctl_user_scan_cfg *scan_cfg, int dur)
 {
        char *start, *end, *hold, *str;
        int i = 0;
@@ -233,8 +233,8 @@ static int libertas_parse_chan(char *buf, size_t count,
        return i;
 }
 
-static void libertas_parse_bssid(char *buf, size_t count,
-                        struct wlan_ioctl_user_scan_cfg *scan_cfg)
+static void lbs_parse_bssid(char *buf, size_t count,
+       struct lbs_ioctl_user_scan_cfg *scan_cfg)
 {
        char *hold;
        unsigned int mac[ETH_ALEN];
@@ -248,8 +248,8 @@ static void libertas_parse_bssid(char *buf, size_t count,
        memcpy(scan_cfg->bssid, mac, ETH_ALEN);
 }
 
-static void libertas_parse_ssid(char *buf, size_t count,
-                        struct wlan_ioctl_user_scan_cfg *scan_cfg)
+static void lbs_parse_ssid(char *buf, size_t count,
+       struct lbs_ioctl_user_scan_cfg *scan_cfg)
 {
        char *hold, *end;
        ssize_t size;
@@ -268,7 +268,7 @@ static void libertas_parse_ssid(char *buf, size_t count,
        return;
 }
 
-static int libertas_parse_clear(char *buf, size_t count, const char *tag)
+static int lbs_parse_clear(char *buf, size_t count, const char *tag)
 {
        char *hold;
        int val;
@@ -285,8 +285,8 @@ static int libertas_parse_clear(char *buf, size_t count, const char *tag)
        return val;
 }
 
-static int libertas_parse_dur(char *buf, size_t count,
-                        struct wlan_ioctl_user_scan_cfg *scan_cfg)
+static int lbs_parse_dur(char *buf, size_t count,
+       struct lbs_ioctl_user_scan_cfg *scan_cfg)
 {
        char *hold;
        int val;
@@ -300,8 +300,8 @@ static int libertas_parse_dur(char *buf, size_t count,
        return val;
 }
 
-static void libertas_parse_probes(char *buf, size_t count,
-                        struct wlan_ioctl_user_scan_cfg *scan_cfg)
+static void lbs_parse_probes(char *buf, size_t count,
+       struct lbs_ioctl_user_scan_cfg *scan_cfg)
 {
        char *hold;
        int val;
@@ -317,8 +317,8 @@ static void libertas_parse_probes(char *buf, size_t count,
        return;
 }
 
-static void libertas_parse_type(char *buf, size_t count,
-                        struct wlan_ioctl_user_scan_cfg *scan_cfg)
+static void lbs_parse_type(char *buf, size_t count,
+       struct lbs_ioctl_user_scan_cfg *scan_cfg)
 {
        char *hold;
        int val;
@@ -338,19 +338,19 @@ static void libertas_parse_type(char *buf, size_t count,
        return;
 }
 
-static ssize_t libertas_setuserscan(struct file *file,
+static ssize_t lbs_setuserscan(struct file *file,
                                    const char __user *userbuf,
                                    size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
+       lbs_private *priv = file->private_data;
        ssize_t res, buf_size;
-       struct wlan_ioctl_user_scan_cfg *scan_cfg;
+       struct lbs_ioctl_user_scan_cfg *scan_cfg;
        union iwreq_data wrqu;
        int dur;
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
        char *buf = (char *)addr;
 
-       scan_cfg = kzalloc(sizeof(struct wlan_ioctl_user_scan_cfg), GFP_KERNEL);
+       scan_cfg = kzalloc(sizeof(struct lbs_ioctl_user_scan_cfg), GFP_KERNEL);
        if (!scan_cfg)
                return -ENOMEM;
 
@@ -360,18 +360,18 @@ static ssize_t libertas_setuserscan(struct file *file,
                goto out_unlock;
        }
 
-       scan_cfg->bsstype = WLAN_SCAN_BSS_TYPE_ANY;
+       scan_cfg->bsstype = LBS_SCAN_BSS_TYPE_ANY;
 
-       dur = libertas_parse_dur(buf, count, scan_cfg);
-       libertas_parse_chan(buf, count, scan_cfg, dur);
-       libertas_parse_bssid(buf, count, scan_cfg);
-       scan_cfg->clear_bssid = libertas_parse_clear(buf, count, "clear_bssid=");
-       libertas_parse_ssid(buf, count, scan_cfg);
-       scan_cfg->clear_ssid = libertas_parse_clear(buf, count, "clear_ssid=");
-       libertas_parse_probes(buf, count, scan_cfg);
-       libertas_parse_type(buf, count, scan_cfg);
+       dur = lbs_parse_dur(buf, count, scan_cfg);
+       lbs_parse_chan(buf, count, scan_cfg, dur);
+       lbs_parse_bssid(buf, count, scan_cfg);
+       scan_cfg->clear_bssid = lbs_parse_clear(buf, count, "clear_bssid=");
+       lbs_parse_ssid(buf, count, scan_cfg);
+       scan_cfg->clear_ssid = lbs_parse_clear(buf, count, "clear_ssid=");
+       lbs_parse_probes(buf, count, scan_cfg);
+       lbs_parse_type(buf, count, scan_cfg);
 
-       wlan_scan_networks(priv, scan_cfg, 1);
+       lbs_scan_networks(priv, scan_cfg, 1);
        wait_event_interruptible(priv->adapter->cmd_pending,
                                 !priv->adapter->nr_cmd_pending);
 
@@ -384,21 +384,21 @@ out_unlock:
        return count;
 }
 
-static int libertas_event_initcmd(wlan_private *priv, void **response_buf,
+static int lbs_event_initcmd(lbs_private *priv, void **response_buf,
                        struct cmd_ctrl_node **cmdnode,
                        struct cmd_ds_command **cmd)
 {
        u16 wait_option = CMD_OPTION_WAITFORRSP;
 
-       if (!(*cmdnode = libertas_get_free_cmd_ctrl_node(priv))) {
-               lbs_deb_debugfs("failed libertas_get_free_cmd_ctrl_node\n");
+       if (!(*cmdnode = lbs_get_free_cmd_ctrl_node(priv))) {
+               lbs_deb_debugfs("failed lbs_get_free_cmd_ctrl_node\n");
                return -ENOMEM;
        }
        if (!(*response_buf = kmalloc(3000, GFP_KERNEL))) {
                lbs_deb_debugfs("failed to allocate response buffer!\n");
                return -ENOMEM;
        }
-       libertas_set_cmd_ctrl_node(priv, *cmdnode, 0, wait_option, NULL);
+       lbs_set_cmd_ctrl_node(priv, *cmdnode, 0, wait_option, NULL);
        init_waitqueue_head(&(*cmdnode)->cmdwait_q);
        (*cmdnode)->pdata_buf = *response_buf;
        (*cmdnode)->cmdflags |= CMD_F_HOSTCMD;
@@ -410,11 +410,11 @@ static int libertas_event_initcmd(wlan_private *priv, void **response_buf,
        return 0;
 }
 
-static ssize_t libertas_lowrssi_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_lowrssi_read(struct file *file, char __user *userbuf,
                                  size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ctrl_node *pcmdnode;
        struct cmd_ds_command *pcmdptr;
        struct cmd_ds_802_11_subscribe_event *event;
@@ -424,7 +424,7 @@ static ssize_t libertas_lowrssi_read(struct file *file, char __user *userbuf,
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
        char *buf = (char *)addr;
 
-       res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+       res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
        if (res < 0) {
                free_page(addr);
                return res;
@@ -433,7 +433,7 @@ static ssize_t libertas_lowrssi_read(struct file *file, char __user *userbuf,
        event = &pcmdptr->params.subscribe_event;
        event->action = cpu_to_le16(CMD_ACT_GET);
        pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
-       libertas_queue_cmd(adapter, pcmdnode, 1);
+       lbs_queue_cmd(adapter, pcmdnode, 1);
        wake_up_interruptible(&priv->waitq);
 
        /* Sleep until response is generated by FW */
@@ -480,9 +480,9 @@ static ssize_t libertas_lowrssi_read(struct file *file, char __user *userbuf,
        return res;
 }
 
-static u16 libertas_get_events_bitmap(wlan_private *priv)
+static u16 lbs_get_events_bitmap(lbs_private *priv)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ctrl_node *pcmdnode;
        struct cmd_ds_command *pcmdptr;
        struct cmd_ds_802_11_subscribe_event *event;
@@ -490,14 +490,14 @@ static u16 libertas_get_events_bitmap(wlan_private *priv)
        int res;
        u16 event_bitmap;
 
-       res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+       res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
        if (res < 0)
                return res;
 
        event = &pcmdptr->params.subscribe_event;
        event->action = cpu_to_le16(CMD_ACT_GET);
        pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
-       libertas_queue_cmd(adapter, pcmdnode, 1);
+       lbs_queue_cmd(adapter, pcmdnode, 1);
        wake_up_interruptible(&priv->waitq);
 
        /* Sleep until response is generated by FW */
@@ -525,12 +525,12 @@ static u16 libertas_get_events_bitmap(wlan_private *priv)
        return event_bitmap;
 }
 
-static ssize_t libertas_lowrssi_write(struct file *file,
+static ssize_t lbs_lowrssi_write(struct file *file,
                                    const char __user *userbuf,
                                    size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
        ssize_t res, buf_size;
        int value, freq, subscribed, cmd_len;
        struct cmd_ctrl_node *pcmdnode;
@@ -554,9 +554,9 @@ static ssize_t libertas_lowrssi_write(struct file *file,
                goto out_unlock;
        }
 
-       event_bitmap = libertas_get_events_bitmap(priv);
+       event_bitmap = lbs_get_events_bitmap(priv);
 
-       res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+       res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
        if (res < 0)
                goto out_unlock;
 
@@ -576,7 +576,7 @@ static ssize_t libertas_lowrssi_write(struct file *file,
        event_bitmap |= subscribed ? 0x0001 : 0x0;
        event->events = cpu_to_le16(event_bitmap);
 
-       libertas_queue_cmd(adapter, pcmdnode, 1);
+       lbs_queue_cmd(adapter, pcmdnode, 1);
        wake_up_interruptible(&priv->waitq);
 
        /* Sleep until response is generated by FW */
@@ -606,11 +606,11 @@ out_unlock:
        return res;
 }
 
-static ssize_t libertas_lowsnr_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_lowsnr_read(struct file *file, char __user *userbuf,
                                  size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ctrl_node *pcmdnode;
        struct cmd_ds_command *pcmdptr;
        struct cmd_ds_802_11_subscribe_event *event;
@@ -620,7 +620,7 @@ static ssize_t libertas_lowsnr_read(struct file *file, char __user *userbuf,
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
        char *buf = (char *)addr;
 
-       res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+       res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
        if (res < 0) {
                free_page(addr);
                return res;
@@ -629,7 +629,7 @@ static ssize_t libertas_lowsnr_read(struct file *file, char __user *userbuf,
        event = &pcmdptr->params.subscribe_event;
        event->action = cpu_to_le16(CMD_ACT_GET);
        pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
-       libertas_queue_cmd(adapter, pcmdnode, 1);
+       lbs_queue_cmd(adapter, pcmdnode, 1);
        wake_up_interruptible(&priv->waitq);
 
        /* Sleep until response is generated by FW */
@@ -678,12 +678,12 @@ static ssize_t libertas_lowsnr_read(struct file *file, char __user *userbuf,
        return res;
 }
 
-static ssize_t libertas_lowsnr_write(struct file *file,
+static ssize_t lbs_lowsnr_write(struct file *file,
                                    const char __user *userbuf,
                                    size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
        ssize_t res, buf_size;
        int value, freq, subscribed, cmd_len;
        struct cmd_ctrl_node *pcmdnode;
@@ -707,9 +707,9 @@ static ssize_t libertas_lowsnr_write(struct file *file,
                goto out_unlock;
        }
 
-       event_bitmap = libertas_get_events_bitmap(priv);
+       event_bitmap = lbs_get_events_bitmap(priv);
 
-       res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+       res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
        if (res < 0)
                goto out_unlock;
 
@@ -728,7 +728,7 @@ static ssize_t libertas_lowsnr_write(struct file *file,
        event_bitmap |= subscribed ? 0x0002 : 0x0;
        event->events = cpu_to_le16(event_bitmap);
 
-       libertas_queue_cmd(adapter, pcmdnode, 1);
+       lbs_queue_cmd(adapter, pcmdnode, 1);
        wake_up_interruptible(&priv->waitq);
 
        /* Sleep until response is generated by FW */
@@ -759,11 +759,11 @@ out_unlock:
        return res;
 }
 
-static ssize_t libertas_failcount_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_failcount_read(struct file *file, char __user *userbuf,
                                  size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ctrl_node *pcmdnode;
        struct cmd_ds_command *pcmdptr;
        struct cmd_ds_802_11_subscribe_event *event;
@@ -773,7 +773,7 @@ static ssize_t libertas_failcount_read(struct file *file, char __user *userbuf,
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
        char *buf = (char *)addr;
 
-       res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+       res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
        if (res < 0) {
                free_page(addr);
                return res;
@@ -782,7 +782,7 @@ static ssize_t libertas_failcount_read(struct file *file, char __user *userbuf,
        event = &pcmdptr->params.subscribe_event;
        event->action = cpu_to_le16(CMD_ACT_GET);
        pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
-       libertas_queue_cmd(adapter, pcmdnode, 1);
+       lbs_queue_cmd(adapter, pcmdnode, 1);
        wake_up_interruptible(&priv->waitq);
 
        /* Sleep until response is generated by FW */
@@ -830,12 +830,12 @@ static ssize_t libertas_failcount_read(struct file *file, char __user *userbuf,
        return res;
 }
 
-static ssize_t libertas_failcount_write(struct file *file,
+static ssize_t lbs_failcount_write(struct file *file,
                                    const char __user *userbuf,
                                    size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
        ssize_t res, buf_size;
        int value, freq, subscribed, cmd_len;
        struct cmd_ctrl_node *pcmdnode;
@@ -859,9 +859,9 @@ static ssize_t libertas_failcount_write(struct file *file,
                goto out_unlock;
        }
 
-       event_bitmap = libertas_get_events_bitmap(priv);
+       event_bitmap = lbs_get_events_bitmap(priv);
 
-       res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+       res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
        if (res < 0)
                goto out_unlock;
 
@@ -880,7 +880,7 @@ static ssize_t libertas_failcount_write(struct file *file,
        event_bitmap |= subscribed ? 0x0004 : 0x0;
        event->events = cpu_to_le16(event_bitmap);
 
-       libertas_queue_cmd(adapter, pcmdnode, 1);
+       lbs_queue_cmd(adapter, pcmdnode, 1);
        wake_up_interruptible(&priv->waitq);
 
        /* Sleep until response is generated by FW */
@@ -910,11 +910,11 @@ out_unlock:
        return res;
 }
 
-static ssize_t libertas_bcnmiss_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_bcnmiss_read(struct file *file, char __user *userbuf,
                                  size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ctrl_node *pcmdnode;
        struct cmd_ds_command *pcmdptr;
        struct cmd_ds_802_11_subscribe_event *event;
@@ -924,7 +924,7 @@ static ssize_t libertas_bcnmiss_read(struct file *file, char __user *userbuf,
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
        char *buf = (char *)addr;
 
-       res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+       res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
        if (res < 0) {
                free_page(addr);
                return res;
@@ -933,7 +933,7 @@ static ssize_t libertas_bcnmiss_read(struct file *file, char __user *userbuf,
        event = &pcmdptr->params.subscribe_event;
        event->action = cpu_to_le16(CMD_ACT_GET);
        pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
-       libertas_queue_cmd(adapter, pcmdnode, 1);
+       lbs_queue_cmd(adapter, pcmdnode, 1);
        wake_up_interruptible(&priv->waitq);
 
        /* Sleep until response is generated by FW */
@@ -981,12 +981,12 @@ static ssize_t libertas_bcnmiss_read(struct file *file, char __user *userbuf,
        return res;
 }
 
-static ssize_t libertas_bcnmiss_write(struct file *file,
+static ssize_t lbs_bcnmiss_write(struct file *file,
                                    const char __user *userbuf,
                                    size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
        ssize_t res, buf_size;
        int value, freq, subscribed, cmd_len;
        struct cmd_ctrl_node *pcmdnode;
@@ -1010,9 +1010,9 @@ static ssize_t libertas_bcnmiss_write(struct file *file,
                goto out_unlock;
        }
 
-       event_bitmap = libertas_get_events_bitmap(priv);
+       event_bitmap = lbs_get_events_bitmap(priv);
 
-       res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+       res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
        if (res < 0)
                goto out_unlock;
 
@@ -1030,7 +1030,7 @@ static ssize_t libertas_bcnmiss_write(struct file *file,
        event_bitmap |= subscribed ? 0x0008 : 0x0;
        event->events = cpu_to_le16(event_bitmap);
 
-       libertas_queue_cmd(adapter, pcmdnode, 1);
+       lbs_queue_cmd(adapter, pcmdnode, 1);
        wake_up_interruptible(&priv->waitq);
 
        /* Sleep until response is generated by FW */
@@ -1060,11 +1060,11 @@ out_unlock:
        return res;
 }
 
-static ssize_t libertas_highrssi_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_highrssi_read(struct file *file, char __user *userbuf,
                                  size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ctrl_node *pcmdnode;
        struct cmd_ds_command *pcmdptr;
        struct cmd_ds_802_11_subscribe_event *event;
@@ -1074,7 +1074,7 @@ static ssize_t libertas_highrssi_read(struct file *file, char __user *userbuf,
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
        char *buf = (char *)addr;
 
-       res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+       res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
        if (res < 0) {
                free_page(addr);
                return res;
@@ -1083,7 +1083,7 @@ static ssize_t libertas_highrssi_read(struct file *file, char __user *userbuf,
        event = &pcmdptr->params.subscribe_event;
        event->action = cpu_to_le16(CMD_ACT_GET);
        pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
-       libertas_queue_cmd(adapter, pcmdnode, 1);
+       lbs_queue_cmd(adapter, pcmdnode, 1);
        wake_up_interruptible(&priv->waitq);
 
        /* Sleep until response is generated by FW */
@@ -1132,12 +1132,12 @@ static ssize_t libertas_highrssi_read(struct file *file, char __user *userbuf,
        return res;
 }
 
-static ssize_t libertas_highrssi_write(struct file *file,
+static ssize_t lbs_highrssi_write(struct file *file,
                                    const char __user *userbuf,
                                    size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
        ssize_t res, buf_size;
        int value, freq, subscribed, cmd_len;
        struct cmd_ctrl_node *pcmdnode;
@@ -1161,9 +1161,9 @@ static ssize_t libertas_highrssi_write(struct file *file,
                goto out_unlock;
        }
 
-       event_bitmap = libertas_get_events_bitmap(priv);
+       event_bitmap = lbs_get_events_bitmap(priv);
 
-       res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+       res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
        if (res < 0)
                goto out_unlock;
 
@@ -1182,7 +1182,7 @@ static ssize_t libertas_highrssi_write(struct file *file,
        event_bitmap |= subscribed ? 0x0010 : 0x0;
        event->events = cpu_to_le16(event_bitmap);
 
-       libertas_queue_cmd(adapter, pcmdnode, 1);
+       lbs_queue_cmd(adapter, pcmdnode, 1);
        wake_up_interruptible(&priv->waitq);
 
        /* Sleep until response is generated by FW */
@@ -1210,11 +1210,11 @@ out_unlock:
        return res;
 }
 
-static ssize_t libertas_highsnr_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_highsnr_read(struct file *file, char __user *userbuf,
                                  size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ctrl_node *pcmdnode;
        struct cmd_ds_command *pcmdptr;
        struct cmd_ds_802_11_subscribe_event *event;
@@ -1224,7 +1224,7 @@ static ssize_t libertas_highsnr_read(struct file *file, char __user *userbuf,
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
        char *buf = (char *)addr;
 
-       res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+       res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
        if (res < 0) {
                free_page(addr);
                return res;
@@ -1233,7 +1233,7 @@ static ssize_t libertas_highsnr_read(struct file *file, char __user *userbuf,
        event = &pcmdptr->params.subscribe_event;
        event->action = cpu_to_le16(CMD_ACT_GET);
        pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
-       libertas_queue_cmd(adapter, pcmdnode, 1);
+       lbs_queue_cmd(adapter, pcmdnode, 1);
        wake_up_interruptible(&priv->waitq);
 
        /* Sleep until response is generated by FW */
@@ -1282,12 +1282,12 @@ static ssize_t libertas_highsnr_read(struct file *file, char __user *userbuf,
        return res;
 }
 
-static ssize_t libertas_highsnr_write(struct file *file,
+static ssize_t lbs_highsnr_write(struct file *file,
                                    const char __user *userbuf,
                                    size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
        ssize_t res, buf_size;
        int value, freq, subscribed, cmd_len;
        struct cmd_ctrl_node *pcmdnode;
@@ -1311,9 +1311,9 @@ static ssize_t libertas_highsnr_write(struct file *file,
                goto out_unlock;
        }
 
-       event_bitmap = libertas_get_events_bitmap(priv);
+       event_bitmap = lbs_get_events_bitmap(priv);
 
-       res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+       res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
        if (res < 0)
                goto out_unlock;
 
@@ -1332,7 +1332,7 @@ static ssize_t libertas_highsnr_write(struct file *file,
        event_bitmap |= subscribed ? 0x0020 : 0x0;
        event->events = cpu_to_le16(event_bitmap);
 
-       libertas_queue_cmd(adapter, pcmdnode, 1);
+       lbs_queue_cmd(adapter, pcmdnode, 1);
        wake_up_interruptible(&priv->waitq);
 
        /* Sleep until response is generated by FW */
@@ -1362,12 +1362,12 @@ out_unlock:
        return res;
 }
 
-static ssize_t libertas_rdmac_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_rdmac_read(struct file *file, char __user *userbuf,
                                  size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
-       struct wlan_offset_value offval;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
+       struct lbs_offset_value offval;
        ssize_t pos = 0;
        int ret;
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
@@ -1376,7 +1376,7 @@ static ssize_t libertas_rdmac_read(struct file *file, char __user *userbuf,
        offval.offset = priv->mac_offset;
        offval.value = 0;
 
-       ret = libertas_prepare_and_send_command(priv,
+       ret = lbs_prepare_and_send_command(priv,
                                CMD_MAC_REG_ACCESS, 0,
                                CMD_OPTION_WAITFORRSP, 0, &offval);
        mdelay(10);
@@ -1388,11 +1388,11 @@ static ssize_t libertas_rdmac_read(struct file *file, char __user *userbuf,
        return ret;
 }
 
-static ssize_t libertas_rdmac_write(struct file *file,
+static ssize_t lbs_rdmac_write(struct file *file,
                                    const char __user *userbuf,
                                    size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
+       lbs_private *priv = file->private_data;
        ssize_t res, buf_size;
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
        char *buf = (char *)addr;
@@ -1409,15 +1409,15 @@ out_unlock:
        return res;
 }
 
-static ssize_t libertas_wrmac_write(struct file *file,
+static ssize_t lbs_wrmac_write(struct file *file,
                                    const char __user *userbuf,
                                    size_t count, loff_t *ppos)
 {
 
-       wlan_private *priv = file->private_data;
+       lbs_private *priv = file->private_data;
        ssize_t res, buf_size;
        u32 offset, value;
-       struct wlan_offset_value offval;
+       struct lbs_offset_value offval;
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
        char *buf = (char *)addr;
 
@@ -1434,7 +1434,7 @@ static ssize_t libertas_wrmac_write(struct file *file,
 
        offval.offset = offset;
        offval.value = value;
-       res = libertas_prepare_and_send_command(priv,
+       res = lbs_prepare_and_send_command(priv,
                                CMD_MAC_REG_ACCESS, 1,
                                CMD_OPTION_WAITFORRSP, 0, &offval);
        mdelay(10);
@@ -1445,12 +1445,12 @@ out_unlock:
        return res;
 }
 
-static ssize_t libertas_rdbbp_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_rdbbp_read(struct file *file, char __user *userbuf,
                                  size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
-       struct wlan_offset_value offval;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
+       struct lbs_offset_value offval;
        ssize_t pos = 0;
        int ret;
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
@@ -1459,7 +1459,7 @@ static ssize_t libertas_rdbbp_read(struct file *file, char __user *userbuf,
        offval.offset = priv->bbp_offset;
        offval.value = 0;
 
-       ret = libertas_prepare_and_send_command(priv,
+       ret = lbs_prepare_and_send_command(priv,
                                CMD_BBP_REG_ACCESS, 0,
                                CMD_OPTION_WAITFORRSP, 0, &offval);
        mdelay(10);
@@ -1472,11 +1472,11 @@ static ssize_t libertas_rdbbp_read(struct file *file, char __user *userbuf,
        return ret;
 }
 
-static ssize_t libertas_rdbbp_write(struct file *file,
+static ssize_t lbs_rdbbp_write(struct file *file,
                                    const char __user *userbuf,
                                    size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
+       lbs_private *priv = file->private_data;
        ssize_t res, buf_size;
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
        char *buf = (char *)addr;
@@ -1493,15 +1493,15 @@ out_unlock:
        return res;
 }
 
-static ssize_t libertas_wrbbp_write(struct file *file,
+static ssize_t lbs_wrbbp_write(struct file *file,
                                    const char __user *userbuf,
                                    size_t count, loff_t *ppos)
 {
 
-       wlan_private *priv = file->private_data;
+       lbs_private *priv = file->private_data;
        ssize_t res, buf_size;
        u32 offset, value;
-       struct wlan_offset_value offval;
+       struct lbs_offset_value offval;
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
        char *buf = (char *)addr;
 
@@ -1518,7 +1518,7 @@ static ssize_t libertas_wrbbp_write(struct file *file,
 
        offval.offset = offset;
        offval.value = value;
-       res = libertas_prepare_and_send_command(priv,
+       res = lbs_prepare_and_send_command(priv,
                                CMD_BBP_REG_ACCESS, 1,
                                CMD_OPTION_WAITFORRSP, 0, &offval);
        mdelay(10);
@@ -1529,12 +1529,12 @@ out_unlock:
        return res;
 }
 
-static ssize_t libertas_rdrf_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_rdrf_read(struct file *file, char __user *userbuf,
                                  size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
-       wlan_adapter *adapter = priv->adapter;
-       struct wlan_offset_value offval;
+       lbs_private *priv = file->private_data;
+       lbs_adapter *adapter = priv->adapter;
+       struct lbs_offset_value offval;
        ssize_t pos = 0;
        int ret;
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
@@ -1543,7 +1543,7 @@ static ssize_t libertas_rdrf_read(struct file *file, char __user *userbuf,
        offval.offset = priv->rf_offset;
        offval.value = 0;
 
-       ret = libertas_prepare_and_send_command(priv,
+       ret = lbs_prepare_and_send_command(priv,
                                CMD_RF_REG_ACCESS, 0,
                                CMD_OPTION_WAITFORRSP, 0, &offval);
        mdelay(10);
@@ -1556,11 +1556,11 @@ static ssize_t libertas_rdrf_read(struct file *file, char __user *userbuf,
        return ret;
 }
 
-static ssize_t libertas_rdrf_write(struct file *file,
+static ssize_t lbs_rdrf_write(struct file *file,
                                    const char __user *userbuf,
                                    size_t count, loff_t *ppos)
 {
-       wlan_private *priv = file->private_data;
+       lbs_private *priv = file->private_data;
        ssize_t res, buf_size;
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
        char *buf = (char *)addr;
@@ -1577,15 +1577,15 @@ out_unlock:
        return res;
 }
 
-static ssize_t libertas_wrrf_write(struct file *file,
+static ssize_t lbs_wrrf_write(struct file *file,
                                    const char __user *userbuf,
                                    size_t count, loff_t *ppos)
 {
 
-       wlan_private *priv = file->private_data;
+       lbs_private *priv = file->private_data;
        ssize_t res, buf_size;
        u32 offset, value;
-       struct wlan_offset_value offval;
+       struct lbs_offset_value offval;
        unsigned long addr = get_zeroed_page(GFP_KERNEL);
        char *buf = (char *)addr;
 
@@ -1602,7 +1602,7 @@ static ssize_t libertas_wrrf_write(struct file *file,
 
        offval.offset = offset;
        offval.value = value;
-       res = libertas_prepare_and_send_command(priv,
+       res = lbs_prepare_and_send_command(priv,
                                CMD_RF_REG_ACCESS, 1,
                                CMD_OPTION_WAITFORRSP, 0, &offval);
        mdelay(10);
@@ -1620,69 +1620,69 @@ out_unlock:
        .write = (fwrite), \
 }
 
-struct libertas_debugfs_files {
+struct lbs_debugfs_files {
        char *name;
        int perm;
        struct file_operations fops;
 };
 
-static struct libertas_debugfs_files debugfs_files[] = {
-       { "info", 0444, FOPS(libertas_dev_info, write_file_dummy), },
-       { "getscantable", 0444, FOPS(libertas_getscantable,
+static struct lbs_debugfs_files debugfs_files[] = {
+       { "info", 0444, FOPS(lbs_dev_info, write_file_dummy), },
+       { "getscantable", 0444, FOPS(lbs_getscantable,
                                        write_file_dummy), },
-       { "sleepparams", 0644, FOPS(libertas_sleepparams_read,
-                               libertas_sleepparams_write), },
-       { "extscan", 0600, FOPS(NULL, libertas_extscan), },
-       { "setuserscan", 0600, FOPS(NULL, libertas_setuserscan), },
+       { "sleepparams", 0644, FOPS(lbs_sleepparams_read,
+                               lbs_sleepparams_write), },
+       { "extscan", 0600, FOPS(NULL, lbs_extscan), },
+       { "setuserscan", 0600, FOPS(NULL, lbs_setuserscan), },
 };
 
-static struct libertas_debugfs_files debugfs_events_files[] = {
-       {"low_rssi", 0644, FOPS(libertas_lowrssi_read,
-                               libertas_lowrssi_write), },
-       {"low_snr", 0644, FOPS(libertas_lowsnr_read,
-                               libertas_lowsnr_write), },
-       {"failure_count", 0644, FOPS(libertas_failcount_read,
-                               libertas_failcount_write), },
-       {"beacon_missed", 0644, FOPS(libertas_bcnmiss_read,
-                               libertas_bcnmiss_write), },
-       {"high_rssi", 0644, FOPS(libertas_highrssi_read,
-                               libertas_highrssi_write), },
-       {"high_snr", 0644, FOPS(libertas_highsnr_read,
-                               libertas_highsnr_write), },
+static struct lbs_debugfs_files debugfs_events_files[] = {
+       {"low_rssi", 0644, FOPS(lbs_lowrssi_read,
+                               lbs_lowrssi_write), },
+       {"low_snr", 0644, FOPS(lbs_lowsnr_read,
+                               lbs_lowsnr_write), },
+       {"failure_count", 0644, FOPS(lbs_failcount_read,
+                               lbs_failcount_write), },
+       {"beacon_missed", 0644, FOPS(lbs_bcnmiss_read,
+                               lbs_bcnmiss_write), },
+       {"high_rssi", 0644, FOPS(lbs_highrssi_read,
+                               lbs_highrssi_write), },
+       {"high_snr", 0644, FOPS(lbs_highsnr_read,
+                               lbs_highsnr_write), },
 };
 
-static struct libertas_debugfs_files debugfs_regs_files[] = {
-       {"rdmac", 0644, FOPS(libertas_rdmac_read, libertas_rdmac_write), },
-       {"wrmac", 0600, FOPS(NULL, libertas_wrmac_write), },
-       {"rdbbp", 0644, FOPS(libertas_rdbbp_read, libertas_rdbbp_write), },
-       {"wrbbp", 0600, FOPS(NULL, libertas_wrbbp_write), },
-       {"rdrf", 0644, FOPS(libertas_rdrf_read, libertas_rdrf_write), },
-       {"wrrf", 0600, FOPS(NULL, libertas_wrrf_write), },
+static struct lbs_debugfs_files debugfs_regs_files[] = {
+       {"rdmac", 0644, FOPS(lbs_rdmac_read, lbs_rdmac_write), },
+       {"wrmac", 0600, FOPS(NULL, lbs_wrmac_write), },
+       {"rdbbp", 0644, FOPS(lbs_rdbbp_read, lbs_rdbbp_write), },
+       {"wrbbp", 0600, FOPS(NULL, lbs_wrbbp_write), },
+       {"rdrf", 0644, FOPS(lbs_rdrf_read, lbs_rdrf_write), },
+       {"wrrf", 0600, FOPS(NULL, lbs_wrrf_write), },
 };
 
-void libertas_debugfs_init(void)
+void lbs_debugfs_init(void)
 {
-       if (!libertas_dir)
-               libertas_dir = debugfs_create_dir("libertas_wireless", NULL);
+       if (!lbs_dir)
+               lbs_dir = debugfs_create_dir("lbs_wireless", NULL);
 
        return;
 }
 
-void libertas_debugfs_remove(void)
+void lbs_debugfs_remove(void)
 {
-       if (libertas_dir)
-                debugfs_remove(libertas_dir);
+       if (lbs_dir)
+                debugfs_remove(lbs_dir);
        return;
 }
 
-void libertas_debugfs_init_one(wlan_private *priv, struct net_device *dev)
+void lbs_debugfs_init_one(lbs_private *priv, struct net_device *dev)
 {
        int i;
-       struct libertas_debugfs_files *files;
-       if (!libertas_dir)
+       struct lbs_debugfs_files *files;
+       if (!lbs_dir)
                goto exit;
 
-       priv->debugfs_dir = debugfs_create_dir(dev->name, libertas_dir);
+       priv->debugfs_dir = debugfs_create_dir(dev->name, lbs_dir);
        if (!priv->debugfs_dir)
                goto exit;
 
@@ -1722,13 +1722,13 @@ void libertas_debugfs_init_one(wlan_private *priv, struct net_device *dev)
        }
 
 #ifdef PROC_DEBUG
-       libertas_debug_init(priv, dev);
+       lbs_debug_init(priv, dev);
 #endif
 exit:
        return;
 }
 
-void libertas_debugfs_remove_one(wlan_private *priv)
+void lbs_debugfs_remove_one(lbs_private *priv)
 {
        int i;
 
@@ -1755,8 +1755,8 @@ void libertas_debugfs_remove_one(wlan_private *priv)
 
 #ifdef PROC_DEBUG
 
-#define item_size(n)   (FIELD_SIZEOF(wlan_adapter, n))
-#define item_addr(n)   (offsetof(wlan_adapter, n))
+#define item_size(n)   (FIELD_SIZEOF(lbs_adapter, n))
+#define item_addr(n)   (offsetof(lbs_adapter, n))
 
 
 struct debug_data {
@@ -1765,7 +1765,7 @@ struct debug_data {
        size_t addr;
 };
 
-/* To debug any member of wlan_adapter, simply add one line here.
+/* To debug any member of lbs_adapter, simply add one line here.
  */
 static struct debug_data items[] = {
        {"intcounter", item_size(intcounter), item_addr(intcounter)},
@@ -1786,7 +1786,7 @@ static int num_of_items = ARRAY_SIZE(items);
  *  @param data    data to output
  *  @return       number of output data
  */
-static ssize_t wlan_debugfs_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_debugfs_read(struct file *file, char __user *userbuf,
                        size_t count, loff_t *ppos)
 {
        int val = 0;
@@ -1830,7 +1830,7 @@ static ssize_t wlan_debugfs_read(struct file *file, char __user *userbuf,
  *  @param data    data to write
  *  @return       number of data
  */
-static ssize_t wlan_debugfs_write(struct file *f, const char __user *buf,
+static ssize_t lbs_debugfs_write(struct file *f, const char __user *buf,
                            size_t cnt, loff_t *ppos)
 {
        int r, i;
@@ -1882,21 +1882,21 @@ static ssize_t wlan_debugfs_write(struct file *f, const char __user *buf,
        return (ssize_t)cnt;
 }
 
-static struct file_operations libertas_debug_fops = {
+static struct file_operations lbs_debug_fops = {
        .owner = THIS_MODULE,
        .open = open_file_generic,
-       .write = wlan_debugfs_write,
-       .read = wlan_debugfs_read,
+       .write = lbs_debugfs_write,
+       .read = lbs_debugfs_read,
 };
 
 /**
  *  @brief create debug proc file
  *
- *  @param priv           pointer wlan_private
+ *  @param priv           pointer lbs_private
  *  @param dev     pointer net_device
  *  @return       N/A
  */
-static void libertas_debug_init(wlan_private * priv, struct net_device *dev)
+static void lbs_debug_init(lbs_private * priv, struct net_device *dev)
 {
        int i;
 
@@ -1908,7 +1908,7 @@ static void libertas_debug_init(wlan_private * priv, struct net_device *dev)
 
        priv->debugfs_debug = debugfs_create_file("debug", 0644,
                                                  priv->debugfs_dir, &items[0],
-                                                 &libertas_debug_fops);
+                                                 &lbs_debug_fops);
 }
 #endif
 
index 880a11b95d26c4f06ea04cfaa6b0f881e3c5766e..c9758458198042d076f97fc2029ccac43f383724 100644 (file)
@@ -1,6 +1,10 @@
-void libertas_debugfs_init(void);
-void libertas_debugfs_remove(void);
+#ifndef _LBS_DEBUGFS_H_
+#define _LBS_DEBUGFS_H_
 
-void libertas_debugfs_init_one(wlan_private *priv, struct net_device *dev);
-void libertas_debugfs_remove_one(wlan_private *priv);
+void lbs_debugfs_init(void);
+void lbs_debugfs_remove(void);
 
+void lbs_debugfs_init_one(lbs_private *priv, struct net_device *dev);
+void lbs_debugfs_remove_one(lbs_private *priv);
+
+#endif
index 87fea9d5b90a7394e4aba2c7e01347e64adb6238..7dd76f8e8d2d9d5b061e0ef48a1859470fb176a8 100644 (file)
@@ -3,80 +3,80 @@
   *  functions defined in other source files
   */
 
-#ifndef _WLAN_DECL_H_
-#define _WLAN_DECL_H_
+#ifndef _LBS_DECL_H_
+#define _LBS_DECL_H_
 
 #include <linux/device.h>
 
 #include "defs.h"
 
 /** Function Prototype Declaration */
-struct wlan_private;
+struct lbs_private;
 struct sk_buff;
 struct net_device;
 
-int libertas_set_mac_packet_filter(wlan_private * priv);
+int lbs_set_mac_packet_filter(lbs_private * priv);
 
-void libertas_send_tx_feedback(wlan_private * priv);
+void lbs_send_tx_feedback(lbs_private * priv);
 
-int libertas_free_cmd_buffer(wlan_private * priv);
+int lbs_free_cmd_buffer(lbs_private * priv);
 struct cmd_ctrl_node;
-struct cmd_ctrl_node *libertas_get_free_cmd_ctrl_node(wlan_private * priv);
+struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(lbs_private * priv);
 
-void libertas_set_cmd_ctrl_node(wlan_private * priv,
+void lbs_set_cmd_ctrl_node(lbs_private * priv,
                    struct cmd_ctrl_node *ptempnode,
                    u32 cmd_oid, u16 wait_option, void *pdata_buf);
 
-int libertas_prepare_and_send_command(wlan_private * priv,
+int lbs_prepare_and_send_command(lbs_private * priv,
                          u16 cmd_no,
                          u16 cmd_action,
                          u16 wait_option, u32 cmd_oid, void *pdata_buf);
 
-void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail);
+void lbs_queue_cmd(lbs_adapter *adapter, struct cmd_ctrl_node *cmdnode, u8 addtail);
 
-int libertas_allocate_cmd_buffer(wlan_private * priv);
-int libertas_execute_next_command(wlan_private * priv);
-int libertas_process_event(wlan_private * priv);
-void libertas_interrupt(struct net_device *);
-int libertas_set_radio_control(wlan_private * priv);
-u32 libertas_fw_index_to_data_rate(u8 index);
-u8 libertas_data_rate_to_fw_index(u32 rate);
-void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen);
+int lbs_allocate_cmd_buffer(lbs_private * priv);
+int lbs_execute_next_command(lbs_private * priv);
+int lbs_process_event(lbs_private * priv);
+void lbs_interrupt(struct net_device *);
+int lbs_set_radio_control(lbs_private * priv);
+u32 lbs_fw_index_to_data_rate(u8 index);
+u8 lbs_data_rate_to_fw_index(u32 rate);
+void lbs_get_fwversion(lbs_adapter *adapter, char *fwversion, int maxlen);
 
-void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb);
+void lbs_upload_rx_packet(lbs_private * priv, struct sk_buff *skb);
 
 /** The proc fs interface */
-int libertas_process_rx_command(wlan_private * priv);
-int libertas_process_tx(wlan_private * priv, struct sk_buff *skb);
-void __libertas_cleanup_and_insert_cmd(wlan_private * priv,
+int lbs_process_rx_command(lbs_private * priv);
+int lbs_process_tx(lbs_private * priv, struct sk_buff *skb);
+void __lbs_cleanup_and_insert_cmd(lbs_private * priv,
                                        struct cmd_ctrl_node *ptempcmd);
 
-int libertas_set_regiontable(wlan_private * priv, u8 region, u8 band);
+int lbs_set_regiontable(lbs_private * priv, u8 region, u8 band);
 
-int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *);
+int lbs_process_rxed_packet(lbs_private * priv, struct sk_buff *);
 
-void libertas_ps_sleep(wlan_private * priv, int wait_option);
-void libertas_ps_confirm_sleep(wlan_private * priv, u16 psmode);
-void libertas_ps_wakeup(wlan_private * priv, int wait_option);
+void lbs_ps_sleep(lbs_private * priv, int wait_option);
+void lbs_ps_confirm_sleep(lbs_private * priv, u16 psmode);
+void lbs_ps_wakeup(lbs_private * priv, int wait_option);
 
-void libertas_tx_runqueue(wlan_private *priv);
+void lbs_tx_runqueue(lbs_private *priv);
 
-struct chan_freq_power *libertas_find_cfp_by_band_and_channel(
-                               wlan_adapter * adapter, u8 band, u16 channel);
+struct chan_freq_power *lbs_find_cfp_by_band_and_channel(
+                               lbs_adapter *adapter, u8 band, u16 channel);
 
-void libertas_mac_event_disconnected(wlan_private * priv);
+void lbs_mac_event_disconnected(lbs_private * priv);
 
-void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str);
+void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str);
 
 /* main.c */
-struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band,
+struct chan_freq_power *lbs_get_region_cfp_table(u8 region, u8 band,
                                                             int *cfp_no);
-wlan_private *libertas_add_card(void *card, struct device *dmdev);
-int libertas_remove_card(wlan_private *priv);
-int libertas_start_card(wlan_private *priv);
-int libertas_stop_card(wlan_private *priv);
-int libertas_add_mesh(wlan_private *priv, struct device *dev);
-void libertas_remove_mesh(wlan_private *priv);
-int libertas_reset_device(wlan_private *priv);
-
-#endif                         /* _WLAN_DECL_H_ */
+lbs_private *lbs_add_card(void *card, struct device *dmdev);
+int lbs_remove_card(lbs_private *priv);
+int lbs_start_card(lbs_private *priv);
+int lbs_stop_card(lbs_private *priv);
+int lbs_add_mesh(lbs_private *priv, struct device *dev);
+void lbs_remove_mesh(lbs_private *priv);
+int lbs_reset_device(lbs_private *priv);
+
+#endif
index 3a0c9beefcf8a0260092e03304a3243fe5da9e77..81ab99c3f49fdc4a52e6a4bd6088d313af3777b8 100644 (file)
@@ -2,8 +2,8 @@
   * This header file contains global constant/enum definitions,
   * global variable declaration.
   */
-#ifndef _WLAN_DEFS_H_
-#define _WLAN_DEFS_H_
+#ifndef _LBS_DEFS_H_
+#define _LBS_DEFS_H_
 
 #include <linux/spinlock.h>
 
 #define LBS_DEB_HEX    0x00200000
 #define LBS_DEB_SDIO   0x00400000
 
-extern unsigned int libertas_debug;
+extern unsigned int lbs_debug;
 
 #ifdef DEBUG
 #define LBS_DEB_LL(grp, grpnam, fmt, args...) \
-do { if ((libertas_debug & (grp)) == (grp)) \
+do { if ((lbs_debug & (grp)) == (grp)) \
   printk(KERN_DEBUG DRV_NAME grpnam "%s: " fmt, \
          in_interrupt() ? " (INT)" : "", ## args); } while (0)
 #else
@@ -96,8 +96,8 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
        int i = 0;
 
        if (len &&
-           (libertas_debug & LBS_DEB_HEX) &&
-           (libertas_debug & grp))
+           (lbs_debug & LBS_DEB_HEX) &&
+           (lbs_debug & grp))
        {
                for (i = 1; i <= len; i++) {
                        if ((i & 0xf) == 1) {
@@ -138,7 +138,7 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
 #define MRVDRV_ASSOCIATION_TIME_OUT    255
 #define MRVDRV_SNAP_HEADER_LEN          8
 
-#define        WLAN_UPLD_SIZE                  2312
+#define        LBS_UPLD_SIZE                   2312
 #define DEV_NAME_LEN                   32
 
 /** Misc constants */
@@ -262,12 +262,12 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
 #define UNSET_MESH_FRAME(x) (x->cb[6]=0)
 
 /** Global Variable Declaration */
-typedef struct _wlan_private wlan_private;
-typedef struct _wlan_adapter wlan_adapter;
-extern const char libertas_driver_version[];
-extern u16 libertas_region_code_to_index[MRVDRV_MAX_REGION_CODE];
+typedef struct _lbs_private lbs_private;
+typedef struct _lbs_adapter lbs_adapter;
+extern const char lbs_driver_version[];
+extern u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE];
 
-extern u8 libertas_bg_rates[MAX_RATES];
+extern u8 lbs_bg_rates[MAX_RATES];
 
 /** ENUM definition*/
 /** SNRNF_TYPE */
@@ -284,13 +284,13 @@ enum SNRNF_DATA {
        MAX_TYPE_AVG
 };
 
-/** WLAN_802_11_POWER_MODE */
-enum WLAN_802_11_POWER_MODE {
-       WLAN802_11POWERMODECAM,
-       WLAN802_11POWERMODEMAX_PSP,
-       WLAN802_11POWERMODEFAST_PSP,
+/** LBS_802_11_POWER_MODE */
+enum LBS_802_11_POWER_MODE {
+       LBS802_11POWERMODECAM,
+       LBS802_11POWERMODEMAX_PSP,
+       LBS802_11POWERMODEFAST_PSP,
        /*not a real mode, defined as an upper bound */
-       WLAN802_11POWEMODEMAX
+       LBS802_11POWEMODEMAX
 };
 
 /** PS_STATE */
@@ -308,16 +308,16 @@ enum DNLD_STATE {
        DNLD_CMD_SENT
 };
 
-/** WLAN_MEDIA_STATE */
-enum WLAN_MEDIA_STATE {
-       LIBERTAS_CONNECTED,
-       LIBERTAS_DISCONNECTED
+/** LBS_MEDIA_STATE */
+enum LBS_MEDIA_STATE {
+       LBS_CONNECTED,
+       LBS_DISCONNECTED
 };
 
-/** WLAN_802_11_PRIVACY_FILTER */
-enum WLAN_802_11_PRIVACY_FILTER {
-       WLAN802_11PRIVFILTERACCEPTALL,
-       WLAN802_11PRIVFILTER8021XWEP
+/** LBS_802_11_PRIVACY_FILTER */
+enum LBS_802_11_PRIVACY_FILTER {
+       LBS802_11PRIVFILTERACCEPTALL,
+       LBS802_11PRIVFILTER8021XWEP
 };
 
 /** mv_ms_type */
@@ -382,4 +382,4 @@ enum SNMP_MIB_VALUE_e {
 #define FWT_DEFAULT_SLEEPMODE 0
 #define FWT_DEFAULT_SNR 0
 
-#endif                         /* _WLAN_DEFS_H_ */
+#endif
index 1fb807aa91b96ec84e9742777360bb5681776991..27db5d4389a7241e47cb30b1e2803783f3b964b2 100644 (file)
@@ -1,10 +1,10 @@
 /**
   * This file contains definitions and data structures specific
   * to Marvell 802.11 NIC. It contains the Device Information
-  * structure wlan_adapter.
+  * structure lbs_adapter.
   */
-#ifndef _WLAN_DEV_H_
-#define _WLAN_DEV_H_
+#ifndef _LBS_DEV_H_
+#define _LBS_DEV_H_
 
 #include <linux/netdevice.h>
 #include <linux/wireless.h>
@@ -15,7 +15,7 @@
 #include "defs.h"
 #include "scan.h"
 
-extern struct ethtool_ops libertas_ethtool_ops;
+extern struct ethtool_ops lbs_ethtool_ops;
 
 #define        MAX_BSSID_PER_CHANNEL           16
 
@@ -53,7 +53,7 @@ struct region_channel {
        struct chan_freq_power *CFP;
 };
 
-struct wlan_802_11_security {
+struct lbs_802_11_security {
        u8 WPAenabled;
        u8 WPA2enabled;
        u8 wep_enabled;
@@ -87,7 +87,7 @@ struct sleep_params {
 };
 
 /* Mesh statistics */
-struct wlan_mesh_stats {
+struct lbs_mesh_stats {
        u32     fwd_bcast_cnt;          /* Fwd: Broadcast counter */
        u32     fwd_unicast_cnt;        /* Fwd: Unicast counter */
        u32     fwd_drop_ttl;           /* Fwd: TTL zero */
@@ -99,7 +99,7 @@ struct wlan_mesh_stats {
 };
 
 /** Private structure for the MV device */
-struct _wlan_private {
+struct _lbs_private {
        int open;
        int mesh_open;
        int infra_open;
@@ -109,7 +109,7 @@ struct _wlan_private {
        char name[DEV_NAME_LEN];
 
        void *card;
-       wlan_adapter *adapter;
+       lbs_adapter *adapter;
        struct net_device *dev;
 
        struct net_device_stats stats;
@@ -118,7 +118,7 @@ struct _wlan_private {
        struct ieee80211_device *ieee;
 
        struct iw_statistics wstats;
-       struct wlan_mesh_stats mstats;
+       struct lbs_mesh_stats mstats;
        struct dentry *debugfs_dir;
        struct dentry *debugfs_debug;
        struct dentry *debugfs_files[6];
@@ -136,7 +136,7 @@ struct _wlan_private {
        /** Upload length */
        u32 upld_len;
        /* Upload buffer */
-       u8 upld_buf[WLAN_UPLD_SIZE];
+       u8 upld_buf[LBS_UPLD_SIZE];
        /* Download sent:
           bit0 1/0=data_sent/data_tx_done,
           bit1 1/0=cmd_sent/cmd_tx_done,
@@ -155,9 +155,9 @@ struct _wlan_private {
        struct work_struct sync_channel;
 
        /** Hardware access */
-       int (*hw_host_to_card) (wlan_private * priv, u8 type, u8 * payload, u16 nb);
-       int (*hw_get_int_status) (wlan_private * priv, u8 *);
-       int (*hw_read_event_cause) (wlan_private *);
+       int (*hw_host_to_card) (lbs_private *priv, u8 type, u8 *payload, u16 nb);
+       int (*hw_get_int_status) (lbs_private *priv, u8 *);
+       int (*hw_read_event_cause) (lbs_private *);
 };
 
 /** Association request
@@ -194,7 +194,7 @@ struct assoc_request {
        struct enc_key wpa_mcast_key;
        struct enc_key wpa_unicast_key;
 
-       struct wlan_802_11_security secinfo;
+       struct lbs_802_11_security secinfo;
 
        /** WPA Information Elements*/
        u8 wpa_ie[MAX_WPA_IE_LEN];
@@ -205,7 +205,7 @@ struct assoc_request {
 };
 
 /** Wlan adapter data structure*/
-struct _wlan_adapter {
+struct _lbs_adapter {
        /** STATUS variables */
        u8 fwreleasenumber[4];
        u32 fwcapinfo;
@@ -213,7 +213,7 @@ struct _wlan_adapter {
 
        struct mutex lock;
 
-       u8 tmptxbuf[WLAN_UPLD_SIZE];
+       u8 tmptxbuf[LBS_UPLD_SIZE];
        /* protected by hard_start_xmit serialization */
 
        /** command-related variables */
@@ -302,13 +302,13 @@ struct _wlan_adapter {
        u32 psstate;
        u8 needtowakeup;
 
-       struct PS_CMD_ConfirmSleep libertas_ps_confirm_sleep;
+       struct PS_CMD_ConfirmSleep lbs_ps_confirm_sleep;
 
        struct assoc_request * pending_assoc_req;
        struct assoc_request * in_progress_assoc_req;
 
        /** Encryption parameter */
-       struct wlan_802_11_security secinfo;
+       struct lbs_802_11_security secinfo;
 
        /** WEP keys */
        struct enc_key wep_keys[4];
@@ -350,7 +350,7 @@ struct _wlan_adapter {
        struct region_channel universal_channel[MAX_REGION_CHANNEL_NUM];
 
        /** 11D and Domain Regulatory Data */
-       struct wlan_802_11d_domain_reg domainreg;
+       struct lbs_802_11d_domain_reg domainreg;
        struct parsed_region_chan_11d parsed_region_chan;
 
        /** FSM variable for 11d support */
@@ -358,7 +358,7 @@ struct _wlan_adapter {
 
        /**     MISCELLANEOUS */
        u8 *prdeeprom;
-       struct wlan_offset_value offsetvalue;
+       struct lbs_offset_value offsetvalue;
 
        struct cmd_ds_802_11_get_log logmsg;
 
@@ -368,4 +368,4 @@ struct _wlan_adapter {
        u8 last_scanned_channel;
 };
 
-#endif                         /* _WLAN_DEV_H_ */
+#endif
index 3dae15211b6ad3124c28324eefb9e0f04a4933c8..8121399f4b90ca878f69a021b8b11009e87b54ec 100644 (file)
@@ -19,35 +19,35 @@ static const char * mesh_stat_strings[]= {
                        "tx_failed_cnt"
 };
 
-static void libertas_ethtool_get_drvinfo(struct net_device *dev,
+static void lbs_ethtool_get_drvinfo(struct net_device *dev,
                                         struct ethtool_drvinfo *info)
 {
-       wlan_private *priv = (wlan_private *) dev->priv;
+       lbs_private *priv = (lbs_private *) dev->priv;
        char fwver[32];
 
-       libertas_get_fwversion(priv->adapter, fwver, sizeof(fwver) - 1);
+       lbs_get_fwversion(priv->adapter, fwver, sizeof(fwver) - 1);
 
        strcpy(info->driver, "libertas");
-       strcpy(info->version, libertas_driver_version);
+       strcpy(info->version, lbs_driver_version);
        strcpy(info->fw_version, fwver);
 }
 
 /* All 8388 parts have 16KiB EEPROM size at the time of writing.
  * In case that changes this needs fixing.
  */
-#define LIBERTAS_EEPROM_LEN 16384
+#define LBS_EEPROM_LEN 16384
 
-static int libertas_ethtool_get_eeprom_len(struct net_device *dev)
+static int lbs_ethtool_get_eeprom_len(struct net_device *dev)
 {
-       return LIBERTAS_EEPROM_LEN;
+       return LBS_EEPROM_LEN;
 }
 
-static int libertas_ethtool_get_eeprom(struct net_device *dev,
+static int lbs_ethtool_get_eeprom(struct net_device *dev,
                                   struct ethtool_eeprom *eeprom, u8 * bytes)
 {
-       wlan_private *priv = (wlan_private *) dev->priv;
-       wlan_adapter *adapter = priv->adapter;
-       struct wlan_ioctl_regrdwr regctrl;
+       lbs_private *priv = (lbs_private *) dev->priv;
+       lbs_adapter *adapter = priv->adapter;
+       struct lbs_ioctl_regrdwr regctrl;
        char *ptr;
        int ret;
 
@@ -55,7 +55,7 @@ static int libertas_ethtool_get_eeprom(struct net_device *dev,
        regctrl.offset = eeprom->offset;
        regctrl.NOB = eeprom->len;
 
-       if (eeprom->offset + eeprom->len > LIBERTAS_EEPROM_LEN)
+       if (eeprom->offset + eeprom->len > LBS_EEPROM_LEN)
                return -EINVAL;
 
 //      mutex_lock(&priv->mutex);
@@ -70,7 +70,7 @@ static int libertas_ethtool_get_eeprom(struct net_device *dev,
        lbs_deb_ethtool("action:%d offset: %x NOB: %02x\n",
               regctrl.action, regctrl.offset, regctrl.NOB);
 
-       ret = libertas_prepare_and_send_command(priv,
+       ret = lbs_prepare_and_send_command(priv,
                                    CMD_802_11_EEPROM_ACCESS,
                                    regctrl.action,
                                    CMD_OPTION_WAITFORRSP, 0,
@@ -87,7 +87,7 @@ static int libertas_ethtool_get_eeprom(struct net_device *dev,
        ptr = (char *)adapter->prdeeprom;
 
        /* skip the command header, but include the "value" u32 variable */
-       ptr = ptr + sizeof(struct wlan_ioctl_regrdwr) - 4;
+       ptr = ptr + sizeof(struct lbs_ioctl_regrdwr) - 4;
 
        /*
         * Return the result back to the user
@@ -105,17 +105,17 @@ done:
         return ret;
 }
 
-static void libertas_ethtool_get_stats(struct net_device * dev,
+static void lbs_ethtool_get_stats(struct net_device * dev,
                                struct ethtool_stats * stats, u64 * data)
 {
-       wlan_private *priv = dev->priv;
+       lbs_private *priv = dev->priv;
        struct cmd_ds_mesh_access mesh_access;
        int ret;
 
        lbs_deb_enter(LBS_DEB_ETHTOOL);
 
        /* Get Mesh Statistics */
-       ret = libertas_prepare_and_send_command(priv,
+       ret = lbs_prepare_and_send_command(priv,
                        CMD_MESH_ACCESS, CMD_ACT_MESH_GET_STATS,
                        CMD_OPTION_WAITFORRSP, 0, &mesh_access);
 
@@ -143,7 +143,7 @@ static void libertas_ethtool_get_stats(struct net_device * dev,
        lbs_deb_enter(LBS_DEB_ETHTOOL);
 }
 
-static int libertas_ethtool_get_sset_count(struct net_device * dev, int sset)
+static int lbs_ethtool_get_sset_count(struct net_device * dev, int sset)
 {
        switch (sset) {
        case ETH_SS_STATS:
@@ -153,7 +153,7 @@ static int libertas_ethtool_get_sset_count(struct net_device * dev, int sset)
        }
 }
 
-static void libertas_ethtool_get_strings (struct net_device * dev,
+static void lbs_ethtool_get_strings(struct net_device *dev,
                                          u32 stringset,
                                          u8 * s)
 {
@@ -173,12 +173,12 @@ static void libertas_ethtool_get_strings (struct net_device * dev,
        lbs_deb_enter(LBS_DEB_ETHTOOL);
 }
 
-struct ethtool_ops libertas_ethtool_ops = {
-       .get_drvinfo = libertas_ethtool_get_drvinfo,
-       .get_eeprom =  libertas_ethtool_get_eeprom,
-       .get_eeprom_len = libertas_ethtool_get_eeprom_len,
-       .get_sset_count = libertas_ethtool_get_sset_count,
-       .get_ethtool_stats = libertas_ethtool_get_stats,
-       .get_strings = libertas_ethtool_get_strings,
+struct ethtool_ops lbs_ethtool_ops = {
+       .get_drvinfo = lbs_ethtool_get_drvinfo,
+       .get_eeprom =  lbs_ethtool_get_eeprom,
+       .get_eeprom_len = lbs_ethtool_get_eeprom_len,
+       .get_sset_count = lbs_ethtool_get_sset_count,
+       .get_ethtool_stats = lbs_ethtool_get_stats,
+       .get_strings = lbs_ethtool_get_strings,
 };
 
index b37ddbca969f74dd1e056b358f6f2fdebbca0ef4..3746f702d980c22a78eafeac9ac0d72c77b9c741 100644 (file)
@@ -2,8 +2,8 @@
   * This file contains definitions of WLAN commands.
   */
 
-#ifndef _HOST_H_
-#define _HOST_H_
+#ifndef _LBS_HOST_H_
+#define _LBS_HOST_H_
 
 /** PUBLIC DEFINITIONS */
 #define DEFAULT_AD_HOC_CHANNEL       6
@@ -287,4 +287,4 @@ enum cmd_mesh_access_opts {
 #define MACREG_INT_CODE_SNR_HIGH               0x0000001d
 #define MACREG_INT_CODE_MESH_AUTO_STARTED      0x00000023
 
-#endif                         /* _HOST_H_ */
+#endif
index e1045dc02cce26ca18736bfba0568d591d4e17b9..6477ce0839d7a72c10f1a4166ca9c80af8a8234d 100644 (file)
@@ -2,8 +2,8 @@
  * This file contains the function prototypes, data structure
  * and defines for all the host/station commands
  */
-#ifndef __HOSTCMD__H
-#define __HOSTCMD__H
+#ifndef _LBS_HOSTCMD_H
+#define _LBS_HOSTCMD_H
 
 #include <linux/wireless.h>
 #include "11d.h"
@@ -86,13 +86,13 @@ struct cmd_ctrl_node {
 /* Generic structure to hold all key types. */
 struct enc_key {
        u16 len;
-       u16 flags;  /* KEY_INFO_* from wlan_defs.h */
-       u16 type; /* KEY_TYPE_* from wlan_defs.h */
+       u16 flags;  /* KEY_INFO_* from defs.h */
+       u16 type; /* KEY_TYPE_* from defs.h */
        u8 key[32];
 };
 
-/* wlan_offset_value */
-struct wlan_offset_value {
+/* lbs_offset_value */
+struct lbs_offset_value {
        u32 offset;
        u32 value;
 };
index d383c0f9fe3ebd61e1679000e1e8bea0623c0ff7..b0b95cf2e7c936383b914ff2f228388b1cf52a2f 100644 (file)
@@ -57,7 +57,7 @@ MODULE_LICENSE("GPL");
 
 struct if_cs_card {
        struct pcmcia_device *p_dev;
-       wlan_private *priv;
+       lbs_private *priv;
        void __iomem *iobase;
 };
 
@@ -263,7 +263,7 @@ static irqreturn_t if_cs_interrupt(int irq, void *data)
                        if (!card->priv->adapter->cur_cmd)
                                wake_up_interruptible(&card->priv->waitq);
 
-                       if (card->priv->adapter->connect_status == LIBERTAS_CONNECTED)
+                       if (card->priv->adapter->connect_status == LBS_CONNECTED)
                                netif_wake_queue(card->priv->dev);
                }
 
@@ -271,7 +271,7 @@ static irqreturn_t if_cs_interrupt(int irq, void *data)
                if_cs_write16(card, IF_CS_C_INT_CAUSE, int_cause & IF_CS_C_IC_MASK);
        }
 
-       libertas_interrupt(card->priv->dev);
+       lbs_interrupt(card->priv->dev);
 
        return IRQ_HANDLED;
 }
@@ -286,7 +286,7 @@ static irqreturn_t if_cs_interrupt(int irq, void *data)
 /*
  * Called from if_cs_host_to_card to send a command to the hardware
  */
-static int if_cs_send_cmd(wlan_private *priv, u8 *buf, u16 nb)
+static int if_cs_send_cmd(lbs_private *priv, u8 *buf, u16 nb)
 {
        struct if_cs_card *card = (struct if_cs_card *)priv->card;
        int ret = -1;
@@ -331,7 +331,7 @@ done:
 /*
  * Called from if_cs_host_to_card to send a data to the hardware
  */
-static void if_cs_send_data(wlan_private *priv, u8 *buf, u16 nb)
+static void if_cs_send_data(lbs_private *priv, u8 *buf, u16 nb)
 {
        struct if_cs_card *card = (struct if_cs_card *)priv->card;
 
@@ -354,7 +354,7 @@ static void if_cs_send_data(wlan_private *priv, u8 *buf, u16 nb)
 /*
  * Get the command result out of the card.
  */
-static int if_cs_receive_cmdres(wlan_private *priv, u8* data, u32 *len)
+static int if_cs_receive_cmdres(lbs_private *priv, u8 *data, u32 *len)
 {
        int ret = -1;
        u16 val;
@@ -386,7 +386,7 @@ out:
 }
 
 
-static struct sk_buff *if_cs_receive_data(wlan_private *priv)
+static struct sk_buff *if_cs_receive_data(lbs_private *priv)
 {
        struct sk_buff *skb = NULL;
        u16 len;
@@ -616,7 +616,7 @@ done:
 /********************************************************************/
 
 /* Send commands or data packets to the card */
-static int if_cs_host_to_card(wlan_private *priv, u8 type, u8 *buf, u16 nb)
+static int if_cs_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb)
 {
        int ret = -1;
 
@@ -641,10 +641,10 @@ static int if_cs_host_to_card(wlan_private *priv, u8 type, u8 *buf, u16 nb)
 }
 
 
-static int if_cs_get_int_status(wlan_private *priv, u8 *ireg)
+static int if_cs_get_int_status(lbs_private *priv, u8 *ireg)
 {
        struct if_cs_card *card = (struct if_cs_card *)priv->card;
-       //wlan_adapter *adapter = priv->adapter;
+       /* lbs_adapter *adapter = priv->adapter; */
        int ret = 0;
        u16 int_cause;
        u8 *cmdbuf;
@@ -668,7 +668,7 @@ sbi_get_int_status_exit:
        /* is there a data packet for us? */
        if (*ireg & IF_CS_C_S_RX_UPLD_RDY) {
                struct sk_buff *skb = if_cs_receive_data(priv);
-               libertas_process_rxed_packet(priv, skb);
+               lbs_process_rxed_packet(priv, skb);
                *ireg &= ~IF_CS_C_S_RX_UPLD_RDY;
        }
 
@@ -698,7 +698,7 @@ out:
 }
 
 
-static int if_cs_read_event_cause(wlan_private *priv)
+static int if_cs_read_event_cause(lbs_private *priv)
 {
        lbs_deb_enter(LBS_DEB_CS);
 
@@ -746,7 +746,7 @@ static void if_cs_release(struct pcmcia_device *p_dev)
 static int if_cs_probe(struct pcmcia_device *p_dev)
 {
        int ret = -ENOMEM;
-       wlan_private *priv;
+       lbs_private *priv;
        struct if_cs_card *card;
        /* CIS parsing */
        tuple_t tuple;
@@ -856,7 +856,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
                goto out2;
 
        /* Make this card known to the libertas driver */
-       priv = libertas_add_card(card, &p_dev->dev);
+       priv = lbs_add_card(card, &p_dev->dev);
        if (!priv) {
                ret = -ENOMEM;
                goto out2;
@@ -885,7 +885,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
        if_cs_enable_ints(card);
 
        /* And finally bring the card up */
-       if (libertas_start_card(priv) != 0) {
+       if (lbs_start_card(priv) != 0) {
                lbs_pr_err("could not activate card\n");
                goto out3;
        }
@@ -894,7 +894,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
        goto out;
 
 out3:
-       libertas_remove_card(priv);
+       lbs_remove_card(priv);
 out2:
        ioport_unmap(card->iobase);
 out1:
@@ -917,8 +917,8 @@ static void if_cs_detach(struct pcmcia_device *p_dev)
 
        lbs_deb_enter(LBS_DEB_CS);
 
-       libertas_stop_card(card->priv);
-       libertas_remove_card(card->priv);
+       lbs_stop_card(card->priv);
+       lbs_remove_card(card->priv);
        if_cs_disable_ints(card);
        if_cs_release(p_dev);
        kfree(card);
@@ -939,7 +939,7 @@ static struct pcmcia_device_id if_cs_ids[] = {
 MODULE_DEVICE_TABLE(pcmcia, if_cs_ids);
 
 
-static struct pcmcia_driver libertas_driver = {
+static struct pcmcia_driver lbs_driver = {
        .owner          = THIS_MODULE,
        .drv            = {
                .name   = DRV_NAME,
@@ -955,7 +955,7 @@ static int __init if_cs_init(void)
        int ret;
 
        lbs_deb_enter(LBS_DEB_CS);
-       ret = pcmcia_register_driver(&libertas_driver);
+       ret = pcmcia_register_driver(&lbs_driver);
        lbs_deb_leave(LBS_DEB_CS);
        return ret;
 }
@@ -964,7 +964,7 @@ static int __init if_cs_init(void)
 static void __exit if_cs_exit(void)
 {
        lbs_deb_enter(LBS_DEB_CS);
-       pcmcia_unregister_driver(&libertas_driver);
+       pcmcia_unregister_driver(&lbs_driver);
        lbs_deb_leave(LBS_DEB_CS);
 }
 
index 4f1efb108c28dfa7260ee7f1a1355fa67fccd576..0c762eea7a34ff0ecd964c22a1842f1462256aa5 100644 (file)
 #include "dev.h"
 #include "if_sdio.h"
 
-static char *libertas_helper_name = NULL;
-module_param_named(helper_name, libertas_helper_name, charp, 0644);
+static char *lbs_helper_name = NULL;
+module_param_named(helper_name, lbs_helper_name, charp, 0644);
 
-static char *libertas_fw_name = NULL;
-module_param_named(fw_name, libertas_fw_name, charp, 0644);
+static char *lbs_fw_name = NULL;
+module_param_named(fw_name, lbs_fw_name, charp, 0644);
 
 static const struct sdio_device_id if_sdio_ids[] = {
        { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_LIBERTAS) },
@@ -82,7 +82,7 @@ struct if_sdio_packet {
 
 struct if_sdio_card {
        struct sdio_func        *func;
-       wlan_private            *priv;
+       lbs_private             *priv;
 
        int                     model;
        unsigned long           ioport;
@@ -154,7 +154,7 @@ static int if_sdio_handle_cmd(struct if_sdio_card *card,
 
        card->int_cause |= MRVDRV_CMD_UPLD_RDY;
 
-       libertas_interrupt(card->priv->dev);
+       lbs_interrupt(card->priv->dev);
 
        ret = 0;
 
@@ -194,7 +194,7 @@ static int if_sdio_handle_data(struct if_sdio_card *card,
 
        memcpy(data, buffer, size);
 
-       libertas_process_rxed_packet(card->priv, skb);
+       lbs_process_rxed_packet(card->priv, skb);
 
        ret = 0;
 
@@ -236,7 +236,7 @@ static int if_sdio_handle_event(struct if_sdio_card *card,
        card->event = event;
        card->int_cause |= MRVDRV_CARDEVENT;
 
-       libertas_interrupt(card->priv->dev);
+       lbs_interrupt(card->priv->dev);
 
        spin_unlock_irqrestore(&card->priv->adapter->driver_lock, flags);
 
@@ -694,7 +694,7 @@ out:
 /* Libertas callbacks                                              */
 /*******************************************************************/
 
-static int if_sdio_host_to_card(wlan_private *priv, u8 type, u8 *buf, u16 nb)
+static int if_sdio_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb)
 {
        int ret;
        struct if_sdio_card *card;
@@ -775,7 +775,7 @@ out:
        return ret;
 }
 
-static int if_sdio_get_int_status(wlan_private *priv, u8 *ireg)
+static int if_sdio_get_int_status(lbs_private *priv, u8 *ireg)
 {
        struct if_sdio_card *card;
 
@@ -791,7 +791,7 @@ static int if_sdio_get_int_status(wlan_private *priv, u8 *ireg)
        return 0;
 }
 
-static int if_sdio_read_event_cause(wlan_private *priv)
+static int if_sdio_read_event_cause(lbs_private *priv)
 {
        struct if_sdio_card *card;
 
@@ -836,7 +836,7 @@ static void if_sdio_interrupt(struct sdio_func *func)
         */
        if (cause & IF_SDIO_H_INT_DNLD) {
                if ((card->priv->dnld_sent == DNLD_DATA_SENT) &&
-                       (card->priv->adapter->connect_status == LIBERTAS_CONNECTED))
+                       (card->priv->adapter->connect_status == LBS_CONNECTED))
                        netif_wake_queue(card->priv->dev);
                card->priv->dnld_sent = DNLD_RES_RECEIVED;
        }
@@ -857,7 +857,7 @@ static int if_sdio_probe(struct sdio_func *func,
                const struct sdio_device_id *id)
 {
        struct if_sdio_card *card;
-       wlan_private *priv;
+       lbs_private *priv;
        int ret, i;
        unsigned int model;
        struct if_sdio_packet *packet;
@@ -905,15 +905,15 @@ static int if_sdio_probe(struct sdio_func *func,
        card->helper = if_sdio_models[i].helper;
        card->firmware = if_sdio_models[i].firmware;
 
-       if (libertas_helper_name) {
+       if (lbs_helper_name) {
                lbs_deb_sdio("overriding helper firmware: %s\n",
-                       libertas_helper_name);
-               card->helper = libertas_helper_name;
+                       lbs_helper_name);
+               card->helper = lbs_helper_name;
        }
 
-       if (libertas_fw_name) {
-               lbs_deb_sdio("overriding firmware: %s\n", libertas_fw_name);
-               card->firmware = libertas_fw_name;
+       if (lbs_fw_name) {
+               lbs_deb_sdio("overriding firmware: %s\n", lbs_fw_name);
+               card->firmware = lbs_fw_name;
        }
 
        sdio_claim_host(func);
@@ -951,7 +951,7 @@ static int if_sdio_probe(struct sdio_func *func,
        if (ret)
                goto reclaim;
 
-       priv = libertas_add_card(card, &func->dev);
+       priv = lbs_add_card(card, &func->dev);
        if (!priv) {
                ret = -ENOMEM;
                goto reclaim;
@@ -975,7 +975,7 @@ static int if_sdio_probe(struct sdio_func *func,
        if (ret)
                goto reclaim;
 
-       ret = libertas_start_card(priv);
+       ret = lbs_start_card(priv);
        if (ret)
                goto err_activate_card;
 
@@ -1020,8 +1020,8 @@ static void if_sdio_remove(struct sdio_func *func)
        card->priv->adapter->surpriseremoved = 1;
 
        lbs_deb_sdio("call remove card\n");
-       libertas_stop_card(card->priv);
-       libertas_remove_card(card->priv);
+       lbs_stop_card(card->priv);
+       lbs_remove_card(card->priv);
 
        flush_scheduled_work();
 
index dfcaea7b168f6d90a009cc91db04272698fac9b4..533bdfbf5d2af794570e1232e6e23a3052f9d7bc 100644 (file)
@@ -9,8 +9,8 @@
  * your option) any later version.
  */
 
-#ifndef LIBERTAS_IF_SDIO_H
-#define LIBERTAS_IF_SDIO_H
+#ifndef _LBS_IF_SDIO_H
+#define _LBS_IF_SDIO_H
 
 #define IF_SDIO_IOPORT         0x00
 
index cb59f46ed126471816cee87712f89ee32d2cd4ef..797d3fbf7154e4cc2ee1563257988ff02a58fa00 100644 (file)
@@ -21,8 +21,8 @@
 static const char usbdriver_name[] = "usb8xxx";
 static u8 *default_fw_name = "usb8388.bin";
 
-static char *libertas_fw_name = NULL;
-module_param_named(fw_name, libertas_fw_name, charp, 0644);
+static char *lbs_fw_name;
+module_param_named(fw_name, lbs_fw_name, charp, 0644);
 
 /*
  * We need to send a RESET command to all USB devices before
@@ -45,9 +45,9 @@ MODULE_DEVICE_TABLE(usb, if_usb_table);
 static void if_usb_receive(struct urb *urb);
 static void if_usb_receive_fwload(struct urb *urb);
 static int if_usb_prog_firmware(struct usb_card_rec *cardp);
-static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 nb);
-static int if_usb_get_int_status(wlan_private * priv, u8 *);
-static int if_usb_read_event_cause(wlan_private *);
+static int if_usb_host_to_card(lbs_private *priv, u8 type, u8 *payload, u16 nb);
+static int if_usb_get_int_status(lbs_private *priv, u8 *);
+static int if_usb_read_event_cause(lbs_private *);
 static int usb_tx_block(struct usb_card_rec *cardp, u8 *payload, u16 nb);
 static void if_usb_free(struct usb_card_rec *cardp);
 static 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)
        /* handle the transmission complete validations */
 
        if (urb->status == 0) {
-               wlan_private *priv = cardp->priv;
+               lbs_private *priv = cardp->priv;
 
                /*
                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)
                 * valid at firmware load time.
                 */
                if (priv) {
-                       wlan_adapter *adapter = priv->adapter;
+                       lbs_adapter *adapter = priv->adapter;
                        struct net_device *dev = priv->dev;
 
                        priv->dnld_sent = DNLD_RES_RECEIVED;
@@ -86,7 +86,7 @@ static void if_usb_write_bulk_callback(struct urb *urb)
                        if (!adapter->cur_cmd)
                                wake_up_interruptible(&priv->waitq);
 
-                       if ((adapter->connect_status == LIBERTAS_CONNECTED)) {
+                       if ((adapter->connect_status == LBS_CONNECTED)) {
                                netif_wake_queue(dev);
                                netif_wake_queue(priv->mesh_dev);
                        }
@@ -136,7 +136,7 @@ static int if_usb_probe(struct usb_interface *intf,
        struct usb_device *udev;
        struct usb_host_interface *iface_desc;
        struct usb_endpoint_descriptor *endpoint;
-       wlan_private *priv;
+       lbs_private *priv;
        struct usb_card_rec *cardp;
        int i;
 
@@ -222,12 +222,12 @@ static int if_usb_probe(struct usb_interface *intf,
                goto err_prog_firmware;
        }
 
-       if (!(priv = libertas_add_card(cardp, &udev->dev)))
+       if (!(priv = lbs_add_card(cardp, &udev->dev)))
                goto err_prog_firmware;
 
        cardp->priv = priv;
 
-       if (libertas_add_mesh(priv, &udev->dev))
+       if (lbs_add_mesh(priv, &udev->dev))
                goto err_add_mesh;
 
        cardp->eth_dev = priv->dev;
@@ -242,7 +242,7 @@ static int if_usb_probe(struct usb_interface *intf,
        msleep_interruptible(200);
        priv->adapter->fw_ready = 1;
 
-       if (libertas_start_card(priv))
+       if (lbs_start_card(priv))
                goto err_start_card;
 
        list_add_tail(&cardp->list, &usb_devices);
@@ -253,9 +253,9 @@ static int if_usb_probe(struct usb_interface *intf,
        return 0;
 
 err_start_card:
-       libertas_remove_mesh(priv);
+       lbs_remove_mesh(priv);
 err_add_mesh:
-       libertas_remove_card(priv);
+       lbs_remove_card(priv);
 err_prog_firmware:
        if_usb_reset_device(cardp);
 dealloc:
@@ -273,7 +273,7 @@ error:
 static void if_usb_disconnect(struct usb_interface *intf)
 {
        struct usb_card_rec *cardp = usb_get_intfdata(intf);
-       wlan_private *priv = (wlan_private *) cardp->priv;
+       lbs_private *priv = (lbs_private *) cardp->priv;
 
        lbs_deb_enter(LBS_DEB_MAIN);
 
@@ -283,12 +283,12 @@ static void if_usb_disconnect(struct usb_interface *intf)
        list_del(&cardp->list);
 
        if (priv) {
-               wlan_adapter *adapter = priv->adapter;
+               lbs_adapter *adapter = priv->adapter;
 
                adapter->surpriseremoved = 1;
-               libertas_stop_card(priv);
-               libertas_remove_mesh(priv);
-               libertas_remove_card(priv);
+               lbs_stop_card(priv);
+               lbs_remove_mesh(priv);
+               lbs_remove_card(priv);
        }
 
        /* Unlink and free urb */
@@ -302,7 +302,7 @@ static void if_usb_disconnect(struct usb_interface *intf)
 
 /**
  *  @brief  This function download FW
- *  @param priv                pointer to wlan_private
+ *  @param priv                pointer to lbs_private
  *  @return            0
  */
 static int if_prog_firmware(struct usb_card_rec *cardp)
@@ -385,7 +385,7 @@ static int if_prog_firmware(struct usb_card_rec *cardp)
 static int if_usb_reset_device(struct usb_card_rec *cardp)
 {
        int ret;
-       wlan_private * priv = cardp->priv;
+       lbs_private * priv = cardp->priv;
 
        lbs_deb_enter(LBS_DEB_USB);
 
@@ -395,7 +395,7 @@ static int if_usb_reset_device(struct usb_card_rec *cardp)
        ret = usb_reset_device(cardp->udev);
        if (!ret && priv) {
                msleep(10);
-               ret = libertas_reset_device(priv);
+               ret = lbs_reset_device(priv);
                msleep(10);
        }
 
@@ -406,7 +406,7 @@ static int if_usb_reset_device(struct usb_card_rec *cardp)
 
 /**
  *  @brief This function transfer the data to the device.
- *  @param priv        pointer to wlan_private
+ *  @param priv        pointer to lbs_private
  *  @param payload     pointer to payload data
  *  @param nb          data length
  *  @return            0 or -1
@@ -583,7 +583,7 @@ exit:
 
 static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb,
                                       struct usb_card_rec *cardp,
-                                      wlan_private *priv)
+                                      lbs_private *priv)
 {
        if (recvlength > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE +
            MESSAGE_HEADER_LEN || recvlength < MRVDRV_MIN_PKT_LEN) {
@@ -596,14 +596,14 @@ static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb,
        skb_reserve(skb, IPFIELD_ALIGN_OFFSET);
        skb_put(skb, recvlength);
        skb_pull(skb, MESSAGE_HEADER_LEN);
-       libertas_process_rxed_packet(priv, skb);
+       lbs_process_rxed_packet(priv, skb);
        priv->upld_len = (recvlength - MESSAGE_HEADER_LEN);
 }
 
 static inline void process_cmdrequest(int recvlength, u8 *recvbuff,
                                      struct sk_buff *skb,
                                      struct usb_card_rec *cardp,
-                                     wlan_private *priv)
+                                     lbs_private *priv)
 {
        u8 *cmdbuf;
        if (recvlength > MRVDRV_SIZE_OF_CMD_BUFFER) {
@@ -631,7 +631,7 @@ static inline void process_cmdrequest(int recvlength, u8 *recvbuff,
               priv->upld_len);
 
        kfree_skb(skb);
-       libertas_interrupt(priv->dev);
+       lbs_interrupt(priv->dev);
        spin_unlock(&priv->adapter->driver_lock);
 
        lbs_deb_usbd(&cardp->udev->dev,
@@ -652,7 +652,7 @@ static void if_usb_receive(struct urb *urb)
        struct read_cb_info *rinfo = (struct read_cb_info *)urb->context;
        struct sk_buff *skb = rinfo->skb;
        struct usb_card_rec *cardp = (struct usb_card_rec *) rinfo->cardp;
-       wlan_private * priv = cardp->priv;
+       lbs_private * priv = cardp->priv;
 
        int recvlength = urb->actual_length;
        u8 *recvbuff = NULL;
@@ -695,14 +695,14 @@ static void if_usb_receive(struct urb *urb)
                lbs_deb_usbd(&cardp->udev->dev,"**EVENT** 0x%X\n",
                            cardp->usb_event_cause);
                if (cardp->usb_event_cause & 0xffff0000) {
-                       libertas_send_tx_feedback(priv);
+                       lbs_send_tx_feedback(priv);
                        spin_unlock(&priv->adapter->driver_lock);
                        break;
                }
                cardp->usb_event_cause <<= 3;
                cardp->usb_int_cause |= MRVDRV_CARDEVENT;
                kfree_skb(skb);
-               libertas_interrupt(priv->dev);
+               lbs_interrupt(priv->dev);
                spin_unlock(&priv->adapter->driver_lock);
                goto rx_exit;
        default:
@@ -720,13 +720,13 @@ rx_exit:
 
 /**
  *  @brief This function downloads data to FW
- *  @param priv                pointer to wlan_private structure
+ *  @param priv                pointer to lbs_private structure
  *  @param type                type of data
  *  @param buf         pointer to data buffer
  *  @param len         number of bytes
  *  @return            0 or -1
  */
-static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 nb)
+static int if_usb_host_to_card(lbs_private *priv, u8 type, u8 *payload, u16 nb)
 {
        struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card;
 
@@ -753,7 +753,7 @@ static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 n
 }
 
 /* called with adapter->driver_lock held */
-static int if_usb_get_int_status(wlan_private * priv, u8 * ireg)
+static int if_usb_get_int_status(lbs_private *priv, u8 *ireg)
 {
        struct usb_card_rec *cardp = priv->card;
 
@@ -765,7 +765,7 @@ static int if_usb_get_int_status(wlan_private * priv, u8 * ireg)
        return 0;
 }
 
-static int if_usb_read_event_cause(wlan_private * priv)
+static int if_usb_read_event_cause(lbs_private * priv)
 {
        struct usb_card_rec *cardp = priv->card;
 
@@ -856,10 +856,10 @@ static int if_usb_prog_firmware(struct usb_card_rec *cardp)
 
        lbs_deb_enter(LBS_DEB_USB);
 
-       if ((ret = request_firmware(&cardp->fw, libertas_fw_name,
+       if ((ret = request_firmware(&cardp->fw, lbs_fw_name,
                                    &cardp->udev->dev)) < 0) {
                lbs_pr_err("request_firmware() failed with %#x\n", ret);
-               lbs_pr_err("firmware %s not found\n", libertas_fw_name);
+               lbs_pr_err("firmware %s not found\n", lbs_fw_name);
                goto done;
        }
 
@@ -940,7 +940,7 @@ done:
 static int if_usb_suspend(struct usb_interface *intf, pm_message_t message)
 {
        struct usb_card_rec *cardp = usb_get_intfdata(intf);
-       wlan_private *priv = cardp->priv;
+       lbs_private *priv = cardp->priv;
 
        lbs_deb_enter(LBS_DEB_USB);
 
@@ -954,7 +954,7 @@ static int if_usb_suspend(struct usb_interface *intf, pm_message_t message)
                struct cmd_ds_mesh_access mesh_access;
                memset(&mesh_access, 0, sizeof(mesh_access));
                mesh_access.data[0] = cpu_to_le32(1);
-               libertas_prepare_and_send_command(priv,
+               lbs_prepare_and_send_command(priv,
                                CMD_MESH_ACCESS,
                                CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
                                CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
@@ -976,7 +976,7 @@ static int if_usb_suspend(struct usb_interface *intf, pm_message_t message)
 static int if_usb_resume(struct usb_interface *intf)
 {
        struct usb_card_rec *cardp = usb_get_intfdata(intf);
-       wlan_private *priv = cardp->priv;
+       lbs_private *priv = cardp->priv;
 
        lbs_deb_enter(LBS_DEB_USB);
 
@@ -994,7 +994,7 @@ static int if_usb_resume(struct usb_interface *intf)
                struct cmd_ds_mesh_access mesh_access;
                memset(&mesh_access, 0, sizeof(mesh_access));
                mesh_access.data[0] = cpu_to_le32(0);
-               libertas_prepare_and_send_command(priv,
+               lbs_prepare_and_send_command(priv,
                                CMD_MESH_ACCESS,
                                CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
                                CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
@@ -1027,8 +1027,8 @@ static int if_usb_init_module(void)
 
        lbs_deb_enter(LBS_DEB_MAIN);
 
-       if (libertas_fw_name == NULL) {
-               libertas_fw_name = default_fw_name;
+       if (lbs_fw_name == NULL) {
+               lbs_fw_name = default_fw_name;
        }
 
        ret = usb_register(&if_usb_driver);
@@ -1044,7 +1044,7 @@ static void if_usb_exit_module(void)
        lbs_deb_enter(LBS_DEB_MAIN);
 
        list_for_each_entry_safe(cardp, cardp_temp, &usb_devices, list) {
-               libertas_prepare_and_send_command(cardp->priv, CMD_802_11_RESET,
+               lbs_prepare_and_send_command(cardp->priv, CMD_802_11_RESET,
                                                  CMD_ACT_HALT, 0, 0, NULL);
        }
 
index e07a10ed28b5d34447ab28cd97d9be71faea8f73..9b4230864c438327c35d651766bf3996be7b0318 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _LIBERTAS_IF_USB_H
-#define _LIBERTAS_IF_USB_H
+#ifndef _LBS_IF_USB_H
+#define _LBS_IF_USB_H
 
 #include <linux/list.h>
 
index dc24a05c9447557d72f3443020e8e00ef0cbc701..90c25f478123eb1f5d386d5bb2e64454c3bd09cd 100644 (file)
  * NOTE: Setting the MSB of the basic rates need to be taken
  *   care, either before or after calling this function
  *
- *  @param adapter     A pointer to wlan_adapter structure
+ *  @param adapter     A pointer to lbs_adapter structure
  *  @param rate1       the buffer which keeps input and output
  *  @param rate1_size  the size of rate1 buffer; new size of buffer on return
  *
  *  @return            0 or -1
  */
-static int get_common_rates(wlan_adapter * adapter, u8 * rates, u16 *rates_size)
+static int get_common_rates(lbs_adapter *adapter, u8 *rates, u16 *rates_size)
 {
-       u8 *card_rates = libertas_bg_rates;
-       size_t num_card_rates = sizeof(libertas_bg_rates);
+       u8 *card_rates = lbs_bg_rates;
+       size_t num_card_rates = sizeof(lbs_bg_rates);
        int ret = 0, i, j;
        u8 tmp[30];
        size_t tmp_size = 0;
@@ -85,7 +85,7 @@ done:
  *  @param rates     buffer of data rates
  *  @param len       size of buffer
  */
-static void libertas_set_basic_rate_flags(u8 * rates, size_t len)
+static void lbs_set_basic_rate_flags(u8 *rates, size_t len)
 {
        int i;
 
@@ -104,7 +104,7 @@ static void libertas_set_basic_rate_flags(u8 * rates, size_t len)
  *  @param rates     buffer of data rates
  *  @param len       size of buffer
  */
-void libertas_unset_basic_rate_flags(u8 * rates, size_t len)
+void lbs_unset_basic_rate_flags(u8 *rates, size_t len)
 {
        int i;
 
@@ -116,19 +116,19 @@ void libertas_unset_basic_rate_flags(u8 * rates, size_t len)
 /**
  *  @brief Associate to a specific BSS discovered in a scan
  *
- *  @param priv      A pointer to wlan_private structure
+ *  @param priv      A pointer to lbs_private structure
  *  @param pbssdesc  Pointer to the BSS descriptor to associate with.
  *
  *  @return          0-success, otherwise fail
  */
-int wlan_associate(wlan_private * priv, struct assoc_request * assoc_req)
+int lbs_associate(lbs_private *priv, struct assoc_request *assoc_req)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret;
 
        lbs_deb_enter(LBS_DEB_JOIN);
 
-       ret = libertas_prepare_and_send_command(priv, CMD_802_11_AUTHENTICATE,
+       ret = lbs_prepare_and_send_command(priv, CMD_802_11_AUTHENTICATE,
                                    0, CMD_OPTION_WAITFORRSP,
                                    0, assoc_req->bss.bssid);
 
@@ -142,9 +142,9 @@ int wlan_associate(wlan_private * priv, struct assoc_request * assoc_req)
        else
                adapter->preamble = CMD_TYPE_LONG_PREAMBLE;
 
-       libertas_set_radio_control(priv);
+       lbs_set_radio_control(priv);
 
-       ret = libertas_prepare_and_send_command(priv, CMD_802_11_ASSOCIATE,
+       ret = lbs_prepare_and_send_command(priv, CMD_802_11_ASSOCIATE,
                                    0, CMD_OPTION_WAITFORRSP, 0, assoc_req);
 
 done:
@@ -155,13 +155,13 @@ done:
 /**
  *  @brief Start an Adhoc Network
  *
- *  @param priv         A pointer to wlan_private structure
+ *  @param priv         A pointer to lbs_private structure
  *  @param adhocssid    The ssid of the Adhoc Network
  *  @return             0--success, -1--fail
  */
-int libertas_start_adhoc_network(wlan_private * priv, struct assoc_request * assoc_req)
+int lbs_start_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret = 0;
 
        adapter->adhoccreate = 1;
@@ -174,12 +174,12 @@ int libertas_start_adhoc_network(wlan_private * priv, struct assoc_request * ass
                adapter->preamble = CMD_TYPE_LONG_PREAMBLE;
        }
 
-       libertas_set_radio_control(priv);
+       lbs_set_radio_control(priv);
 
        lbs_deb_join("AdhocStart: channel = %d\n", assoc_req->channel);
        lbs_deb_join("AdhocStart: band = %d\n", assoc_req->band);
 
-       ret = libertas_prepare_and_send_command(priv, CMD_802_11_AD_HOC_START,
+       ret = lbs_prepare_and_send_command(priv, CMD_802_11_AD_HOC_START,
                                    0, CMD_OPTION_WAITFORRSP, 0, assoc_req);
 
        return ret;
@@ -188,15 +188,15 @@ int libertas_start_adhoc_network(wlan_private * priv, struct assoc_request * ass
 /**
  *  @brief Join an adhoc network found in a previous scan
  *
- *  @param priv         A pointer to wlan_private structure
+ *  @param priv         A pointer to lbs_private structure
  *  @param pbssdesc     Pointer to a BSS descriptor found in a previous scan
  *                      to attempt to join
  *
  *  @return             0--success, -1--fail
  */
-int libertas_join_adhoc_network(wlan_private * priv, struct assoc_request * assoc_req)
+int lbs_join_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        struct bss_descriptor * bss = &assoc_req->bss;
        int ret = 0;
 
@@ -211,11 +211,11 @@ int libertas_join_adhoc_network(wlan_private * priv, struct assoc_request * asso
 
        /* check if the requested SSID is already joined */
        if (   adapter->curbssparams.ssid_len
-           && !libertas_ssid_cmp(adapter->curbssparams.ssid,
+           && !lbs_ssid_cmp(adapter->curbssparams.ssid,
                                  adapter->curbssparams.ssid_len,
                                  bss->ssid, bss->ssid_len)
            && (adapter->mode == IW_MODE_ADHOC)
-           && (adapter->connect_status == LIBERTAS_CONNECTED)) {
+           && (adapter->connect_status == LBS_CONNECTED)) {
                union iwreq_data wrqu;
 
                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
                adapter->preamble = CMD_TYPE_SHORT_PREAMBLE;
        }
 
-       libertas_set_radio_control(priv);
+       lbs_set_radio_control(priv);
 
        lbs_deb_join("AdhocJoin: channel = %d\n", assoc_req->channel);
        lbs_deb_join("AdhocJoin: band = %c\n", assoc_req->band);
 
        adapter->adhoccreate = 0;
 
-       ret = libertas_prepare_and_send_command(priv, CMD_802_11_AD_HOC_JOIN,
+       ret = lbs_prepare_and_send_command(priv, CMD_802_11_AD_HOC_JOIN,
                                    0, CMD_OPTION_WAITFORRSP,
                                    OID_802_11_SSID, assoc_req);
 
@@ -258,38 +258,38 @@ out:
        return ret;
 }
 
-int libertas_stop_adhoc_network(wlan_private * priv)
+int lbs_stop_adhoc_network(lbs_private * priv)
 {
-       return libertas_prepare_and_send_command(priv, CMD_802_11_AD_HOC_STOP,
+       return lbs_prepare_and_send_command(priv, CMD_802_11_AD_HOC_STOP,
                                     0, CMD_OPTION_WAITFORRSP, 0, NULL);
 }
 
 /**
  *  @brief Send Deauthentication Request
  *
- *  @param priv      A pointer to wlan_private structure
+ *  @param priv      A pointer to lbs_private structure
  *  @return          0--success, -1--fail
  */
-int libertas_send_deauthentication(wlan_private * priv)
+int lbs_send_deauthentication(lbs_private *priv)
 {
-       return libertas_prepare_and_send_command(priv, CMD_802_11_DEAUTHENTICATE,
+       return lbs_prepare_and_send_command(priv, CMD_802_11_DEAUTHENTICATE,
                                     0, CMD_OPTION_WAITFORRSP, 0, NULL);
 }
 
 /**
  *  @brief This function prepares command of authenticate.
  *
- *  @param priv      A pointer to wlan_private structure
+ *  @param priv      A pointer to lbs_private structure
  *  @param cmd       A pointer to cmd_ds_command structure
  *  @param pdata_buf Void cast of pointer to a BSSID to authenticate with
  *
  *  @return         0 or -1
  */
-int libertas_cmd_80211_authenticate(wlan_private * priv,
+int lbs_cmd_80211_authenticate(lbs_private *priv,
                                 struct cmd_ds_command *cmd,
                                 void *pdata_buf)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth;
        int ret = -1;
        u8 *bssid = pdata_buf;
@@ -329,10 +329,10 @@ out:
        return ret;
 }
 
-int libertas_cmd_80211_deauthenticate(wlan_private * priv,
+int lbs_cmd_80211_deauthenticate(lbs_private *priv,
                                   struct cmd_ds_command *cmd)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ds_802_11_deauthenticate *dauth = &cmd->params.deauth;
 
        lbs_deb_enter(LBS_DEB_JOIN);
@@ -352,10 +352,10 @@ int libertas_cmd_80211_deauthenticate(wlan_private * priv,
        return 0;
 }
 
-int libertas_cmd_80211_associate(wlan_private * priv,
+int lbs_cmd_80211_associate(lbs_private *priv,
                              struct cmd_ds_command *cmd, void *pdata_buf)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ds_802_11_associate *passo = &cmd->params.associate;
        int ret = 0;
        struct assoc_request * assoc_req = pdata_buf;
@@ -431,7 +431,7 @@ int libertas_cmd_80211_associate(wlan_private * priv,
        /* Set MSB on basic rates as the firmware requires, but _after_
         * copying to current bss rates.
         */
-       libertas_set_basic_rate_flags(rates->rates, tmplen);
+       lbs_set_basic_rate_flags(rates->rates, tmplen);
 
        if (assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled) {
                rsn = (struct mrvlietypes_rsnparamset *) pos;
@@ -448,7 +448,7 @@ int libertas_cmd_80211_associate(wlan_private * priv,
        /* update curbssparams */
        adapter->curbssparams.channel = bss->phyparamset.dsparamset.currentchan;
 
-       if (libertas_parse_dnld_countryinfo_11d(priv, bss)) {
+       if (lbs_parse_dnld_countryinfo_11d(priv, bss)) {
                ret = -1;
                goto done;
        }
@@ -468,10 +468,10 @@ done:
        return ret;
 }
 
-int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
+int lbs_cmd_80211_ad_hoc_start(lbs_private *priv,
                                 struct cmd_ds_command *cmd, void *pdata_buf)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ds_802_11_ad_hoc_start *adhs = &cmd->params.ads;
        int ret = 0;
        int cmdappendsize = 0;
@@ -548,8 +548,8 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
        adhs->probedelay = cpu_to_le16(CMD_SCAN_PROBE_DELAY_TIME);
 
        memset(adhs->rates, 0, sizeof(adhs->rates));
-       ratesize = min(sizeof(adhs->rates), sizeof(libertas_bg_rates));
-       memcpy(adhs->rates, libertas_bg_rates, ratesize);
+       ratesize = min(sizeof(adhs->rates), sizeof(lbs_bg_rates));
+       memcpy(adhs->rates, lbs_bg_rates, ratesize);
 
        /* Copy the ad-hoc creating rates into Current BSS state structure */
        memset(&adapter->curbssparams.rates, 0, sizeof(adapter->curbssparams.rates));
@@ -558,14 +558,14 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
        /* Set MSB on basic rates as the firmware requires, but _after_
         * copying to current bss rates.
         */
-       libertas_set_basic_rate_flags(adhs->rates, ratesize);
+       lbs_set_basic_rate_flags(adhs->rates, ratesize);
 
        lbs_deb_join("ADHOC_S_CMD: rates=%02x %02x %02x %02x \n",
               adhs->rates[0], adhs->rates[1], adhs->rates[2], adhs->rates[3]);
 
        lbs_deb_join("ADHOC_S_CMD: AD HOC Start command is ready\n");
 
-       if (libertas_create_dnld_countryinfo_11d(priv)) {
+       if (lbs_create_dnld_countryinfo_11d(priv)) {
                lbs_deb_join("ADHOC_S_CMD: dnld_countryinfo_11d failed\n");
                ret = -1;
                goto done;
@@ -580,7 +580,7 @@ done:
        return ret;
 }
 
-int libertas_cmd_80211_ad_hoc_stop(wlan_private * priv,
+int lbs_cmd_80211_ad_hoc_stop(lbs_private *priv,
                                struct cmd_ds_command *cmd)
 {
        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,
        return 0;
 }
 
-int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
+int lbs_cmd_80211_ad_hoc_join(lbs_private *priv,
                                struct cmd_ds_command *cmd, void *pdata_buf)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ds_802_11_ad_hoc_join *join_cmd = &cmd->params.adj;
        struct assoc_request * assoc_req = pdata_buf;
        struct bss_descriptor *bss = &assoc_req->bss;
@@ -652,7 +652,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
        /* Set MSB on basic rates as the firmware requires, but _after_
         * copying to current bss rates.
         */
-       libertas_set_basic_rate_flags(join_cmd->bss.rates, ratesize);
+       lbs_set_basic_rate_flags(join_cmd->bss.rates, ratesize);
 
        join_cmd->bss.ssparamset.ibssparamset.atimwindow =
            cpu_to_le16(bss->atimwindow);
@@ -663,12 +663,12 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
                join_cmd->bss.capability = cpu_to_le16(tmp);
        }
 
-       if (adapter->psmode == WLAN802_11POWERMODEMAX_PSP) {
+       if (adapter->psmode == LBS802_11POWERMODEMAX_PSP) {
                /* wake up first */
                __le32 Localpsmode;
 
-               Localpsmode = cpu_to_le32(WLAN802_11POWERMODECAM);
-               ret = libertas_prepare_and_send_command(priv,
+               Localpsmode = cpu_to_le32(LBS802_11POWERMODECAM);
+               ret = lbs_prepare_and_send_command(priv,
                                            CMD_802_11_PS_MODE,
                                            CMD_ACT_SET,
                                            0, 0, &Localpsmode);
@@ -679,7 +679,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
                }
        }
 
-       if (libertas_parse_dnld_countryinfo_11d(priv, bss)) {
+       if (lbs_parse_dnld_countryinfo_11d(priv, bss)) {
                ret = -1;
                goto done;
        }
@@ -692,10 +692,10 @@ done:
        return ret;
 }
 
-int libertas_ret_80211_associate(wlan_private * priv,
+int lbs_ret_80211_associate(lbs_private *priv,
                              struct cmd_ds_command *resp)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret = 0;
        union iwreq_data wrqu;
        struct ieeetypes_assocrsp *passocrsp;
@@ -762,7 +762,7 @@ int libertas_ret_80211_associate(wlan_private * priv,
        }
 
        if (status_code) {
-               libertas_mac_event_disconnected(priv);
+               lbs_mac_event_disconnected(priv);
                ret = -1;
                goto done;
        }
@@ -771,7 +771,7 @@ int libertas_ret_80211_associate(wlan_private * priv,
                le16_to_cpu(resp->size) - S_DS_GEN);
 
        /* Send a Media Connected event, according to the Spec */
-       adapter->connect_status = LIBERTAS_CONNECTED;
+       adapter->connect_status = LBS_CONNECTED;
 
        lbs_deb_join("ASSOC_RESP: assocated to '%s'\n",
                     escape_essid(bss->ssid, bss->ssid_len));
@@ -809,21 +809,21 @@ done:
        return ret;
 }
 
-int libertas_ret_80211_disassociate(wlan_private * priv,
+int lbs_ret_80211_disassociate(lbs_private *priv,
                                 struct cmd_ds_command *resp)
 {
        lbs_deb_enter(LBS_DEB_JOIN);
 
-       libertas_mac_event_disconnected(priv);
+       lbs_mac_event_disconnected(priv);
 
        lbs_deb_leave(LBS_DEB_JOIN);
        return 0;
 }
 
-int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
+int lbs_ret_80211_ad_hoc_start(lbs_private *priv,
                                 struct cmd_ds_command *resp)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret = 0;
        u16 command = le16_to_cpu(resp->command);
        u16 result = le16_to_cpu(resp->result);
@@ -852,8 +852,8 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
         */
        if (result) {
                lbs_deb_join("ADHOC_RESP: failed\n");
-               if (adapter->connect_status == LIBERTAS_CONNECTED) {
-                       libertas_mac_event_disconnected(priv);
+               if (adapter->connect_status == LBS_CONNECTED) {
+                       lbs_mac_event_disconnected(priv);
                }
                ret = -1;
                goto done;
@@ -867,7 +867,7 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
                     escape_essid(bss->ssid, bss->ssid_len));
 
        /* Send a Media Connected event, according to the Spec */
-       adapter->connect_status = LIBERTAS_CONNECTED;
+       adapter->connect_status = LBS_CONNECTED;
 
        if (command == CMD_RET(CMD_802_11_AD_HOC_START)) {
                /* Update the created network descriptor with the new BSSID */
@@ -904,12 +904,12 @@ done:
        return ret;
 }
 
-int libertas_ret_80211_ad_hoc_stop(wlan_private * priv,
+int lbs_ret_80211_ad_hoc_stop(lbs_private *priv,
                                struct cmd_ds_command *resp)
 {
        lbs_deb_enter(LBS_DEB_JOIN);
 
-       libertas_mac_event_disconnected(priv);
+       lbs_mac_event_disconnected(priv);
 
        lbs_deb_leave(LBS_DEB_JOIN);
        return 0;
index 894a072b9f8d4e6ab8164a422deec0aa68e462df..5c2b2df5e577824d9e980aa5930671460417e332 100644 (file)
@@ -2,52 +2,52 @@
   * Interface for the wlan infrastructure and adhoc join routines
   *
   * Driver interface functions and type declarations for the join module
-  *   implemented in wlan_join.c.  Process all start/join requests for
+  *   implemented in join.c.  Process all start/join requests for
   *   both adhoc and infrastructure networks
   */
-#ifndef _WLAN_JOIN_H
-#define _WLAN_JOIN_H
+#ifndef _LBS_JOIN_H
+#define _LBS_JOIN_H
 
 #include "defs.h"
 #include "dev.h"
 
 struct cmd_ds_command;
-int libertas_cmd_80211_authenticate(wlan_private * priv,
+int lbs_cmd_80211_authenticate(lbs_private *priv,
                                        struct cmd_ds_command *cmd,
                                        void *pdata_buf);
-int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
+int lbs_cmd_80211_ad_hoc_join(lbs_private *priv,
                                       struct cmd_ds_command *cmd,
                                       void *pdata_buf);
-int libertas_cmd_80211_ad_hoc_stop(wlan_private * priv,
+int lbs_cmd_80211_ad_hoc_stop(lbs_private *priv,
                                       struct cmd_ds_command *cmd);
-int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
+int lbs_cmd_80211_ad_hoc_start(lbs_private *priv,
                                        struct cmd_ds_command *cmd,
                                        void *pdata_buf);
-int libertas_cmd_80211_deauthenticate(wlan_private * priv,
+int lbs_cmd_80211_deauthenticate(lbs_private *priv,
                                          struct cmd_ds_command *cmd);
-int libertas_cmd_80211_associate(wlan_private * priv,
+int lbs_cmd_80211_associate(lbs_private *priv,
                                     struct cmd_ds_command *cmd,
                                     void *pdata_buf);
 
-int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
+int lbs_ret_80211_ad_hoc_start(lbs_private *priv,
                                        struct cmd_ds_command *resp);
-int libertas_ret_80211_ad_hoc_stop(wlan_private * priv,
+int lbs_ret_80211_ad_hoc_stop(lbs_private *priv,
                                       struct cmd_ds_command *resp);
-int libertas_ret_80211_disassociate(wlan_private * priv,
+int lbs_ret_80211_disassociate(lbs_private *priv,
                                        struct cmd_ds_command *resp);
-int libertas_ret_80211_associate(wlan_private * priv,
+int lbs_ret_80211_associate(lbs_private *priv,
                                     struct cmd_ds_command *resp);
 
-int libertas_start_adhoc_network(wlan_private * priv,
+int lbs_start_adhoc_network(lbs_private *priv,
                             struct assoc_request * assoc_req);
-int libertas_join_adhoc_network(wlan_private * priv,
+int lbs_join_adhoc_network(lbs_private *priv,
                                struct assoc_request * assoc_req);
-int libertas_stop_adhoc_network(wlan_private * priv);
+int lbs_stop_adhoc_network(lbs_private *priv);
 
-int libertas_send_deauthentication(wlan_private * priv);
+int lbs_send_deauthentication(lbs_private *priv);
 
-int wlan_associate(wlan_private * priv, struct assoc_request * assoc_req);
+int lbs_associate(lbs_private *priv, struct assoc_request *assoc_req);
 
-void libertas_unset_basic_rate_flags(u8 * rates, size_t len);
+void lbs_unset_basic_rate_flags(u8 *rates, size_t len);
 
 #endif
index 1823b48a8ba74653c6be98fc3f65caedfdb9f9b0..825970af34198251bce260a49771e505b7c89f70 100644 (file)
@@ -24,7 +24,7 @@
 #include "join.h"
 
 #define DRIVER_RELEASE_VERSION "323.p0"
-const char libertas_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION
+const char lbs_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION
 #ifdef  DEBUG
     "-dbg"
 #endif
@@ -32,80 +32,80 @@ const char libertas_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION
 
 
 /* Module parameters */
-unsigned int libertas_debug = 0;
-module_param(libertas_debug, int, 0644);
-EXPORT_SYMBOL_GPL(libertas_debug);
+unsigned int lbs_debug;
+EXPORT_SYMBOL_GPL(lbs_debug);
+module_param_named(libertas_debug, lbs_debug, int, 0644);
 
 
-#define WLAN_TX_PWR_DEFAULT            20      /*100mW */
-#define WLAN_TX_PWR_US_DEFAULT         20      /*100mW */
-#define WLAN_TX_PWR_JP_DEFAULT         16      /*50mW */
-#define WLAN_TX_PWR_FR_DEFAULT         20      /*100mW */
-#define WLAN_TX_PWR_EMEA_DEFAULT       20      /*100mW */
+#define LBS_TX_PWR_DEFAULT             20      /*100mW */
+#define LBS_TX_PWR_US_DEFAULT          20      /*100mW */
+#define LBS_TX_PWR_JP_DEFAULT          16      /*50mW */
+#define LBS_TX_PWR_FR_DEFAULT          20      /*100mW */
+#define LBS_TX_PWR_EMEA_DEFAULT        20      /*100mW */
 
 /* Format { channel, frequency (MHz), maxtxpower } */
 /* band: 'B/G', region: USA FCC/Canada IC */
 static struct chan_freq_power channel_freq_power_US_BG[] = {
-       {1, 2412, WLAN_TX_PWR_US_DEFAULT},
-       {2, 2417, WLAN_TX_PWR_US_DEFAULT},
-       {3, 2422, WLAN_TX_PWR_US_DEFAULT},
-       {4, 2427, WLAN_TX_PWR_US_DEFAULT},
-       {5, 2432, WLAN_TX_PWR_US_DEFAULT},
-       {6, 2437, WLAN_TX_PWR_US_DEFAULT},
-       {7, 2442, WLAN_TX_PWR_US_DEFAULT},
-       {8, 2447, WLAN_TX_PWR_US_DEFAULT},
-       {9, 2452, WLAN_TX_PWR_US_DEFAULT},
-       {10, 2457, WLAN_TX_PWR_US_DEFAULT},
-       {11, 2462, WLAN_TX_PWR_US_DEFAULT}
+       {1, 2412, LBS_TX_PWR_US_DEFAULT},
+       {2, 2417, LBS_TX_PWR_US_DEFAULT},
+       {3, 2422, LBS_TX_PWR_US_DEFAULT},
+       {4, 2427, LBS_TX_PWR_US_DEFAULT},
+       {5, 2432, LBS_TX_PWR_US_DEFAULT},
+       {6, 2437, LBS_TX_PWR_US_DEFAULT},
+       {7, 2442, LBS_TX_PWR_US_DEFAULT},
+       {8, 2447, LBS_TX_PWR_US_DEFAULT},
+       {9, 2452, LBS_TX_PWR_US_DEFAULT},
+       {10, 2457, LBS_TX_PWR_US_DEFAULT},
+       {11, 2462, LBS_TX_PWR_US_DEFAULT}
 };
 
 /* band: 'B/G', region: Europe ETSI */
 static struct chan_freq_power channel_freq_power_EU_BG[] = {
-       {1, 2412, WLAN_TX_PWR_EMEA_DEFAULT},
-       {2, 2417, WLAN_TX_PWR_EMEA_DEFAULT},
-       {3, 2422, WLAN_TX_PWR_EMEA_DEFAULT},
-       {4, 2427, WLAN_TX_PWR_EMEA_DEFAULT},
-       {5, 2432, WLAN_TX_PWR_EMEA_DEFAULT},
-       {6, 2437, WLAN_TX_PWR_EMEA_DEFAULT},
-       {7, 2442, WLAN_TX_PWR_EMEA_DEFAULT},
-       {8, 2447, WLAN_TX_PWR_EMEA_DEFAULT},
-       {9, 2452, WLAN_TX_PWR_EMEA_DEFAULT},
-       {10, 2457, WLAN_TX_PWR_EMEA_DEFAULT},
-       {11, 2462, WLAN_TX_PWR_EMEA_DEFAULT},
-       {12, 2467, WLAN_TX_PWR_EMEA_DEFAULT},
-       {13, 2472, WLAN_TX_PWR_EMEA_DEFAULT}
+       {1, 2412, LBS_TX_PWR_EMEA_DEFAULT},
+       {2, 2417, LBS_TX_PWR_EMEA_DEFAULT},
+       {3, 2422, LBS_TX_PWR_EMEA_DEFAULT},
+       {4, 2427, LBS_TX_PWR_EMEA_DEFAULT},
+       {5, 2432, LBS_TX_PWR_EMEA_DEFAULT},
+       {6, 2437, LBS_TX_PWR_EMEA_DEFAULT},
+       {7, 2442, LBS_TX_PWR_EMEA_DEFAULT},
+       {8, 2447, LBS_TX_PWR_EMEA_DEFAULT},
+       {9, 2452, LBS_TX_PWR_EMEA_DEFAULT},
+       {10, 2457, LBS_TX_PWR_EMEA_DEFAULT},
+       {11, 2462, LBS_TX_PWR_EMEA_DEFAULT},
+       {12, 2467, LBS_TX_PWR_EMEA_DEFAULT},
+       {13, 2472, LBS_TX_PWR_EMEA_DEFAULT}
 };
 
 /* band: 'B/G', region: Spain */
 static struct chan_freq_power channel_freq_power_SPN_BG[] = {
-       {10, 2457, WLAN_TX_PWR_DEFAULT},
-       {11, 2462, WLAN_TX_PWR_DEFAULT}
+       {10, 2457, LBS_TX_PWR_DEFAULT},
+       {11, 2462, LBS_TX_PWR_DEFAULT}
 };
 
 /* band: 'B/G', region: France */
 static struct chan_freq_power channel_freq_power_FR_BG[] = {
-       {10, 2457, WLAN_TX_PWR_FR_DEFAULT},
-       {11, 2462, WLAN_TX_PWR_FR_DEFAULT},
-       {12, 2467, WLAN_TX_PWR_FR_DEFAULT},
-       {13, 2472, WLAN_TX_PWR_FR_DEFAULT}
+       {10, 2457, LBS_TX_PWR_FR_DEFAULT},
+       {11, 2462, LBS_TX_PWR_FR_DEFAULT},
+       {12, 2467, LBS_TX_PWR_FR_DEFAULT},
+       {13, 2472, LBS_TX_PWR_FR_DEFAULT}
 };
 
 /* band: 'B/G', region: Japan */
 static struct chan_freq_power channel_freq_power_JPN_BG[] = {
-       {1, 2412, WLAN_TX_PWR_JP_DEFAULT},
-       {2, 2417, WLAN_TX_PWR_JP_DEFAULT},
-       {3, 2422, WLAN_TX_PWR_JP_DEFAULT},
-       {4, 2427, WLAN_TX_PWR_JP_DEFAULT},
-       {5, 2432, WLAN_TX_PWR_JP_DEFAULT},
-       {6, 2437, WLAN_TX_PWR_JP_DEFAULT},
-       {7, 2442, WLAN_TX_PWR_JP_DEFAULT},
-       {8, 2447, WLAN_TX_PWR_JP_DEFAULT},
-       {9, 2452, WLAN_TX_PWR_JP_DEFAULT},
-       {10, 2457, WLAN_TX_PWR_JP_DEFAULT},
-       {11, 2462, WLAN_TX_PWR_JP_DEFAULT},
-       {12, 2467, WLAN_TX_PWR_JP_DEFAULT},
-       {13, 2472, WLAN_TX_PWR_JP_DEFAULT},
-       {14, 2484, WLAN_TX_PWR_JP_DEFAULT}
+       {1, 2412, LBS_TX_PWR_JP_DEFAULT},
+       {2, 2417, LBS_TX_PWR_JP_DEFAULT},
+       {3, 2422, LBS_TX_PWR_JP_DEFAULT},
+       {4, 2427, LBS_TX_PWR_JP_DEFAULT},
+       {5, 2432, LBS_TX_PWR_JP_DEFAULT},
+       {6, 2437, LBS_TX_PWR_JP_DEFAULT},
+       {7, 2442, LBS_TX_PWR_JP_DEFAULT},
+       {8, 2447, LBS_TX_PWR_JP_DEFAULT},
+       {9, 2452, LBS_TX_PWR_JP_DEFAULT},
+       {10, 2457, LBS_TX_PWR_JP_DEFAULT},
+       {11, 2462, LBS_TX_PWR_JP_DEFAULT},
+       {12, 2467, LBS_TX_PWR_JP_DEFAULT},
+       {13, 2472, LBS_TX_PWR_JP_DEFAULT},
+       {14, 2484, LBS_TX_PWR_JP_DEFAULT}
 };
 
 /**
@@ -153,13 +153,13 @@ static struct region_cfp_table region_cfp_table[] = {
 /**
  * the table to keep region code
  */
-u16 libertas_region_code_to_index[MRVDRV_MAX_REGION_CODE] =
+u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE] =
     { 0x10, 0x20, 0x30, 0x31, 0x32, 0x40 };
 
 /**
  * 802.11b/g supported bitrates (in 500Kb/s units)
  */
-u8 libertas_bg_rates[MAX_RATES] =
+u8 lbs_bg_rates[MAX_RATES] =
     { 0x02, 0x04, 0x0b, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c,
 0x00, 0x00 };
 
@@ -179,7 +179,7 @@ static u8 fw_data_rates[MAX_RATES] =
  *  @param idx                The index of data rate
  *  @return                    data rate or 0
  */
-u32 libertas_fw_index_to_data_rate(u8 idx)
+u32 lbs_fw_index_to_data_rate(u8 idx)
 {
        if (idx >= sizeof(fw_data_rates))
                idx = 0;
@@ -192,7 +192,7 @@ u32 libertas_fw_index_to_data_rate(u8 idx)
  *  @param rate                 data rate
  *  @return                    index or 0
  */
-u8 libertas_data_rate_to_fw_index(u32 rate)
+u8 lbs_data_rate_to_fw_index(u32 rate)
 {
        u8 i;
 
@@ -213,13 +213,13 @@ u8 libertas_data_rate_to_fw_index(u32 rate)
 /**
  * @brief Get function for sysfs attribute anycast_mask
  */
-static ssize_t libertas_anycast_get(struct device * dev,
+static ssize_t lbs_anycast_get(struct device *dev,
                struct device_attribute *attr, char * buf)
 {
        struct cmd_ds_mesh_access mesh_access;
 
        memset(&mesh_access, 0, sizeof(mesh_access));
-       libertas_prepare_and_send_command(to_net_dev(dev)->priv,
+       lbs_prepare_and_send_command(to_net_dev(dev)->priv,
                        CMD_MESH_ACCESS,
                        CMD_ACT_MESH_GET_ANYCAST,
                        CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
@@ -230,7 +230,7 @@ static ssize_t libertas_anycast_get(struct device * dev,
 /**
  * @brief Set function for sysfs attribute anycast_mask
  */
-static ssize_t libertas_anycast_set(struct device * dev,
+static ssize_t lbs_anycast_set(struct device *dev,
                struct device_attribute *attr, const char * buf, size_t count)
 {
        struct cmd_ds_mesh_access mesh_access;
@@ -240,86 +240,86 @@ static ssize_t libertas_anycast_set(struct device * dev,
        sscanf(buf, "%x", &datum);
        mesh_access.data[0] = cpu_to_le32(datum);
 
-       libertas_prepare_and_send_command((to_net_dev(dev))->priv,
+       lbs_prepare_and_send_command((to_net_dev(dev))->priv,
                        CMD_MESH_ACCESS,
                        CMD_ACT_MESH_SET_ANYCAST,
                        CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
        return strlen(buf);
 }
 
-int libertas_add_rtap(wlan_private *priv);
-void libertas_remove_rtap(wlan_private *priv);
+int lbs_add_rtap(lbs_private *priv);
+void lbs_remove_rtap(lbs_private *priv);
 
 /**
  * Get function for sysfs attribute rtap
  */
-static ssize_t libertas_rtap_get(struct device * dev,
+static ssize_t lbs_rtap_get(struct device *dev,
                struct device_attribute *attr, char * buf)
 {
-       wlan_private *priv = (wlan_private *) (to_net_dev(dev))->priv;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = (lbs_private *) (to_net_dev(dev))->priv;
+       lbs_adapter *adapter = priv->adapter;
        return snprintf(buf, 5, "0x%X\n", adapter->monitormode);
 }
 
 /**
  *  Set function for sysfs attribute rtap
  */
-static ssize_t libertas_rtap_set(struct device * dev,
+static ssize_t lbs_rtap_set(struct device *dev,
                struct device_attribute *attr, const char * buf, size_t count)
 {
        int monitor_mode;
-       wlan_private *priv = (wlan_private *) (to_net_dev(dev))->priv;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = (lbs_private *) (to_net_dev(dev))->priv;
+       lbs_adapter *adapter = priv->adapter;
 
        sscanf(buf, "%x", &monitor_mode);
-       if (monitor_mode != WLAN_MONITOR_OFF) {
+       if (monitor_mode != LBS_MONITOR_OFF) {
                if(adapter->monitormode == monitor_mode)
                        return strlen(buf);
-               if (adapter->monitormode == WLAN_MONITOR_OFF) {
+               if (adapter->monitormode == LBS_MONITOR_OFF) {
                        if (adapter->mode == IW_MODE_INFRA)
-                               libertas_send_deauthentication(priv);
+                               lbs_send_deauthentication(priv);
                        else if (adapter->mode == IW_MODE_ADHOC)
-                               libertas_stop_adhoc_network(priv);
-                       libertas_add_rtap(priv);
+                               lbs_stop_adhoc_network(priv);
+                       lbs_add_rtap(priv);
                }
                adapter->monitormode = monitor_mode;
        }
 
        else {
-               if(adapter->monitormode == WLAN_MONITOR_OFF)
+               if (adapter->monitormode == LBS_MONITOR_OFF)
                        return strlen(buf);
-               adapter->monitormode = WLAN_MONITOR_OFF;
-               libertas_remove_rtap(priv);
+               adapter->monitormode = LBS_MONITOR_OFF;
+               lbs_remove_rtap(priv);
                netif_wake_queue(priv->dev);
                netif_wake_queue(priv->mesh_dev);
        }
 
-       libertas_prepare_and_send_command(priv,
+       lbs_prepare_and_send_command(priv,
                        CMD_802_11_MONITOR_MODE, CMD_ACT_SET,
                        CMD_OPTION_WAITFORRSP, 0, &adapter->monitormode);
        return strlen(buf);
 }
 
 /**
- * libertas_rtap attribute to be exported per mshX interface
+ * lbs_rtap attribute to be exported per mshX interface
  * through sysfs (/sys/class/net/mshX/libertas-rtap)
  */
-static DEVICE_ATTR(libertas_rtap, 0644, libertas_rtap_get,
-               libertas_rtap_set );
+static DEVICE_ATTR(lbs_rtap, 0644, lbs_rtap_get,
+               lbs_rtap_set );
 
 /**
  * anycast_mask attribute to be exported per mshX interface
  * through sysfs (/sys/class/net/mshX/anycast_mask)
  */
-static DEVICE_ATTR(anycast_mask, 0644, libertas_anycast_get, libertas_anycast_set);
+static DEVICE_ATTR(anycast_mask, 0644, lbs_anycast_get, lbs_anycast_set);
 
-static ssize_t libertas_autostart_enabled_get(struct device * dev,
+static ssize_t lbs_autostart_enabled_get(struct device *dev,
                struct device_attribute *attr, char * buf)
 {
        struct cmd_ds_mesh_access mesh_access;
 
        memset(&mesh_access, 0, sizeof(mesh_access));
-       libertas_prepare_and_send_command(to_net_dev(dev)->priv,
+       lbs_prepare_and_send_command(to_net_dev(dev)->priv,
                        CMD_MESH_ACCESS,
                        CMD_ACT_MESH_GET_AUTOSTART_ENABLED,
                        CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
@@ -327,19 +327,19 @@ static ssize_t libertas_autostart_enabled_get(struct device * dev,
        return sprintf(buf, "%d\n", le32_to_cpu(mesh_access.data[0]));
 }
 
-static ssize_t libertas_autostart_enabled_set(struct device * dev,
+static ssize_t lbs_autostart_enabled_set(struct device *dev,
                struct device_attribute *attr, const char * buf, size_t count)
 {
        struct cmd_ds_mesh_access mesh_access;
        uint32_t datum;
-       wlan_private * priv = (to_net_dev(dev))->priv;
+       lbs_private *priv = (to_net_dev(dev))->priv;
        int ret;
 
        memset(&mesh_access, 0, sizeof(mesh_access));
        sscanf(buf, "%d", &datum);
        mesh_access.data[0] = cpu_to_le32(datum);
 
-       ret = libertas_prepare_and_send_command(priv,
+       ret = lbs_prepare_and_send_command(priv,
                        CMD_MESH_ACCESS,
                        CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
                        CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
@@ -350,16 +350,16 @@ static ssize_t libertas_autostart_enabled_set(struct device * dev,
 }
 
 static DEVICE_ATTR(autostart_enabled, 0644,
-               libertas_autostart_enabled_get, libertas_autostart_enabled_set);
+               lbs_autostart_enabled_get, lbs_autostart_enabled_set);
 
-static struct attribute *libertas_mesh_sysfs_entries[] = {
+static struct attribute *lbs_mesh_sysfs_entries[] = {
        &dev_attr_anycast_mask.attr,
        &dev_attr_autostart_enabled.attr,
        NULL,
 };
 
-static struct attribute_group libertas_mesh_attr_group = {
-       .attrs = libertas_mesh_sysfs_entries,
+static struct attribute_group lbs_mesh_attr_group = {
+       .attrs = lbs_mesh_sysfs_entries,
 };
 
 /**
@@ -375,8 +375,8 @@ static struct attribute_group libertas_mesh_attr_group = {
  */
 static int pre_open_check(struct net_device *dev)
 {
-       wlan_private *priv = (wlan_private *) dev->priv;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = (lbs_private *) dev->priv;
+       lbs_adapter *adapter = priv->adapter;
        int i = 0;
 
        while (!adapter->fw_ready && i < 20) {
@@ -397,16 +397,16 @@ static int pre_open_check(struct net_device *dev)
  *  @param dev     A pointer to net_device structure
  *  @return       0
  */
-static int libertas_dev_open(struct net_device *dev)
+static int lbs_dev_open(struct net_device *dev)
 {
-       wlan_private *priv = (wlan_private *) dev->priv;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = (lbs_private *) dev->priv;
+       lbs_adapter *adapter = priv->adapter;
 
        lbs_deb_enter(LBS_DEB_NET);
 
        priv->open = 1;
 
-       if (adapter->connect_status == LIBERTAS_CONNECTED) {
+       if (adapter->connect_status == LBS_CONNECTED) {
                netif_carrier_on(priv->dev);
                if (priv->mesh_dev)
                        netif_carrier_on(priv->mesh_dev);
@@ -425,16 +425,16 @@ static int libertas_dev_open(struct net_device *dev)
  *  @param dev     A pointer to net_device structure
  *  @return       0
  */
-static int libertas_mesh_open(struct net_device *dev)
+static int lbs_mesh_open(struct net_device *dev)
 {
-       wlan_private *priv = (wlan_private *) dev->priv ;
+       lbs_private *priv = (lbs_private *) dev->priv ;
 
        if (pre_open_check(dev) == -1)
                return -1;
        priv->mesh_open = 1 ;
        netif_wake_queue(priv->mesh_dev);
        if (priv->infra_open == 0)
-               return libertas_dev_open(priv->dev) ;
+               return lbs_dev_open(priv->dev) ;
        return 0;
 }
 
@@ -444,22 +444,22 @@ static int libertas_mesh_open(struct net_device *dev)
  *  @param dev     A pointer to net_device structure
  *  @return       0
  */
-static int libertas_open(struct net_device *dev)
+static int lbs_open(struct net_device *dev)
 {
-       wlan_private *priv = (wlan_private *) dev->priv ;
+       lbs_private *priv = (lbs_private *) dev->priv ;
 
        if(pre_open_check(dev) == -1)
                return -1;
        priv->infra_open = 1 ;
        netif_wake_queue(priv->dev);
        if (priv->open == 0)
-               return libertas_dev_open(priv->dev) ;
+               return lbs_dev_open(priv->dev) ;
        return 0;
 }
 
-static int libertas_dev_close(struct net_device *dev)
+static int lbs_dev_close(struct net_device *dev)
 {
-       wlan_private *priv = dev->priv;
+       lbs_private *priv = dev->priv;
 
        lbs_deb_enter(LBS_DEB_NET);
 
@@ -476,14 +476,14 @@ static int libertas_dev_close(struct net_device *dev)
  *  @param dev     A pointer to net_device structure
  *  @return       0
  */
-static int libertas_mesh_close(struct net_device *dev)
+static int lbs_mesh_close(struct net_device *dev)
 {
-       wlan_private *priv = (wlan_private *) (dev->priv);
+       lbs_private *priv = (lbs_private *) (dev->priv);
 
        priv->mesh_open = 0;
        netif_stop_queue(priv->mesh_dev);
        if (priv->infra_open == 0)
-               return libertas_dev_close(dev);
+               return lbs_dev_close(dev);
        else
                return 0;
 }
@@ -494,23 +494,23 @@ static int libertas_mesh_close(struct net_device *dev)
  *  @param dev     A pointer to net_device structure
  *  @return       0
  */
-static int libertas_close(struct net_device *dev)
+static int lbs_close(struct net_device *dev)
 {
-       wlan_private *priv = (wlan_private *) dev->priv;
+       lbs_private *priv = (lbs_private *) dev->priv;
 
        netif_stop_queue(dev);
        priv->infra_open = 0;
        if (priv->mesh_open == 0)
-               return libertas_dev_close(dev);
+               return lbs_dev_close(dev);
        else
                return 0;
 }
 
 
-static int libertas_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        int ret = 0;
-       wlan_private *priv = dev->priv;
+       lbs_private *priv = dev->priv;
 
        lbs_deb_enter(LBS_DEB_NET);
 
@@ -523,7 +523,7 @@ static int libertas_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
        if (priv->mesh_dev)
                netif_stop_queue(priv->mesh_dev);
 
-       if (libertas_process_tx(priv, skb) == 0)
+       if (lbs_process_tx(priv, skb) == 0)
                dev->trans_start = jiffies;
 done:
        lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret);
@@ -531,54 +531,54 @@ done:
 }
 
 /**
- * @brief Mark mesh packets and handover them to libertas_hard_start_xmit
+ * @brief Mark mesh packets and handover them to lbs_hard_start_xmit
  *
  */
-static int libertas_mesh_pre_start_xmit(struct sk_buff *skb,
+static int lbs_mesh_pre_start_xmit(struct sk_buff *skb,
                struct net_device *dev)
 {
-       wlan_private *priv = dev->priv;
+       lbs_private *priv = dev->priv;
        int ret;
 
        lbs_deb_enter(LBS_DEB_MESH);
-       if(priv->adapter->monitormode != WLAN_MONITOR_OFF) {
+       if (priv->adapter->monitormode != LBS_MONITOR_OFF) {
                netif_stop_queue(dev);
                return -EOPNOTSUPP;
        }
 
        SET_MESH_FRAME(skb);
 
-       ret = libertas_hard_start_xmit(skb, priv->dev);
+       ret = lbs_hard_start_xmit(skb, priv->dev);
        lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret);
        return ret;
 }
 
 /**
- * @brief Mark non-mesh packets and handover them to libertas_hard_start_xmit
+ * @brief Mark non-mesh packets and handover them to lbs_hard_start_xmit
  *
  */
-static int libertas_pre_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static int lbs_pre_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
-       wlan_private *priv = dev->priv;
+       lbs_private *priv = dev->priv;
        int ret;
 
        lbs_deb_enter(LBS_DEB_NET);
 
-       if(priv->adapter->monitormode != WLAN_MONITOR_OFF) {
+       if (priv->adapter->monitormode != LBS_MONITOR_OFF) {
                netif_stop_queue(dev);
                return -EOPNOTSUPP;
        }
 
        UNSET_MESH_FRAME(skb);
 
-       ret = libertas_hard_start_xmit(skb, dev);
+       ret = lbs_hard_start_xmit(skb, dev);
        lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret);
        return ret;
 }
 
-static void libertas_tx_timeout(struct net_device *dev)
+static void lbs_tx_timeout(struct net_device *dev)
 {
-       wlan_private *priv = (wlan_private *) dev->priv;
+       lbs_private *priv = (lbs_private *) dev->priv;
 
        lbs_deb_enter(LBS_DEB_TX);
 
@@ -588,14 +588,14 @@ static void libertas_tx_timeout(struct net_device *dev)
        dev->trans_start = jiffies;
 
        if (priv->adapter->currenttxskb) {
-               if (priv->adapter->monitormode != WLAN_MONITOR_OFF) {
+               if (priv->adapter->monitormode != LBS_MONITOR_OFF) {
                        /* If we are here, we have not received feedback from
                           the previous packet.  Assume TX_FAIL and move on. */
                        priv->adapter->eventcause = 0x01000000;
-                       libertas_send_tx_feedback(priv);
+                       lbs_send_tx_feedback(priv);
                } else
                        wake_up_interruptible(&priv->waitq);
-       } else if (priv->adapter->connect_status == LIBERTAS_CONNECTED) {
+       } else if (priv->adapter->connect_status == LBS_CONNECTED) {
                netif_wake_queue(priv->dev);
                if (priv->mesh_dev)
                        netif_wake_queue(priv->mesh_dev);
@@ -607,21 +607,21 @@ static void libertas_tx_timeout(struct net_device *dev)
 /**
  *  @brief This function returns the network statistics
  *
- *  @param dev     A pointer to wlan_private structure
+ *  @param dev     A pointer to lbs_private structure
  *  @return       A pointer to net_device_stats structure
  */
-static struct net_device_stats *libertas_get_stats(struct net_device *dev)
+static struct net_device_stats *lbs_get_stats(struct net_device *dev)
 {
-       wlan_private *priv = (wlan_private *) dev->priv;
+       lbs_private *priv = (lbs_private *) dev->priv;
 
        return &priv->stats;
 }
 
-static int libertas_set_mac_address(struct net_device *dev, void *addr)
+static int lbs_set_mac_address(struct net_device *dev, void *addr)
 {
        int ret = 0;
-       wlan_private *priv = (wlan_private *) dev->priv;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = (lbs_private *) dev->priv;
+       lbs_adapter *adapter = priv->adapter;
        struct sockaddr *phwaddr = addr;
 
        lbs_deb_enter(LBS_DEB_NET);
@@ -637,7 +637,7 @@ static int libertas_set_mac_address(struct net_device *dev, void *addr)
        lbs_deb_hex(LBS_DEB_NET, "addr", phwaddr->sa_data, ETH_ALEN);
        memcpy(adapter->current_addr, phwaddr->sa_data, ETH_ALEN);
 
-       ret = libertas_prepare_and_send_command(priv, CMD_802_11_MAC_ADDRESS,
+       ret = lbs_prepare_and_send_command(priv, CMD_802_11_MAC_ADDRESS,
                                    CMD_ACT_SET,
                                    CMD_OPTION_WAITFORRSP, 0, NULL);
 
@@ -657,7 +657,7 @@ done:
        return ret;
 }
 
-static int libertas_copy_multicast_address(wlan_adapter * adapter,
+static int lbs_copy_multicast_address(lbs_adapter *adapter,
                                     struct net_device *dev)
 {
        int i = 0;
@@ -672,10 +672,10 @@ static int libertas_copy_multicast_address(wlan_adapter * adapter,
 
 }
 
-static void libertas_set_multicast_list(struct net_device *dev)
+static void lbs_set_multicast_list(struct net_device *dev)
 {
-       wlan_private *priv = dev->priv;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = dev->priv;
+       lbs_adapter *adapter = priv->adapter;
        int oldpacketfilter;
        DECLARE_MAC_BUF(mac);
 
@@ -718,7 +718,7 @@ static void libertas_set_multicast_list(struct net_device *dev)
                                    CMD_ACT_MAC_MULTICAST_ENABLE;
 
                                adapter->nr_of_multicastmacaddr =
-                                   libertas_copy_multicast_address(adapter, dev);
+                                   lbs_copy_multicast_address(adapter, dev);
 
                                lbs_deb_net("multicast addresses: %d\n",
                                       dev->mc_count);
@@ -729,7 +729,7 @@ static void libertas_set_multicast_list(struct net_device *dev)
                                               adapter->multicastlist[i]));
                                }
                                /* send multicast addresses to firmware */
-                               libertas_prepare_and_send_command(priv,
+                               lbs_prepare_and_send_command(priv,
                                                      CMD_MAC_MULTICAST_ADR,
                                                      CMD_ACT_SET, 0, 0,
                                                      NULL);
@@ -738,25 +738,25 @@ static void libertas_set_multicast_list(struct net_device *dev)
        }
 
        if (adapter->currentpacketfilter != oldpacketfilter) {
-               libertas_set_mac_packet_filter(priv);
+               lbs_set_mac_packet_filter(priv);
        }
 
        lbs_deb_leave(LBS_DEB_NET);
 }
 
 /**
- *  @brief This function handles the major jobs in the WLAN driver.
+ *  @brief This function handles the major jobs in the LBS driver.
  *  It handles all events generated by firmware, RX data received
  *  from firmware and TX data sent from kernel.
  *
- *  @param data    A pointer to wlan_thread structure
+ *  @param data    A pointer to lbs_thread structure
  *  @return       0
  */
-static int libertas_thread(void *data)
+static int lbs_thread(void *data)
 {
        struct net_device *dev = data;
-       wlan_private *priv = dev->priv;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = dev->priv;
+       lbs_adapter *adapter = priv->adapter;
        wait_queue_t wait;
        u8 ireg = 0;
 
@@ -836,7 +836,7 @@ static int libertas_thread(void *data)
 
                        adapter->hisregcpy &= ~MRVDRV_CMD_UPLD_RDY;
                        spin_unlock_irq(&adapter->driver_lock);
-                       libertas_process_rx_command(priv);
+                       lbs_process_rx_command(priv);
                        spin_lock_irq(&adapter->driver_lock);
                }
 
@@ -853,7 +853,7 @@ static int libertas_thread(void *data)
                                continue;
                        }
                        spin_unlock_irq(&adapter->driver_lock);
-                       libertas_process_event(priv);
+                       lbs_process_event(priv);
                } else
                        spin_unlock_irq(&adapter->driver_lock);
 
@@ -861,7 +861,7 @@ static int libertas_thread(void *data)
                if (adapter->psstate == PS_STATE_PRE_SLEEP) {
                        if (!priv->dnld_sent && !adapter->cur_cmd) {
                                if (adapter->connect_status ==
-                                   LIBERTAS_CONNECTED) {
+                                   LBS_CONNECTED) {
                                        lbs_deb_thread(
                                               "main_thread: PRE_SLEEP--intcounter=%d currenttxskb=%p "
                                               "dnld_sent=%d cur_cmd=%p, confirm now\n",
@@ -870,7 +870,7 @@ static int libertas_thread(void *data)
                                               priv->dnld_sent,
                                               adapter->cur_cmd);
 
-                                       libertas_ps_confirm_sleep(priv,
+                                       lbs_ps_confirm_sleep(priv,
                                                       (u16) adapter->psmode);
                                } else {
                                        /* workaround for firmware sending
@@ -894,15 +894,15 @@ static int libertas_thread(void *data)
 
                /* Execute the next command */
                if (!priv->dnld_sent && !priv->adapter->cur_cmd)
-                       libertas_execute_next_command(priv);
+                       lbs_execute_next_command(priv);
 
                /* Wake-up command waiters which can't sleep in
-                * libertas_prepare_and_send_command
+                * lbs_prepare_and_send_command
                 */
                if (!adapter->nr_cmd_pending)
                        wake_up_all(&adapter->cmd_pending);
 
-               libertas_tx_runqueue(priv);
+               lbs_tx_runqueue(priv);
        }
 
        del_timer(&adapter->command_timer);
@@ -918,13 +918,13 @@ static int libertas_thread(void *data)
  *  HW spec from firmware and set basic parameters to
  *  firmware.
  *
- *  @param priv    A pointer to wlan_private structure
+ *  @param priv    A pointer to lbs_private structure
  *  @return       0 or -1
  */
-static int wlan_setup_firmware(wlan_private * priv)
+static int lbs_setup_firmware(lbs_private *priv)
 {
        int ret = -1;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ds_mesh_access mesh_access;
 
        lbs_deb_enter(LBS_DEB_FW);
@@ -934,7 +934,7 @@ static int wlan_setup_firmware(wlan_private * priv)
         */
        memset(adapter->current_addr, 0xff, ETH_ALEN);
 
-       ret = libertas_prepare_and_send_command(priv, CMD_GET_HW_SPEC,
+       ret = lbs_prepare_and_send_command(priv, CMD_GET_HW_SPEC,
                                    0, CMD_OPTION_WAITFORRSP, 0, NULL);
 
        if (ret) {
@@ -942,10 +942,10 @@ static int wlan_setup_firmware(wlan_private * priv)
                goto done;
        }
 
-       libertas_set_mac_packet_filter(priv);
+       lbs_set_mac_packet_filter(priv);
 
        /* Get the supported Data rates */
-       ret = libertas_prepare_and_send_command(priv, CMD_802_11_DATA_RATE,
+       ret = lbs_prepare_and_send_command(priv, CMD_802_11_DATA_RATE,
                                    CMD_ACT_GET_TX_RATE,
                                    CMD_OPTION_WAITFORRSP, 0, NULL);
 
@@ -958,7 +958,7 @@ static int wlan_setup_firmware(wlan_private * priv)
        if (priv->mesh_dev) {
                memset(&mesh_access, 0, sizeof(mesh_access));
                mesh_access.data[0] = cpu_to_le32(0);
-               ret = libertas_prepare_and_send_command(priv,
+               ret = lbs_prepare_and_send_command(priv,
                                CMD_MESH_ACCESS,
                                CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
                                CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
@@ -970,7 +970,7 @@ static int wlan_setup_firmware(wlan_private * priv)
        }
 
        /* Set the boot2 version in firmware */
-       ret = libertas_prepare_and_send_command(priv, CMD_SET_BOOT2_VER,
+       ret = lbs_prepare_and_send_command(priv, CMD_SET_BOOT2_VER,
                                    0, CMD_OPTION_WAITFORRSP, 0, NULL);
 
        ret = 0;
@@ -985,8 +985,8 @@ done:
  */
 static void command_timer_fn(unsigned long data)
 {
-       wlan_private *priv = (wlan_private *)data;
-       wlan_adapter *adapter = priv->adapter;
+       lbs_private *priv = (lbs_private *)data;
+       lbs_adapter *adapter = priv->adapter;
        struct cmd_ctrl_node *ptempnode;
        struct cmd_ds_command *cmd;
        unsigned long flags;
@@ -1013,16 +1013,16 @@ static void command_timer_fn(unsigned long data)
        spin_unlock_irqrestore(&adapter->driver_lock, flags);
 
        lbs_deb_fw("re-sending same command because of timeout\n");
-       libertas_queue_cmd(adapter, ptempnode, 0);
+       lbs_queue_cmd(adapter, ptempnode, 0);
 
        wake_up_interruptible(&priv->waitq);
 
        return;
 }
 
-static int libertas_init_adapter(wlan_private * priv)
+static int lbs_init_adapter(lbs_private *priv)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        size_t bufsize;
        int i, ret = 0;
 
@@ -1043,17 +1043,17 @@ static int libertas_init_adapter(wlan_private * priv)
                              &adapter->network_free_list);
        }
 
-       adapter->libertas_ps_confirm_sleep.seqnum = cpu_to_le16(++adapter->seqnum);
-       adapter->libertas_ps_confirm_sleep.command =
+       adapter->lbs_ps_confirm_sleep.seqnum = cpu_to_le16(++adapter->seqnum);
+       adapter->lbs_ps_confirm_sleep.command =
            cpu_to_le16(CMD_802_11_PS_MODE);
-       adapter->libertas_ps_confirm_sleep.size =
+       adapter->lbs_ps_confirm_sleep.size =
            cpu_to_le16(sizeof(struct PS_CMD_ConfirmSleep));
-       adapter->libertas_ps_confirm_sleep.action =
+       adapter->lbs_ps_confirm_sleep.action =
            cpu_to_le16(CMD_SUBCMD_SLEEP_CONFIRMED);
 
        memset(adapter->current_addr, 0xff, ETH_ALEN);
 
-       adapter->connect_status = LIBERTAS_DISCONNECTED;
+       adapter->connect_status = LBS_DISCONNECTED;
        adapter->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
        adapter->mode = IW_MODE_INFRA;
        adapter->curbssparams.channel = DEFAULT_AD_HOC_CHANNEL;
@@ -1061,7 +1061,7 @@ static int libertas_init_adapter(wlan_private * priv)
        adapter->radioon = RADIO_ON;
        adapter->auto_rate = 1;
        adapter->capability = WLAN_CAPABILITY_SHORT_PREAMBLE;
-       adapter->psmode = WLAN802_11POWERMODECAM;
+       adapter->psmode = LBS802_11POWERMODECAM;
        adapter->psstate = PS_STATE_FULL_POWER;
 
        mutex_init(&adapter->lock);
@@ -1081,7 +1081,7 @@ static int libertas_init_adapter(wlan_private * priv)
        adapter->nr_cmd_pending = 0;
 
        /* Allocate the command buffers */
-       if (libertas_allocate_cmd_buffer(priv)) {
+       if (lbs_allocate_cmd_buffer(priv)) {
                lbs_pr_err("Out of memory allocating command buffers\n");
                ret = -1;
        }
@@ -1090,9 +1090,9 @@ out:
        return ret;
 }
 
-static void libertas_free_adapter(wlan_private * priv)
+static void lbs_free_adapter(lbs_private *priv)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
 
        if (!adapter) {
                lbs_deb_fw("why double free adapter?\n");
@@ -1100,7 +1100,7 @@ static void libertas_free_adapter(wlan_private * priv)
        }
 
        lbs_deb_fw("free command buffer\n");
-       libertas_free_cmd_buffer(priv);
+       lbs_free_cmd_buffer(priv);
 
        lbs_deb_fw("free command_timer\n");
        del_timer(&adapter->command_timer);
@@ -1117,32 +1117,32 @@ static void libertas_free_adapter(wlan_private * priv)
 
 /**
  * @brief This function adds the card. it will probe the
- * card, allocate the wlan_priv and initialize the device.
+ * card, allocate the lbs_priv and initialize the device.
  *
  *  @param card    A pointer to card
- *  @return       A pointer to wlan_private structure
+ *  @return       A pointer to lbs_private structure
  */
-wlan_private *libertas_add_card(void *card, struct device *dmdev)
+lbs_private *lbs_add_card(void *card, struct device *dmdev)
 {
        struct net_device *dev = NULL;
-       wlan_private *priv = NULL;
+       lbs_private *priv = NULL;
 
        lbs_deb_enter(LBS_DEB_NET);
 
        /* Allocate an Ethernet device and register it */
-       if (!(dev = alloc_etherdev(sizeof(wlan_private)))) {
+       if (!(dev = alloc_etherdev(sizeof(lbs_private)))) {
                lbs_pr_err("init ethX device failed\n");
                goto done;
        }
        priv = dev->priv;
 
-       /* allocate buffer for wlan_adapter */
-       if (!(priv->adapter = kzalloc(sizeof(wlan_adapter), GFP_KERNEL))) {
-               lbs_pr_err("allocate buffer for wlan_adapter failed\n");
+       /* allocate buffer for lbs_adapter */
+       if (!(priv->adapter = kzalloc(sizeof(lbs_adapter), GFP_KERNEL))) {
+               lbs_pr_err("allocate buffer for lbs_adapter failed\n");
                goto err_kzalloc;
        }
 
-       if (libertas_init_adapter(priv)) {
+       if (lbs_init_adapter(priv)) {
                lbs_pr_err("failed to initialize adapter structure.\n");
                goto err_init_adapter;
        }
@@ -1154,46 +1154,46 @@ wlan_private *libertas_add_card(void *card, struct device *dmdev)
        priv->hotplug_device = dmdev;
 
        /* Setup the OS Interface to our functions */
-       dev->open = libertas_open;
-       dev->hard_start_xmit = libertas_pre_start_xmit;
-       dev->stop = libertas_close;
-       dev->set_mac_address = libertas_set_mac_address;
-       dev->tx_timeout = libertas_tx_timeout;
-       dev->get_stats = libertas_get_stats;
+       dev->open = lbs_open;
+       dev->hard_start_xmit = lbs_pre_start_xmit;
+       dev->stop = lbs_close;
+       dev->set_mac_address = lbs_set_mac_address;
+       dev->tx_timeout = lbs_tx_timeout;
+       dev->get_stats = lbs_get_stats;
        dev->watchdog_timeo = 5 * HZ;
-       dev->ethtool_ops = &libertas_ethtool_ops;
+       dev->ethtool_ops = &lbs_ethtool_ops;
 #ifdef WIRELESS_EXT
-       dev->wireless_handlers = (struct iw_handler_def *)&libertas_handler_def;
+       dev->wireless_handlers = (struct iw_handler_def *)&lbs_handler_def;
 #endif
        dev->flags |= IFF_BROADCAST | IFF_MULTICAST;
-       dev->set_multicast_list = libertas_set_multicast_list;
+       dev->set_multicast_list = lbs_set_multicast_list;
 
        SET_NETDEV_DEV(dev, dmdev);
 
        priv->rtap_net_dev = NULL;
-       if (device_create_file(dmdev, &dev_attr_libertas_rtap))
+       if (device_create_file(dmdev, &dev_attr_lbs_rtap))
                goto err_init_adapter;
 
        lbs_deb_thread("Starting main thread...\n");
        init_waitqueue_head(&priv->waitq);
-       priv->main_thread = kthread_run(libertas_thread, dev, "libertas_main");
+       priv->main_thread = kthread_run(lbs_thread, dev, "lbs_main");
        if (IS_ERR(priv->main_thread)) {
                lbs_deb_thread("Error creating main thread.\n");
                goto err_kthread_run;
        }
 
-       priv->work_thread = create_singlethread_workqueue("libertas_worker");
-       INIT_DELAYED_WORK(&priv->assoc_work, libertas_association_worker);
-       INIT_DELAYED_WORK(&priv->scan_work, libertas_scan_worker);
-       INIT_WORK(&priv->sync_channel, libertas_sync_channel);
+       priv->work_thread = create_singlethread_workqueue("lbs_worker");
+       INIT_DELAYED_WORK(&priv->assoc_work, lbs_association_worker);
+       INIT_DELAYED_WORK(&priv->scan_work, lbs_scan_worker);
+       INIT_WORK(&priv->sync_channel, lbs_sync_channel);
 
        goto done;
 
 err_kthread_run:
-       device_remove_file(dmdev, &dev_attr_libertas_rtap);
+       device_remove_file(dmdev, &dev_attr_lbs_rtap);
 
 err_init_adapter:
-       libertas_free_adapter(priv);
+       lbs_free_adapter(priv);
 
 err_kzalloc:
        free_netdev(dev);
@@ -1203,29 +1203,29 @@ done:
        lbs_deb_leave_args(LBS_DEB_NET, "priv %p", priv);
        return priv;
 }
-EXPORT_SYMBOL_GPL(libertas_add_card);
+EXPORT_SYMBOL_GPL(lbs_add_card);
 
 
-int libertas_remove_card(wlan_private *priv)
+int lbs_remove_card(lbs_private *priv)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        struct net_device *dev = priv->dev;
        union iwreq_data wrqu;
 
        lbs_deb_enter(LBS_DEB_MAIN);
 
-       libertas_remove_rtap(priv);
+       lbs_remove_rtap(priv);
 
        dev = priv->dev;
-       device_remove_file(priv->hotplug_device, &dev_attr_libertas_rtap);
+       device_remove_file(priv->hotplug_device, &dev_attr_lbs_rtap);
 
        cancel_delayed_work(&priv->scan_work);
        cancel_delayed_work(&priv->assoc_work);
        destroy_workqueue(priv->work_thread);
 
-       if (adapter->psmode == WLAN802_11POWERMODEMAX_PSP) {
-               adapter->psmode = WLAN802_11POWERMODECAM;
-               libertas_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
+       if (adapter->psmode == LBS802_11POWERMODEMAX_PSP) {
+               adapter->psmode = LBS802_11POWERMODECAM;
+               lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
        }
 
        memset(wrqu.ap_addr.sa_data, 0xaa, ETH_ALEN);
@@ -1236,7 +1236,7 @@ int libertas_remove_card(wlan_private *priv)
        adapter->surpriseremoved = 1;
        kthread_stop(priv->main_thread);
 
-       libertas_free_adapter(priv);
+       lbs_free_adapter(priv);
 
        priv->dev = NULL;
        free_netdev(dev);
@@ -1244,10 +1244,10 @@ int libertas_remove_card(wlan_private *priv)
        lbs_deb_leave(LBS_DEB_MAIN);
        return 0;
 }
-EXPORT_SYMBOL_GPL(libertas_remove_card);
+EXPORT_SYMBOL_GPL(lbs_remove_card);
 
 
-int libertas_start_card(wlan_private *priv)
+int lbs_start_card(lbs_private *priv)
 {
        struct net_device *dev = priv->dev;
        int ret = -1;
@@ -1255,19 +1255,19 @@ int libertas_start_card(wlan_private *priv)
        lbs_deb_enter(LBS_DEB_MAIN);
 
        /* poke the firmware */
-       ret = wlan_setup_firmware(priv);
+       ret = lbs_setup_firmware(priv);
        if (ret)
                goto done;
 
        /* init 802.11d */
-       libertas_init_11d(priv);
+       lbs_init_11d(priv);
 
        if (register_netdev(dev)) {
                lbs_pr_err("cannot register ethX device\n");
                goto done;
        }
 
-       libertas_debugfs_init_one(priv, dev);
+       lbs_debugfs_init_one(priv, dev);
 
        lbs_pr_info("%s: Marvell WLAN 802.11 adapter\n", dev->name);
 
@@ -1277,10 +1277,10 @@ done:
        lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret);
        return ret;
 }
-EXPORT_SYMBOL_GPL(libertas_start_card);
+EXPORT_SYMBOL_GPL(lbs_start_card);
 
 
-int libertas_stop_card(wlan_private *priv)
+int lbs_stop_card(lbs_private *priv)
 {
        struct net_device *dev = priv->dev;
        int ret = -1;
@@ -1292,7 +1292,7 @@ int libertas_stop_card(wlan_private *priv)
        netif_stop_queue(priv->dev);
        netif_carrier_off(priv->dev);
 
-       libertas_debugfs_remove_one(priv);
+       lbs_debugfs_remove_one(priv);
 
        /* Flush pending command nodes */
        spin_lock_irqsave(&priv->adapter->driver_lock, flags);
@@ -1307,16 +1307,16 @@ int libertas_stop_card(wlan_private *priv)
        lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret);
        return ret;
 }
-EXPORT_SYMBOL_GPL(libertas_stop_card);
+EXPORT_SYMBOL_GPL(lbs_stop_card);
 
 
 /**
  * @brief This function adds mshX interface
  *
- *  @param priv    A pointer to the wlan_private structure
+ *  @param priv    A pointer to the lbs_private structure
  *  @return       0 if successful, -X otherwise
  */
-int libertas_add_mesh(wlan_private *priv, struct device *dev)
+int lbs_add_mesh(lbs_private *priv, struct device *dev)
 {
        struct net_device *mesh_dev = NULL;
        int ret = 0;
@@ -1332,12 +1332,12 @@ int libertas_add_mesh(wlan_private *priv, struct device *dev)
        mesh_dev->priv = priv;
        priv->mesh_dev = mesh_dev;
 
-       mesh_dev->open = libertas_mesh_open;
-       mesh_dev->hard_start_xmit = libertas_mesh_pre_start_xmit;
-       mesh_dev->stop = libertas_mesh_close;
-       mesh_dev->get_stats = libertas_get_stats;
-       mesh_dev->set_mac_address = libertas_set_mac_address;
-       mesh_dev->ethtool_ops = &libertas_ethtool_ops;
+       mesh_dev->open = lbs_mesh_open;
+       mesh_dev->hard_start_xmit = lbs_mesh_pre_start_xmit;
+       mesh_dev->stop = lbs_mesh_close;
+       mesh_dev->get_stats = lbs_get_stats;
+       mesh_dev->set_mac_address = lbs_set_mac_address;
+       mesh_dev->ethtool_ops = &lbs_ethtool_ops;
        memcpy(mesh_dev->dev_addr, priv->dev->dev_addr,
                        sizeof(priv->dev->dev_addr));
 
@@ -1353,7 +1353,7 @@ int libertas_add_mesh(wlan_private *priv, struct device *dev)
                goto err_free;
        }
 
-       ret = sysfs_create_group(&(mesh_dev->dev.kobj), &libertas_mesh_attr_group);
+       ret = sysfs_create_group(&(mesh_dev->dev.kobj), &lbs_mesh_attr_group);
        if (ret)
                goto err_unregister;
 
@@ -1371,10 +1371,10 @@ done:
        lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret);
        return ret;
 }
-EXPORT_SYMBOL_GPL(libertas_add_mesh);
+EXPORT_SYMBOL_GPL(lbs_add_mesh);
 
 
-void libertas_remove_mesh(wlan_private *priv)
+void lbs_remove_mesh(lbs_private *priv)
 {
        struct net_device *mesh_dev;
 
@@ -1388,7 +1388,7 @@ void libertas_remove_mesh(wlan_private *priv)
        netif_stop_queue(mesh_dev);
        netif_carrier_off(priv->mesh_dev);
 
-       sysfs_remove_group(&(mesh_dev->dev.kobj), &libertas_mesh_attr_group);
+       sysfs_remove_group(&(mesh_dev->dev.kobj), &lbs_mesh_attr_group);
        unregister_netdev(mesh_dev);
 
        priv->mesh_dev = NULL ;
@@ -1397,7 +1397,7 @@ void libertas_remove_mesh(wlan_private *priv)
 out:
        lbs_deb_leave(LBS_DEB_MAIN);
 }
-EXPORT_SYMBOL_GPL(libertas_remove_mesh);
+EXPORT_SYMBOL_GPL(lbs_remove_mesh);
 
 /**
  *  @brief This function finds the CFP in
@@ -1408,7 +1408,7 @@ EXPORT_SYMBOL_GPL(libertas_remove_mesh);
  *  @param cfp_no  A pointer to CFP number
  *  @return       A pointer to CFP
  */
-struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band, int *cfp_no)
+struct chan_freq_power *lbs_get_region_cfp_table(u8 region, u8 band, int *cfp_no)
 {
        int i, end;
 
@@ -1430,9 +1430,9 @@ struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band, int *c
        return NULL;
 }
 
-int libertas_set_regiontable(wlan_private * priv, u8 region, u8 band)
+int lbs_set_regiontable(lbs_private *priv, u8 region, u8 band)
 {
-       wlan_adapter *adapter = priv->adapter;
+       lbs_adapter *adapter = priv->adapter;
        int ret = 0;
        int i = 0;
 
@@ -1444,7 +1444,7 @@ int libertas_set_regiontable(wlan_private * priv, u8 region, u8 band)
        memset(adapter->region_channel, 0, sizeof(adapter->region_channel));
 
        {
-               cfp = libertas_get_region_cfp_table(region, band, &cfp_no);
+               cfp = lbs_get_region_cfp_table(region, band, &cfp_no);
                if (cfp != NULL) {
                        adapter->region_channel[i].nrcfp = cfp_no;
                        adapter->region_channel[i].CFP = cfp;
@@ -1472,13 +1472,13 @@ out:
  *  @param dev     A pointer to net_device structure
  *  @return       n/a
  */
-void libertas_interrupt(struct net_device *dev)
+void lbs_interrupt(struct net_device *dev)
 {
-       wlan_private *priv = dev->priv;
+       lbs_private *priv = dev->priv;
 
        lbs_deb_enter(LBS_DEB_THREAD);
 
-       lbs_deb_thread("libertas_interrupt: intcounter=%d\n",
+       lbs_deb_thread("lbs_interrupt: intcounter=%d\n",
               priv->adapter->intcounter);
 
        priv->adapter->intcounter++;
@@ -1494,35 +1494,35 @@ void libertas_interrupt(struct net_device *dev)
 
        lbs_deb_leave(LBS_DEB_THREAD);
 }
-EXPORT_SYMBOL_GPL(libertas_interrupt);
+EXPORT_SYMBOL_GPL(lbs_interrupt);
 
-int libertas_reset_device(wlan_private *priv)
+int lbs_reset_device(lbs_private *priv)
 {
        int ret;
 
        lbs_deb_enter(LBS_DEB_MAIN);
-       ret = libertas_prepare_and_send_command(priv, CMD_802_11_RESET,
+       ret = lbs_prepare_and_send_command(priv, CMD_802_11_RESET,
                                    CMD_ACT_HALT, 0, 0, NULL);
        msleep_interruptible(10);
 
        lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret);
        return ret;
 }
-EXPORT_SYMBOL_GPL(libertas_reset_device);
+EXPORT_SYMBOL_GPL(lbs_reset_devi