[PATCH] move wlan_*_association_work from header to c file
Holger Schurig
hs4233 at mail.mn-solutions.de
Mon Oct 15 06:47:25 EDT 2007
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:
- "foo * name" -> "foo *name"
- void xxxx () -> "void xxxx()"
- spaces instead of tabs
In other words: only those checkpatch.pl musings that could be
fixed directly in the patch, because they involved only one line.
That leaves all other "violations" of checkpatch like C99 comments
or > 80 characters open. These "violations" where in the original
code. I thought that fixing them would have changed too many things
at once.
Signed-off-by: Holger Schurig <hs4233 at mail.mn-solutions.de>
---
This patch has been made against wireless-2.6 everything
2d46d1e00056de79e54c622a60f7e6f8818f6cb4
Index: wireless-2.6/drivers/net/wireless/libertas/11d.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/11d.c 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/11d.c 2007-10-15 13:41:51.000000000 +0200
@@ -43,7 +43,7 @@ static struct chan_freq_power channel_fr
{14, 2484, TX_PWR_DEFAULT}
};
-static u8 wlan_region_2_code(u8 * region)
+static u8 lbs_region_2_code(u8 *region)
{
u8 i;
u8 size = sizeof(region_code_mapping)/
@@ -62,7 +62,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;
u8 size = sizeof(region_code_mapping)
@@ -82,7 +82,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;
@@ -117,7 +117,7 @@ static u8 wlan_get_chan_11d(u8 band, u8
* @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;
@@ -138,7 +138,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 cnt;
@@ -160,7 +160,7 @@ u32 libertas_chan_2_freq(u8 chan, u8 ban
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;
@@ -225,7 +225,7 @@ static int generate_domain_info_11d(stru
* @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)
{
@@ -246,7 +246,7 @@ static void wlan_generate_parsed_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);
@@ -272,7 +272,7 @@ static void wlan_generate_parsed_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;
@@ -281,7 +281,7 @@ static u8 wlan_region_chan_supported_11d
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;
@@ -346,7 +346,7 @@ static int parse_domain_info_11d(struct
/*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,
@@ -375,7 +375,7 @@ static int parse_domain_info_11d(struct
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;
@@ -383,7 +383,7 @@ static int parse_domain_info_11d(struct
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;
@@ -419,14 +419,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 {
@@ -438,7 +438,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,
@@ -448,10 +448,10 @@ void libertas_init_11d(wlan_private * pr
/**
* @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;
@@ -460,7 +460,7 @@ static int set_domain_info_11d(wlan_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)
@@ -471,13 +471,13 @@ static int set_domain_info_11d(wlan_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;
@@ -500,20 +500,20 @@ int libertas_set_universaltable(wlan_pri
/**
* @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);
@@ -560,11 +560,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;
@@ -606,14 +606,14 @@ int libertas_ret_802_11d_domain_info(wla
/**
* @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) {
@@ -628,7 +628,7 @@ int libertas_parse_dnld_countryinfo_11d(
}
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);
@@ -648,13 +648,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;
@@ -689,12 +689,12 @@ int libertas_create_dnld_countryinfo_11d
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: wireless-2.6/drivers/net/wireless/libertas/11d.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/11d.h 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/11d.h 2007-10-15 13:41:51.000000000 +0200
@@ -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: wireless-2.6/drivers/net/wireless/libertas/assoc.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/assoc.c 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/assoc.c 2007-10-15 13:41:51.000000000 +0200
@@ -37,10 +37,10 @@ static void print_assoc_req(const char *
}
-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;
@@ -57,15 +57,15 @@ static int assoc_helper_essid(wlan_priva
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");
}
@@ -73,23 +73,23 @@ static int assoc_helper_essid(wlan_priva
/* 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);
}
}
@@ -98,10 +98,10 @@ static int assoc_helper_essid(wlan_priva
}
-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;
@@ -109,7 +109,7 @@ static int assoc_helper_bssid(wlan_priva
MAC_ARG(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 " MAC_FMT " not found, "
@@ -119,10 +119,10 @@ static int assoc_helper_bssid(wlan_priva
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:
@@ -131,7 +131,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;
@@ -160,10 +160,10 @@ static int assoc_helper_associate(wlan_p
}
-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);
@@ -173,12 +173,12 @@ static int assoc_helper_mode(wlan_privat
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,
@@ -190,26 +190,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);
@@ -225,7 +225,7 @@ static int assoc_helper_channel(wlan_pri
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) {
@@ -261,10 +261,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;
@@ -275,13 +275,13 @@ static int assoc_helper_wep_keys(wlan_pr
|| 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,
@@ -296,7 +296,7 @@ static int assoc_helper_wep_keys(wlan_pr
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;
@@ -316,10 +316,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;
@@ -327,9 +327,9 @@ static int assoc_helper_secinfo(wlan_pri
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;
@@ -339,7 +339,7 @@ static int assoc_helper_secinfo(wlan_pri
*/
/* 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,
@@ -356,7 +356,7 @@ static int assoc_helper_secinfo(wlan_pri
/* 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,
@@ -368,7 +368,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;
@@ -383,7 +383,7 @@ static int assoc_helper_wpa_keys(wlan_pr
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,
@@ -397,7 +397,7 @@ static int assoc_helper_wpa_keys(wlan_pr
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,
@@ -411,10 +411,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);
@@ -432,10 +432,10 @@ static int assoc_helper_wpa_ie(wlan_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)) {
@@ -473,13 +473,13 @@ static int should_deauth_infrastructure(
}
-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;
@@ -499,10 +499,10 @@ static int should_stop_adhoc(wlan_adapte
}
-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;
@@ -535,7 +535,7 @@ void libertas_association_worker(struct
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");
@@ -556,7 +556,7 @@ void libertas_association_worker(struct
*/
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",
@@ -565,7 +565,7 @@ void libertas_association_worker(struct
}
} 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",
@@ -646,7 +646,7 @@ void libertas_association_worker(struct
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;
@@ -658,11 +658,11 @@ void libertas_association_worker(struct
escape_essid(adapter->curbssparams.ssid,
adapter->curbssparams.ssid_len),
MAC_ARG(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 {
@@ -689,7 +689,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;
@@ -750,7 +750,7 @@ struct assoc_request * wlan_get_associat
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: wireless-2.6/drivers/net/wireless/libertas/assoc.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/assoc.h 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/assoc.h 2007-10-15 13:41:51.000000000 +0200
@@ -1,14 +1,12 @@
/* 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);
-
-struct assoc_request * wlan_get_association_request(wlan_adapter *adapter);
-
-void libertas_sync_channel(struct work_struct *work);
+void lbs_association_worker(struct work_struct *work);
+struct assoc_request *lbs_get_association_request(lbs_adapter *adapter);
+void lbs_sync_channel(struct work_struct *work);
-#endif /* _WLAN_ASSOC_H */
+#endif
Index: wireless-2.6/drivers/net/wireless/libertas/cmd.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/cmd.c 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/cmd.c 2007-10-15 13:41:51.000000000 +0200
@@ -37,7 +37,7 @@ static u8 is_command_allowed_in_ps(__le1
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
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_
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_ti
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(
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 MrvlI
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_pr
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_
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
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
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
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(w
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(
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_ra
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(wla
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(wla
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(wl
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(wl
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_pri
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_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(w
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
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_priva
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_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_pri
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)
{
@@ -912,7 +912,7 @@ static int wlan_cmd_set_boot2_ver(wlan_p
return 0;
}
-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;
@@ -963,12 +963,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;
@@ -985,7 +985,7 @@ static int DownloadcommandToStation(wlan
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;
}
@@ -1010,7 +1010,7 @@ static int DownloadcommandToStation(wlan
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);
@@ -1033,7 +1033,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;
@@ -1055,9 +1055,9 @@ static int wlan_cmd_mac_control(wlan_pri
* 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;
@@ -1066,22 +1066,22 @@ void __libertas_cleanup_and_insert_cmd(w
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);
@@ -1093,14 +1093,14 @@ int libertas_set_radio_control(wlan_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);
@@ -1110,7 +1110,7 @@ int libertas_set_mac_packet_filter(wlan_
/**
* @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
@@ -1118,13 +1118,13 @@ int libertas_set_mac_packet_filter(wlan_
* @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;
@@ -1143,7 +1143,7 @@ int libertas_prepare_and_send_command(wl
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");
@@ -1154,7 +1154,7 @@ int libertas_prepare_and_send_command(wl
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;
@@ -1162,7 +1162,7 @@ int libertas_prepare_and_send_command(wl
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;
}
@@ -1176,116 +1176,116 @@ int libertas_prepare_and_send_command(wl
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;
@@ -1295,11 +1295,11 @@ int libertas_prepare_and_send_command(wl
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;
@@ -1317,17 +1317,17 @@ int libertas_prepare_and_send_command(wl
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:
@@ -1374,19 +1374,19 @@ int libertas_prepare_and_send_command(wl
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:
@@ -1404,14 +1404,14 @@ int libertas_prepare_and_send_command(wl
/* 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);
adapter->nr_cmd_pending++;
wake_up_interruptible(&priv->waitq);
@@ -1435,23 +1435,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);
@@ -1480,7 +1480,7 @@ int libertas_allocate_cmd_buffer(wlan_pr
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;
@@ -1493,15 +1493,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);
@@ -1537,13 +1537,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);
@@ -1598,14 +1598,14 @@ static void cleanup_cmdnode(struct cmd_c
/**
* @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)
{
@@ -1626,19 +1626,19 @@ void libertas_set_cmd_ctrl_node(wlan_pri
* 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);
@@ -1679,7 +1679,7 @@ int libertas_execute_next_command(wlan_p
/*
* 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:
@@ -1698,7 +1698,7 @@ int libertas_execute_next_command(wlan_p
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;
@@ -1718,7 +1718,7 @@ int libertas_execute_next_command(wlan_p
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;
@@ -1729,7 +1729,7 @@ int libertas_execute_next_command(wlan_p
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;
@@ -1749,9 +1749,9 @@ int libertas_execute_next_command(wlan_p
* 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 */
@@ -1760,13 +1760,13 @@ int libertas_execute_next_command(wlan_p
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);
}
}
}
@@ -1777,7 +1777,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];
@@ -1801,10 +1801,10 @@ void libertas_send_iwevcustom_event(wlan
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);
@@ -1843,7 +1843,7 @@ static int sendconfirmsleep(wlan_private
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);
@@ -1852,7 +1852,7 @@ void libertas_ps_sleep(wlan_private * pr
* 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);
@@ -1861,19 +1861,19 @@ void libertas_ps_sleep(wlan_private * pr
/**
* @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);
@@ -1884,14 +1884,14 @@ void libertas_ps_wakeup(wlan_private * p
* @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);
@@ -1913,8 +1913,8 @@ void libertas_ps_confirm_sleep(wlan_priv
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: wireless-2.6/drivers/net/wireless/libertas/cmdresp.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/cmdresp.c 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/cmdresp.c 2007-10-15 13:41:51.000000000 +0200
@@ -20,15 +20,15 @@
* 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(wla
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(wla
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(wla
/**
* @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
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_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;
lbs_deb_enter(LBS_DEB_CMD);
@@ -182,7 +182,7 @@ static int wlan_ret_get_hw_spec(wlan_pri
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;
}
}
@@ -200,12 +200,12 @@ static int wlan_ret_get_hw_spec(wlan_pri
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;
}
@@ -215,11 +215,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);
@@ -239,14 +239,14 @@ static int wlan_ret_802_11_sleep_params(
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,
@@ -256,7 +256,7 @@ static int wlan_ret_802_11_stat(wlan_pri
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;
@@ -298,12 +298,12 @@ static int wlan_ret_802_11_snmp_mib(wlan
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);
@@ -354,11 +354,11 @@ static int wlan_ret_802_11_key_material(
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);
@@ -368,11 +368,11 @@ static int wlan_ret_802_11_mac_address(w
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);
@@ -384,11 +384,11 @@ static int wlan_ret_802_11_rf_tx_power(w
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);
@@ -401,11 +401,11 @@ static int wlan_ret_802_11_rate_adapt_ra
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);
@@ -415,18 +415,18 @@ static int wlan_ret_802_11_data_rate(wla
/* 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);
@@ -445,11 +445,11 @@ static int wlan_ret_802_11_rf_channel(wl
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);
@@ -476,12 +476,12 @@ static int wlan_ret_802_11_rssi(wlan_pri
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));
@@ -502,11 +502,11 @@ static int wlan_ret_802_11_eeprom_access
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);
@@ -517,11 +517,11 @@ static int wlan_ret_get_log(wlan_private
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);
@@ -537,11 +537,11 @@ static int libertas_ret_802_11_enable_rs
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);
@@ -549,47 +549,47 @@ static inline int handle_cmd_response(u1
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):
@@ -611,45 +611,45 @@ static inline int handle_cmd_response(u1
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);
@@ -712,11 +712,11 @@ static inline int handle_cmd_response(u1
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;
@@ -748,7 +748,7 @@ int libertas_process_rx_command(wlan_pri
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);
@@ -773,27 +773,27 @@ int libertas_process_rx_command(wlan_pri
/*
* 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);
}
@@ -805,7 +805,7 @@ int libertas_process_rx_command(wlan_pri
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);
@@ -836,7 +836,7 @@ int libertas_process_rx_command(wlan_pri
}
- __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);
@@ -852,7 +852,7 @@ int libertas_process_rx_command(wlan_pri
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;
@@ -865,10 +865,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);
@@ -886,17 +886,17 @@ int libertas_process_event(wlan_private
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:
@@ -910,7 +910,7 @@ int libertas_process_event(wlan_private
}
adapter->psstate = PS_STATE_PRE_SLEEP;
- libertas_ps_confirm_sleep(priv, (u16) adapter->psmode);
+ lbs_ps_confirm_sleep(priv, (u16) adapter->psmode);
break;
@@ -931,10 +931,10 @@ int libertas_process_event(wlan_private
* 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;
@@ -978,7 +978,7 @@ int libertas_process_event(wlan_private
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: wireless-2.6/drivers/net/wireless/libertas/debugfs.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/debugfs.c 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/debugfs.c 2007-10-15 13:41:51.000000000 +0200
@@ -11,14 +11,14 @@
#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 f
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
}
-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);
@@ -97,11 +97,11 @@ static ssize_t libertas_getscantable(str
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);
@@ -124,7 +124,7 @@ static ssize_t libertas_sleepparams_writ
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);
@@ -139,17 +139,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);
@@ -170,10 +170,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);
@@ -185,7 +185,7 @@ static ssize_t libertas_extscan(struct f
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);
@@ -195,8 +195,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;
@@ -232,8 +232,8 @@ static int libertas_parse_chan(char *buf
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];
@@ -246,8 +246,8 @@ static void libertas_parse_bssid(char *b
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;
@@ -266,7 +266,7 @@ static void libertas_parse_ssid(char *bu
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;
@@ -283,8 +283,8 @@ static int libertas_parse_clear(char *bu
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;
@@ -298,8 +298,8 @@ static int libertas_parse_dur(char *buf,
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;
@@ -315,8 +315,8 @@ static void libertas_parse_probes(char *
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;
@@ -336,19 +336,19 @@ static void libertas_parse_type(char *bu
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;
@@ -358,18 +358,18 @@ static ssize_t libertas_setuserscan(stru
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);
@@ -382,21 +382,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;
@@ -408,11 +408,11 @@ static int libertas_event_initcmd(wlan_p
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;
@@ -422,7 +422,7 @@ static ssize_t libertas_lowrssi_read(str
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;
@@ -431,7 +431,7 @@ static ssize_t libertas_lowrssi_read(str
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 */
@@ -478,9 +478,9 @@ static ssize_t libertas_lowrssi_read(str
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;
@@ -488,14 +488,14 @@ static u16 libertas_get_events_bitmap(wl
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 */
@@ -523,12 +523,12 @@ static u16 libertas_get_events_bitmap(wl
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;
@@ -552,9 +552,9 @@ static ssize_t libertas_lowrssi_write(st
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;
@@ -574,7 +574,7 @@ static ssize_t libertas_lowrssi_write(st
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 */
@@ -604,11 +604,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;
@@ -618,7 +618,7 @@ static ssize_t libertas_lowsnr_read(stru
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;
@@ -627,7 +627,7 @@ static ssize_t libertas_lowsnr_read(stru
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 */
@@ -676,12 +676,12 @@ static ssize_t libertas_lowsnr_read(stru
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;
@@ -705,9 +705,9 @@ static ssize_t libertas_lowsnr_write(str
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;
@@ -726,7 +726,7 @@ static ssize_t libertas_lowsnr_write(str
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 */
@@ -757,11 +757,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;
@@ -771,7 +771,7 @@ static ssize_t libertas_failcount_read(s
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;
@@ -780,7 +780,7 @@ static ssize_t libertas_failcount_read(s
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 */
@@ -828,12 +828,12 @@ static ssize_t libertas_failcount_read(s
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;
@@ -857,9 +857,9 @@ static ssize_t libertas_failcount_write(
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;
@@ -878,7 +878,7 @@ static ssize_t libertas_failcount_write(
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 */
@@ -908,11 +908,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;
@@ -922,7 +922,7 @@ static ssize_t libertas_bcnmiss_read(str
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;
@@ -931,7 +931,7 @@ static ssize_t libertas_bcnmiss_read(str
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 */
@@ -979,12 +979,12 @@ static ssize_t libertas_bcnmiss_read(str
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;
@@ -1008,9 +1008,9 @@ static ssize_t libertas_bcnmiss_write(st
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;
@@ -1028,7 +1028,7 @@ static ssize_t libertas_bcnmiss_write(st
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 */
@@ -1058,11 +1058,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;
@@ -1072,7 +1072,7 @@ static ssize_t libertas_highrssi_read(st
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;
@@ -1081,7 +1081,7 @@ static ssize_t libertas_highrssi_read(st
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 */
@@ -1130,12 +1130,12 @@ static ssize_t libertas_highrssi_read(st
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;
@@ -1159,9 +1159,9 @@ static ssize_t libertas_highrssi_write(s
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;
@@ -1180,7 +1180,7 @@ static ssize_t libertas_highrssi_write(s
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 */
@@ -1208,11 +1208,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;
@@ -1222,7 +1222,7 @@ static ssize_t libertas_highsnr_read(str
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;
@@ -1231,7 +1231,7 @@ static ssize_t libertas_highsnr_read(str
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 */
@@ -1280,12 +1280,12 @@ static ssize_t libertas_highsnr_read(str
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;
@@ -1309,9 +1309,9 @@ static ssize_t libertas_highsnr_write(st
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;
@@ -1330,7 +1330,7 @@ static ssize_t libertas_highsnr_write(st
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 */
@@ -1360,12 +1360,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);
@@ -1374,7 +1374,7 @@ static ssize_t libertas_rdmac_read(struc
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);
@@ -1386,11 +1386,11 @@ static ssize_t libertas_rdmac_read(struc
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;
@@ -1407,15 +1407,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;
@@ -1432,7 +1432,7 @@ static ssize_t libertas_wrmac_write(stru
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);
@@ -1443,12 +1443,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);
@@ -1457,7 +1457,7 @@ static ssize_t libertas_rdbbp_read(struc
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);
@@ -1470,11 +1470,11 @@ static ssize_t libertas_rdbbp_read(struc
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;
@@ -1491,15 +1491,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;
@@ -1516,7 +1516,7 @@ static ssize_t libertas_wrbbp_write(stru
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);
@@ -1527,12 +1527,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);
@@ -1541,7 +1541,7 @@ static ssize_t libertas_rdrf_read(struct
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);
@@ -1554,11 +1554,11 @@ static ssize_t libertas_rdrf_read(struct
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;
@@ -1575,15 +1575,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;
@@ -1600,7 +1600,7 @@ static ssize_t libertas_wrrf_write(struc
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);
@@ -1618,69 +1618,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;
@@ -1720,13 +1720,13 @@ void libertas_debugfs_init_one(wlan_priv
}
#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;
@@ -1753,8 +1753,8 @@ void libertas_debugfs_remove_one(wlan_pr
#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 {
@@ -1763,7 +1763,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)},
@@ -1784,7 +1784,7 @@ static int num_of_items = ARRAY_SIZE(ite
* @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;
@@ -1828,7 +1828,7 @@ static ssize_t wlan_debugfs_read(struct
* @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;
@@ -1880,21 +1880,21 @@ static ssize_t wlan_debugfs_write(struct
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;
@@ -1906,7 +1906,7 @@ static void libertas_debug_init(wlan_pri
priv->debugfs_debug = debugfs_create_file("debug", 0644,
priv->debugfs_dir, &items[0],
- &libertas_debug_fops);
+ &lbs_debug_fops);
}
#endif
Index: wireless-2.6/drivers/net/wireless/libertas/debugfs.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/debugfs.h 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/debugfs.h 2007-10-15 13:41:51.000000000 +0200
@@ -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: wireless-2.6/drivers/net/wireless/libertas/decl.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/decl.h 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/decl.h 2007-10-15 13:41:51.000000000 +0200
@@ -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);
+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 /* _WLAN_DECL_H_ */
+#endif
Index: wireless-2.6/drivers/net/wireless/libertas/defs.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/defs.h 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/defs.h 2007-10-15 13:41:51.000000000 +0200
@@ -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>
@@ -40,11 +40,11 @@
#define LBS_DEB_THREAD 0x00100000
#define LBS_DEB_HEX 0x00200000
-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
@@ -94,8 +94,8 @@ static inline void lbs_deb_hex(unsigned
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) {
@@ -136,7 +136,7 @@ static inline void lbs_deb_hex(unsigned
#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 */
@@ -260,12 +260,12 @@ static inline void lbs_deb_hex(unsigned
#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 */
@@ -282,13 +282,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 */
@@ -306,16 +306,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 */
@@ -380,4 +380,4 @@ enum SNMP_MIB_VALUE_e {
#define FWT_DEFAULT_SLEEPMODE 0
#define FWT_DEFAULT_SNR 0
-#endif /* _WLAN_DEFS_H_ */
+#endif
Index: wireless-2.6/drivers/net/wireless/libertas/dev.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/dev.h 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/dev.h 2007-10-15 13:41:51.000000000 +0200
@@ -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: wireless-2.6/drivers/net/wireless/libertas/ethtool.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/ethtool.c 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/ethtool.c 2007-10-15 13:41:51.000000000 +0200
@@ -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(s
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(s
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(s
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,10 +105,10 @@ 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;
lbs_deb_enter(LBS_DEB_ETHTOOL);
@@ -127,16 +127,16 @@ static void libertas_ethtool_get_stats(s
lbs_deb_enter(LBS_DEB_ETHTOOL);
}
-static int libertas_ethtool_get_stats_count(struct net_device * dev)
+static int lbs_ethtool_get_stats_count(struct net_device *dev)
{
int ret;
- wlan_private *priv = dev->priv;
+ lbs_private *priv = dev->priv;
struct cmd_ds_mesh_access mesh_access;
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);
@@ -161,7 +161,7 @@ done:
return ret;
}
-static void libertas_ethtool_get_strings (struct net_device * dev,
+static void lbs_ethtool_get_strings(struct net_device *dev,
u32 stringset,
u8 * s)
{
@@ -181,12 +181,12 @@ static void libertas_ethtool_get_strings
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_stats_count = libertas_ethtool_get_stats_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_stats_count = lbs_ethtool_get_stats_count,
+ .get_ethtool_stats = lbs_ethtool_get_stats,
+ .get_strings = lbs_ethtool_get_strings,
};
Index: wireless-2.6/drivers/net/wireless/libertas/hostcmd.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/hostcmd.h 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/hostcmd.h 2007-10-15 13:41:51.000000000 +0200
@@ -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: wireless-2.6/drivers/net/wireless/libertas/if_cs.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/if_cs.c 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/if_cs.c 2007-10-15 13:41:51.000000000 +0200
@@ -34,7 +34,7 @@
#include <linux/io.h>
-#define DRV_NAME "libertas_cs"
+#define DRV_NAME "lbs_cs"
#include "decl.h"
#include "defs.h"
@@ -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;
};
@@ -262,7 +262,7 @@ static irqreturn_t if_cs_interrupt(int i
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);
}
@@ -270,7 +270,7 @@ static irqreturn_t if_cs_interrupt(int i
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;
}
@@ -285,7 +285,7 @@ static irqreturn_t if_cs_interrupt(int i
/*
* 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;
@@ -330,7 +330,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;
@@ -353,7 +353,7 @@ static void if_cs_send_data(wlan_private
/*
* 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;
@@ -385,7 +385,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;
@@ -615,7 +615,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;
@@ -640,10 +640,10 @@ static int if_cs_host_to_card(wlan_priva
}
-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;
@@ -667,7 +667,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;
}
@@ -697,7 +697,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);
@@ -745,7 +745,7 @@ static void if_cs_release(struct pcmcia_
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;
@@ -855,7 +855,7 @@ static int if_cs_probe(struct pcmcia_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;
@@ -881,7 +881,7 @@ static int if_cs_probe(struct pcmcia_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;
}
@@ -890,7 +890,7 @@ static int if_cs_probe(struct pcmcia_dev
goto out;
out3:
- libertas_remove_card(priv);
+ lbs_remove_card(priv);
out2:
ioport_unmap(card->iobase);
out1:
@@ -913,8 +913,8 @@ static void if_cs_detach(struct pcmcia_d
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);
@@ -935,7 +935,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,
@@ -951,7 +951,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;
}
@@ -960,7 +960,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: wireless-2.6/drivers/net/wireless/libertas/if_usb.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/if_usb.c 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/if_usb.c 2007-10-15 13:41:51.000000000 +0200
@@ -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(s
/* 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(s
* 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(s
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_inter
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_inter
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_inter
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_inter
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
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
/**
* @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_c
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 us
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 us
/**
* @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(i
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(in
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 *u
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 *u
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_priv
}
/* 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_pr
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 u
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_int
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_int
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_inte
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: wireless-2.6/drivers/net/wireless/libertas/join.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/join.c 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/join.c 2007-10-15 13:41:51.000000000 +0200
@@ -30,16 +30,16 @@
* 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_flag
* @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
/**
* @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,
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_pr
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_pr
/**
* @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_pri
/* 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_pri
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;
@@ -328,10 +328,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);
@@ -351,10 +351,10 @@ int libertas_cmd_80211_deauthenticate(wl
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;
@@ -430,7 +430,7 @@ int libertas_cmd_80211_associate(wlan_pr
/* 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;
@@ -447,7 +447,7 @@ int libertas_cmd_80211_associate(wlan_pr
/* 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;
}
@@ -467,10 +467,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;
@@ -547,8 +547,8 @@ int libertas_cmd_80211_ad_hoc_start(wlan
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));
@@ -557,14 +557,14 @@ int libertas_cmd_80211_ad_hoc_start(wlan
/* 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;
@@ -579,7 +579,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);
@@ -588,10 +588,10 @@ int libertas_cmd_80211_ad_hoc_stop(wlan_
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;
@@ -649,7 +649,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_
/* 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);
@@ -660,12 +660,12 @@ int libertas_cmd_80211_ad_hoc_join(wlan_
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);
@@ -676,7 +676,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_
}
}
- if (libertas_parse_dnld_countryinfo_11d(priv, bss)) {
+ if (lbs_parse_dnld_countryinfo_11d(priv, bss)) {
ret = -1;
goto done;
}
@@ -689,10 +689,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;
@@ -759,7 +759,7 @@ int libertas_ret_80211_associate(wlan_pr
}
if (status_code) {
- libertas_mac_event_disconnected(priv);
+ lbs_mac_event_disconnected(priv);
ret = -1;
goto done;
}
@@ -768,7 +768,7 @@ int libertas_ret_80211_associate(wlan_pr
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));
@@ -806,21 +806,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);
@@ -848,8 +848,8 @@ int libertas_ret_80211_ad_hoc_start(wlan
*/
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;
@@ -863,7 +863,7 @@ int libertas_ret_80211_ad_hoc_start(wlan
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 */
@@ -900,12 +900,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: wireless-2.6/drivers/net/wireless/libertas/join.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/join.h 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/join.h 2007-10-15 13:41:51.000000000 +0200
@@ -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: wireless-2.6/drivers/net/wireless/libertas/main.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/main.c 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/main.c 2007-10-15 13:41:51.000000000 +0200
@@ -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[] = "
/* 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(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_cf
/**
* 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 id
* @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 ra
/**
* @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(stru
/**
* @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(stru
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_enable
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_enable
}
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_m
*/
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_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_
* @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
* @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
* @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 ne
* @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(stru
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 n
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 n
/**
* @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(stru
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_addre
}
-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;
lbs_deb_enter(LBS_DEB_NET);
@@ -717,7 +717,7 @@ static void libertas_set_multicast_list(
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);
@@ -733,7 +733,7 @@ static void libertas_set_multicast_list(
adapter->multicastlist[i][5]);
}
/* 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);
@@ -742,25 +742,25 @@ static void libertas_set_multicast_list(
}
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;
@@ -840,7 +840,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);
}
@@ -857,7 +857,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);
@@ -865,7 +865,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",
@@ -874,7 +874,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
@@ -898,15 +898,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);
@@ -922,13 +922,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);
@@ -938,7 +938,7 @@ static int wlan_setup_firmware(wlan_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) {
@@ -946,10 +946,10 @@ static int wlan_setup_firmware(wlan_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);
@@ -962,7 +962,7 @@ static int wlan_setup_firmware(wlan_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);
@@ -974,7 +974,7 @@ static int wlan_setup_firmware(wlan_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;
@@ -989,8 +989,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;
@@ -1017,16 +1017,16 @@ static void command_timer_fn(unsigned lo
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;
@@ -1047,17 +1047,17 @@ static int libertas_init_adapter(wlan_pr
&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;
@@ -1065,7 +1065,7 @@ static int libertas_init_adapter(wlan_pr
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);
@@ -1085,7 +1085,7 @@ static int libertas_init_adapter(wlan_pr
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;
}
@@ -1094,9 +1094,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");
@@ -1104,7 +1104,7 @@ static void libertas_free_adapter(wlan_p
}
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);
@@ -1121,32 +1121,32 @@ static void libertas_free_adapter(wlan_p
/**
* @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;
}
@@ -1160,48 +1160,48 @@ wlan_private *libertas_add_card(void *ca
SET_MODULE_OWNER(dev);
/* 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
#define NETIF_F_DYNALLOC 16
dev->features |= NETIF_F_DYNALLOC;
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);
@@ -1211,29 +1211,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);
@@ -1244,7 +1244,7 @@ int libertas_remove_card(wlan_private *p
adapter->surpriseremoved = 1;
kthread_stop(priv->main_thread);
- libertas_free_adapter(priv);
+ lbs_free_adapter(priv);
priv->dev = NULL;
free_netdev(dev);
@@ -1252,10 +1252,10 @@ int libertas_remove_card(wlan_private *p
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;
@@ -1263,19 +1263,19 @@ int libertas_start_card(wlan_private *pr
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);
@@ -1285,10 +1285,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;
@@ -1300,7 +1300,7 @@ int libertas_stop_card(wlan_private *pri
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);
@@ -1315,16 +1315,16 @@ int libertas_stop_card(wlan_private *pri
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;
@@ -1342,12 +1342,12 @@ int libertas_add_mesh(wlan_private *priv
SET_MODULE_OWNER(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));
@@ -1365,7 +1365,7 @@ int libertas_add_mesh(wlan_private *priv
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;
@@ -1383,10 +1383,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;
@@ -1400,7 +1400,7 @@ void libertas_remove_mesh(wlan_private *
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 ;
@@ -1409,7 +1409,7 @@ void libertas_remove_mesh(wlan_private *
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
@@ -1420,7 +1420,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;
@@ -1442,9 +1442,9 @@ struct chan_freq_power *libertas_get_reg
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;
@@ -1456,7 +1456,7 @@ int libertas_set_regiontable(wlan_privat
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;
@@ -1484,13 +1484,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++;
@@ -1506,35 +1506,35 @@ void libertas_interrupt(struct net_devic
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_device);
-static int libertas_init_module(void)
+static int lbs_init_module(void)
{
lbs_deb_enter(LBS_DEB_MAIN);
- libertas_debugfs_init();
+ lbs_debugfs_init();
lbs_deb_leave(LBS_DEB_MAIN);
return 0;
}
-static void libertas_exit_module(void)
+static void lbs_exit_module(void)
{
lbs_deb_enter(LBS_DEB_MAIN);
- libertas_debugfs_remove();
+ lbs_debugfs_remove();
lbs_deb_leave(LBS_DEB_MAIN);
}
@@ -1543,32 +1543,32 @@ static void libertas_exit_module(void)
* rtap interface support fuctions
*/
-static int libertas_rtap_open(struct net_device *dev)
+static int lbs_rtap_open(struct net_device *dev)
{
netif_carrier_off(dev);
netif_stop_queue(dev);
return 0;
}
-static int libertas_rtap_stop(struct net_device *dev)
+static int lbs_rtap_stop(struct net_device *dev)
{
return 0;
}
-static int libertas_rtap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static int lbs_rtap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
netif_stop_queue(dev);
return -EOPNOTSUPP;
}
-static struct net_device_stats *libertas_rtap_get_stats(struct net_device *dev)
+static struct net_device_stats *lbs_rtap_get_stats(struct net_device *dev)
{
- wlan_private *priv = dev->priv;
+ lbs_private *priv = dev->priv;
return &priv->ieee->stats;
}
-void libertas_remove_rtap(wlan_private *priv)
+void lbs_remove_rtap(lbs_private *priv)
{
if (priv->rtap_net_dev == NULL)
return;
@@ -1577,7 +1577,7 @@ void libertas_remove_rtap(wlan_private *
priv->rtap_net_dev = NULL;
}
-int libertas_add_rtap(wlan_private *priv)
+int lbs_add_rtap(lbs_private *priv)
{
int rc = 0;
@@ -1594,11 +1594,11 @@ int libertas_add_rtap(wlan_private *priv
strcpy(priv->rtap_net_dev->name, "rtap%d");
priv->rtap_net_dev->type = ARPHRD_IEEE80211_RADIOTAP;
- priv->rtap_net_dev->open = libertas_rtap_open;
- priv->rtap_net_dev->stop = libertas_rtap_stop;
- priv->rtap_net_dev->get_stats = libertas_rtap_get_stats;
- priv->rtap_net_dev->hard_start_xmit = libertas_rtap_hard_start_xmit;
- priv->rtap_net_dev->set_multicast_list = libertas_set_multicast_list;
+ priv->rtap_net_dev->open = lbs_rtap_open;
+ priv->rtap_net_dev->stop = lbs_rtap_stop;
+ priv->rtap_net_dev->get_stats = lbs_rtap_get_stats;
+ priv->rtap_net_dev->hard_start_xmit = lbs_rtap_hard_start_xmit;
+ priv->rtap_net_dev->set_multicast_list = lbs_set_multicast_list;
priv->rtap_net_dev->priv = priv;
priv->ieee->iw_mode = IW_MODE_MONITOR;
@@ -1614,8 +1614,8 @@ int libertas_add_rtap(wlan_private *priv
}
-module_init(libertas_init_module);
-module_exit(libertas_exit_module);
+module_init(lbs_init_module);
+module_exit(lbs_exit_module);
MODULE_DESCRIPTION("Libertas WLAN Driver Library");
MODULE_AUTHOR("Marvell International Ltd.");
Index: wireless-2.6/drivers/net/wireless/libertas/rx.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/rx.c 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/rx.c 2007-10-15 13:41:51.000000000 +0200
@@ -35,19 +35,19 @@ struct rx80211packethdr {
void *eth80211_hdr;
} __attribute__ ((packed));
-static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb);
+static int process_rxed_802_11_packet(lbs_private *priv, struct sk_buff *skb);
/**
* @brief This function computes the avgSNR .
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @return avgSNR
*/
-static u8 wlan_getavgsnr(wlan_private * priv)
+static u8 lbs_getavgsnr(lbs_private *priv)
{
u8 i;
u16 temp = 0;
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
if (adapter->numSNRNF == 0)
return 0;
for (i = 0; i < adapter->numSNRNF; i++)
@@ -59,14 +59,14 @@ static u8 wlan_getavgsnr(wlan_private *
/**
* @brief This function computes the AvgNF
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @return AvgNF
*/
-static u8 wlan_getavgnf(wlan_private * priv)
+static u8 lbs_getavgnf(lbs_private *priv)
{
u8 i;
u16 temp = 0;
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
if (adapter->numSNRNF == 0)
return 0;
for (i = 0; i < adapter->numSNRNF; i++)
@@ -78,13 +78,13 @@ static u8 wlan_getavgnf(wlan_private * p
/**
* @brief This function save the raw SNR/NF to our internel buffer
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @param prxpd A pointer to rxpd structure of received packet
* @return n/a
*/
-static void wlan_save_rawSNRNF(wlan_private * priv, struct rxpd *p_rx_pd)
+static void lbs_save_rawSNRNF(lbs_private *priv, struct rxpd *p_rx_pd)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
if (adapter->numSNRNF < DEFAULT_DATA_AVG_FACTOR)
adapter->numSNRNF++;
adapter->rawSNR[adapter->nextSNRNF] = p_rx_pd->snr;
@@ -98,13 +98,13 @@ static void wlan_save_rawSNRNF(wlan_priv
/**
* @brief This function computes the RSSI in received packet.
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @param prxpd A pointer to rxpd structure of received packet
* @return n/a
*/
-static void wlan_compute_rssi(wlan_private * priv, struct rxpd *p_rx_pd)
+static void lbs_compute_rssi(lbs_private *priv, struct rxpd *p_rx_pd)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_RX);
@@ -115,10 +115,10 @@ static void wlan_compute_rssi(wlan_priva
adapter->SNR[TYPE_RXPD][TYPE_NOAVG] = p_rx_pd->snr;
adapter->NF[TYPE_RXPD][TYPE_NOAVG] = p_rx_pd->nf;
- wlan_save_rawSNRNF(priv, p_rx_pd);
+ lbs_save_rawSNRNF(priv, p_rx_pd);
- adapter->SNR[TYPE_RXPD][TYPE_AVG] = wlan_getavgsnr(priv) * AVG_SCALE;
- adapter->NF[TYPE_RXPD][TYPE_AVG] = wlan_getavgnf(priv) * AVG_SCALE;
+ adapter->SNR[TYPE_RXPD][TYPE_AVG] = lbs_getavgsnr(priv) * AVG_SCALE;
+ adapter->NF[TYPE_RXPD][TYPE_AVG] = lbs_getavgnf(priv) * AVG_SCALE;
lbs_deb_rx("after computing SNR: SNR-avg = %d, NF-avg = %d\n",
adapter->SNR[TYPE_RXPD][TYPE_AVG] / AVG_SCALE,
adapter->NF[TYPE_RXPD][TYPE_AVG] / AVG_SCALE);
@@ -134,11 +134,11 @@ static void wlan_compute_rssi(wlan_priva
lbs_deb_leave(LBS_DEB_RX);
}
-void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb)
+void lbs_upload_rx_packet(lbs_private *priv, struct sk_buff *skb)
{
lbs_deb_rx("skb->data %p\n", skb->data);
- if (priv->adapter->monitormode != WLAN_MONITOR_OFF) {
+ if (priv->adapter->monitormode != LBS_MONITOR_OFF) {
skb->protocol = eth_type_trans(skb, priv->rtap_net_dev);
} else {
if (priv->mesh_dev && IS_MESH_FRAME(skb))
@@ -154,13 +154,13 @@ void libertas_upload_rx_packet(wlan_priv
* @brief This function processes received packet and forwards it
* to kernel/upper layer
*
- * @param priv A pointer to wlan_private
+ * @param priv A pointer to lbs_private
* @param skb A pointer to skb which includes the received packet
* @return 0 or -1
*/
-int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb)
+int lbs_process_rxed_packet(lbs_private *priv, struct sk_buff *skb)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
int ret = 0;
struct rxpackethdr *p_rx_pkt;
@@ -173,7 +173,7 @@ int libertas_process_rxed_packet(wlan_pr
lbs_deb_enter(LBS_DEB_RX);
- if (priv->adapter->monitormode != WLAN_MONITOR_OFF)
+ if (priv->adapter->monitormode != LBS_MONITOR_OFF)
return process_rxed_802_11_packet(priv, skb);
p_rx_pkt = (struct rxpackethdr *) skb->data;
@@ -258,22 +258,22 @@ int libertas_process_rxed_packet(wlan_pr
* only if the rate is auto
*/
if (adapter->auto_rate)
- adapter->cur_rate = libertas_fw_index_to_data_rate(p_rx_pd->rx_rate);
+ adapter->cur_rate = lbs_fw_index_to_data_rate(p_rx_pd->rx_rate);
- wlan_compute_rssi(priv, p_rx_pd);
+ lbs_compute_rssi(priv, p_rx_pd);
lbs_deb_rx("rx data: size of actual packet %d\n", skb->len);
priv->stats.rx_bytes += skb->len;
priv->stats.rx_packets++;
- libertas_upload_rx_packet(priv, skb);
+ lbs_upload_rx_packet(priv, skb);
ret = 0;
done:
lbs_deb_leave_args(LBS_DEB_RX, "ret %d", ret);
return ret;
}
-EXPORT_SYMBOL_GPL(libertas_process_rxed_packet);
+EXPORT_SYMBOL_GPL(lbs_process_rxed_packet);
/**
* @brief This function converts Tx/Rx rates from the Marvell WLAN format
@@ -319,13 +319,13 @@ static u8 convert_mv_rate_to_radiotap(u8
* @brief This function processes a received 802.11 packet and forwards it
* to kernel/upper layer
*
- * @param priv A pointer to wlan_private
+ * @param priv A pointer to lbs_private
* @param skb A pointer to skb which includes the received packet
* @return 0 or -1
*/
-static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb)
+static int process_rxed_802_11_packet(lbs_private *priv, struct sk_buff *skb)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
int ret = 0;
struct rx80211packethdr *p_rx_pkt;
@@ -359,7 +359,7 @@ static int process_rxed_802_11_packet(wl
skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd));
/* create the exported radio header */
- if(priv->adapter->monitormode == WLAN_MONITOR_OFF) {
+ if (priv->adapter->monitormode == LBS_MONITOR_OFF) {
/* no radio header */
/* chop the rxpd */
skb_pull(skb, sizeof(struct rxpd));
@@ -409,15 +409,15 @@ static int process_rxed_802_11_packet(wl
* only if the rate is auto
*/
if (adapter->auto_rate)
- adapter->cur_rate = libertas_fw_index_to_data_rate(prxpd->rx_rate);
+ adapter->cur_rate = lbs_fw_index_to_data_rate(prxpd->rx_rate);
- wlan_compute_rssi(priv, prxpd);
+ lbs_compute_rssi(priv, prxpd);
lbs_deb_rx("rx data: size of actual packet %d\n", skb->len);
priv->stats.rx_bytes += skb->len;
priv->stats.rx_packets++;
- libertas_upload_rx_packet(priv, skb);
+ lbs_upload_rx_packet(priv, skb);
ret = 0;
Index: wireless-2.6/drivers/net/wireless/libertas/scan.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/scan.c 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/scan.c 2007-10-15 13:41:51.000000000 +0200
@@ -39,8 +39,8 @@
//! Memory needed to store a max number/size SSID TLV for a firmware scan
#define SSID_TLV_MAX_SIZE (1 * sizeof(struct mrvlietypes_ssidparamset))
-//! Maximum memory needed for a wlan_scan_cmd_config with all TLVs at max
-#define MAX_SCAN_CFG_ALLOC (sizeof(struct wlan_scan_cmd_config) \
+//! Maximum memory needed for a lbs_scan_cmd_config with all TLVs at max
+#define MAX_SCAN_CFG_ALLOC (sizeof(struct lbs_scan_cmd_config) \
+ sizeof(struct mrvlietypes_numprobes) \
+ CHAN_TLV_MAX_SIZE \
+ SSID_TLV_MAX_SIZE)
@@ -80,7 +80,7 @@ static inline void clear_bss_descriptor
memset(bss, 0, offsetof(struct bss_descriptor, list));
}
-static inline int match_bss_no_security(struct wlan_802_11_security * secinfo,
+static inline int match_bss_no_security(struct lbs_802_11_security *secinfo,
struct bss_descriptor * match_bss)
{
if ( !secinfo->wep_enabled
@@ -94,7 +94,7 @@ static inline int match_bss_no_security(
return 0;
}
-static inline int match_bss_static_wep(struct wlan_802_11_security * secinfo,
+static inline int match_bss_static_wep(struct lbs_802_11_security *secinfo,
struct bss_descriptor * match_bss)
{
if ( secinfo->wep_enabled
@@ -106,7 +106,7 @@ static inline int match_bss_static_wep(s
return 0;
}
-static inline int match_bss_wpa(struct wlan_802_11_security * secinfo,
+static inline int match_bss_wpa(struct lbs_802_11_security *secinfo,
struct bss_descriptor * match_bss)
{
if ( !secinfo->wep_enabled
@@ -121,7 +121,7 @@ static inline int match_bss_wpa(struct w
return 0;
}
-static inline int match_bss_wpa2(struct wlan_802_11_security * secinfo,
+static inline int match_bss_wpa2(struct lbs_802_11_security *secinfo,
struct bss_descriptor * match_bss)
{
if ( !secinfo->wep_enabled
@@ -136,7 +136,7 @@ static inline int match_bss_wpa2(struct
return 0;
}
-static inline int match_bss_dynamic_wep(struct wlan_802_11_security * secinfo,
+static inline int match_bss_dynamic_wep(struct lbs_802_11_security *secinfo,
struct bss_descriptor * match_bss)
{
if ( !secinfo->wep_enabled
@@ -163,13 +163,13 @@ static inline int match_bss_dynamic_wep(
* 0 0 0 0 !=NONE 1 0 0 yes Dynamic WEP
*
*
- * @param adapter A pointer to wlan_adapter
+ * @param adapter A pointer to lbs_adapter
* @param index Index in scantable to check against current driver settings
* @param mode Network mode: Infrastructure or IBSS
*
* @return Index in scantable, or error code if negative
*/
-static int is_network_compatible(wlan_adapter * adapter,
+static int is_network_compatible(lbs_adapter *adapter,
struct bss_descriptor * bss, u8 mode)
{
int matched = 0;
@@ -235,7 +235,7 @@ done:
*
* @return 0--ssid is same, otherwise is different
*/
-int libertas_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len)
+int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len)
{
if (ssid1_len != ssid2_len)
return -1;
@@ -256,13 +256,13 @@ int libertas_ssid_cmp(u8 *ssid1, u8 ssid
/**
* @brief Create a channel list for the driver to scan based on region info
*
- * Only used from wlan_scan_setup_scan_config()
+ * Only used from lbs_scan_setup_scan_config()
*
* Use the driver region/band information to construct a comprehensive list
* of channels to scan. This routine is used for any scan that is not
* provided a specific channel list to scan.
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @param scanchanlist Output parameter: resulting channel list to scan
* @param filteredscan Flag indicating whether or not a BSSID or SSID filter
* is being sent in the command to firmware. Used to
@@ -272,12 +272,12 @@ int libertas_ssid_cmp(u8 *ssid1, u8 ssid
*
* @return void
*/
-static void wlan_scan_create_channel_list(wlan_private * priv,
+static void lbs_scan_create_channel_list(lbs_private *priv,
struct chanscanparamset * scanchanlist,
u8 filteredscan)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
struct region_channel *scanregion;
struct chan_freq_power *cfp;
int rgnidx;
@@ -297,7 +297,7 @@ static void wlan_scan_create_channel_lis
for (rgnidx = 0; rgnidx < ARRAY_SIZE(adapter->region_channel); rgnidx++) {
if (priv->adapter->enable11d &&
- adapter->connect_status != LIBERTAS_CONNECTED) {
+ adapter->connect_status != LBS_CONNECTED) {
/* Scan all the supported chan for the first scan */
if (!adapter->universal_channel[rgnidx].valid)
continue;
@@ -319,7 +319,7 @@ static void wlan_scan_create_channel_lis
if (priv->adapter->enable11d) {
scantype =
- libertas_get_scan_type_11d(cfp->channel,
+ lbs_get_scan_type_11d(cfp->channel,
&adapter->
parsed_region_chan);
}
@@ -357,24 +357,24 @@ static void wlan_scan_create_channel_lis
/* Delayed partial scan worker */
-void libertas_scan_worker(struct work_struct *work)
+void lbs_scan_worker(struct work_struct *work)
{
- wlan_private *priv = container_of(work, wlan_private, scan_work.work);
+ lbs_private *priv = container_of(work, lbs_private, scan_work.work);
- wlan_scan_networks(priv, NULL, 0);
+ lbs_scan_networks(priv, NULL, 0);
}
/**
- * @brief Construct a wlan_scan_cmd_config structure to use in issue scan cmds
+ * @brief Construct a lbs_scan_cmd_config structure to use in issue scan cmds
*
- * Application layer or other functions can invoke wlan_scan_networks
- * with a scan configuration supplied in a wlan_ioctl_user_scan_cfg struct.
- * This structure is used as the basis of one or many wlan_scan_cmd_config
+ * Application layer or other functions can invoke lbs_scan_networks
+ * with a scan configuration supplied in a lbs_ioctl_user_scan_cfg struct.
+ * This structure is used as the basis of one or many lbs_scan_cmd_config
* commands that are sent to the command processing module and sent to
* firmware.
*
- * Create a wlan_scan_cmd_config based on the following user supplied
+ * Create a lbs_scan_cmd_config based on the following user supplied
* parameters (if present):
* - SSID filter
* - BSSID filter
@@ -385,7 +385,7 @@ void libertas_scan_worker(struct work_st
* If the number of probes is not set, use the adapter default setting
* Qualify the channel
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @param puserscanin NULL or pointer to scan configuration parameters
* @param ppchantlvout Output parameter: Pointer to the start of the
* channel TLV portion of the output scan config
@@ -403,9 +403,9 @@ void libertas_scan_worker(struct work_st
*
* @return resulting scan configuration
*/
-static struct wlan_scan_cmd_config *
-wlan_scan_setup_scan_config(wlan_private * priv,
- const struct wlan_ioctl_user_scan_cfg * puserscanin,
+static struct lbs_scan_cmd_config *
+lbs_scan_setup_scan_config(lbs_private *priv,
+ const struct lbs_ioctl_user_scan_cfg *puserscanin,
struct mrvlietypes_chanlistparamset ** ppchantlvout,
struct chanscanparamset * pscanchanlist,
int *pmaxchanperscan,
@@ -414,7 +414,7 @@ wlan_scan_setup_scan_config(wlan_private
{
struct mrvlietypes_numprobes *pnumprobestlv;
struct mrvlietypes_ssidparamset *pssidtlv;
- struct wlan_scan_cmd_config * pscancfgout = NULL;
+ struct lbs_scan_cmd_config *pscancfgout = NULL;
u8 *ptlvpos;
u16 numprobes;
int chanidx;
@@ -523,13 +523,13 @@ wlan_scan_setup_scan_config(wlan_private
if (!puserscanin || !puserscanin->chanlist[0].channumber) {
/* Create a default channel scan list */
lbs_deb_scan("creating full region channel list\n");
- wlan_scan_create_channel_list(priv, pscanchanlist,
+ lbs_scan_create_channel_list(priv, pscanchanlist,
*pfilteredscan);
goto out;
}
for (chanidx = 0;
- chanidx < WLAN_IOCTL_USER_SCAN_CHAN_MAX
+ chanidx < LBS_IOCTL_USER_SCAN_CHAN_MAX
&& puserscanin->chanlist[chanidx].channumber; chanidx++) {
channel = puserscanin->chanlist[chanidx].channumber;
@@ -579,14 +579,14 @@ out:
/**
* @brief Construct and send multiple scan config commands to the firmware
*
- * Only used from wlan_scan_networks()
+ * Only used from lbs_scan_networks()
*
- * Previous routines have created a wlan_scan_cmd_config with any requested
+ * Previous routines have created a lbs_scan_cmd_config with any requested
* TLVs. This function splits the channel TLV into maxchanperscan lists
* and sends the portion of the channel TLV along with the other TLVs
- * to the wlan_cmd routines for execution in the firmware.
+ * to the lbs_cmd routines for execution in the firmware.
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @param maxchanperscan Maximum number channels to be included in each
* scan command sent to firmware
* @param filteredscan Flag indicating whether or not a BSSID or SSID
@@ -600,13 +600,13 @@ out:
*
* @return 0 or error return otherwise
*/
-static int wlan_scan_channel_list(wlan_private * priv,
+static int lbs_scan_channel_list(lbs_private *priv,
int maxchanperscan,
u8 filteredscan,
- struct wlan_scan_cmd_config * pscancfgout,
+ struct lbs_scan_cmd_config *pscancfgout,
struct mrvlietypes_chanlistparamset * pchantlvout,
struct chanscanparamset * pscanchanlist,
- const struct wlan_ioctl_user_scan_cfg * puserscanin,
+ const struct lbs_ioctl_user_scan_cfg *puserscanin,
int full_scan)
{
struct chanscanparamset *ptmpchan;
@@ -720,7 +720,7 @@ static int wlan_scan_channel_list(wlan_p
}
/* Send the scan command to the firmware with the specified cfg */
- ret = libertas_prepare_and_send_command(priv, CMD_802_11_SCAN, 0,
+ ret = lbs_prepare_and_send_command(priv, CMD_802_11_SCAN, 0,
0, 0, pscancfgout);
if (scanned >= 2 && !full_scan) {
ret = 0;
@@ -751,10 +751,10 @@ out:
}
/*
- * Only used from wlan_scan_networks()
+ * Only used from lbs_scan_networks()
*/
-static void clear_selected_scan_list_entries(wlan_adapter *adapter,
- const struct wlan_ioctl_user_scan_cfg *scan_cfg)
+static void clear_selected_scan_list_entries(lbs_adapter *adapter,
+ const struct lbs_ioctl_user_scan_cfg *scan_cfg)
{
struct bss_descriptor *bss;
struct bss_descriptor *safe;
@@ -812,21 +812,21 @@ out:
* order to send the appropriate scan commands to firmware to populate or
* update the internal driver scan table
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @param puserscanin Pointer to the input configuration for the requested
* scan.
* @param full_scan ???
*
* @return 0 or < 0 if error
*/
-int wlan_scan_networks(wlan_private * priv,
- const struct wlan_ioctl_user_scan_cfg * puserscanin,
+int lbs_scan_networks(lbs_private *priv,
+ const struct lbs_ioctl_user_scan_cfg *puserscanin,
int full_scan)
{
- wlan_adapter * adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
struct mrvlietypes_chanlistparamset *pchantlvout;
struct chanscanparamset * scan_chan_list = NULL;
- struct wlan_scan_cmd_config * scan_cfg = NULL;
+ struct lbs_scan_cmd_config *scan_cfg = NULL;
u8 filteredscan;
u8 scancurrentchanonly;
int maxchanperscan;
@@ -845,13 +845,13 @@ int wlan_scan_networks(wlan_private * pr
cancel_delayed_work(&priv->scan_work);
scan_chan_list = kzalloc(sizeof(struct chanscanparamset) *
- WLAN_IOCTL_USER_SCAN_CHAN_MAX, GFP_KERNEL);
+ LBS_IOCTL_USER_SCAN_CHAN_MAX, GFP_KERNEL);
if (scan_chan_list == NULL) {
ret = -ENOMEM;
goto out;
}
- scan_cfg = wlan_scan_setup_scan_config(priv,
+ scan_cfg = lbs_scan_setup_scan_config(priv,
puserscanin,
&pchantlvout,
scan_chan_list,
@@ -875,7 +875,7 @@ int wlan_scan_networks(wlan_private * pr
}
}
- ret = wlan_scan_channel_list(priv,
+ ret = lbs_scan_channel_list(priv,
maxchanperscan,
filteredscan,
scan_cfg,
@@ -896,7 +896,7 @@ int wlan_scan_networks(wlan_private * pr
mutex_unlock(&adapter->lock);
#endif
- if (priv->adapter->connect_status == LIBERTAS_CONNECTED) {
+ if (priv->adapter->connect_status == LBS_CONNECTED) {
netif_carrier_on(priv->dev);
netif_wake_queue(priv->dev);
if (priv->mesh_dev) {
@@ -927,7 +927,7 @@ out:
*
* @return 0 or -1
*/
-static int libertas_process_bss(struct bss_descriptor * bss,
+static int lbs_process_bss(struct bss_descriptor *bss,
u8 ** pbeaconinfo, int *bytesleft)
{
struct ieeetypes_fhparamset *pFH;
@@ -1137,7 +1137,7 @@ static int libertas_process_bss(struct b
/* Timestamp */
bss->last_scanned = jiffies;
- libertas_unset_basic_rate_flags(bss->rates, sizeof(bss->rates));
+ lbs_unset_basic_rate_flags(bss->rates, sizeof(bss->rates));
ret = 0;
@@ -1151,13 +1151,13 @@ done:
*
* Used in association code
*
- * @param adapter A pointer to wlan_adapter
+ * @param adapter A pointer to lbs_adapter
* @param bssid BSSID to find in the scan list
* @param mode Network mode: Infrastructure or IBSS
*
* @return index in BSSID list, or error return code (< 0)
*/
-struct bss_descriptor *libertas_find_bssid_in_list(wlan_adapter * adapter,
+struct bss_descriptor *lbs_find_bssid_in_list(lbs_adapter *adapter,
u8 * bssid, u8 mode)
{
struct bss_descriptor * iter_bss;
@@ -1203,14 +1203,14 @@ out:
*
* Used in association code
*
- * @param adapter A pointer to wlan_adapter
+ * @param adapter A pointer to lbs_adapter
* @param ssid SSID to find in the list
* @param bssid BSSID to qualify the SSID selection (if provided)
* @param mode Network mode: Infrastructure or IBSS
*
* @return index in BSSID list
*/
-struct bss_descriptor * libertas_find_ssid_in_list(wlan_adapter * adapter,
+struct bss_descriptor *lbs_find_ssid_in_list(lbs_adapter *adapter,
u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode,
int channel)
{
@@ -1228,7 +1228,7 @@ struct bss_descriptor * libertas_find_ss
|| (iter_bss->last_scanned < tmp_oldest->last_scanned))
tmp_oldest = iter_bss;
- if (libertas_ssid_cmp(iter_bss->ssid, iter_bss->ssid_len,
+ if (lbs_ssid_cmp(iter_bss->ssid, iter_bss->ssid_len,
ssid, ssid_len) != 0)
continue; /* ssid doesn't match */
if (bssid && compare_ether_addr(iter_bss->bssid, bssid) != 0)
@@ -1275,11 +1275,11 @@ out:
* Search the scan table for the best SSID that also matches the current
* adapter network preference (infrastructure or adhoc)
*
- * @param adapter A pointer to wlan_adapter
+ * @param adapter A pointer to lbs_adapter
*
* @return index in BSSID list
*/
-static struct bss_descriptor * libertas_find_best_ssid_in_list(wlan_adapter * adapter,
+static struct bss_descriptor *lbs_find_best_ssid_in_list(lbs_adapter *adapter,
u8 mode)
{
u8 bestrssi = 0;
@@ -1321,27 +1321,27 @@ static struct bss_descriptor * libertas_
*
* Used from association worker.
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @param pSSID A pointer to AP's ssid
*
* @return 0--success, otherwise--fail
*/
-int libertas_find_best_network_ssid(wlan_private * priv,
+int lbs_find_best_network_ssid(lbs_private *priv,
u8 *out_ssid, u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
int ret = -1;
struct bss_descriptor * found;
lbs_deb_enter(LBS_DEB_SCAN);
- wlan_scan_networks(priv, NULL, 1);
+ lbs_scan_networks(priv, NULL, 1);
if (adapter->surpriseremoved)
goto out;
wait_event_interruptible(adapter->cmd_pending, !adapter->nr_cmd_pending);
- found = libertas_find_best_ssid_in_list(adapter, preferred_mode);
+ found = lbs_find_best_ssid_in_list(adapter, preferred_mode);
if (found && (found->ssid_len > 0)) {
memcpy(out_ssid, &found->ssid, IW_ESSID_MAX_SIZE);
*out_ssid_len = found->ssid_len;
@@ -1364,11 +1364,11 @@ out:
*
* @return 0 --success, otherwise fail
*/
-int libertas_set_scan(struct net_device *dev, struct iw_request_info *info,
+int lbs_set_scan(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_SCAN);
@@ -1390,7 +1390,7 @@ int libertas_set_scan(struct net_device
*
* Used in association code and from debugfs
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @param ssid A pointer to the SSID to scan for
* @param ssid_len Length of the SSID
* @param clear_ssid Should existing scan results with this SSID
@@ -1400,11 +1400,11 @@ int libertas_set_scan(struct net_device
*
* @return 0-success, otherwise fail
*/
-int libertas_send_specific_ssid_scan(wlan_private * priv,
+int lbs_send_specific_ssid_scan(lbs_private *priv,
u8 *ssid, u8 ssid_len, u8 clear_ssid)
{
- wlan_adapter *adapter = priv->adapter;
- struct wlan_ioctl_user_scan_cfg scancfg;
+ lbs_adapter *adapter = priv->adapter;
+ struct lbs_ioctl_user_scan_cfg scancfg;
int ret = 0;
lbs_deb_enter_args(LBS_DEB_SCAN, "SSID '%s', clear %d",
@@ -1418,7 +1418,7 @@ int libertas_send_specific_ssid_scan(wla
scancfg.ssid_len = ssid_len;
scancfg.clear_ssid = clear_ssid;
- wlan_scan_networks(priv, &scancfg, 1);
+ lbs_scan_networks(priv, &scancfg, 1);
if (adapter->surpriseremoved) {
ret = -1;
goto out;
@@ -1441,11 +1441,11 @@ out:
#define MAX_CUSTOM_LEN 64
-static inline char *libertas_translate_scan(wlan_private *priv,
+static inline char *lbs_translate_scan(lbs_private *priv,
char *start, char *stop,
struct bss_descriptor *bss)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
struct chan_freq_power *cfp;
char *current_val; /* For rates */
struct iw_event iwe; /* Temporary buffer */
@@ -1457,7 +1457,7 @@ static inline char *libertas_translate_s
lbs_deb_enter(LBS_DEB_SCAN);
- cfp = libertas_find_cfp_by_band_and_channel(adapter, 0, bss->channel);
+ cfp = lbs_find_cfp_by_band_and_channel(adapter, 0, bss->channel);
if (!cfp) {
lbs_deb_scan("Invalid channel number %d\n", bss->channel);
start = NULL;
@@ -1513,7 +1513,7 @@ static inline char *libertas_translate_s
*/
if ((adapter->mode == IW_MODE_ADHOC)
&& adapter->adhoccreate
- && !libertas_ssid_cmp(adapter->curbssparams.ssid,
+ && !lbs_ssid_cmp(adapter->curbssparams.ssid,
adapter->curbssparams.ssid_len,
bss->ssid, bss->ssid_len)) {
int snr, nf;
@@ -1547,7 +1547,7 @@ static inline char *libertas_translate_s
stop, &iwe, IW_EV_PARAM_LEN);
}
if ((bss->mode == IW_MODE_ADHOC)
- && !libertas_ssid_cmp(adapter->curbssparams.ssid,
+ && !lbs_ssid_cmp(adapter->curbssparams.ssid,
adapter->curbssparams.ssid_len,
bss->ssid, bss->ssid_len)
&& adapter->adhoccreate) {
@@ -1604,12 +1604,12 @@ out:
*
* @return 0 --success, otherwise fail
*/
-int libertas_get_scan(struct net_device *dev, struct iw_request_info *info,
+int lbs_get_scan(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
#define SCAN_ITEM_SIZE 128
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
int err = 0;
char *ev = extra;
char *stop = ev + dwrq->length;
@@ -1620,7 +1620,7 @@ int libertas_get_scan(struct net_device
/* Update RSSI if current BSS is a locally created ad-hoc BSS */
if ((adapter->mode == IW_MODE_ADHOC) && adapter->adhoccreate) {
- libertas_prepare_and_send_command(priv, CMD_802_11_RSSI, 0,
+ lbs_prepare_and_send_command(priv, CMD_802_11_RSSI, 0,
CMD_OPTION_WAITFORRSP, 0, NULL);
}
@@ -1648,7 +1648,7 @@ int libertas_get_scan(struct net_device
}
/* Translate to WE format this entry */
- next_ev = libertas_translate_scan(priv, ev, stop, iter_bss);
+ next_ev = lbs_translate_scan(priv, ev, stop, iter_bss);
if (next_ev == NULL)
continue;
ev = next_ev;
@@ -1675,24 +1675,24 @@ int libertas_get_scan(struct net_device
/**
* @brief Prepare a scan command to be sent to the firmware
*
- * Called from libertas_prepare_and_send_command() in cmd.c
+ * Called from lbs_prepare_and_send_command() in cmd.c
*
* Sends a fixed lenght data part (specifying the BSS type and BSSID filters)
* as well as a variable number/length of TLVs to the firmware.
*
- * @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 to be sent to
* firmware with the cmd_DS_801_11_SCAN structure
- * @param pdata_buf Void pointer cast of a wlan_scan_cmd_config struct used
+ * @param pdata_buf Void pointer cast of a lbs_scan_cmd_config struct used
* to set the fields/TLVs for the command sent to firmware
*
* @return 0 or -1
*/
-int libertas_cmd_80211_scan(wlan_private * priv,
+int lbs_cmd_80211_scan(lbs_private *priv,
struct cmd_ds_command *cmd, void *pdata_buf)
{
struct cmd_ds_802_11_scan *pscan = &cmd->params.scan;
- struct wlan_scan_cmd_config *pscancfg = pdata_buf;
+ struct lbs_scan_cmd_config *pscancfg = pdata_buf;
lbs_deb_enter(LBS_DEB_SCAN);
@@ -1748,14 +1748,14 @@ static inline int is_same_network(struct
* | bufsize and sizeof the fixed fields above) |
* .-----------------------------------------------------------.
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @param resp A pointer to cmd_ds_command
*
* @return 0 or -1
*/
-int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp)
+int lbs_ret_80211_scan(lbs_private *priv, struct cmd_ds_command *resp)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_scan_rsp *pscan;
struct bss_descriptor * iter_bss;
struct bss_descriptor * safe;
@@ -1818,7 +1818,7 @@ int libertas_ret_80211_scan(wlan_private
/* Process the data fields and IEs returned for this BSS */
memset(&new, 0, sizeof (struct bss_descriptor));
- if (libertas_process_bss(&new, &pbssinfo, &bytesleft) != 0) {
+ if (lbs_process_bss(&new, &pbssinfo, &bytesleft) != 0) {
/* error parsing the scan response, skipped */
lbs_deb_scan("SCAN_RESP: process_bss returned ERROR\n");
continue;
Index: wireless-2.6/drivers/net/wireless/libertas/scan.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/scan.h 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/scan.h 2007-10-15 13:41:51.000000000 +0200
@@ -2,10 +2,10 @@
* Interface for the wlan network scan routines
*
* Driver interface functions and type declarations for the scan module
- * implemented in wlan_scan.c.
+ * implemented in scan.c.
*/
-#ifndef _WLAN_SCAN_H
-#define _WLAN_SCAN_H
+#ifndef _LBS_SCAN_H
+#define _LBS_SCAN_H
#include <net/ieee80211.h>
#include "hostcmd.h"
@@ -13,38 +13,38 @@
/**
* @brief Maximum number of channels that can be sent in a setuserscan ioctl
*
- * @sa wlan_ioctl_user_scan_cfg
+ * @sa lbs_ioctl_user_scan_cfg
*/
-#define WLAN_IOCTL_USER_SCAN_CHAN_MAX 50
+#define LBS_IOCTL_USER_SCAN_CHAN_MAX 50
-//! Infrastructure BSS scan type in wlan_scan_cmd_config
-#define WLAN_SCAN_BSS_TYPE_BSS 1
+//! Infrastructure BSS scan type in lbs_scan_cmd_config
+#define LBS_SCAN_BSS_TYPE_BSS 1
-//! Adhoc BSS scan type in wlan_scan_cmd_config
-#define WLAN_SCAN_BSS_TYPE_IBSS 2
+//! Adhoc BSS scan type in lbs_scan_cmd_config
+#define LBS_SCAN_BSS_TYPE_IBSS 2
-//! Adhoc or Infrastructure BSS scan type in wlan_scan_cmd_config, no filter
-#define WLAN_SCAN_BSS_TYPE_ANY 3
+//! Adhoc or Infrastructure BSS scan type in lbs_scan_cmd_config, no filter
+#define LBS_SCAN_BSS_TYPE_ANY 3
/**
* @brief Structure used internally in the wlan driver to configure a scan.
*
* Sent to the command processing module to configure the firmware
- * scan command prepared by libertas_cmd_80211_scan.
+ * scan command prepared by lbs_cmd_80211_scan.
*
- * @sa wlan_scan_networks
+ * @sa lbs_scan_networks
*
*/
-struct wlan_scan_cmd_config {
+struct lbs_scan_cmd_config {
/**
* @brief BSS type to be sent in the firmware command
*
* Field can be used to restrict the types of networks returned in the
* scan. valid settings are:
*
- * - WLAN_SCAN_BSS_TYPE_BSS (infrastructure)
- * - WLAN_SCAN_BSS_TYPE_IBSS (adhoc)
- * - WLAN_SCAN_BSS_TYPE_ANY (unrestricted, adhoc and infrastructure)
+ * - LBS_SCAN_BSS_TYPE_BSS (infrastructure)
+ * - LBS_SCAN_BSS_TYPE_IBSS (adhoc)
+ * - LBS_SCAN_BSS_TYPE_ANY (unrestricted, adhoc and infrastructure)
*/
u8 bsstype;
@@ -68,12 +68,12 @@ struct wlan_scan_cmd_config {
};
/**
- * @brief IOCTL channel sub-structure sent in wlan_ioctl_user_scan_cfg
+ * @brief IOCTL channel sub-structure sent in lbs_ioctl_user_scan_cfg
*
* Multiple instances of this structure are included in the IOCTL command
* to configure a instance of a scan on the specific channel.
*/
-struct wlan_ioctl_user_scan_chan {
+struct lbs_ioctl_user_scan_chan {
u8 channumber; //!< channel Number to scan
u8 radiotype; //!< Radio type: 'B/G' band = 0, 'A' band = 1
u8 scantype; //!< Scan type: Active = 0, Passive = 1
@@ -83,23 +83,23 @@ struct wlan_ioctl_user_scan_chan {
/**
* @brief IOCTL input structure to configure an immediate scan cmd to firmware
*
- * Used in the setuserscan (WLAN_SET_USER_SCAN) private ioctl. Specifies
+ * Used in the setuserscan (LBS_SET_USER_SCAN) private ioctl. Specifies
* a number of parameters to be used in general for the scan as well
- * as a channel list (wlan_ioctl_user_scan_chan) for each scan period
+ * as a channel list (lbs_ioctl_user_scan_chan) for each scan period
* desired.
*
- * @sa libertas_set_user_scan_ioctl
+ * @sa lbs_set_user_scan_ioctl
*/
-struct wlan_ioctl_user_scan_cfg {
+struct lbs_ioctl_user_scan_cfg {
/**
* @brief BSS type to be sent in the firmware command
*
* Field can be used to restrict the types of networks returned in the
* scan. valid settings are:
*
- * - WLAN_SCAN_BSS_TYPE_BSS (infrastructure)
- * - WLAN_SCAN_BSS_TYPE_IBSS (adhoc)
- * - WLAN_SCAN_BSS_TYPE_ANY (unrestricted, adhoc and infrastructure)
+ * - LBS_SCAN_BSS_TYPE_BSS (infrastructure)
+ * - LBS_SCAN_BSS_TYPE_IBSS (adhoc)
+ * - LBS_SCAN_BSS_TYPE_ANY (unrestricted, adhoc and infrastructure)
*/
u8 bsstype;
@@ -128,7 +128,7 @@ struct wlan_ioctl_user_scan_cfg {
/**
* @brief Variable number (fixed maximum) of channels to scan up
*/
- struct wlan_ioctl_user_scan_chan chanlist[WLAN_IOCTL_USER_SCAN_CHAN_MAX];
+ struct lbs_ioctl_user_scan_chan chanlist[LBS_IOCTL_USER_SCAN_CHAN_MAX];
};
/**
@@ -174,30 +174,30 @@ struct bss_descriptor {
struct list_head list;
};
-int libertas_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len);
+int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len);
-struct bss_descriptor * libertas_find_ssid_in_list(wlan_adapter * adapter,
- u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode,
- int channel);
+struct bss_descriptor *lbs_find_ssid_in_list(lbs_adapter *adapter,
+ u8 *ssid, u8 ssid_len, u8 *bssid, u8 mode,
+ int channel);
-struct bss_descriptor * libertas_find_bssid_in_list(wlan_adapter * adapter,
- u8 * bssid, u8 mode);
+struct bss_descriptor *lbs_find_bssid_in_list(lbs_adapter *adapter,
+ u8 *bssid, u8 mode);
-int libertas_find_best_network_ssid(wlan_private * priv, u8 *out_ssid,
+int lbs_find_best_network_ssid(lbs_private *priv, u8 *out_ssid,
u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode);
-int libertas_send_specific_ssid_scan(wlan_private * priv, u8 *ssid,
+int lbs_send_specific_ssid_scan(lbs_private *priv, u8 *ssid,
u8 ssid_len, u8 clear_ssid);
-int libertas_cmd_80211_scan(wlan_private * priv,
+int lbs_cmd_80211_scan(lbs_private *priv,
struct cmd_ds_command *cmd,
void *pdata_buf);
-int libertas_ret_80211_scan(wlan_private * priv,
+int lbs_ret_80211_scan(lbs_private *priv,
struct cmd_ds_command *resp);
-int wlan_scan_networks(wlan_private * priv,
- const struct wlan_ioctl_user_scan_cfg * puserscanin,
+int lbs_scan_networks(lbs_private *priv,
+ const struct lbs_ioctl_user_scan_cfg *puserscanin,
int full_scan);
struct ifreq;
@@ -205,11 +205,11 @@ struct ifreq;
struct iw_point;
struct iw_param;
struct iw_request_info;
-int libertas_get_scan(struct net_device *dev, struct iw_request_info *info,
+int lbs_get_scan(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra);
-int libertas_set_scan(struct net_device *dev, struct iw_request_info *info,
+int lbs_set_scan(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra);
-void libertas_scan_worker(struct work_struct *work);
+void lbs_scan_worker(struct work_struct *work);
-#endif /* _WLAN_SCAN_H */
+#endif
Index: wireless-2.6/drivers/net/wireless/libertas/tx.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/tx.c 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/tx.c 2007-10-15 13:41:51.000000000 +0200
@@ -52,11 +52,11 @@ static u32 convert_radiotap_rate_to_mv(u
* @brief This function processes a single packet and sends
* to IF layer
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @param skb A pointer to skb which includes TX packet
* @return 0 or -1
*/
-static int SendSinglePacket(wlan_private * priv, struct sk_buff *skb)
+static int SendSinglePacket(lbs_private *priv, struct sk_buff *skb)
{
int ret = 0;
struct txpd localtxpd;
@@ -86,7 +86,7 @@ static int SendSinglePacket(wlan_private
plocaltxpd->tx_packet_location = cpu_to_le32(sizeof(struct txpd));
p802x_hdr = skb->data;
- if (priv->adapter->monitormode != WLAN_MONITOR_OFF) {
+ if (priv->adapter->monitormode != LBS_MONITOR_OFF) {
/* locate radiotap header */
pradiotap_hdr = (struct tx_radiotap_hdr *)skb->data;
@@ -106,7 +106,7 @@ static int SendSinglePacket(wlan_private
}
/* copy destination address from 802.3 or 802.11 header */
- if (priv->adapter->monitormode != WLAN_MONITOR_OFF)
+ if (priv->adapter->monitormode != LBS_MONITOR_OFF)
memcpy(plocaltxpd->tx_dest_addr_high, p802x_hdr + 4, ETH_ALEN);
else
memcpy(plocaltxpd->tx_dest_addr_high, p802x_hdr, ETH_ALEN);
@@ -144,7 +144,7 @@ done:
priv->stats.tx_errors++;
}
- if (!ret && priv->adapter->monitormode != WLAN_MONITOR_OFF) {
+ if (!ret && priv->adapter->monitormode != LBS_MONITOR_OFF) {
/* Keep the skb to echo it back once Tx feedback is
received from FW */
skb_orphan(skb);
@@ -164,9 +164,9 @@ done:
}
-void libertas_tx_runqueue(wlan_private *priv)
+void lbs_tx_runqueue(lbs_private *priv)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
int i;
spin_lock(&adapter->txqueue_lock);
@@ -180,9 +180,9 @@ void libertas_tx_runqueue(wlan_private *
spin_unlock(&adapter->txqueue_lock);
}
-static void wlan_tx_queue(wlan_private *priv, struct sk_buff *skb)
+static void lbs_tx_queue(lbs_private *priv, struct sk_buff *skb)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
spin_lock(&adapter->txqueue_lock);
@@ -205,10 +205,10 @@ static void wlan_tx_queue(wlan_private *
* @brief This function checks the conditions and sends packet to IF
* layer if everything is ok.
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @return n/a
*/
-int libertas_process_tx(wlan_private * priv, struct sk_buff *skb)
+int lbs_process_tx(lbs_private *priv, struct sk_buff *skb)
{
int ret = -1;
@@ -223,7 +223,7 @@ int libertas_process_tx(wlan_private * p
if ((priv->adapter->psstate == PS_STATE_SLEEP) ||
(priv->adapter->psstate == PS_STATE_PRE_SLEEP)) {
- wlan_tx_queue(priv, skb);
+ lbs_tx_queue(priv, skb);
return ret;
}
@@ -239,20 +239,20 @@ done:
* @brief This function sends to the host the last transmitted packet,
* filling the radiotap headers with transmission information.
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @param status A 32 bit value containing transmission status.
*
* @returns void
*/
-void libertas_send_tx_feedback(wlan_private * priv)
+void lbs_send_tx_feedback(lbs_private *priv)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
struct tx_radiotap_hdr *radiotap_hdr;
u32 status = adapter->eventcause;
int txfail;
int try_count;
- if (adapter->monitormode == WLAN_MONITOR_OFF ||
+ if (adapter->monitormode == LBS_MONITOR_OFF ||
adapter->currenttxskb == NULL)
return;
@@ -270,13 +270,13 @@ void libertas_send_tx_feedback(wlan_priv
try_count = (status >> 16) & 0xff;
radiotap_hdr->data_retries = (try_count) ?
(1 + adapter->txretrycount - try_count) : 0;
- libertas_upload_rx_packet(priv, adapter->currenttxskb);
+ lbs_upload_rx_packet(priv, adapter->currenttxskb);
adapter->currenttxskb = NULL;
priv->adapter->TxLockFlag = 0;
- if (priv->adapter->connect_status == LIBERTAS_CONNECTED) {
+ if (priv->adapter->connect_status == LBS_CONNECTED) {
netif_wake_queue(priv->dev);
if (priv->mesh_dev)
netif_wake_queue(priv->mesh_dev);
}
}
-EXPORT_SYMBOL_GPL(libertas_send_tx_feedback);
+EXPORT_SYMBOL_GPL(lbs_send_tx_feedback);
Index: wireless-2.6/drivers/net/wireless/libertas/wext.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/wext.c 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/wext.c 2007-10-15 13:41:51.000000000 +0200
@@ -21,7 +21,7 @@
#include "assoc.h"
-static inline void libertas_postpone_association_work(wlan_private *priv)
+static inline void lbs_postpone_association_work(lbs_private *priv)
{
if (priv->adapter->surpriseremoved)
return;
@@ -29,7 +29,7 @@ static inline void libertas_postpone_ass
queue_delayed_work(priv->work_thread, &priv->assoc_work, HZ / 2);
}
-static inline void libertas_cancel_association_work(wlan_private *priv)
+static inline void lbs_cancel_association_work(lbs_private *priv)
{
cancel_delayed_work(&priv->assoc_work);
if (priv->adapter->pending_assoc_req) {
@@ -42,12 +42,12 @@ static inline void libertas_cancel_assoc
/**
* @brief Find the channel frequency power info with specific channel
*
- * @param adapter A pointer to wlan_adapter structure
+ * @param adapter A pointer to lbs_adapter structure
* @param band it can be BAND_A, BAND_G or BAND_B
* @param channel the channel for looking
* @return A pointer to struct chan_freq_power structure or NULL if not find.
*/
-struct chan_freq_power *libertas_find_cfp_by_band_and_channel(wlan_adapter * adapter,
+struct chan_freq_power *lbs_find_cfp_by_band_and_channel(lbs_adapter *adapter,
u8 band, u16 channel)
{
struct chan_freq_power *cfp = NULL;
@@ -74,7 +74,7 @@ struct chan_freq_power *libertas_find_cf
}
if (!cfp && channel)
- lbs_deb_wext("libertas_find_cfp_by_band_and_channel: can't find "
+ lbs_deb_wext("lbs_find_cfp_by_band_and_channel: can't find "
"cfp by band %d / channel %d\n", band, channel);
return cfp;
@@ -83,12 +83,12 @@ struct chan_freq_power *libertas_find_cf
/**
* @brief Find the channel frequency power info with specific frequency
*
- * @param adapter A pointer to wlan_adapter structure
+ * @param adapter A pointer to lbs_adapter structure
* @param band it can be BAND_A, BAND_G or BAND_B
* @param freq the frequency for looking
* @return A pointer to struct chan_freq_power structure or NULL if not find.
*/
-static struct chan_freq_power *find_cfp_by_band_and_freq(wlan_adapter * adapter,
+static struct chan_freq_power *find_cfp_by_band_and_freq(lbs_adapter *adapter,
u8 band, u32 freq)
{
struct chan_freq_power *cfp = NULL;
@@ -125,14 +125,14 @@ static struct chan_freq_power *find_cfp_
/**
* @brief Set Radio On/OFF
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @option Radio Option
* @return 0 --success, otherwise fail
*/
-static int wlan_radio_ioctl(wlan_private * priv, u8 option)
+static int lbs_radio_ioctl(lbs_private *priv, u8 option)
{
int ret = 0;
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
@@ -140,7 +140,7 @@ static int wlan_radio_ioctl(wlan_private
lbs_deb_wext("switching radio %s\n", option ? "on" : "off");
adapter->radioon = option;
- 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);
@@ -153,22 +153,22 @@ static int wlan_radio_ioctl(wlan_private
/**
* @brief Copy active data rates based on adapter mode and status
*
- * @param adapter A pointer to wlan_adapter structure
+ * @param adapter A pointer to lbs_adapter structure
* @param rate The buf to return the active rates
*/
-static void copy_active_data_rates(wlan_adapter * adapter, u8 * rates)
+static void copy_active_data_rates(lbs_adapter *adapter, u8 *rates)
{
lbs_deb_enter(LBS_DEB_WEXT);
- if (adapter->connect_status != LIBERTAS_CONNECTED)
- memcpy(rates, libertas_bg_rates, MAX_RATES);
+ if (adapter->connect_status != LBS_CONNECTED)
+ memcpy(rates, lbs_bg_rates, MAX_RATES);
else
memcpy(rates, adapter->curbssparams.rates, MAX_RATES);
lbs_deb_leave(LBS_DEB_WEXT);
}
-static int wlan_get_name(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_name(struct net_device *dev, struct iw_request_info *info,
char *cwrq, char *extra)
{
@@ -181,16 +181,16 @@ static int wlan_get_name(struct net_devi
return 0;
}
-static int wlan_get_freq(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_freq(struct net_device *dev, struct iw_request_info *info,
struct iw_freq *fwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct chan_freq_power *cfp;
lbs_deb_enter(LBS_DEB_WEXT);
- cfp = libertas_find_cfp_by_band_and_channel(adapter, 0,
+ cfp = lbs_find_cfp_by_band_and_channel(adapter, 0,
adapter->curbssparams.channel);
if (!cfp) {
@@ -208,15 +208,15 @@ static int wlan_get_freq(struct net_devi
return 0;
}
-static int wlan_get_wap(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_wap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *awrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
- if (adapter->connect_status == LIBERTAS_CONNECTED) {
+ if (adapter->connect_status == LBS_CONNECTED) {
memcpy(awrq->sa_data, adapter->curbssparams.bssid, ETH_ALEN);
} else {
memset(awrq->sa_data, 0, ETH_ALEN);
@@ -227,11 +227,11 @@ static int wlan_get_wap(struct net_devic
return 0;
}
-static int wlan_set_nick(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_nick(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
@@ -252,11 +252,11 @@ static int wlan_set_nick(struct net_devi
return 0;
}
-static int wlan_get_nick(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_nick(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
@@ -273,14 +273,14 @@ static int wlan_get_nick(struct net_devi
static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
/* Use nickname to indicate that mesh is on */
- if (adapter->connect_status == LIBERTAS_CONNECTED) {
+ if (adapter->connect_status == LBS_CONNECTED) {
strncpy(extra, "Mesh", 12);
extra[12] = '\0';
dwrq->length = strlen(extra);
@@ -295,12 +295,12 @@ static int mesh_get_nick(struct net_devi
return 0;
}
-static int wlan_set_rts(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_rts(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
u32 rthr = vwrq->value;
lbs_deb_enter(LBS_DEB_WEXT);
@@ -313,7 +313,7 @@ static int wlan_set_rts(struct net_devic
adapter->rtsthsd = rthr;
}
- ret = libertas_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
+ ret = lbs_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
CMD_ACT_SET, CMD_OPTION_WAITFORRSP,
OID_802_11_RTS_THRESHOLD, &rthr);
@@ -321,17 +321,17 @@ static int wlan_set_rts(struct net_devic
return ret;
}
-static int wlan_get_rts(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_rts(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
adapter->rtsthsd = 0;
- ret = libertas_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
+ ret = lbs_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
CMD_ACT_GET, CMD_OPTION_WAITFORRSP,
OID_802_11_RTS_THRESHOLD, NULL);
if (ret)
@@ -347,13 +347,13 @@ out:
return ret;
}
-static int wlan_set_frag(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_frag(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
int ret = 0;
u32 fthr = vwrq->value;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
@@ -366,7 +366,7 @@ static int wlan_set_frag(struct net_devi
adapter->fragthsd = fthr;
}
- ret = libertas_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
+ ret = lbs_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
CMD_ACT_SET, CMD_OPTION_WAITFORRSP,
OID_802_11_FRAGMENTATION_THRESHOLD, &fthr);
@@ -374,17 +374,17 @@ static int wlan_set_frag(struct net_devi
return ret;
}
-static int wlan_get_frag(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_frag(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
adapter->fragthsd = 0;
- ret = libertas_prepare_and_send_command(priv,
+ ret = lbs_prepare_and_send_command(priv,
CMD_802_11_SNMP_MIB,
CMD_ACT_GET, CMD_OPTION_WAITFORRSP,
OID_802_11_FRAGMENTATION_THRESHOLD, NULL);
@@ -401,11 +401,11 @@ out:
return ret;
}
-static int wlan_get_mode(struct net_device *dev,
+static int lbs_get_mode(struct net_device *dev,
struct iw_request_info *info, u32 * uwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
@@ -427,17 +427,17 @@ static int mesh_wlan_get_mode(struct net
return 0;
}
-static int wlan_get_txpow(struct net_device *dev,
+static int lbs_get_txpow(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
- ret = libertas_prepare_and_send_command(priv,
+ ret = lbs_prepare_and_send_command(priv,
CMD_802_11_RF_TX_POWER,
CMD_ACT_TX_POWER_OPT_GET,
CMD_OPTION_WAITFORRSP, 0, NULL);
@@ -460,12 +460,12 @@ out:
return ret;
}
-static int wlan_set_retry(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_retry(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
@@ -480,7 +480,7 @@ static int wlan_set_retry(struct net_dev
/* Adding 1 to convert retry count to try count */
adapter->txretrycount = vwrq->value + 1;
- ret = libertas_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
+ ret = lbs_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
CMD_ACT_SET,
CMD_OPTION_WAITFORRSP,
OID_802_11_TX_RETRYCOUNT, NULL);
@@ -496,17 +496,17 @@ out:
return ret;
}
-static int wlan_get_retry(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_retry(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
int ret = 0;
lbs_deb_enter(LBS_DEB_WEXT);
adapter->txretrycount = 0;
- ret = libertas_prepare_and_send_command(priv,
+ ret = lbs_prepare_and_send_command(priv,
CMD_802_11_SNMP_MIB,
CMD_ACT_GET, CMD_OPTION_WAITFORRSP,
OID_802_11_TX_RETRYCOUNT, NULL);
@@ -564,12 +564,12 @@ static inline void sort_channels(struct
* @param extra A pointer to extra data buf
* @return 0 --success, otherwise fail
*/
-static int wlan_get_range(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_range(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
int i, j;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct iw_range *range = (struct iw_range *)extra;
struct chan_freq_power *cfp;
u8 rates[MAX_RATES + 1];
@@ -595,7 +595,7 @@ static int wlan_get_range(struct net_dev
range->num_frequency = 0;
if (priv->adapter->enable11d &&
- adapter->connect_status == LIBERTAS_CONNECTED) {
+ adapter->connect_status == LBS_CONNECTED) {
u8 chan_no;
u8 band;
@@ -616,7 +616,7 @@ static int wlan_get_range(struct net_dev
lbs_deb_wext("chan_no %d\n", chan_no);
range->freq[range->num_frequency].i = (long)chan_no;
range->freq[range->num_frequency].m =
- (long)libertas_chan_2_freq(chan_no, band) * 100000;
+ (long)lbs_chan_2_freq(chan_no, band) * 100000;
range->freq[range->num_frequency].e = 1;
range->num_frequency++;
}
@@ -742,11 +742,11 @@ out:
return 0;
}
-static int wlan_set_power(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_power(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
@@ -755,9 +755,9 @@ static int wlan_set_power(struct net_dev
*/
if (vwrq->disabled) {
- adapter->psmode = WLAN802_11POWERMODECAM;
+ adapter->psmode = LBS802_11POWERMODECAM;
if (adapter->psstate != PS_STATE_FULL_POWER) {
- libertas_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
+ lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
}
return 0;
@@ -772,33 +772,33 @@ static int wlan_set_power(struct net_dev
return -EINVAL;
}
- if (adapter->psmode != WLAN802_11POWERMODECAM) {
+ if (adapter->psmode != LBS802_11POWERMODECAM) {
return 0;
}
- adapter->psmode = WLAN802_11POWERMODEMAX_PSP;
+ adapter->psmode = LBS802_11POWERMODEMAX_PSP;
- if (adapter->connect_status == LIBERTAS_CONNECTED) {
- libertas_ps_sleep(priv, CMD_OPTION_WAITFORRSP);
+ if (adapter->connect_status == LBS_CONNECTED) {
+ lbs_ps_sleep(priv, CMD_OPTION_WAITFORRSP);
}
lbs_deb_leave(LBS_DEB_WEXT);
return 0;
}
-static int wlan_get_power(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_power(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
int mode;
lbs_deb_enter(LBS_DEB_WEXT);
mode = adapter->psmode;
- if ((vwrq->disabled = (mode == WLAN802_11POWERMODECAM))
- || adapter->connect_status == LIBERTAS_DISCONNECTED)
+ if ((vwrq->disabled = (mode == LBS802_11POWERMODECAM))
+ || adapter->connect_status == LBS_DISCONNECTED)
{
goto out;
}
@@ -810,7 +810,7 @@ out:
return 0;
}
-static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev)
+static struct iw_statistics *lbs_get_wireless_stats(struct net_device *dev)
{
enum {
POOR = 30,
@@ -820,8 +820,8 @@ static struct iw_statistics *wlan_get_wi
EXCELLENT = 95,
PERFECT = 100
};
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
u32 rssi_qual;
u32 tx_qual;
u32 quality = 0;
@@ -834,7 +834,7 @@ static struct iw_statistics *wlan_get_wi
priv->wstats.status = adapter->mode;
/* If we're not associated, all quality values are meaningless */
- if (adapter->connect_status != LIBERTAS_CONNECTED)
+ if (adapter->connect_status != LBS_CONNECTED)
goto out;
/* Quality by RSSI */
@@ -897,9 +897,9 @@ static struct iw_statistics *wlan_get_wi
stats_valid = 1;
/* update stats asynchronously for future calls */
- libertas_prepare_and_send_command(priv, CMD_802_11_RSSI, 0,
+ lbs_prepare_and_send_command(priv, CMD_802_11_RSSI, 0,
0, 0, NULL);
- libertas_prepare_and_send_command(priv, CMD_802_11_GET_LOG, 0,
+ lbs_prepare_and_send_command(priv, CMD_802_11_GET_LOG, 0,
0, 0, NULL);
out:
if (!stats_valid) {
@@ -919,19 +919,19 @@ out:
}
-static int wlan_set_freq(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_freq(struct net_device *dev, struct iw_request_info *info,
struct iw_freq *fwrq, char *extra)
{
int ret = -EINVAL;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct chan_freq_power *cfp;
struct assoc_request * assoc_req;
lbs_deb_enter(LBS_DEB_WEXT);
mutex_lock(&adapter->lock);
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
ret = -ENOMEM;
goto out;
@@ -956,7 +956,7 @@ static int wlan_set_freq(struct net_devi
goto out;
}
- cfp = libertas_find_cfp_by_band_and_channel(adapter, 0, fwrq->m);
+ cfp = lbs_find_cfp_by_band_and_channel(adapter, 0, fwrq->m);
if (!cfp) {
goto out;
}
@@ -967,9 +967,9 @@ static int wlan_set_freq(struct net_devi
out:
if (ret == 0) {
set_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags);
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
} else {
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
}
mutex_unlock(&adapter->lock);
@@ -977,11 +977,11 @@ out:
return ret;
}
-static int wlan_set_rate(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
u32 new_rate;
u16 action;
int ret = -EINVAL;
@@ -1013,7 +1013,7 @@ static int wlan_set_rate(struct net_devi
adapter->auto_rate = 0;
}
- ret = libertas_prepare_and_send_command(priv, CMD_802_11_DATA_RATE,
+ ret = lbs_prepare_and_send_command(priv, CMD_802_11_DATA_RATE,
action, CMD_OPTION_WAITFORRSP, 0, NULL);
out:
@@ -1021,15 +1021,15 @@ out:
return ret;
}
-static int wlan_get_rate(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_rate(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
- if (adapter->connect_status == LIBERTAS_CONNECTED) {
+ if (adapter->connect_status == LBS_CONNECTED) {
vwrq->value = adapter->cur_rate * 500000;
if (adapter->auto_rate)
@@ -1046,12 +1046,12 @@ static int wlan_get_rate(struct net_devi
return 0;
}
-static int wlan_set_mode(struct net_device *dev,
+static int lbs_set_mode(struct net_device *dev,
struct iw_request_info *info, u32 * uwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct assoc_request * assoc_req;
lbs_deb_enter(LBS_DEB_WEXT);
@@ -1065,14 +1065,14 @@ static int wlan_set_mode(struct net_devi
}
mutex_lock(&adapter->lock);
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
ret = -ENOMEM;
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
} else {
assoc_req->mode = *uwrq;
set_bit(ASSOC_FLAG_MODE, &assoc_req->flags);
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
lbs_deb_wext("Switching to mode: 0x%x\n", *uwrq);
}
mutex_unlock(&adapter->lock);
@@ -1092,12 +1092,12 @@ out:
* @param extra A pointer to extra data buf
* @return 0 --success, otherwise fail
*/
-static int wlan_get_encode(struct net_device *dev,
+static int lbs_get_encode(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *dwrq, u8 * extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
lbs_deb_enter(LBS_DEB_WEXT);
@@ -1178,7 +1178,7 @@ static int wlan_get_encode(struct net_de
* @param set_tx_key Force set TX key (1 = yes, 0 = no)
* @return 0 --success, otherwise fail
*/
-static int wlan_set_wep_key(struct assoc_request *assoc_req,
+static int lbs_set_wep_key(struct assoc_request *assoc_req,
const char *key_material,
u16 key_length,
u16 index,
@@ -1296,20 +1296,20 @@ static void disable_wpa(struct assoc_req
* @param extra A pointer to extra data buf
* @return 0 --success, otherwise fail
*/
-static int wlan_set_encode(struct net_device *dev,
+static int lbs_set_encode(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct assoc_request * assoc_req;
u16 is_default = 0, index = 0, set_tx_key = 0;
lbs_deb_enter(LBS_DEB_WEXT);
mutex_lock(&adapter->lock);
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
ret = -ENOMEM;
goto out;
@@ -1335,7 +1335,7 @@ static int wlan_set_encode(struct net_de
if (!assoc_req->secinfo.wep_enabled || (dwrq->length == 0 && !is_default))
set_tx_key = 1;
- ret = wlan_set_wep_key(assoc_req, extra, dwrq->length, index, set_tx_key);
+ ret = lbs_set_wep_key(assoc_req, extra, dwrq->length, index, set_tx_key);
if (ret)
goto out;
@@ -1353,9 +1353,9 @@ static int wlan_set_encode(struct net_de
out:
if (ret == 0) {
set_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags);
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
} else {
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
}
mutex_unlock(&adapter->lock);
@@ -1372,14 +1372,14 @@ out:
* @param extra A pointer to extra data buf
* @return 0 on success, otherwise failure
*/
-static int wlan_get_encodeext(struct net_device *dev,
+static int lbs_get_encodeext(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *dwrq,
char *extra)
{
int ret = -EINVAL;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
int index, max_key_len;
@@ -1479,14 +1479,14 @@ out:
* @param extra A pointer to extra data buf
* @return 0 --success, otherwise fail
*/
-static int wlan_set_encodeext(struct net_device *dev,
+static int lbs_set_encodeext(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *dwrq,
char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
int alg = ext->alg;
struct assoc_request * assoc_req;
@@ -1494,7 +1494,7 @@ static int wlan_set_encodeext(struct net
lbs_deb_enter(LBS_DEB_WEXT);
mutex_lock(&adapter->lock);
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
ret = -ENOMEM;
goto out;
@@ -1521,7 +1521,7 @@ static int wlan_set_encodeext(struct net
set_tx_key = 1;
/* Copy key to driver */
- ret = wlan_set_wep_key (assoc_req, ext->key, ext->key_len, index,
+ ret = lbs_set_wep_key(assoc_req, ext->key, ext->key_len, index,
set_tx_key);
if (ret)
goto out;
@@ -1594,9 +1594,9 @@ static int wlan_set_encodeext(struct net
out:
if (ret == 0) {
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
} else {
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
}
mutex_unlock(&adapter->lock);
@@ -1605,20 +1605,20 @@ out:
}
-static int wlan_set_genie(struct net_device *dev,
+static int lbs_set_genie(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *dwrq,
char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
int ret = 0;
struct assoc_request * assoc_req;
lbs_deb_enter(LBS_DEB_WEXT);
mutex_lock(&adapter->lock);
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
ret = -ENOMEM;
goto out;
@@ -1641,9 +1641,9 @@ static int wlan_set_genie(struct net_dev
out:
if (ret == 0) {
set_bit(ASSOC_FLAG_WPA_IE, &assoc_req->flags);
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
} else {
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
}
mutex_unlock(&adapter->lock);
@@ -1651,14 +1651,14 @@ out:
return ret;
}
-static int wlan_get_genie(struct net_device *dev,
+static int lbs_get_genie(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *dwrq,
char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
@@ -1681,13 +1681,13 @@ out:
}
-static int wlan_set_auth(struct net_device *dev,
+static int lbs_set_auth(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *dwrq,
char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct assoc_request * assoc_req;
int ret = 0;
int updated = 0;
@@ -1695,7 +1695,7 @@ static int wlan_set_auth(struct net_devi
lbs_deb_enter(LBS_DEB_WEXT);
mutex_lock(&adapter->lock);
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
ret = -ENOMEM;
goto out;
@@ -1770,9 +1770,9 @@ out:
if (ret == 0) {
if (updated)
set_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags);
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
} else if (ret != -EOPNOTSUPP) {
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
}
mutex_unlock(&adapter->lock);
@@ -1780,14 +1780,14 @@ out:
return ret;
}
-static int wlan_get_auth(struct net_device *dev,
+static int lbs_get_auth(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *dwrq,
char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
@@ -1820,25 +1820,25 @@ static int wlan_get_auth(struct net_devi
}
-static int wlan_set_txpow(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_txpow(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
u16 dbm;
lbs_deb_enter(LBS_DEB_WEXT);
if (vwrq->disabled) {
- wlan_radio_ioctl(priv, RADIO_OFF);
+ lbs_radio_ioctl(priv, RADIO_OFF);
return 0;
}
adapter->preamble = CMD_TYPE_AUTO_PREAMBLE;
- wlan_radio_ioctl(priv, RADIO_ON);
+ lbs_radio_ioctl(priv, RADIO_ON);
/* Userspace check in iwrange if it should use dBm or mW,
* therefore this should never happen... Jean II */
@@ -1854,7 +1854,7 @@ static int wlan_set_txpow(struct net_dev
lbs_deb_wext("txpower set %d dbm\n", dbm);
- ret = libertas_prepare_and_send_command(priv,
+ ret = lbs_prepare_and_send_command(priv,
CMD_802_11_RF_TX_POWER,
CMD_ACT_TX_POWER_OPT_SET_LOW,
CMD_OPTION_WAITFORRSP, 0, (void *)&dbm);
@@ -1863,11 +1863,11 @@ static int wlan_set_txpow(struct net_dev
return ret;
}
-static int wlan_get_essid(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_essid(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
@@ -1879,7 +1879,7 @@ static int wlan_get_essid(struct net_dev
/*
* Get the current SSID
*/
- if (adapter->connect_status == LIBERTAS_CONNECTED) {
+ if (adapter->connect_status == LBS_CONNECTED) {
memcpy(extra, adapter->curbssparams.ssid,
adapter->curbssparams.ssid_len);
extra[adapter->curbssparams.ssid_len] = '\0';
@@ -1899,11 +1899,11 @@ static int wlan_get_essid(struct net_dev
return 0;
}
-static int wlan_set_essid(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_essid(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
int ret = 0;
u8 ssid[IW_ESSID_MAX_SIZE];
u8 ssid_len = 0;
@@ -1939,7 +1939,7 @@ out:
mutex_lock(&adapter->lock);
if (ret == 0) {
/* Get or create the current association request */
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
ret = -ENOMEM;
} else {
@@ -1947,13 +1947,13 @@ out:
memcpy(&assoc_req->ssid, &ssid, IW_ESSID_MAX_SIZE);
assoc_req->ssid_len = ssid_len;
set_bit(ASSOC_FLAG_SSID, &assoc_req->flags);
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
}
}
/* Cancel the association request if there was an error */
if (ret != 0) {
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
}
mutex_unlock(&adapter->lock);
@@ -1971,11 +1971,11 @@ out:
* @param extra A pointer to extra data buf
* @return 0 --success, otherwise fail
*/
-static int wlan_set_wap(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_wap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *awrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct assoc_request * assoc_req;
int ret = 0;
@@ -1989,15 +1989,15 @@ static int wlan_set_wap(struct net_devic
mutex_lock(&adapter->lock);
/* Get or create the current association request */
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
ret = -ENOMEM;
} else {
/* Copy the BSSID to the association request */
memcpy(&assoc_req->bssid, awrq->sa_data, ETH_ALEN);
set_bit(ASSOC_FLAG_BSSID, &assoc_req->flags);
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
}
mutex_unlock(&adapter->lock);
@@ -2005,7 +2005,7 @@ static int wlan_set_wap(struct net_devic
return ret;
}
-void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen)
+void lbs_get_fwversion(lbs_adapter *adapter, char *fwversion, int maxlen)
{
char fwver[32];
@@ -2031,19 +2031,19 @@ void libertas_get_fwversion(wlan_adapter
/*
* iwconfig settable callbacks
*/
-static const iw_handler wlan_handler[] = {
+static const iw_handler lbs_handler[] = {
(iw_handler) NULL, /* SIOCSIWCOMMIT */
- (iw_handler) wlan_get_name, /* SIOCGIWNAME */
+ (iw_handler) lbs_get_name, /* SIOCGIWNAME */
(iw_handler) NULL, /* SIOCSIWNWID */
(iw_handler) NULL, /* SIOCGIWNWID */
- (iw_handler) wlan_set_freq, /* SIOCSIWFREQ */
- (iw_handler) wlan_get_freq, /* SIOCGIWFREQ */
- (iw_handler) wlan_set_mode, /* SIOCSIWMODE */
- (iw_handler) wlan_get_mode, /* SIOCGIWMODE */
+ (iw_handler) lbs_set_freq, /* SIOCSIWFREQ */
+ (iw_handler) lbs_get_freq, /* SIOCGIWFREQ */
+ (iw_handler) lbs_set_mode, /* SIOCSIWMODE */
+ (iw_handler) lbs_get_mode, /* SIOCGIWMODE */
(iw_handler) NULL, /* SIOCSIWSENS */
(iw_handler) NULL, /* SIOCGIWSENS */
(iw_handler) NULL, /* SIOCSIWRANGE */
- (iw_handler) wlan_get_range, /* SIOCGIWRANGE */
+ (iw_handler) lbs_get_range, /* SIOCGIWRANGE */
(iw_handler) NULL, /* SIOCSIWPRIV */
(iw_handler) NULL, /* SIOCGIWPRIV */
(iw_handler) NULL, /* SIOCSIWSTATS */
@@ -2052,56 +2052,56 @@ static const iw_handler wlan_handler[] =
iw_handler_get_spy, /* SIOCGIWSPY */
iw_handler_set_thrspy, /* SIOCSIWTHRSPY */
iw_handler_get_thrspy, /* SIOCGIWTHRSPY */
- (iw_handler) wlan_set_wap, /* SIOCSIWAP */
- (iw_handler) wlan_get_wap, /* SIOCGIWAP */
+ (iw_handler) lbs_set_wap, /* SIOCSIWAP */
+ (iw_handler) lbs_get_wap, /* SIOCGIWAP */
(iw_handler) NULL, /* SIOCSIWMLME */
(iw_handler) NULL, /* SIOCGIWAPLIST - deprecated */
- (iw_handler) libertas_set_scan, /* SIOCSIWSCAN */
- (iw_handler) libertas_get_scan, /* SIOCGIWSCAN */
- (iw_handler) wlan_set_essid, /* SIOCSIWESSID */
- (iw_handler) wlan_get_essid, /* SIOCGIWESSID */
- (iw_handler) wlan_set_nick, /* SIOCSIWNICKN */
- (iw_handler) wlan_get_nick, /* SIOCGIWNICKN */
+ (iw_handler) lbs_set_scan, /* SIOCSIWSCAN */
+ (iw_handler) lbs_get_scan, /* SIOCGIWSCAN */
+ (iw_handler) lbs_set_essid, /* SIOCSIWESSID */
+ (iw_handler) lbs_get_essid, /* SIOCGIWESSID */
+ (iw_handler) lbs_set_nick, /* SIOCSIWNICKN */
+ (iw_handler) lbs_get_nick, /* SIOCGIWNICKN */
(iw_handler) NULL, /* -- hole -- */
(iw_handler) NULL, /* -- hole -- */
- (iw_handler) wlan_set_rate, /* SIOCSIWRATE */
- (iw_handler) wlan_get_rate, /* SIOCGIWRATE */
- (iw_handler) wlan_set_rts, /* SIOCSIWRTS */
- (iw_handler) wlan_get_rts, /* SIOCGIWRTS */
- (iw_handler) wlan_set_frag, /* SIOCSIWFRAG */
- (iw_handler) wlan_get_frag, /* SIOCGIWFRAG */
- (iw_handler) wlan_set_txpow, /* SIOCSIWTXPOW */
- (iw_handler) wlan_get_txpow, /* SIOCGIWTXPOW */
- (iw_handler) wlan_set_retry, /* SIOCSIWRETRY */
- (iw_handler) wlan_get_retry, /* SIOCGIWRETRY */
- (iw_handler) wlan_set_encode, /* SIOCSIWENCODE */
- (iw_handler) wlan_get_encode, /* SIOCGIWENCODE */
- (iw_handler) wlan_set_power, /* SIOCSIWPOWER */
- (iw_handler) wlan_get_power, /* SIOCGIWPOWER */
+ (iw_handler) lbs_set_rate, /* SIOCSIWRATE */
+ (iw_handler) lbs_get_rate, /* SIOCGIWRATE */
+ (iw_handler) lbs_set_rts, /* SIOCSIWRTS */
+ (iw_handler) lbs_get_rts, /* SIOCGIWRTS */
+ (iw_handler) lbs_set_frag, /* SIOCSIWFRAG */
+ (iw_handler) lbs_get_frag, /* SIOCGIWFRAG */
+ (iw_handler) lbs_set_txpow, /* SIOCSIWTXPOW */
+ (iw_handler) lbs_get_txpow, /* SIOCGIWTXPOW */
+ (iw_handler) lbs_set_retry, /* SIOCSIWRETRY */
+ (iw_handler) lbs_get_retry, /* SIOCGIWRETRY */
+ (iw_handler) lbs_set_encode, /* SIOCSIWENCODE */
+ (iw_handler) lbs_get_encode, /* SIOCGIWENCODE */
+ (iw_handler) lbs_set_power, /* SIOCSIWPOWER */
+ (iw_handler) lbs_get_power, /* SIOCGIWPOWER */
(iw_handler) NULL, /* -- hole -- */
(iw_handler) NULL, /* -- hole -- */
- (iw_handler) wlan_set_genie, /* SIOCSIWGENIE */
- (iw_handler) wlan_get_genie, /* SIOCGIWGENIE */
- (iw_handler) wlan_set_auth, /* SIOCSIWAUTH */
- (iw_handler) wlan_get_auth, /* SIOCGIWAUTH */
- (iw_handler) wlan_set_encodeext,/* SIOCSIWENCODEEXT */
- (iw_handler) wlan_get_encodeext,/* SIOCGIWENCODEEXT */
+ (iw_handler) lbs_set_genie, /* SIOCSIWGENIE */
+ (iw_handler) lbs_get_genie, /* SIOCGIWGENIE */
+ (iw_handler) lbs_set_auth, /* SIOCSIWAUTH */
+ (iw_handler) lbs_get_auth, /* SIOCGIWAUTH */
+ (iw_handler) lbs_set_encodeext,/* SIOCSIWENCODEEXT */
+ (iw_handler) lbs_get_encodeext,/* SIOCGIWENCODEEXT */
(iw_handler) NULL, /* SIOCSIWPMKSA */
};
static const iw_handler mesh_wlan_handler[] = {
(iw_handler) NULL, /* SIOCSIWCOMMIT */
- (iw_handler) wlan_get_name, /* SIOCGIWNAME */
+ (iw_handler) lbs_get_name, /* SIOCGIWNAME */
(iw_handler) NULL, /* SIOCSIWNWID */
(iw_handler) NULL, /* SIOCGIWNWID */
- (iw_handler) wlan_set_freq, /* SIOCSIWFREQ */
- (iw_handler) wlan_get_freq, /* SIOCGIWFREQ */
+ (iw_handler) lbs_set_freq, /* SIOCSIWFREQ */
+ (iw_handler) lbs_get_freq, /* SIOCGIWFREQ */
(iw_handler) NULL, /* SIOCSIWMODE */
(iw_handler) mesh_wlan_get_mode, /* SIOCGIWMODE */
(iw_handler) NULL, /* SIOCSIWSENS */
(iw_handler) NULL, /* SIOCGIWSENS */
(iw_handler) NULL, /* SIOCSIWRANGE */
- (iw_handler) wlan_get_range, /* SIOCGIWRANGE */
+ (iw_handler) lbs_get_range, /* SIOCGIWRANGE */
(iw_handler) NULL, /* SIOCSIWPRIV */
(iw_handler) NULL, /* SIOCGIWPRIV */
(iw_handler) NULL, /* SIOCSIWSTATS */
@@ -2114,46 +2114,46 @@ static const iw_handler mesh_wlan_handle
(iw_handler) NULL, /* SIOCGIWAP */
(iw_handler) NULL, /* SIOCSIWMLME */
(iw_handler) NULL, /* SIOCGIWAPLIST - deprecated */
- (iw_handler) libertas_set_scan, /* SIOCSIWSCAN */
- (iw_handler) libertas_get_scan, /* SIOCGIWSCAN */
+ (iw_handler) lbs_set_scan, /* SIOCSIWSCAN */
+ (iw_handler) lbs_get_scan, /* SIOCGIWSCAN */
(iw_handler) NULL, /* SIOCSIWESSID */
(iw_handler) NULL, /* SIOCGIWESSID */
(iw_handler) NULL, /* SIOCSIWNICKN */
(iw_handler) mesh_get_nick, /* SIOCGIWNICKN */
(iw_handler) NULL, /* -- hole -- */
(iw_handler) NULL, /* -- hole -- */
- (iw_handler) wlan_set_rate, /* SIOCSIWRATE */
- (iw_handler) wlan_get_rate, /* SIOCGIWRATE */
- (iw_handler) wlan_set_rts, /* SIOCSIWRTS */
- (iw_handler) wlan_get_rts, /* SIOCGIWRTS */
- (iw_handler) wlan_set_frag, /* SIOCSIWFRAG */
- (iw_handler) wlan_get_frag, /* SIOCGIWFRAG */
- (iw_handler) wlan_set_txpow, /* SIOCSIWTXPOW */
- (iw_handler) wlan_get_txpow, /* SIOCGIWTXPOW */
- (iw_handler) wlan_set_retry, /* SIOCSIWRETRY */
- (iw_handler) wlan_get_retry, /* SIOCGIWRETRY */
- (iw_handler) wlan_set_encode, /* SIOCSIWENCODE */
- (iw_handler) wlan_get_encode, /* SIOCGIWENCODE */
- (iw_handler) wlan_set_power, /* SIOCSIWPOWER */
- (iw_handler) wlan_get_power, /* SIOCGIWPOWER */
+ (iw_handler) lbs_set_rate, /* SIOCSIWRATE */
+ (iw_handler) lbs_get_rate, /* SIOCGIWRATE */
+ (iw_handler) lbs_set_rts, /* SIOCSIWRTS */
+ (iw_handler) lbs_get_rts, /* SIOCGIWRTS */
+ (iw_handler) lbs_set_frag, /* SIOCSIWFRAG */
+ (iw_handler) lbs_get_frag, /* SIOCGIWFRAG */
+ (iw_handler) lbs_set_txpow, /* SIOCSIWTXPOW */
+ (iw_handler) lbs_get_txpow, /* SIOCGIWTXPOW */
+ (iw_handler) lbs_set_retry, /* SIOCSIWRETRY */
+ (iw_handler) lbs_get_retry, /* SIOCGIWRETRY */
+ (iw_handler) lbs_set_encode, /* SIOCSIWENCODE */
+ (iw_handler) lbs_get_encode, /* SIOCGIWENCODE */
+ (iw_handler) lbs_set_power, /* SIOCSIWPOWER */
+ (iw_handler) lbs_get_power, /* SIOCGIWPOWER */
(iw_handler) NULL, /* -- hole -- */
(iw_handler) NULL, /* -- hole -- */
- (iw_handler) wlan_set_genie, /* SIOCSIWGENIE */
- (iw_handler) wlan_get_genie, /* SIOCGIWGENIE */
- (iw_handler) wlan_set_auth, /* SIOCSIWAUTH */
- (iw_handler) wlan_get_auth, /* SIOCGIWAUTH */
- (iw_handler) wlan_set_encodeext,/* SIOCSIWENCODEEXT */
- (iw_handler) wlan_get_encodeext,/* SIOCGIWENCODEEXT */
+ (iw_handler) lbs_set_genie, /* SIOCSIWGENIE */
+ (iw_handler) lbs_get_genie, /* SIOCGIWGENIE */
+ (iw_handler) lbs_set_auth, /* SIOCSIWAUTH */
+ (iw_handler) lbs_get_auth, /* SIOCGIWAUTH */
+ (iw_handler) lbs_set_encodeext,/* SIOCSIWENCODEEXT */
+ (iw_handler) lbs_get_encodeext,/* SIOCGIWENCODEEXT */
(iw_handler) NULL, /* SIOCSIWPMKSA */
};
-struct iw_handler_def libertas_handler_def = {
- .num_standard = sizeof(wlan_handler) / sizeof(iw_handler),
- .standard = (iw_handler *) wlan_handler,
- .get_wireless_stats = wlan_get_wireless_stats,
+struct iw_handler_def lbs_handler_def = {
+ .num_standard = sizeof(lbs_handler) / sizeof(iw_handler),
+ .standard = (iw_handler *) lbs_handler,
+ .get_wireless_stats = lbs_get_wireless_stats,
};
struct iw_handler_def mesh_handler_def = {
.num_standard = sizeof(mesh_wlan_handler) / sizeof(iw_handler),
.standard = (iw_handler *) mesh_wlan_handler,
- .get_wireless_stats = wlan_get_wireless_stats,
+ .get_wireless_stats = lbs_get_wireless_stats,
};
Index: wireless-2.6/drivers/net/wireless/libertas/wext.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/wext.h 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/wext.h 2007-10-15 13:41:51.000000000 +0200
@@ -1,11 +1,11 @@
/**
* This file contains definition for IOCTL call.
*/
-#ifndef _WLAN_WEXT_H_
-#define _WLAN_WEXT_H_
+#ifndef _LBS_WEXT_H_
+#define _LBS_WEXT_H_
-/** wlan_ioctl_regrdwr */
-struct wlan_ioctl_regrdwr {
+/** lbs_ioctl_regrdwr */
+struct lbs_ioctl_regrdwr {
/** Which register to access */
u16 whichreg;
/** Read or Write */
@@ -15,9 +15,9 @@ struct wlan_ioctl_regrdwr {
u32 value;
};
-#define WLAN_MONITOR_OFF 0
+#define LBS_MONITOR_OFF 0
-extern struct iw_handler_def libertas_handler_def;
+extern struct iw_handler_def lbs_handler_def;
extern struct iw_handler_def mesh_handler_def;
-#endif /* _WLAN_WEXT_H_ */
+#endif
Index: wireless-2.6/drivers/net/wireless/libertas/host.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/host.h 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/host.h 2007-10-15 13:41:51.000000000 +0200
@@ -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: wireless-2.6/drivers/net/wireless/libertas/if_usb.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/if_usb.h 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/if_usb.h 2007-10-15 13:41:51.000000000 +0200
@@ -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: wireless-2.6/drivers/net/wireless/libertas/types.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/types.h 2007-10-15 13:40:48.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/libertas/types.h 2007-10-15 13:41:51.000000000 +0200
@@ -1,8 +1,8 @@
/**
* This header file contains definition for global types
*/
-#ifndef _WLAN_TYPES_
-#define _WLAN_TYPES_
+#ifndef _LBS_TYPES_H_
+#define _LBS_TYPES_H_
#include <linux/if_ether.h>
#include <asm/byteorder.h>
@@ -250,4 +250,4 @@ struct mrvlietypes_ledgpio {
struct led_pin ledpin[1];
} __attribute__ ((packed));
-#endif /* _WLAN_TYPES_ */
+#endif
More information about the libertas-dev
mailing list