libertas: move to uniform lbs_/LBS_ namespace

This patch unifies the namespace of variables, functions defines
and structures. It does:

- rename libertas_XXX to lbs_XXX
- rename LIBERTAS_XXX to lbs_XXX
- rename wlan_XXX to lbs_XXX
- rename WLAN_XXX to LBS_XXX (but only those that were
  defined in libertas-local *.h files, e.g. not defines
  from net/ieee80211.h)

While passing, I fixed some checkpatch.pl errors too.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Holger Schurig 2007-11-15 18:05:47 -05:00 committed by David S. Miller
parent 9a62f73b1a
commit 1007832103
29 changed files with 1545 additions and 1541 deletions

View file

@ -43,7 +43,7 @@ static struct chan_freq_power channel_freq_power_UN_BG[] = {
{14, 2484, TX_PWR_DEFAULT}
};
static u8 wlan_region_2_code(u8 * region)
static u8 lbs_region_2_code(u8 *region)
{
u8 i;
@ -60,7 +60,7 @@ static u8 wlan_region_2_code(u8 * region)
return (region_code_mapping[0].code);
}
static u8 *wlan_code_2_region(u8 code)
static u8 *lbs_code_2_region(u8 code)
{
u8 i;
@ -79,7 +79,7 @@ static u8 *wlan_code_2_region(u8 code)
* @param nrchan number of channels
* @return the nrchan-th chan number
*/
static u8 wlan_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 * chan)
static u8 lbs_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 *chan)
/*find the nrchan-th chan after the firstchan*/
{
u8 i;
@ -113,7 +113,7 @@ static u8 wlan_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 * chan)
* @param parsed_region_chan pointer to parsed_region_chan_11d
* @return TRUE; FALSE
*/
static u8 wlan_channel_known_11d(u8 chan,
static u8 lbs_channel_known_11d(u8 chan,
struct parsed_region_chan_11d * parsed_region_chan)
{
struct chan_power_11d *chanpwr = parsed_region_chan->chanpwr;
@ -134,7 +134,7 @@ static u8 wlan_channel_known_11d(u8 chan,
return 0;
}
u32 libertas_chan_2_freq(u8 chan, u8 band)
u32 lbs_chan_2_freq(u8 chan, u8 band)
{
struct chan_freq_power *cf;
u16 i;
@ -152,7 +152,7 @@ u32 libertas_chan_2_freq(u8 chan, u8 band)
static int generate_domain_info_11d(struct parsed_region_chan_11d
*parsed_region_chan,
struct wlan_802_11d_domain_reg * domaininfo)
struct lbs_802_11d_domain_reg *domaininfo)
{
u8 nr_subband = 0;
@ -217,7 +217,7 @@ static int generate_domain_info_11d(struct parsed_region_chan_11d
* @param *parsed_region_chan pointer to parsed_region_chan_11d
* @return N/A
*/
static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_chan,
static void lbs_generate_parsed_region_chan_11d(struct region_channel *region_chan,
struct parsed_region_chan_11d *
parsed_region_chan)
{
@ -238,7 +238,7 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_
parsed_region_chan->band = region_chan->band;
parsed_region_chan->region = region_chan->region;
memcpy(parsed_region_chan->countrycode,
wlan_code_2_region(region_chan->region), COUNTRY_CODE_LEN);
lbs_code_2_region(region_chan->region), COUNTRY_CODE_LEN);
lbs_deb_11d("region 0x%x, band %d\n", parsed_region_chan->region,
parsed_region_chan->band);
@ -264,7 +264,7 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_
* @param chan chan
* @return TRUE;FALSE
*/
static u8 wlan_region_chan_supported_11d(u8 region, u8 band, u8 chan)
static u8 lbs_region_chan_supported_11d(u8 region, u8 band, u8 chan)
{
struct chan_freq_power *cfp;
int cfp_no;
@ -273,7 +273,7 @@ static u8 wlan_region_chan_supported_11d(u8 region, u8 band, u8 chan)
lbs_deb_enter(LBS_DEB_11D);
cfp = libertas_get_region_cfp_table(region, band, &cfp_no);
cfp = lbs_get_region_cfp_table(region, band, &cfp_no);
if (cfp == NULL)
return 0;
@ -338,7 +338,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
/*Step1: check region_code */
parsed_region_chan->region = region =
wlan_region_2_code(countryinfo->countrycode);
lbs_region_2_code(countryinfo->countrycode);
lbs_deb_11d("regioncode=%x\n", (u8) parsed_region_chan->region);
lbs_deb_hex(LBS_DEB_11D, "countrycode", (char *)countryinfo->countrycode,
@ -367,7 +367,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
for (i = 0; idx < MAX_NO_OF_CHAN && i < nrchan; i++) {
/*step4: channel is supported? */
if (!wlan_get_chan_11d(band, firstchan, i, &curchan)) {
if (!lbs_get_chan_11d(band, firstchan, i, &curchan)) {
/* Chan is not found in UN table */
lbs_deb_11d("chan is not supported: %d \n", i);
break;
@ -375,7 +375,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
lastchan = curchan;
if (wlan_region_chan_supported_11d
if (lbs_region_chan_supported_11d
(region, band, curchan)) {
/*step5: Check if curchan is supported by mrvl in region */
parsed_region_chan->chanpwr[idx].chan = curchan;
@ -411,14 +411,14 @@ done:
* @param parsed_region_chan pointer to parsed_region_chan_11d
* @return PASSIVE if chan is unknown; ACTIVE if chan is known
*/
u8 libertas_get_scan_type_11d(u8 chan,
u8 lbs_get_scan_type_11d(u8 chan,
struct parsed_region_chan_11d * parsed_region_chan)
{
u8 scan_type = CMD_SCAN_TYPE_PASSIVE;
lbs_deb_enter(LBS_DEB_11D);
if (wlan_channel_known_11d(chan, parsed_region_chan)) {
if (lbs_channel_known_11d(chan, parsed_region_chan)) {
lbs_deb_11d("found, do active scan\n");
scan_type = CMD_SCAN_TYPE_ACTIVE;
} else {
@ -430,7 +430,7 @@ u8 libertas_get_scan_type_11d(u8 chan,
}
void libertas_init_11d(wlan_private * priv)
void lbs_init_11d(lbs_private * priv)
{
priv->adapter->enable11d = 0;
memset(&(priv->adapter->parsed_region_chan), 0,
@ -440,10 +440,10 @@ void libertas_init_11d(wlan_private * priv)
/**
* @brief This function sets DOMAIN INFO to FW
* @param priv pointer to wlan_private
* @param priv pointer to lbs_private
* @return 0; -1
*/
static int set_domain_info_11d(wlan_private * priv)
static int set_domain_info_11d(lbs_private * priv)
{
int ret;
@ -452,7 +452,7 @@ static int set_domain_info_11d(wlan_private * priv)
return 0;
}
ret = libertas_prepare_and_send_command(priv, CMD_802_11D_DOMAIN_INFO,
ret = lbs_prepare_and_send_command(priv, CMD_802_11D_DOMAIN_INFO,
CMD_ACT_SET,
CMD_OPTION_WAITFORRSP, 0, NULL);
if (ret)
@ -463,13 +463,13 @@ static int set_domain_info_11d(wlan_private * priv)
/**
* @brief This function setups scan channels
* @param priv pointer to wlan_private
* @param priv pointer to lbs_private
* @param band band
* @return 0
*/
int libertas_set_universaltable(wlan_private * priv, u8 band)
int lbs_set_universaltable(lbs_private * priv, u8 band)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
u16 size = sizeof(struct chan_freq_power);
u16 i = 0;
@ -492,20 +492,20 @@ int libertas_set_universaltable(wlan_private * priv, u8 band)
/**
* @brief This function implements command CMD_802_11D_DOMAIN_INFO
* @param priv pointer to wlan_private
* @param priv pointer to lbs_private
* @param cmd pointer to cmd buffer
* @param cmdno cmd ID
* @param cmdOption cmd action
* @return 0
*/
int libertas_cmd_802_11d_domain_info(wlan_private * priv,
int lbs_cmd_802_11d_domain_info(lbs_private * priv,
struct cmd_ds_command *cmd, u16 cmdno,
u16 cmdoption)
{
struct cmd_ds_802_11d_domain_info *pdomaininfo =
&cmd->params.domaininfo;
struct mrvlietypes_domainparamset *domain = &pdomaininfo->domain;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
u8 nr_subband = adapter->domainreg.nr_subband;
lbs_deb_enter(LBS_DEB_11D);
@ -552,11 +552,11 @@ done:
/**
* @brief This function parses countryinfo from AP and download country info to FW
* @param priv pointer to wlan_private
* @param priv pointer to lbs_private
* @param resp pointer to command response buffer
* @return 0; -1
*/
int libertas_ret_802_11d_domain_info(wlan_private * priv,
int lbs_ret_802_11d_domain_info(lbs_private * priv,
struct cmd_ds_command *resp)
{
struct cmd_ds_802_11d_domain_info *domaininfo = &resp->params.domaininforesp;
@ -598,14 +598,14 @@ int libertas_ret_802_11d_domain_info(wlan_private * priv,
/**
* @brief This function parses countryinfo from AP and download country info to FW
* @param priv pointer to wlan_private
* @param priv pointer to lbs_private
* @return 0; -1
*/
int libertas_parse_dnld_countryinfo_11d(wlan_private * priv,
int lbs_parse_dnld_countryinfo_11d(lbs_private * priv,
struct bss_descriptor * bss)
{
int ret;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_11D);
if (priv->adapter->enable11d) {
@ -620,7 +620,7 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv,
}
memset(&adapter->domainreg, 0,
sizeof(struct wlan_802_11d_domain_reg));
sizeof(struct lbs_802_11d_domain_reg));
generate_domain_info_11d(&adapter->parsed_region_chan,
&adapter->domainreg);
@ -640,13 +640,13 @@ done:
/**
* @brief This function generates 11D info from user specified regioncode and download to FW
* @param priv pointer to wlan_private
* @param priv pointer to lbs_private
* @return 0; -1
*/
int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
int lbs_create_dnld_countryinfo_11d(lbs_private * priv)
{
int ret;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
struct region_channel *region_chan;
u8 j;
@ -679,12 +679,12 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
memset(&adapter->parsed_region_chan, 0,
sizeof(struct parsed_region_chan_11d));
wlan_generate_parsed_region_chan_11d(region_chan,
lbs_generate_parsed_region_chan_11d(region_chan,
&adapter->
parsed_region_chan);
memset(&adapter->domainreg, 0,
sizeof(struct wlan_802_11d_domain_reg));
sizeof(struct lbs_802_11d_domain_reg));
generate_domain_info_11d(&adapter->parsed_region_chan,
&adapter->domainreg);

View file

@ -2,8 +2,8 @@
* This header file contains data structures and
* function declarations of 802.11d
*/
#ifndef _WLAN_11D_
#define _WLAN_11D_
#ifndef _LBS_11D_
#define _LBS_11D_
#include "types.h"
#include "defs.h"
@ -52,7 +52,7 @@ struct cmd_ds_802_11d_domain_info {
} __attribute__ ((packed));
/** domain regulatory information */
struct wlan_802_11d_domain_reg {
struct lbs_802_11d_domain_reg {
/** country Code*/
u8 countrycode[COUNTRY_CODE_LEN];
/** No. of subband*/
@ -78,26 +78,26 @@ struct region_code_mapping {
u8 code;
};
u8 libertas_get_scan_type_11d(u8 chan,
u8 lbs_get_scan_type_11d(u8 chan,
struct parsed_region_chan_11d *parsed_region_chan);
u32 libertas_chan_2_freq(u8 chan, u8 band);
u32 lbs_chan_2_freq(u8 chan, u8 band);
void libertas_init_11d(wlan_private * priv);
void lbs_init_11d(lbs_private * priv);
int libertas_set_universaltable(wlan_private * priv, u8 band);
int lbs_set_universaltable(lbs_private * priv, u8 band);
int libertas_cmd_802_11d_domain_info(wlan_private * priv,
int lbs_cmd_802_11d_domain_info(lbs_private * priv,
struct cmd_ds_command *cmd, u16 cmdno,
u16 cmdOption);
int libertas_ret_802_11d_domain_info(wlan_private * priv,
int lbs_ret_802_11d_domain_info(lbs_private * priv,
struct cmd_ds_command *resp);
struct bss_descriptor;
int libertas_parse_dnld_countryinfo_11d(wlan_private * priv,
int lbs_parse_dnld_countryinfo_11d(lbs_private * priv,
struct bss_descriptor * bss);
int libertas_create_dnld_countryinfo_11d(wlan_private * priv);
int lbs_create_dnld_countryinfo_11d(lbs_private * priv);
#endif /* _WLAN_11D_ */
#endif

View file

@ -38,10 +38,10 @@ static void print_assoc_req(const char * extra, struct assoc_request * assoc_req
}
static int assoc_helper_essid(wlan_private *priv,
static int assoc_helper_essid(lbs_private *priv,
struct assoc_request * assoc_req)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int ret = 0;
struct bss_descriptor * bss;
int channel = -1;
@ -58,15 +58,15 @@ static int assoc_helper_essid(wlan_private *priv,
lbs_deb_assoc("New SSID requested: '%s'\n",
escape_essid(assoc_req->ssid, assoc_req->ssid_len));
if (assoc_req->mode == IW_MODE_INFRA) {
libertas_send_specific_ssid_scan(priv, assoc_req->ssid,
lbs_send_specific_ssid_scan(priv, assoc_req->ssid,
assoc_req->ssid_len, 0);
bss = libertas_find_ssid_in_list(adapter, assoc_req->ssid,
bss = lbs_find_ssid_in_list(adapter, assoc_req->ssid,
assoc_req->ssid_len, NULL, IW_MODE_INFRA, channel);
if (bss != NULL) {
lbs_deb_assoc("SSID found in scan list, associating\n");
memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor));
ret = wlan_associate(priv, assoc_req);
ret = lbs_associate(priv, assoc_req);
} else {
lbs_deb_assoc("SSID not found; cannot associate\n");
}
@ -74,23 +74,23 @@ static int assoc_helper_essid(wlan_private *priv,
/* Scan for the network, do not save previous results. Stale
* scan data will cause us to join a non-existant adhoc network
*/
libertas_send_specific_ssid_scan(priv, assoc_req->ssid,
lbs_send_specific_ssid_scan(priv, assoc_req->ssid,
assoc_req->ssid_len, 1);
/* Search for the requested SSID in the scan table */
bss = libertas_find_ssid_in_list(adapter, assoc_req->ssid,
bss = lbs_find_ssid_in_list(adapter, assoc_req->ssid,
assoc_req->ssid_len, NULL, IW_MODE_ADHOC, channel);
if (bss != NULL) {
lbs_deb_assoc("SSID found, will join\n");
memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor));
libertas_join_adhoc_network(priv, assoc_req);
lbs_join_adhoc_network(priv, assoc_req);
} else {
/* else send START command */
lbs_deb_assoc("SSID not found, creating adhoc network\n");
memcpy(&assoc_req->bss.ssid, &assoc_req->ssid,
IW_ESSID_MAX_SIZE);
assoc_req->bss.ssid_len = assoc_req->ssid_len;
libertas_start_adhoc_network(priv, assoc_req);
lbs_start_adhoc_network(priv, assoc_req);
}
}
@ -99,10 +99,10 @@ static int assoc_helper_essid(wlan_private *priv,
}
static int assoc_helper_bssid(wlan_private *priv,
static int assoc_helper_bssid(lbs_private *priv,
struct assoc_request * assoc_req)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int ret = 0;
struct bss_descriptor * bss;
DECLARE_MAC_BUF(mac);
@ -111,7 +111,7 @@ static int assoc_helper_bssid(wlan_private *priv,
print_mac(mac, assoc_req->bssid));
/* Search for index position in list for requested MAC */
bss = libertas_find_bssid_in_list(adapter, assoc_req->bssid,
bss = lbs_find_bssid_in_list(adapter, assoc_req->bssid,
assoc_req->mode);
if (bss == NULL) {
lbs_deb_assoc("ASSOC: WAP: BSSID %s not found, "
@ -121,10 +121,10 @@ static int assoc_helper_bssid(wlan_private *priv,
memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor));
if (assoc_req->mode == IW_MODE_INFRA) {
ret = wlan_associate(priv, assoc_req);
lbs_deb_assoc("ASSOC: wlan_associate(bssid) returned %d\n", ret);
ret = lbs_associate(priv, assoc_req);
lbs_deb_assoc("ASSOC: lbs_associate(bssid) returned %d\n", ret);
} else if (assoc_req->mode == IW_MODE_ADHOC) {
libertas_join_adhoc_network(priv, assoc_req);
lbs_join_adhoc_network(priv, assoc_req);
}
out:
@ -133,7 +133,7 @@ out:
}
static int assoc_helper_associate(wlan_private *priv,
static int assoc_helper_associate(lbs_private *priv,
struct assoc_request * assoc_req)
{
int ret = 0, done = 0;
@ -162,10 +162,10 @@ static int assoc_helper_associate(wlan_private *priv,
}
static int assoc_helper_mode(wlan_private *priv,
static int assoc_helper_mode(lbs_private *priv,
struct assoc_request * assoc_req)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int ret = 0;
lbs_deb_enter(LBS_DEB_ASSOC);
@ -175,12 +175,12 @@ static int assoc_helper_mode(wlan_private *priv,
if (assoc_req->mode == IW_MODE_INFRA) {
if (adapter->psstate != PS_STATE_FULL_POWER)
libertas_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
adapter->psmode = WLAN802_11POWERMODECAM;
lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
adapter->psmode = LBS802_11POWERMODECAM;
}
adapter->mode = assoc_req->mode;
ret = libertas_prepare_and_send_command(priv,
ret = lbs_prepare_and_send_command(priv,
CMD_802_11_SNMP_MIB,
0, CMD_OPTION_WAITFORRSP,
OID_802_11_INFRASTRUCTURE_MODE,
@ -192,26 +192,26 @@ done:
}
static int update_channel(wlan_private * priv)
static int update_channel(lbs_private * priv)
{
/* the channel in f/w could be out of sync, get the current channel */
return libertas_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL,
return lbs_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL,
CMD_OPT_802_11_RF_CHANNEL_GET,
CMD_OPTION_WAITFORRSP, 0, NULL);
}
void libertas_sync_channel(struct work_struct *work)
void lbs_sync_channel(struct work_struct *work)
{
wlan_private *priv = container_of(work, wlan_private, sync_channel);
lbs_private *priv = container_of(work, lbs_private, sync_channel);
if (update_channel(priv) != 0)
lbs_pr_info("Channel synchronization failed.");
}
static int assoc_helper_channel(wlan_private *priv,
static int assoc_helper_channel(lbs_private *priv,
struct assoc_request * assoc_req)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int ret = 0;
lbs_deb_enter(LBS_DEB_ASSOC);
@ -227,7 +227,7 @@ static int assoc_helper_channel(wlan_private *priv,
lbs_deb_assoc("ASSOC: channel: %d -> %d\n",
adapter->curbssparams.channel, assoc_req->channel);
ret = libertas_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL,
ret = lbs_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL,
CMD_OPT_802_11_RF_CHANNEL_SET,
CMD_OPTION_WAITFORRSP, 0, &assoc_req->channel);
if (ret < 0) {
@ -263,10 +263,10 @@ done:
}
static int assoc_helper_wep_keys(wlan_private *priv,
static int assoc_helper_wep_keys(lbs_private *priv,
struct assoc_request * assoc_req)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int i;
int ret = 0;
@ -277,13 +277,13 @@ static int assoc_helper_wep_keys(wlan_private *priv,
|| assoc_req->wep_keys[1].len
|| assoc_req->wep_keys[2].len
|| assoc_req->wep_keys[3].len) {
ret = libertas_prepare_and_send_command(priv,
ret = lbs_prepare_and_send_command(priv,
CMD_802_11_SET_WEP,
CMD_ACT_ADD,
CMD_OPTION_WAITFORRSP,
0, assoc_req);
} else {
ret = libertas_prepare_and_send_command(priv,
ret = lbs_prepare_and_send_command(priv,
CMD_802_11_SET_WEP,
CMD_ACT_REMOVE,
CMD_OPTION_WAITFORRSP,
@ -298,7 +298,7 @@ static int assoc_helper_wep_keys(wlan_private *priv,
adapter->currentpacketfilter |= CMD_ACT_MAC_WEP_ENABLE;
else
adapter->currentpacketfilter &= ~CMD_ACT_MAC_WEP_ENABLE;
ret = libertas_set_mac_packet_filter(priv);
ret = lbs_set_mac_packet_filter(priv);
if (ret)
goto out;
@ -318,10 +318,10 @@ out:
return ret;
}
static int assoc_helper_secinfo(wlan_private *priv,
static int assoc_helper_secinfo(lbs_private *priv,
struct assoc_request * assoc_req)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int ret = 0;
u32 do_wpa;
u32 rsn = 0;
@ -329,9 +329,9 @@ static int assoc_helper_secinfo(wlan_private *priv,
lbs_deb_enter(LBS_DEB_ASSOC);
memcpy(&adapter->secinfo, &assoc_req->secinfo,
sizeof(struct wlan_802_11_security));
sizeof(struct lbs_802_11_security));
ret = libertas_set_mac_packet_filter(priv);
ret = lbs_set_mac_packet_filter(priv);
if (ret)
goto out;
@ -341,7 +341,7 @@ static int assoc_helper_secinfo(wlan_private *priv,
*/
/* Get RSN enabled/disabled */
ret = libertas_prepare_and_send_command(priv,
ret = lbs_prepare_and_send_command(priv,
CMD_802_11_ENABLE_RSN,
CMD_ACT_GET,
CMD_OPTION_WAITFORRSP,
@ -358,7 +358,7 @@ static int assoc_helper_secinfo(wlan_private *priv,
/* Set RSN enabled/disabled */
rsn = do_wpa;
ret = libertas_prepare_and_send_command(priv,
ret = lbs_prepare_and_send_command(priv,
CMD_802_11_ENABLE_RSN,
CMD_ACT_SET,
CMD_OPTION_WAITFORRSP,
@ -370,7 +370,7 @@ out:
}
static int assoc_helper_wpa_keys(wlan_private *priv,
static int assoc_helper_wpa_keys(lbs_private *priv,
struct assoc_request * assoc_req)
{
int ret = 0;
@ -385,7 +385,7 @@ static int assoc_helper_wpa_keys(wlan_private *priv,
if (test_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags)) {
clear_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags);
ret = libertas_prepare_and_send_command(priv,
ret = lbs_prepare_and_send_command(priv,
CMD_802_11_KEY_MATERIAL,
CMD_ACT_SET,
CMD_OPTION_WAITFORRSP,
@ -399,7 +399,7 @@ static int assoc_helper_wpa_keys(wlan_private *priv,
if (test_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags)) {
clear_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags);
ret = libertas_prepare_and_send_command(priv,
ret = lbs_prepare_and_send_command(priv,
CMD_802_11_KEY_MATERIAL,
CMD_ACT_SET,
CMD_OPTION_WAITFORRSP,
@ -413,10 +413,10 @@ out:
}
static int assoc_helper_wpa_ie(wlan_private *priv,
static int assoc_helper_wpa_ie(lbs_private *priv,
struct assoc_request * assoc_req)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int ret = 0;
lbs_deb_enter(LBS_DEB_ASSOC);
@ -434,10 +434,10 @@ static int assoc_helper_wpa_ie(wlan_private *priv,
}
static int should_deauth_infrastructure(wlan_adapter *adapter,
static int should_deauth_infrastructure(lbs_adapter *adapter,
struct assoc_request * assoc_req)
{
if (adapter->connect_status != LIBERTAS_CONNECTED)
if (adapter->connect_status != LBS_CONNECTED)
return 0;
if (test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) {
@ -475,13 +475,13 @@ static int should_deauth_infrastructure(wlan_adapter *adapter,
}
static int should_stop_adhoc(wlan_adapter *adapter,
static int should_stop_adhoc(lbs_adapter *adapter,
struct assoc_request * assoc_req)
{
if (adapter->connect_status != LIBERTAS_CONNECTED)
if (adapter->connect_status != LBS_CONNECTED)
return 0;
if (libertas_ssid_cmp(adapter->curbssparams.ssid,
if (lbs_ssid_cmp(adapter->curbssparams.ssid,
adapter->curbssparams.ssid_len,
assoc_req->ssid, assoc_req->ssid_len) != 0)
return 1;
@ -501,10 +501,10 @@ static int should_stop_adhoc(wlan_adapter *adapter,
}
void libertas_association_worker(struct work_struct *work)
void lbs_association_worker(struct work_struct *work)
{
wlan_private *priv = container_of(work, wlan_private, assoc_work.work);
wlan_adapter *adapter = priv->adapter;
lbs_private *priv = container_of(work, lbs_private, assoc_work.work);
lbs_adapter *adapter = priv->adapter;
struct assoc_request * assoc_req = NULL;
int ret = 0;
int find_any_ssid = 0;
@ -538,7 +538,7 @@ void libertas_association_worker(struct work_struct *work)
if (find_any_ssid) {
u8 new_mode;
ret = libertas_find_best_network_ssid(priv, assoc_req->ssid,
ret = lbs_find_best_network_ssid(priv, assoc_req->ssid,
&assoc_req->ssid_len, assoc_req->mode, &new_mode);
if (ret) {
lbs_deb_assoc("Could not find best network\n");
@ -559,7 +559,7 @@ void libertas_association_worker(struct work_struct *work)
*/
if (adapter->mode == IW_MODE_INFRA) {
if (should_deauth_infrastructure(adapter, assoc_req)) {
ret = libertas_send_deauthentication(priv);
ret = lbs_send_deauthentication(priv);
if (ret) {
lbs_deb_assoc("Deauthentication due to new "
"configuration request failed: %d\n",
@ -568,7 +568,7 @@ void libertas_association_worker(struct work_struct *work)
}
} else if (adapter->mode == IW_MODE_ADHOC) {
if (should_stop_adhoc(adapter, assoc_req)) {
ret = libertas_stop_adhoc_network(priv);
ret = lbs_stop_adhoc_network(priv);
if (ret) {
lbs_deb_assoc("Teardown of AdHoc network due to "
"new configuration request failed: %d\n",
@ -649,7 +649,7 @@ void libertas_association_worker(struct work_struct *work)
success = 0;
}
if (adapter->connect_status != LIBERTAS_CONNECTED) {
if (adapter->connect_status != LBS_CONNECTED) {
lbs_deb_assoc("ASSOC: association attempt unsuccessful, "
"not connected.\n");
success = 0;
@ -661,11 +661,11 @@ void libertas_association_worker(struct work_struct *work)
escape_essid(adapter->curbssparams.ssid,
adapter->curbssparams.ssid_len),
print_mac(mac, adapter->curbssparams.bssid));
libertas_prepare_and_send_command(priv,
lbs_prepare_and_send_command(priv,
CMD_802_11_RSSI,
0, CMD_OPTION_WAITFORRSP, 0, NULL);
libertas_prepare_and_send_command(priv,
lbs_prepare_and_send_command(priv,
CMD_802_11_GET_LOG,
0, CMD_OPTION_WAITFORRSP, 0, NULL);
} else {
@ -692,7 +692,7 @@ done:
/*
* Caller MUST hold any necessary locks
*/
struct assoc_request * wlan_get_association_request(wlan_adapter *adapter)
struct assoc_request *lbs_get_association_request(lbs_adapter *adapter)
{
struct assoc_request * assoc_req;
@ -753,7 +753,7 @@ struct assoc_request * wlan_get_association_request(wlan_adapter *adapter)
if (!test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) {
memcpy(&assoc_req->secinfo, &adapter->secinfo,
sizeof(struct wlan_802_11_security));
sizeof(struct lbs_802_11_security));
}
if (!test_bit(ASSOC_FLAG_WPA_IE, &assoc_req->flags)) {

View file

@ -1,14 +1,14 @@
/* Copyright (C) 2006, Red Hat, Inc. */
#ifndef _WLAN_ASSOC_H_
#define _WLAN_ASSOC_H_
#ifndef _LBS_ASSOC_H_
#define _LBS_ASSOC_H_
#include "dev.h"
void libertas_association_worker(struct work_struct *work);
void lbs_association_worker(struct work_struct *work);
struct assoc_request * wlan_get_association_request(wlan_adapter *adapter);
struct assoc_request * lbs_get_association_request(lbs_adapter *adapter);
void libertas_sync_channel(struct work_struct *work);
void lbs_sync_channel(struct work_struct *work);
#endif /* _WLAN_ASSOC_H */
#endif /* _LBS_ASSOC_H */

View file

@ -37,7 +37,7 @@ static u8 is_command_allowed_in_ps(__le16 command)
return 0;
}
static int wlan_cmd_hw_spec(wlan_private * priv, struct cmd_ds_command *cmd)
static int lbs_cmd_hw_spec(lbs_private * priv, struct cmd_ds_command *cmd)
{
struct cmd_ds_get_hw_spec *hwspec = &cmd->params.hwspec;
@ -51,7 +51,7 @@ static int wlan_cmd_hw_spec(wlan_private * priv, struct cmd_ds_command *cmd)
return 0;
}
static int wlan_cmd_802_11_ps_mode(wlan_private * priv,
static int lbs_cmd_802_11_ps_mode(lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action)
{
@ -90,7 +90,7 @@ static int wlan_cmd_802_11_ps_mode(wlan_private * priv,
return 0;
}
static int wlan_cmd_802_11_inactivity_timeout(wlan_private * priv,
static int lbs_cmd_802_11_inactivity_timeout(lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action, void *pdata_buf)
{
@ -114,11 +114,11 @@ static int wlan_cmd_802_11_inactivity_timeout(wlan_private * priv,
return 0;
}
static int wlan_cmd_802_11_sleep_params(wlan_private * priv,
static int lbs_cmd_802_11_sleep_params(lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_sleep_params *sp = &cmd->params.sleep_params;
lbs_deb_enter(LBS_DEB_CMD);
@ -145,13 +145,13 @@ static int wlan_cmd_802_11_sleep_params(wlan_private * priv,
return 0;
}
static int wlan_cmd_802_11_set_wep(wlan_private * priv,
static int lbs_cmd_802_11_set_wep(lbs_private * priv,
struct cmd_ds_command *cmd,
u32 cmd_act,
void * pdata_buf)
{
struct cmd_ds_802_11_set_wep *wep = &cmd->params.wep;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int ret = 0;
struct assoc_request * assoc_req = pdata_buf;
@ -219,7 +219,7 @@ done:
return ret;
}
static int wlan_cmd_802_11_enable_rsn(wlan_private * priv,
static int lbs_cmd_802_11_enable_rsn(lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action,
void * pdata_buf)
@ -272,7 +272,7 @@ static void set_one_wpa_key(struct MrvlIEtype_keyParamSet * pkeyparamset,
lbs_deb_leave(LBS_DEB_CMD);
}
static int wlan_cmd_802_11_key_material(wlan_private * priv,
static int lbs_cmd_802_11_key_material(lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action,
u32 cmd_oid, void *pdata_buf)
@ -319,7 +319,7 @@ done:
return ret;
}
static int wlan_cmd_802_11_reset(wlan_private * priv,
static int lbs_cmd_802_11_reset(lbs_private * priv,
struct cmd_ds_command *cmd, int cmd_action)
{
struct cmd_ds_802_11_reset *reset = &cmd->params.reset;
@ -334,7 +334,7 @@ static int wlan_cmd_802_11_reset(wlan_private * priv,
return 0;
}
static int wlan_cmd_802_11_get_log(wlan_private * priv,
static int lbs_cmd_802_11_get_log(lbs_private * priv,
struct cmd_ds_command *cmd)
{
lbs_deb_enter(LBS_DEB_CMD);
@ -346,7 +346,7 @@ static int wlan_cmd_802_11_get_log(wlan_private * priv,
return 0;
}
static int wlan_cmd_802_11_get_stat(wlan_private * priv,
static int lbs_cmd_802_11_get_stat(lbs_private * priv,
struct cmd_ds_command *cmd)
{
lbs_deb_enter(LBS_DEB_CMD);
@ -358,13 +358,13 @@ static int wlan_cmd_802_11_get_stat(wlan_private * priv,
return 0;
}
static int wlan_cmd_802_11_snmp_mib(wlan_private * priv,
static int lbs_cmd_802_11_snmp_mib(lbs_private * priv,
struct cmd_ds_command *cmd,
int cmd_action,
int cmd_oid, void *pdata_buf)
{
struct cmd_ds_802_11_snmp_mib *pSNMPMIB = &cmd->params.smib;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
u8 ucTemp;
lbs_deb_enter(LBS_DEB_CMD);
@ -479,11 +479,11 @@ static int wlan_cmd_802_11_snmp_mib(wlan_private * priv,
return 0;
}
static int wlan_cmd_802_11_radio_control(wlan_private * priv,
static int lbs_cmd_802_11_radio_control(lbs_private * priv,
struct cmd_ds_command *cmd,
int cmd_action)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_radio_control *pradiocontrol = &cmd->params.radio;
lbs_deb_enter(LBS_DEB_CMD);
@ -519,7 +519,7 @@ static int wlan_cmd_802_11_radio_control(wlan_private * priv,
return 0;
}
static int wlan_cmd_802_11_rf_tx_power(wlan_private * priv,
static int lbs_cmd_802_11_rf_tx_power(lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action, void *pdata_buf)
{
@ -563,7 +563,7 @@ static int wlan_cmd_802_11_rf_tx_power(wlan_private * priv,
return 0;
}
static int wlan_cmd_802_11_monitor_mode(wlan_private * priv,
static int lbs_cmd_802_11_monitor_mode(lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action, void *pdata_buf)
{
@ -583,13 +583,13 @@ static int wlan_cmd_802_11_monitor_mode(wlan_private * priv,
return 0;
}
static int wlan_cmd_802_11_rate_adapt_rateset(wlan_private * priv,
static int lbs_cmd_802_11_rate_adapt_rateset(lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action)
{
struct cmd_ds_802_11_rate_adapt_rateset
*rateadapt = &cmd->params.rateset;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD);
cmd->size =
@ -605,12 +605,12 @@ static int wlan_cmd_802_11_rate_adapt_rateset(wlan_private * priv,
return 0;
}
static int wlan_cmd_802_11_data_rate(wlan_private * priv,
static int lbs_cmd_802_11_data_rate(lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action)
{
struct cmd_ds_802_11_data_rate *pdatarate = &cmd->params.drate;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD);
@ -621,7 +621,7 @@ static int wlan_cmd_802_11_data_rate(wlan_private * priv,
pdatarate->action = cpu_to_le16(cmd_action);
if (cmd_action == CMD_ACT_SET_TX_FIX_RATE) {
pdatarate->rates[0] = libertas_data_rate_to_fw_index(adapter->cur_rate);
pdatarate->rates[0] = lbs_data_rate_to_fw_index(adapter->cur_rate);
lbs_deb_cmd("DATA_RATE: set fixed 0x%02X\n",
adapter->cur_rate);
} else if (cmd_action == CMD_ACT_SET_TX_AUTO) {
@ -632,12 +632,12 @@ static int wlan_cmd_802_11_data_rate(wlan_private * priv,
return 0;
}
static int wlan_cmd_mac_multicast_adr(wlan_private * priv,
static int lbs_cmd_mac_multicast_adr(lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action)
{
struct cmd_ds_mac_multicast_adr *pMCastAdr = &cmd->params.madr;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD);
cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_multicast_adr) +
@ -655,7 +655,7 @@ static int wlan_cmd_mac_multicast_adr(wlan_private * priv,
return 0;
}
static int wlan_cmd_802_11_rf_channel(wlan_private * priv,
static int lbs_cmd_802_11_rf_channel(lbs_private * priv,
struct cmd_ds_command *cmd,
int option, void *pdata_buf)
{
@ -676,10 +676,10 @@ static int wlan_cmd_802_11_rf_channel(wlan_private * priv,
return 0;
}
static int wlan_cmd_802_11_rssi(wlan_private * priv,
static int lbs_cmd_802_11_rssi(lbs_private * priv,
struct cmd_ds_command *cmd)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD);
cmd->command = cpu_to_le16(CMD_802_11_RSSI);
@ -698,15 +698,15 @@ static int wlan_cmd_802_11_rssi(wlan_private * priv,
return 0;
}
static int wlan_cmd_reg_access(wlan_private * priv,
static int lbs_cmd_reg_access(lbs_private * priv,
struct cmd_ds_command *cmdptr,
u8 cmd_action, void *pdata_buf)
{
struct wlan_offset_value *offval;
struct lbs_offset_value *offval;
lbs_deb_enter(LBS_DEB_CMD);
offval = (struct wlan_offset_value *)pdata_buf;
offval = (struct lbs_offset_value *)pdata_buf;
switch (cmdptr->command) {
case CMD_MAC_REG_ACCESS:
@ -773,11 +773,11 @@ static int wlan_cmd_reg_access(wlan_private * priv,
return 0;
}
static int wlan_cmd_802_11_mac_address(wlan_private * priv,
static int lbs_cmd_802_11_mac_address(lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD);
cmd->command = cpu_to_le16(CMD_802_11_MAC_ADDRESS);
@ -797,11 +797,11 @@ static int wlan_cmd_802_11_mac_address(wlan_private * priv,
return 0;
}
static int wlan_cmd_802_11_eeprom_access(wlan_private * priv,
static int lbs_cmd_802_11_eeprom_access(lbs_private * priv,
struct cmd_ds_command *cmd,
int cmd_action, void *pdata_buf)
{
struct wlan_ioctl_regrdwr *ea = pdata_buf;
struct lbs_ioctl_regrdwr *ea = pdata_buf;
lbs_deb_enter(LBS_DEB_CMD);
@ -819,7 +819,7 @@ static int wlan_cmd_802_11_eeprom_access(wlan_private * priv,
return 0;
}
static int wlan_cmd_bt_access(wlan_private * priv,
static int lbs_cmd_bt_access(lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action, void *pdata_buf)
{
@ -857,7 +857,7 @@ static int wlan_cmd_bt_access(wlan_private * priv,
return 0;
}
static int wlan_cmd_fwt_access(wlan_private * priv,
static int lbs_cmd_fwt_access(lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action, void *pdata_buf)
{
@ -879,7 +879,7 @@ static int wlan_cmd_fwt_access(wlan_private * priv,
return 0;
}
static int wlan_cmd_mesh_access(wlan_private * priv,
static int lbs_cmd_mesh_access(lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action, void *pdata_buf)
{
@ -901,7 +901,7 @@ static int wlan_cmd_mesh_access(wlan_private * priv,
return 0;
}
static int wlan_cmd_set_boot2_ver(wlan_private * priv,
static int lbs_cmd_set_boot2_ver(lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action, void *pdata_buf)
{
@ -913,10 +913,10 @@ static int wlan_cmd_set_boot2_ver(wlan_private * priv,
}
/*
* Note: NEVER use libertas_queue_cmd() with addtail==0 other than for
* Note: NEVER use lbs_queue_cmd() with addtail==0 other than for
* the command timer, because it does not account for queued commands.
*/
void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail)
void lbs_queue_cmd(lbs_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail)
{
unsigned long flags;
struct cmd_ds_command *cmdptr;
@ -968,12 +968,12 @@ done:
* For now - we are not performing the endian conversion the second time - but
* for PS and DEEP_SLEEP we need to worry
*/
static int DownloadcommandToStation(wlan_private * priv,
static int DownloadcommandToStation(lbs_private * priv,
struct cmd_ctrl_node *cmdnode)
{
unsigned long flags;
struct cmd_ds_command *cmdptr;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int ret = -1;
u16 cmdsize;
u16 command;
@ -990,7 +990,7 @@ static int DownloadcommandToStation(wlan_private * priv,
spin_lock_irqsave(&adapter->driver_lock, flags);
if (!cmdptr || !cmdptr->size) {
lbs_deb_host("DNLD_CMD: cmdptr is NULL or zero\n");
__libertas_cleanup_and_insert_cmd(priv, cmdnode);
__lbs_cleanup_and_insert_cmd(priv, cmdnode);
spin_unlock_irqrestore(&adapter->driver_lock, flags);
goto done;
}
@ -1015,7 +1015,7 @@ static int DownloadcommandToStation(wlan_private * priv,
lbs_deb_host("DNLD_CMD: hw_host_to_card failed\n");
spin_lock_irqsave(&adapter->driver_lock, flags);
adapter->cur_cmd_retcode = ret;
__libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
__lbs_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
adapter->nr_cmd_pending--;
adapter->cur_cmd = NULL;
spin_unlock_irqrestore(&adapter->driver_lock, flags);
@ -1038,7 +1038,7 @@ done:
return ret;
}
static int wlan_cmd_mac_control(wlan_private * priv,
static int lbs_cmd_mac_control(lbs_private * priv,
struct cmd_ds_command *cmd)
{
struct cmd_ds_mac_control *mac = &cmd->params.macctrl;
@ -1060,9 +1060,9 @@ static int wlan_cmd_mac_control(wlan_private * priv,
* This function inserts command node to cmdfreeq
* after cleans it. Requires adapter->driver_lock held.
*/
void __libertas_cleanup_and_insert_cmd(wlan_private * priv, struct cmd_ctrl_node *ptempcmd)
void __lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptempcmd)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
if (!ptempcmd)
return;
@ -1071,22 +1071,22 @@ void __libertas_cleanup_and_insert_cmd(wlan_private * priv, struct cmd_ctrl_node
list_add_tail((struct list_head *)ptempcmd, &adapter->cmdfreeq);
}
static void libertas_cleanup_and_insert_cmd(wlan_private * priv, struct cmd_ctrl_node *ptempcmd)
static void lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptempcmd)
{
unsigned long flags;
spin_lock_irqsave(&priv->adapter->driver_lock, flags);
__libertas_cleanup_and_insert_cmd(priv, ptempcmd);
__lbs_cleanup_and_insert_cmd(priv, ptempcmd);
spin_unlock_irqrestore(&priv->adapter->driver_lock, flags);
}
int libertas_set_radio_control(wlan_private * priv)
int lbs_set_radio_control(lbs_private * priv)
{
int ret = 0;
lbs_deb_enter(LBS_DEB_CMD);
ret = libertas_prepare_and_send_command(priv,
ret = lbs_prepare_and_send_command(priv,
CMD_802_11_RADIO_CONTROL,
CMD_ACT_SET,
CMD_OPTION_WAITFORRSP, 0, NULL);
@ -1098,14 +1098,14 @@ int libertas_set_radio_control(wlan_private * priv)
return ret;
}
int libertas_set_mac_packet_filter(wlan_private * priv)
int lbs_set_mac_packet_filter(lbs_private * priv)
{
int ret = 0;
lbs_deb_enter(LBS_DEB_CMD);
/* Send MAC control command to station */
ret = libertas_prepare_and_send_command(priv,
ret = lbs_prepare_and_send_command(priv,
CMD_MAC_CONTROL, 0, 0, 0, NULL);
lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret);
@ -1115,7 +1115,7 @@ int libertas_set_mac_packet_filter(wlan_private * priv)
/**
* @brief This function prepare the command before send to firmware.
*
* @param priv A pointer to wlan_private structure
* @param priv A pointer to lbs_private structure
* @param cmd_no command number
* @param cmd_action command action: GET or SET
* @param wait_option wait option: wait response or not
@ -1123,13 +1123,13 @@ int libertas_set_mac_packet_filter(wlan_private * priv)
* @param pdata_buf A pointer to informaion buffer
* @return 0 or -1
*/
int libertas_prepare_and_send_command(wlan_private * priv,
int lbs_prepare_and_send_command(lbs_private * priv,
u16 cmd_no,
u16 cmd_action,
u16 wait_option, u32 cmd_oid, void *pdata_buf)
{
int ret = 0;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *cmdnode;
struct cmd_ds_command *cmdptr;
unsigned long flags;
@ -1148,7 +1148,7 @@ int libertas_prepare_and_send_command(wlan_private * priv,
goto done;
}
cmdnode = libertas_get_free_cmd_ctrl_node(priv);
cmdnode = lbs_get_free_cmd_ctrl_node(priv);
if (cmdnode == NULL) {
lbs_deb_host("PREP_CMD: cmdnode is NULL\n");
@ -1159,7 +1159,7 @@ int libertas_prepare_and_send_command(wlan_private * priv,
goto done;
}
libertas_set_cmd_ctrl_node(priv, cmdnode, cmd_oid, wait_option, pdata_buf);
lbs_set_cmd_ctrl_node(priv, cmdnode, cmd_oid, wait_option, pdata_buf);
cmdptr = (struct cmd_ds_command *)cmdnode->bufvirtualaddr;
@ -1167,7 +1167,7 @@ int libertas_prepare_and_send_command(wlan_private * priv,
if (!cmdptr) {
lbs_deb_host("PREP_CMD: cmdptr is NULL\n");
libertas_cleanup_and_insert_cmd(priv, cmdnode);
lbs_cleanup_and_insert_cmd(priv, cmdnode);
ret = -1;
goto done;
}
@ -1181,116 +1181,116 @@ int libertas_prepare_and_send_command(wlan_private * priv,
switch (cmd_no) {
case CMD_GET_HW_SPEC:
ret = wlan_cmd_hw_spec(priv, cmdptr);
ret = lbs_cmd_hw_spec(priv, cmdptr);
break;
case CMD_802_11_PS_MODE:
ret = wlan_cmd_802_11_ps_mode(priv, cmdptr, cmd_action);
ret = lbs_cmd_802_11_ps_mode(priv, cmdptr, cmd_action);
break;
case CMD_802_11_SCAN:
ret = libertas_cmd_80211_scan(priv, cmdptr, pdata_buf);
ret = lbs_cmd_80211_scan(priv, cmdptr, pdata_buf);
break;
case CMD_MAC_CONTROL:
ret = wlan_cmd_mac_control(priv, cmdptr);
ret = lbs_cmd_mac_control(priv, cmdptr);
break;
case CMD_802_11_ASSOCIATE:
case CMD_802_11_REASSOCIATE:
ret = libertas_cmd_80211_associate(priv, cmdptr, pdata_buf);
ret = lbs_cmd_80211_associate(priv, cmdptr, pdata_buf);
break;
case CMD_802_11_DEAUTHENTICATE:
ret = libertas_cmd_80211_deauthenticate(priv, cmdptr);
ret = lbs_cmd_80211_deauthenticate(priv, cmdptr);
break;
case CMD_802_11_SET_WEP:
ret = wlan_cmd_802_11_set_wep(priv, cmdptr, cmd_action, pdata_buf);
ret = lbs_cmd_802_11_set_wep(priv, cmdptr, cmd_action, pdata_buf);
break;
case CMD_802_11_AD_HOC_START:
ret = libertas_cmd_80211_ad_hoc_start(priv, cmdptr, pdata_buf);
ret = lbs_cmd_80211_ad_hoc_start(priv, cmdptr, pdata_buf);
break;
case CMD_CODE_DNLD:
break;
case CMD_802_11_RESET:
ret = wlan_cmd_802_11_reset(priv, cmdptr, cmd_action);
ret = lbs_cmd_802_11_reset(priv, cmdptr, cmd_action);
break;
case CMD_802_11_GET_LOG:
ret = wlan_cmd_802_11_get_log(priv, cmdptr);
ret = lbs_cmd_802_11_get_log(priv, cmdptr);
break;
case CMD_802_11_AUTHENTICATE:
ret = libertas_cmd_80211_authenticate(priv, cmdptr, pdata_buf);
ret = lbs_cmd_80211_authenticate(priv, cmdptr, pdata_buf);
break;
case CMD_802_11_GET_STAT:
ret = wlan_cmd_802_11_get_stat(priv, cmdptr);
ret = lbs_cmd_802_11_get_stat(priv, cmdptr);
break;
case CMD_802_11_SNMP_MIB:
ret = wlan_cmd_802_11_snmp_mib(priv, cmdptr,
ret = lbs_cmd_802_11_snmp_mib(priv, cmdptr,
cmd_action, cmd_oid, pdata_buf);
break;
case CMD_MAC_REG_ACCESS:
case CMD_BBP_REG_ACCESS:
case CMD_RF_REG_ACCESS:
ret = wlan_cmd_reg_access(priv, cmdptr, cmd_action, pdata_buf);
ret = lbs_cmd_reg_access(priv, cmdptr, cmd_action, pdata_buf);
break;
case CMD_802_11_RF_CHANNEL:
ret = wlan_cmd_802_11_rf_channel(priv, cmdptr,
ret = lbs_cmd_802_11_rf_channel(priv, cmdptr,
cmd_action, pdata_buf);
break;
case CMD_802_11_RF_TX_POWER:
ret = wlan_cmd_802_11_rf_tx_power(priv, cmdptr,
ret = lbs_cmd_802_11_rf_tx_power(priv, cmdptr,
cmd_action, pdata_buf);
break;
case CMD_802_11_RADIO_CONTROL:
ret = wlan_cmd_802_11_radio_control(priv, cmdptr, cmd_action);
ret = lbs_cmd_802_11_radio_control(priv, cmdptr, cmd_action);
break;
case CMD_802_11_DATA_RATE:
ret = wlan_cmd_802_11_data_rate(priv, cmdptr, cmd_action);
ret = lbs_cmd_802_11_data_rate(priv, cmdptr, cmd_action);
break;
case CMD_802_11_RATE_ADAPT_RATESET:
ret = wlan_cmd_802_11_rate_adapt_rateset(priv,
ret = lbs_cmd_802_11_rate_adapt_rateset(priv,
cmdptr, cmd_action);
break;
case CMD_MAC_MULTICAST_ADR:
ret = wlan_cmd_mac_multicast_adr(priv, cmdptr, cmd_action);
ret = lbs_cmd_mac_multicast_adr(priv, cmdptr, cmd_action);
break;
case CMD_802_11_MONITOR_MODE:
ret = wlan_cmd_802_11_monitor_mode(priv, cmdptr,
ret = lbs_cmd_802_11_monitor_mode(priv, cmdptr,
cmd_action, pdata_buf);
break;
case CMD_802_11_AD_HOC_JOIN:
ret = libertas_cmd_80211_ad_hoc_join(priv, cmdptr, pdata_buf);
ret = lbs_cmd_80211_ad_hoc_join(priv, cmdptr, pdata_buf);
break;
case CMD_802_11_RSSI:
ret = wlan_cmd_802_11_rssi(priv, cmdptr);
ret = lbs_cmd_802_11_rssi(priv, cmdptr);
break;
case CMD_802_11_AD_HOC_STOP:
ret = libertas_cmd_80211_ad_hoc_stop(priv, cmdptr);
ret = lbs_cmd_80211_ad_hoc_stop(priv, cmdptr);
break;
case CMD_802_11_ENABLE_RSN:
ret = wlan_cmd_802_11_enable_rsn(priv, cmdptr, cmd_action,
ret = lbs_cmd_802_11_enable_rsn(priv, cmdptr, cmd_action,
pdata_buf);
break;
case CMD_802_11_KEY_MATERIAL:
ret = wlan_cmd_802_11_key_material(priv, cmdptr, cmd_action,
ret = lbs_cmd_802_11_key_material(priv, cmdptr, cmd_action,
cmd_oid, pdata_buf);
break;
@ -1300,11 +1300,11 @@ int libertas_prepare_and_send_command(wlan_private * priv,
break;
case CMD_802_11_MAC_ADDRESS:
ret = wlan_cmd_802_11_mac_address(priv, cmdptr, cmd_action);
ret = lbs_cmd_802_11_mac_address(priv, cmdptr, cmd_action);
break;
case CMD_802_11_EEPROM_ACCESS:
ret = wlan_cmd_802_11_eeprom_access(priv, cmdptr,
ret = lbs_cmd_802_11_eeprom_access(priv, cmdptr,
cmd_action, pdata_buf);
break;
@ -1322,17 +1322,17 @@ int libertas_prepare_and_send_command(wlan_private * priv,
goto done;
case CMD_802_11D_DOMAIN_INFO:
ret = libertas_cmd_802_11d_domain_info(priv, cmdptr,
ret = lbs_cmd_802_11d_domain_info(priv, cmdptr,
cmd_no, cmd_action);
break;
case CMD_802_11_SLEEP_PARAMS:
ret = wlan_cmd_802_11_sleep_params(priv, cmdptr, cmd_action);
ret = lbs_cmd_802_11_sleep_params(priv, cmdptr, cmd_action);
break;
case CMD_802_11_INACTIVITY_TIMEOUT:
ret = wlan_cmd_802_11_inactivity_timeout(priv, cmdptr,
ret = lbs_cmd_802_11_inactivity_timeout(priv, cmdptr,
cmd_action, pdata_buf);
libertas_set_cmd_ctrl_node(priv, cmdnode, 0, 0, pdata_buf);
lbs_set_cmd_ctrl_node(priv, cmdnode, 0, 0, pdata_buf);
break;
case CMD_802_11_TPC_CFG:
@ -1379,19 +1379,19 @@ int libertas_prepare_and_send_command(wlan_private * priv,
ret = 0;
break;
case CMD_BT_ACCESS:
ret = wlan_cmd_bt_access(priv, cmdptr, cmd_action, pdata_buf);
ret = lbs_cmd_bt_access(priv, cmdptr, cmd_action, pdata_buf);
break;
case CMD_FWT_ACCESS:
ret = wlan_cmd_fwt_access(priv, cmdptr, cmd_action, pdata_buf);
ret = lbs_cmd_fwt_access(priv, cmdptr, cmd_action, pdata_buf);
break;
case CMD_MESH_ACCESS:
ret = wlan_cmd_mesh_access(priv, cmdptr, cmd_action, pdata_buf);
ret = lbs_cmd_mesh_access(priv, cmdptr, cmd_action, pdata_buf);
break;
case CMD_SET_BOOT2_VER:
ret = wlan_cmd_set_boot2_ver(priv, cmdptr, cmd_action, pdata_buf);
ret = lbs_cmd_set_boot2_ver(priv, cmdptr, cmd_action, pdata_buf);
break;
case CMD_GET_TSF:
@ -1409,14 +1409,14 @@ int libertas_prepare_and_send_command(wlan_private * priv,
/* return error, since the command preparation failed */
if (ret != 0) {
lbs_deb_host("PREP_CMD: command preparation failed\n");
libertas_cleanup_and_insert_cmd(priv, cmdnode);
lbs_cleanup_and_insert_cmd(priv, cmdnode);
ret = -1;
goto done;
}
cmdnode->cmdwaitqwoken = 0;
libertas_queue_cmd(adapter, cmdnode, 1);
lbs_queue_cmd(adapter, cmdnode, 1);
wake_up_interruptible(&priv->waitq);
if (wait_option & CMD_OPTION_WAITFORRSP) {
@ -1439,23 +1439,23 @@ done:
lbs_deb_leave_args(LBS_DEB_HOST, "ret %d", ret);
return ret;
}
EXPORT_SYMBOL_GPL(libertas_prepare_and_send_command);
EXPORT_SYMBOL_GPL(lbs_prepare_and_send_command);
/**
* @brief This function allocates the command buffer and link
* it to command free queue.
*
* @param priv A pointer to wlan_private structure
* @param priv A pointer to lbs_private structure
* @return 0 or -1
*/
int libertas_allocate_cmd_buffer(wlan_private * priv)
int lbs_allocate_cmd_buffer(lbs_private * priv)
{
int ret = 0;
u32 ulbufsize;
u32 i;
struct cmd_ctrl_node *tempcmd_array;
u8 *ptempvirtualaddr;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_HOST);
@ -1484,7 +1484,7 @@ int libertas_allocate_cmd_buffer(wlan_private * priv)
for (i = 0; i < MRVDRV_NUM_OF_CMD_BUFFER; i++) {
init_waitqueue_head(&tempcmd_array[i].cmdwait_q);
libertas_cleanup_and_insert_cmd(priv, &tempcmd_array[i]);
lbs_cleanup_and_insert_cmd(priv, &tempcmd_array[i]);
}
ret = 0;
@ -1497,15 +1497,15 @@ done:
/**
* @brief This function frees the command buffer.
*
* @param priv A pointer to wlan_private structure
* @param priv A pointer to lbs_private structure
* @return 0 or -1
*/
int libertas_free_cmd_buffer(wlan_private * priv)
int lbs_free_cmd_buffer(lbs_private * priv)
{
u32 ulbufsize; /* Someone needs to die for this. Slowly and painfully */
unsigned int i;
struct cmd_ctrl_node *tempcmd_array;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_HOST);
@ -1541,13 +1541,13 @@ done:
* @brief This function gets a free command node if available in
* command free queue.
*
* @param priv A pointer to wlan_private structure
* @param priv A pointer to lbs_private structure
* @return cmd_ctrl_node A pointer to cmd_ctrl_node structure or NULL
*/
struct cmd_ctrl_node *libertas_get_free_cmd_ctrl_node(wlan_private * priv)
struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(lbs_private * priv)
{
struct cmd_ctrl_node *tempnode;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
unsigned long flags;
lbs_deb_enter(LBS_DEB_HOST);
@ -1602,14 +1602,14 @@ static void cleanup_cmdnode(struct cmd_ctrl_node *ptempnode)
/**
* @brief This function initializes the command node.
*
* @param priv A pointer to wlan_private structure
* @param priv A pointer to lbs_private structure
* @param ptempnode A pointer to cmd_ctrl_node structure
* @param cmd_oid cmd oid: treated as sub command
* @param wait_option wait option: wait response or not
* @param pdata_buf A pointer to informaion buffer
* @return 0 or -1
*/
void libertas_set_cmd_ctrl_node(wlan_private * priv,
void lbs_set_cmd_ctrl_node(lbs_private * priv,
struct cmd_ctrl_node *ptempnode,
u32 cmd_oid, u16 wait_option, void *pdata_buf)
{
@ -1630,19 +1630,19 @@ void libertas_set_cmd_ctrl_node(wlan_private * priv,
* pending queue. It will put fimware back to PS mode
* if applicable.
*
* @param priv A pointer to wlan_private structure
* @param priv A pointer to lbs_private structure
* @return 0 or -1
*/
int libertas_execute_next_command(wlan_private * priv)
int lbs_execute_next_command(lbs_private * priv)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *cmdnode = NULL;
struct cmd_ds_command *cmdptr;
unsigned long flags;
int ret = 0;
// Debug group is LBS_DEB_THREAD and not LBS_DEB_HOST, because the
// only caller to us is libertas_thread() and we get even when a
// only caller to us is lbs_thread() and we get even when a
// data packet is received
lbs_deb_enter(LBS_DEB_THREAD);
@ -1683,7 +1683,7 @@ int libertas_execute_next_command(wlan_private * priv)
/*
* 1. Non-PS command:
* Queue it. set needtowakeup to TRUE if current state
* is SLEEP, otherwise call libertas_ps_wakeup to send Exit_PS.
* is SLEEP, otherwise call lbs_ps_wakeup to send Exit_PS.
* 2. PS command but not Exit_PS:
* Ignore it.
* 3. PS command Exit_PS:
@ -1702,7 +1702,7 @@ int libertas_execute_next_command(wlan_private * priv)
since it is blocked in main_thread. */
adapter->needtowakeup = 1;
} else
libertas_ps_wakeup(priv, 0);
lbs_ps_wakeup(priv, 0);
ret = 0;
goto done;
@ -1722,7 +1722,7 @@ int libertas_execute_next_command(wlan_private * priv)
lbs_deb_host(
"EXEC_NEXT_CMD: ignore ENTER_PS cmd\n");
list_del((struct list_head *)cmdnode);
libertas_cleanup_and_insert_cmd(priv, cmdnode);
lbs_cleanup_and_insert_cmd(priv, cmdnode);
ret = 0;
goto done;
@ -1733,7 +1733,7 @@ int libertas_execute_next_command(wlan_private * priv)
lbs_deb_host(
"EXEC_NEXT_CMD: ignore EXIT_PS cmd in sleep\n");
list_del((struct list_head *)cmdnode);
libertas_cleanup_and_insert_cmd(priv, cmdnode);
lbs_cleanup_and_insert_cmd(priv, cmdnode);
adapter->needtowakeup = 1;
ret = 0;
@ -1753,9 +1753,9 @@ int libertas_execute_next_command(wlan_private * priv)
* check if in power save mode, if yes, put the device back
* to PS mode
*/
if ((adapter->psmode != WLAN802_11POWERMODECAM) &&
if ((adapter->psmode != LBS802_11POWERMODECAM) &&
(adapter->psstate == PS_STATE_FULL_POWER) &&
(adapter->connect_status == LIBERTAS_CONNECTED)) {
(adapter->connect_status == LBS_CONNECTED)) {
if (adapter->secinfo.WPAenabled ||
adapter->secinfo.WPA2enabled) {
/* check for valid WPA group keys */
@ -1764,13 +1764,13 @@ int libertas_execute_next_command(wlan_private * priv)
lbs_deb_host(
"EXEC_NEXT_CMD: WPA enabled and GTK_SET"
" go back to PS_SLEEP");
libertas_ps_sleep(priv, 0);
lbs_ps_sleep(priv, 0);
}
} else {
lbs_deb_host(
"EXEC_NEXT_CMD: cmdpendingq empty, "
"go back to PS_SLEEP");
libertas_ps_sleep(priv, 0);
lbs_ps_sleep(priv, 0);
}
}
}
@ -1781,7 +1781,7 @@ done:
return ret;
}
void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str)
void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str)
{
union iwreq_data iwrq;
u8 buf[50];
@ -1805,10 +1805,10 @@ void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str)
lbs_deb_leave(LBS_DEB_WEXT);
}
static int sendconfirmsleep(wlan_private * priv, u8 * cmdptr, u16 size)
static int sendconfirmsleep(lbs_private *priv, u8 *cmdptr, u16 size)
{
unsigned long flags;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int ret = 0;
lbs_deb_enter(LBS_DEB_HOST);
@ -1847,7 +1847,7 @@ static int sendconfirmsleep(wlan_private * priv, u8 * cmdptr, u16 size)
return ret;
}
void libertas_ps_sleep(wlan_private * priv, int wait_option)
void lbs_ps_sleep(lbs_private * priv, int wait_option)
{
lbs_deb_enter(LBS_DEB_HOST);
@ -1856,7 +1856,7 @@ void libertas_ps_sleep(wlan_private * priv, int wait_option)
* Remove this check if it is to be supported in IBSS mode also
*/
libertas_prepare_and_send_command(priv, CMD_802_11_PS_MODE,
lbs_prepare_and_send_command(priv, CMD_802_11_PS_MODE,
CMD_SUBCMD_ENTER_PS, wait_option, 0, NULL);
lbs_deb_leave(LBS_DEB_HOST);
@ -1865,19 +1865,19 @@ void libertas_ps_sleep(wlan_private * priv, int wait_option)
/**
* @brief This function sends Exit_PS command to firmware.
*
* @param priv A pointer to wlan_private structure
* @param priv A pointer to lbs_private structure
* @param wait_option wait response or not
* @return n/a
*/
void libertas_ps_wakeup(wlan_private * priv, int wait_option)
void lbs_ps_wakeup(lbs_private * priv, int wait_option)
{
__le32 Localpsmode;
lbs_deb_enter(LBS_DEB_HOST);
Localpsmode = cpu_to_le32(WLAN802_11POWERMODECAM);
Localpsmode = cpu_to_le32(LBS802_11POWERMODECAM);
libertas_prepare_and_send_command(priv, CMD_802_11_PS_MODE,
lbs_prepare_and_send_command(priv, CMD_802_11_PS_MODE,
CMD_SUBCMD_EXIT_PS,
wait_option, 0, &Localpsmode);
@ -1888,14 +1888,14 @@ void libertas_ps_wakeup(wlan_private * priv, int wait_option)
* @brief This function checks condition and prepares to
* send sleep confirm command to firmware if ok.
*
* @param priv A pointer to wlan_private structure
* @param priv A pointer to lbs_private structure
* @param psmode Power Saving mode
* @return n/a
*/
void libertas_ps_confirm_sleep(wlan_private * priv, u16 psmode)
void lbs_ps_confirm_sleep(lbs_private * priv, u16 psmode)
{
unsigned long flags =0;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
u8 allowed = 1;
lbs_deb_enter(LBS_DEB_HOST);
@ -1917,8 +1917,8 @@ void libertas_ps_confirm_sleep(wlan_private * priv, u16 psmode)
spin_unlock_irqrestore(&adapter->driver_lock, flags);
if (allowed) {
lbs_deb_host("sending libertas_ps_confirm_sleep\n");
sendconfirmsleep(priv, (u8 *) & adapter->libertas_ps_confirm_sleep,
lbs_deb_host("sending lbs_ps_confirm_sleep\n");
sendconfirmsleep(priv, (u8 *) & adapter->lbs_ps_confirm_sleep,
sizeof(struct PS_CMD_ConfirmSleep));
} else {
lbs_deb_host("sleep confirm has been delayed\n");

View file

@ -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(wlan_private * priv)
adapter->curbssparams.ssid_len),
adapter->curbssparams.ssid_len);
adapter->connect_status = LIBERTAS_DISCONNECTED;
adapter->connect_status = LBS_DISCONNECTED;
/* Clear out associated SSID and BSSID since connection is
* no longer valid.
@ -77,7 +77,7 @@ void libertas_mac_event_disconnected(wlan_private * priv)
if (adapter->psstate != PS_STATE_FULL_POWER) {
/* make firmware to exit PS mode */
lbs_deb_cmd("disconnected, so exit PS mode\n");
libertas_ps_wakeup(priv, 0);
lbs_ps_wakeup(priv, 0);
}
lbs_deb_leave(LBS_DEB_CMD);
}
@ -85,11 +85,11 @@ void libertas_mac_event_disconnected(wlan_private * priv)
/**
* @brief This function handles MIC failure event.
*
* @param priv A pointer to wlan_private structure
* @param priv A pointer to lbs_private structure
* @para event the event id
* @return n/a
*/
static void handle_mic_failureevent(wlan_private * priv, u32 event)
static void handle_mic_failureevent(lbs_private * priv, u32 event)
{
char buf[50];
@ -104,15 +104,15 @@ static void handle_mic_failureevent(wlan_private * priv, u32 event)
strcat(buf, "multicast ");
}
libertas_send_iwevcustom_event(priv, buf);
lbs_send_iwevcustom_event(priv, buf);
lbs_deb_leave(LBS_DEB_CMD);
}
static int wlan_ret_reg_access(wlan_private * priv,
static int lbs_ret_reg_access(lbs_private * priv,
u16 type, struct cmd_ds_command *resp)
{
int ret = 0;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD);
@ -152,12 +152,12 @@ static int wlan_ret_reg_access(wlan_private * priv,
return ret;
}
static int wlan_ret_get_hw_spec(wlan_private * priv,
static int lbs_ret_get_hw_spec(lbs_private * priv,
struct cmd_ds_command *resp)
{
u32 i;
struct cmd_ds_get_hw_spec *hwspec = &resp->params.hwspec;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int ret = 0;
DECLARE_MAC_BUF(mac);
@ -183,7 +183,7 @@ static int wlan_ret_get_hw_spec(wlan_private * priv,
for (i = 0; i < MRVDRV_MAX_REGION_CODE; i++) {
/* use the region code to search for the index */
if (adapter->regioncode == libertas_region_code_to_index[i]) {
if (adapter->regioncode == lbs_region_code_to_index[i]) {
break;
}
}
@ -201,12 +201,12 @@ static int wlan_ret_get_hw_spec(wlan_private * priv,
if (priv->mesh_dev)
memcpy(priv->mesh_dev->dev_addr, adapter->current_addr, ETH_ALEN);
if (libertas_set_regiontable(priv, adapter->regioncode, 0)) {
if (lbs_set_regiontable(priv, adapter->regioncode, 0)) {
ret = -1;
goto done;
}
if (libertas_set_universaltable(priv, 0)) {
if (lbs_set_universaltable(priv, 0)) {
ret = -1;
goto done;
}
@ -216,11 +216,11 @@ done:
return ret;
}
static int wlan_ret_802_11_sleep_params(wlan_private * priv,
static int lbs_ret_802_11_sleep_params(lbs_private * priv,
struct cmd_ds_command *resp)
{
struct cmd_ds_802_11_sleep_params *sp = &resp->params.sleep_params;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD);
@ -240,14 +240,14 @@ static int wlan_ret_802_11_sleep_params(wlan_private * priv,
return 0;
}
static int wlan_ret_802_11_stat(wlan_private * priv,
static int lbs_ret_802_11_stat(lbs_private * priv,
struct cmd_ds_command *resp)
{
lbs_deb_enter(LBS_DEB_CMD);
/* currently adapter->wlan802_11Stat is unused
struct cmd_ds_802_11_get_stat *p11Stat = &resp->params.gstat;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
// TODO Convert it to Big endian befor copy
memcpy(&adapter->wlan802_11Stat,
@ -257,7 +257,7 @@ static int wlan_ret_802_11_stat(wlan_private * priv,
return 0;
}
static int wlan_ret_802_11_snmp_mib(wlan_private * priv,
static int lbs_ret_802_11_snmp_mib(lbs_private * priv,
struct cmd_ds_command *resp)
{
struct cmd_ds_802_11_snmp_mib *smib = &resp->params.smib;
@ -299,12 +299,12 @@ static int wlan_ret_802_11_snmp_mib(wlan_private * priv,
return 0;
}
static int wlan_ret_802_11_key_material(wlan_private * priv,
static int lbs_ret_802_11_key_material(lbs_private * priv,
struct cmd_ds_command *resp)
{
struct cmd_ds_802_11_key_material *pkeymaterial =
&resp->params.keymaterial;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
u16 action = le16_to_cpu(pkeymaterial->action);
lbs_deb_enter(LBS_DEB_CMD);
@ -355,11 +355,11 @@ static int wlan_ret_802_11_key_material(wlan_private * priv,
return 0;
}
static int wlan_ret_802_11_mac_address(wlan_private * priv,
static int lbs_ret_802_11_mac_address(lbs_private * priv,
struct cmd_ds_command *resp)
{
struct cmd_ds_802_11_mac_address *macadd = &resp->params.macadd;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD);
@ -369,11 +369,11 @@ static int wlan_ret_802_11_mac_address(wlan_private * priv,
return 0;
}
static int wlan_ret_802_11_rf_tx_power(wlan_private * priv,
static int lbs_ret_802_11_rf_tx_power(lbs_private * priv,
struct cmd_ds_command *resp)
{
struct cmd_ds_802_11_rf_tx_power *rtp = &resp->params.txp;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD);
@ -385,11 +385,11 @@ static int wlan_ret_802_11_rf_tx_power(wlan_private * priv,
return 0;
}
static int wlan_ret_802_11_rate_adapt_rateset(wlan_private * priv,
static int lbs_ret_802_11_rate_adapt_rateset(lbs_private * priv,
struct cmd_ds_command *resp)
{
struct cmd_ds_802_11_rate_adapt_rateset *rates = &resp->params.rateset;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD);
@ -402,11 +402,11 @@ static int wlan_ret_802_11_rate_adapt_rateset(wlan_private * priv,
return 0;
}
static int wlan_ret_802_11_data_rate(wlan_private * priv,
static int lbs_ret_802_11_data_rate(lbs_private * priv,
struct cmd_ds_command *resp)
{
struct cmd_ds_802_11_data_rate *pdatarate = &resp->params.drate;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD);
@ -416,18 +416,18 @@ static int wlan_ret_802_11_data_rate(wlan_private * priv,
/* FIXME: get actual rates FW can do if this command actually returns
* all data rates supported.
*/
adapter->cur_rate = libertas_fw_index_to_data_rate(pdatarate->rates[0]);
adapter->cur_rate = lbs_fw_index_to_data_rate(pdatarate->rates[0]);
lbs_deb_cmd("DATA_RATE: current rate 0x%02x\n", adapter->cur_rate);
lbs_deb_leave(LBS_DEB_CMD);
return 0;
}
static int wlan_ret_802_11_rf_channel(wlan_private * priv,
static int lbs_ret_802_11_rf_channel(lbs_private * priv,
struct cmd_ds_command *resp)
{
struct cmd_ds_802_11_rf_channel *rfchannel = &resp->params.rfchannel;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
u16 action = le16_to_cpu(rfchannel->action);
u16 newchannel = le16_to_cpu(rfchannel->currentchannel);
@ -446,11 +446,11 @@ static int wlan_ret_802_11_rf_channel(wlan_private * priv,
return 0;
}
static int wlan_ret_802_11_rssi(wlan_private * priv,
static int lbs_ret_802_11_rssi(lbs_private * priv,
struct cmd_ds_command *resp)
{
struct cmd_ds_802_11_rssi_rsp *rssirsp = &resp->params.rssirsp;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD);
@ -477,12 +477,12 @@ static int wlan_ret_802_11_rssi(wlan_private * priv,
return 0;
}
static int wlan_ret_802_11_eeprom_access(wlan_private * priv,
static int lbs_ret_802_11_eeprom_access(lbs_private * priv,
struct cmd_ds_command *resp)
{
wlan_adapter *adapter = priv->adapter;
struct wlan_ioctl_regrdwr *pbuf;
pbuf = (struct wlan_ioctl_regrdwr *) adapter->prdeeprom;
lbs_adapter *adapter = priv->adapter;
struct lbs_ioctl_regrdwr *pbuf;
pbuf = (struct lbs_ioctl_regrdwr *) adapter->prdeeprom;
lbs_deb_enter_args(LBS_DEB_CMD, "len %d",
le16_to_cpu(resp->params.rdeeprom.bytecount));
@ -503,11 +503,11 @@ static int wlan_ret_802_11_eeprom_access(wlan_private * priv,
return 0;
}
static int wlan_ret_get_log(wlan_private * priv,
static int lbs_ret_get_log(lbs_private * priv,
struct cmd_ds_command *resp)
{
struct cmd_ds_802_11_get_log *logmessage = &resp->params.glog;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD);
@ -518,11 +518,11 @@ static int wlan_ret_get_log(wlan_private * priv,
return 0;
}
static int libertas_ret_802_11_enable_rsn(wlan_private * priv,
static int lbs_ret_802_11_enable_rsn(lbs_private * priv,
struct cmd_ds_command *resp)
{
struct cmd_ds_802_11_enable_rsn *enable_rsn = &resp->params.enbrsn;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
u32 * pdata_buf = adapter->cur_cmd->pdata_buf;
lbs_deb_enter(LBS_DEB_CMD);
@ -538,11 +538,11 @@ static int libertas_ret_802_11_enable_rsn(wlan_private * priv,
static inline int handle_cmd_response(u16 respcmd,
struct cmd_ds_command *resp,
wlan_private *priv)
lbs_private *priv)
{
int ret = 0;
unsigned long flags;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_HOST);
@ -550,47 +550,47 @@ static inline int handle_cmd_response(u16 respcmd,
case CMD_RET(CMD_MAC_REG_ACCESS):
case CMD_RET(CMD_BBP_REG_ACCESS):
case CMD_RET(CMD_RF_REG_ACCESS):
ret = wlan_ret_reg_access(priv, respcmd, resp);
ret = lbs_ret_reg_access(priv, respcmd, resp);
break;
case CMD_RET(CMD_GET_HW_SPEC):
ret = wlan_ret_get_hw_spec(priv, resp);
ret = lbs_ret_get_hw_spec(priv, resp);
break;
case CMD_RET(CMD_802_11_SCAN):
ret = libertas_ret_80211_scan(priv, resp);
ret = lbs_ret_80211_scan(priv, resp);
break;
case CMD_RET(CMD_802_11_GET_LOG):
ret = wlan_ret_get_log(priv, resp);
ret = lbs_ret_get_log(priv, resp);
break;
case CMD_RET_802_11_ASSOCIATE:
case CMD_RET(CMD_802_11_ASSOCIATE):
case CMD_RET(CMD_802_11_REASSOCIATE):
ret = libertas_ret_80211_associate(priv, resp);
ret = lbs_ret_80211_associate(priv, resp);
break;
case CMD_RET(CMD_802_11_DISASSOCIATE):
case CMD_RET(CMD_802_11_DEAUTHENTICATE):
ret = libertas_ret_80211_disassociate(priv, resp);
ret = lbs_ret_80211_disassociate(priv, resp);
break;
case CMD_RET(CMD_802_11_AD_HOC_START):
case CMD_RET(CMD_802_11_AD_HOC_JOIN):
ret = libertas_ret_80211_ad_hoc_start(priv, resp);
ret = lbs_ret_80211_ad_hoc_start(priv, resp);
break;
case CMD_RET(CMD_802_11_GET_STAT):
ret = wlan_ret_802_11_stat(priv, resp);
ret = lbs_ret_802_11_stat(priv, resp);
break;
case CMD_RET(CMD_802_11_SNMP_MIB):
ret = wlan_ret_802_11_snmp_mib(priv, resp);
ret = lbs_ret_802_11_snmp_mib(priv, resp);
break;
case CMD_RET(CMD_802_11_RF_TX_POWER):
ret = wlan_ret_802_11_rf_tx_power(priv, resp);
ret = lbs_ret_802_11_rf_tx_power(priv, resp);
break;
case CMD_RET(CMD_802_11_SET_AFC):
@ -612,45 +612,45 @@ static inline int handle_cmd_response(u16 respcmd,
break;
case CMD_RET(CMD_802_11_ENABLE_RSN):
ret = libertas_ret_802_11_enable_rsn(priv, resp);
ret = lbs_ret_802_11_enable_rsn(priv, resp);
break;
case CMD_RET(CMD_802_11_DATA_RATE):
ret = wlan_ret_802_11_data_rate(priv, resp);
ret = lbs_ret_802_11_data_rate(priv, resp);
break;
case CMD_RET(CMD_802_11_RATE_ADAPT_RATESET):
ret = wlan_ret_802_11_rate_adapt_rateset(priv, resp);
ret = lbs_ret_802_11_rate_adapt_rateset(priv, resp);
break;
case CMD_RET(CMD_802_11_RF_CHANNEL):
ret = wlan_ret_802_11_rf_channel(priv, resp);
ret = lbs_ret_802_11_rf_channel(priv, resp);
break;
case CMD_RET(CMD_802_11_RSSI):
ret = wlan_ret_802_11_rssi(priv, resp);
ret = lbs_ret_802_11_rssi(priv, resp);
break;
case CMD_RET(CMD_802_11_MAC_ADDRESS):
ret = wlan_ret_802_11_mac_address(priv, resp);
ret = lbs_ret_802_11_mac_address(priv, resp);
break;
case CMD_RET(CMD_802_11_AD_HOC_STOP):
ret = libertas_ret_80211_ad_hoc_stop(priv, resp);
ret = lbs_ret_80211_ad_hoc_stop(priv, resp);
break;
case CMD_RET(CMD_802_11_KEY_MATERIAL):
ret = wlan_ret_802_11_key_material(priv, resp);
ret = lbs_ret_802_11_key_material(priv, resp);
break;
case CMD_RET(CMD_802_11_EEPROM_ACCESS):
ret = wlan_ret_802_11_eeprom_access(priv, resp);
ret = lbs_ret_802_11_eeprom_access(priv, resp);
break;
case CMD_RET(CMD_802_11D_DOMAIN_INFO):
ret = libertas_ret_802_11d_domain_info(priv, resp);
ret = lbs_ret_802_11d_domain_info(priv, resp);
break;
case CMD_RET(CMD_802_11_SLEEP_PARAMS):
ret = wlan_ret_802_11_sleep_params(priv, resp);
ret = lbs_ret_802_11_sleep_params(priv, resp);
break;
case CMD_RET(CMD_802_11_INACTIVITY_TIMEOUT):
spin_lock_irqsave(&adapter->driver_lock, flags);
@ -713,11 +713,11 @@ static inline int handle_cmd_response(u16 respcmd,
return ret;
}
int libertas_process_rx_command(wlan_private * priv)
int lbs_process_rx_command(lbs_private * priv)
{
u16 respcmd;
struct cmd_ds_command *resp;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int ret = 0;
ulong flags;
u16 result;
@ -749,7 +749,7 @@ int libertas_process_rx_command(wlan_private * priv)
if (!(respcmd & 0x8000)) {
lbs_deb_host("invalid response!\n");
adapter->cur_cmd_retcode = -1;
__libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
__lbs_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
adapter->nr_cmd_pending--;
adapter->cur_cmd = NULL;
spin_unlock_irqrestore(&adapter->driver_lock, flags);
@ -774,27 +774,27 @@ int libertas_process_rx_command(wlan_private * priv)
/*
* We should not re-try enter-ps command in
* ad-hoc mode. It takes place in
* libertas_execute_next_command().
* lbs_execute_next_command().
*/
if (adapter->mode == IW_MODE_ADHOC &&
action == CMD_SUBCMD_ENTER_PS)
adapter->psmode = WLAN802_11POWERMODECAM;
adapter->psmode = LBS802_11POWERMODECAM;
} else if (action == CMD_SUBCMD_ENTER_PS) {
adapter->needtowakeup = 0;
adapter->psstate = PS_STATE_AWAKE;
lbs_deb_host("CMD_RESP: ENTER_PS command response\n");
if (adapter->connect_status != LIBERTAS_CONNECTED) {
if (adapter->connect_status != LBS_CONNECTED) {
/*
* When Deauth Event received before Enter_PS command
* response, We need to wake up the firmware.
*/
lbs_deb_host(
"disconnected, invoking libertas_ps_wakeup\n");
"disconnected, invoking lbs_ps_wakeup\n");
spin_unlock_irqrestore(&adapter->driver_lock, flags);
mutex_unlock(&adapter->lock);
libertas_ps_wakeup(priv, 0);
lbs_ps_wakeup(priv, 0);
mutex_lock(&adapter->lock);
spin_lock_irqsave(&adapter->driver_lock, flags);
}
@ -806,7 +806,7 @@ int libertas_process_rx_command(wlan_private * priv)
lbs_deb_host("CMD_RESP: PS action 0x%X\n", action);
}
__libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
__lbs_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
adapter->nr_cmd_pending--;
adapter->cur_cmd = NULL;
spin_unlock_irqrestore(&adapter->driver_lock, flags);
@ -837,7 +837,7 @@ int libertas_process_rx_command(wlan_private * priv)
}
__libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
__lbs_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
adapter->nr_cmd_pending--;
adapter->cur_cmd = NULL;
spin_unlock_irqrestore(&adapter->driver_lock, flags);
@ -853,7 +853,7 @@ int libertas_process_rx_command(wlan_private * priv)
spin_lock_irqsave(&adapter->driver_lock, flags);
if (adapter->cur_cmd) {
/* Clean up and Put current command back to cmdfreeq */
__libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
__lbs_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
adapter->nr_cmd_pending--;
WARN_ON(adapter->nr_cmd_pending > 128);
adapter->cur_cmd = NULL;
@ -866,10 +866,10 @@ done:
return ret;
}
int libertas_process_event(wlan_private * priv)
int lbs_process_event(lbs_private * priv)
{
int ret = 0;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
u32 eventcause;
lbs_deb_enter(LBS_DEB_CMD);
@ -887,17 +887,17 @@ int libertas_process_event(wlan_private * priv)
case MACREG_INT_CODE_DEAUTHENTICATED:
lbs_deb_cmd("EVENT: deauthenticated\n");
libertas_mac_event_disconnected(priv);
lbs_mac_event_disconnected(priv);
break;
case MACREG_INT_CODE_DISASSOCIATED:
lbs_deb_cmd("EVENT: disassociated\n");
libertas_mac_event_disconnected(priv);
lbs_mac_event_disconnected(priv);
break;
case MACREG_INT_CODE_LINK_LOSE_NO_SCAN:
lbs_deb_cmd("EVENT: link lost\n");
libertas_mac_event_disconnected(priv);
lbs_mac_event_disconnected(priv);
break;
case MACREG_INT_CODE_PS_SLEEP:
@ -911,7 +911,7 @@ int libertas_process_event(wlan_private * priv)
}
adapter->psstate = PS_STATE_PRE_SLEEP;
libertas_ps_confirm_sleep(priv, (u16) adapter->psmode);
lbs_ps_confirm_sleep(priv, (u16) adapter->psmode);
break;
@ -932,10 +932,10 @@ int libertas_process_event(wlan_private * priv)
* wait for the command processing to finish
* before resuming sending
* adapter->needtowakeup will be set to FALSE
* in libertas_ps_wakeup()
* in lbs_ps_wakeup()
*/
lbs_deb_cmd("waking up ...\n");
libertas_ps_wakeup(priv, 0);
lbs_ps_wakeup(priv, 0);
}
break;
@ -979,7 +979,7 @@ int libertas_process_event(wlan_private * priv)
break;
}
lbs_pr_info("EVENT: MESH_AUTO_STARTED\n");
adapter->connect_status = LIBERTAS_CONNECTED;
adapter->connect_status = LBS_CONNECTED;
if (priv->mesh_open == 1) {
netif_wake_queue(priv->mesh_dev);
netif_carrier_on(priv->mesh_dev);

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,10 @@
void libertas_debugfs_init(void);
void libertas_debugfs_remove(void);
#ifndef _LBS_DEBUGFS_H_
#define _LBS_DEBUGFS_H_
void libertas_debugfs_init_one(wlan_private *priv, struct net_device *dev);
void libertas_debugfs_remove_one(wlan_private *priv);
void lbs_debugfs_init(void);
void lbs_debugfs_remove(void);
void lbs_debugfs_init_one(lbs_private *priv, struct net_device *dev);
void lbs_debugfs_remove_one(lbs_private *priv);
#endif

View file

@ -3,80 +3,80 @@
* functions defined in other source files
*/
#ifndef _WLAN_DECL_H_
#define _WLAN_DECL_H_
#ifndef _LBS_DECL_H_
#define _LBS_DECL_H_
#include <linux/device.h>
#include "defs.h"
/** Function Prototype Declaration */
struct wlan_private;
struct lbs_private;
struct sk_buff;
struct net_device;
int libertas_set_mac_packet_filter(wlan_private * priv);
int lbs_set_mac_packet_filter(lbs_private * priv);
void libertas_send_tx_feedback(wlan_private * priv);
void lbs_send_tx_feedback(lbs_private * priv);
int libertas_free_cmd_buffer(wlan_private * priv);
int lbs_free_cmd_buffer(lbs_private * priv);
struct cmd_ctrl_node;
struct cmd_ctrl_node *libertas_get_free_cmd_ctrl_node(wlan_private * priv);
struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(lbs_private * priv);
void libertas_set_cmd_ctrl_node(wlan_private * priv,
void lbs_set_cmd_ctrl_node(lbs_private * priv,
struct cmd_ctrl_node *ptempnode,
u32 cmd_oid, u16 wait_option, void *pdata_buf);
int libertas_prepare_and_send_command(wlan_private * priv,
int lbs_prepare_and_send_command(lbs_private * priv,
u16 cmd_no,
u16 cmd_action,
u16 wait_option, u32 cmd_oid, void *pdata_buf);
void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail);
void lbs_queue_cmd(lbs_adapter *adapter, struct cmd_ctrl_node *cmdnode, u8 addtail);
int libertas_allocate_cmd_buffer(wlan_private * priv);
int libertas_execute_next_command(wlan_private * priv);
int libertas_process_event(wlan_private * priv);
void libertas_interrupt(struct net_device *);
int libertas_set_radio_control(wlan_private * priv);
u32 libertas_fw_index_to_data_rate(u8 index);
u8 libertas_data_rate_to_fw_index(u32 rate);
void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen);
int lbs_allocate_cmd_buffer(lbs_private * priv);
int lbs_execute_next_command(lbs_private * priv);
int lbs_process_event(lbs_private * priv);
void lbs_interrupt(struct net_device *);
int lbs_set_radio_control(lbs_private * priv);
u32 lbs_fw_index_to_data_rate(u8 index);
u8 lbs_data_rate_to_fw_index(u32 rate);
void lbs_get_fwversion(lbs_adapter *adapter, char *fwversion, int maxlen);
void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb);
void lbs_upload_rx_packet(lbs_private * priv, struct sk_buff *skb);
/** The proc fs interface */
int libertas_process_rx_command(wlan_private * priv);
int libertas_process_tx(wlan_private * priv, struct sk_buff *skb);
void __libertas_cleanup_and_insert_cmd(wlan_private * priv,
int lbs_process_rx_command(lbs_private * priv);
int lbs_process_tx(lbs_private * priv, struct sk_buff *skb);
void __lbs_cleanup_and_insert_cmd(lbs_private * priv,
struct cmd_ctrl_node *ptempcmd);
int libertas_set_regiontable(wlan_private * priv, u8 region, u8 band);
int lbs_set_regiontable(lbs_private * priv, u8 region, u8 band);
int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *);
int lbs_process_rxed_packet(lbs_private * priv, struct sk_buff *);
void libertas_ps_sleep(wlan_private * priv, int wait_option);
void libertas_ps_confirm_sleep(wlan_private * priv, u16 psmode);
void libertas_ps_wakeup(wlan_private * priv, int wait_option);
void lbs_ps_sleep(lbs_private * priv, int wait_option);
void lbs_ps_confirm_sleep(lbs_private * priv, u16 psmode);
void lbs_ps_wakeup(lbs_private * priv, int wait_option);
void libertas_tx_runqueue(wlan_private *priv);
void lbs_tx_runqueue(lbs_private *priv);
struct chan_freq_power *libertas_find_cfp_by_band_and_channel(
wlan_adapter * adapter, u8 band, u16 channel);
struct chan_freq_power *lbs_find_cfp_by_band_and_channel(
lbs_adapter *adapter, u8 band, u16 channel);
void libertas_mac_event_disconnected(wlan_private * priv);
void lbs_mac_event_disconnected(lbs_private * priv);
void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str);
void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str);
/* main.c */
struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band,
struct chan_freq_power *lbs_get_region_cfp_table(u8 region, u8 band,
int *cfp_no);
wlan_private *libertas_add_card(void *card, struct device *dmdev);
int libertas_remove_card(wlan_private *priv);
int libertas_start_card(wlan_private *priv);
int libertas_stop_card(wlan_private *priv);
int libertas_add_mesh(wlan_private *priv, struct device *dev);
void libertas_remove_mesh(wlan_private *priv);
int libertas_reset_device(wlan_private *priv);
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

View file

@ -2,8 +2,8 @@
* This header file contains global constant/enum definitions,
* global variable declaration.
*/
#ifndef _WLAN_DEFS_H_
#define _WLAN_DEFS_H_
#ifndef _LBS_DEFS_H_
#define _LBS_DEFS_H_
#include <linux/spinlock.h>
@ -41,11 +41,11 @@
#define LBS_DEB_HEX 0x00200000
#define LBS_DEB_SDIO 0x00400000
extern unsigned int libertas_debug;
extern unsigned int lbs_debug;
#ifdef DEBUG
#define LBS_DEB_LL(grp, grpnam, fmt, args...) \
do { if ((libertas_debug & (grp)) == (grp)) \
do { if ((lbs_debug & (grp)) == (grp)) \
printk(KERN_DEBUG DRV_NAME grpnam "%s: " fmt, \
in_interrupt() ? " (INT)" : "", ## args); } while (0)
#else
@ -96,8 +96,8 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
int i = 0;
if (len &&
(libertas_debug & LBS_DEB_HEX) &&
(libertas_debug & grp))
(lbs_debug & LBS_DEB_HEX) &&
(lbs_debug & grp))
{
for (i = 1; i <= len; i++) {
if ((i & 0xf) == 1) {
@ -138,7 +138,7 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
#define MRVDRV_ASSOCIATION_TIME_OUT 255
#define MRVDRV_SNAP_HEADER_LEN 8
#define WLAN_UPLD_SIZE 2312
#define LBS_UPLD_SIZE 2312
#define DEV_NAME_LEN 32
/** Misc constants */
@ -262,12 +262,12 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
#define UNSET_MESH_FRAME(x) (x->cb[6]=0)
/** Global Variable Declaration */
typedef struct _wlan_private wlan_private;
typedef struct _wlan_adapter wlan_adapter;
extern const char libertas_driver_version[];
extern u16 libertas_region_code_to_index[MRVDRV_MAX_REGION_CODE];
typedef struct _lbs_private lbs_private;
typedef struct _lbs_adapter lbs_adapter;
extern const char lbs_driver_version[];
extern u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE];
extern u8 libertas_bg_rates[MAX_RATES];
extern u8 lbs_bg_rates[MAX_RATES];
/** ENUM definition*/
/** SNRNF_TYPE */
@ -284,13 +284,13 @@ enum SNRNF_DATA {
MAX_TYPE_AVG
};
/** WLAN_802_11_POWER_MODE */
enum WLAN_802_11_POWER_MODE {
WLAN802_11POWERMODECAM,
WLAN802_11POWERMODEMAX_PSP,
WLAN802_11POWERMODEFAST_PSP,
/** LBS_802_11_POWER_MODE */
enum LBS_802_11_POWER_MODE {
LBS802_11POWERMODECAM,
LBS802_11POWERMODEMAX_PSP,
LBS802_11POWERMODEFAST_PSP,
/*not a real mode, defined as an upper bound */
WLAN802_11POWEMODEMAX
LBS802_11POWEMODEMAX
};
/** PS_STATE */
@ -308,16 +308,16 @@ enum DNLD_STATE {
DNLD_CMD_SENT
};
/** WLAN_MEDIA_STATE */
enum WLAN_MEDIA_STATE {
LIBERTAS_CONNECTED,
LIBERTAS_DISCONNECTED
/** LBS_MEDIA_STATE */
enum LBS_MEDIA_STATE {
LBS_CONNECTED,
LBS_DISCONNECTED
};
/** WLAN_802_11_PRIVACY_FILTER */
enum WLAN_802_11_PRIVACY_FILTER {
WLAN802_11PRIVFILTERACCEPTALL,
WLAN802_11PRIVFILTER8021XWEP
/** LBS_802_11_PRIVACY_FILTER */
enum LBS_802_11_PRIVACY_FILTER {
LBS802_11PRIVFILTERACCEPTALL,
LBS802_11PRIVFILTER8021XWEP
};
/** mv_ms_type */
@ -382,4 +382,4 @@ enum SNMP_MIB_VALUE_e {
#define FWT_DEFAULT_SLEEPMODE 0
#define FWT_DEFAULT_SNR 0
#endif /* _WLAN_DEFS_H_ */
#endif

View file

@ -1,10 +1,10 @@
/**
* This file contains definitions and data structures specific
* to Marvell 802.11 NIC. It contains the Device Information
* structure wlan_adapter.
* structure lbs_adapter.
*/
#ifndef _WLAN_DEV_H_
#define _WLAN_DEV_H_
#ifndef _LBS_DEV_H_
#define _LBS_DEV_H_
#include <linux/netdevice.h>
#include <linux/wireless.h>
@ -15,7 +15,7 @@
#include "defs.h"
#include "scan.h"
extern struct ethtool_ops libertas_ethtool_ops;
extern struct ethtool_ops lbs_ethtool_ops;
#define MAX_BSSID_PER_CHANNEL 16
@ -53,7 +53,7 @@ struct region_channel {
struct chan_freq_power *CFP;
};
struct wlan_802_11_security {
struct lbs_802_11_security {
u8 WPAenabled;
u8 WPA2enabled;
u8 wep_enabled;
@ -87,7 +87,7 @@ struct sleep_params {
};
/* Mesh statistics */
struct wlan_mesh_stats {
struct lbs_mesh_stats {
u32 fwd_bcast_cnt; /* Fwd: Broadcast counter */
u32 fwd_unicast_cnt; /* Fwd: Unicast counter */
u32 fwd_drop_ttl; /* Fwd: TTL zero */
@ -99,7 +99,7 @@ struct wlan_mesh_stats {
};
/** Private structure for the MV device */
struct _wlan_private {
struct _lbs_private {
int open;
int mesh_open;
int infra_open;
@ -109,7 +109,7 @@ struct _wlan_private {
char name[DEV_NAME_LEN];
void *card;
wlan_adapter *adapter;
lbs_adapter *adapter;
struct net_device *dev;
struct net_device_stats stats;
@ -118,7 +118,7 @@ struct _wlan_private {
struct ieee80211_device *ieee;
struct iw_statistics wstats;
struct wlan_mesh_stats mstats;
struct lbs_mesh_stats mstats;
struct dentry *debugfs_dir;
struct dentry *debugfs_debug;
struct dentry *debugfs_files[6];
@ -136,7 +136,7 @@ struct _wlan_private {
/** Upload length */
u32 upld_len;
/* Upload buffer */
u8 upld_buf[WLAN_UPLD_SIZE];
u8 upld_buf[LBS_UPLD_SIZE];
/* Download sent:
bit0 1/0=data_sent/data_tx_done,
bit1 1/0=cmd_sent/cmd_tx_done,
@ -155,9 +155,9 @@ struct _wlan_private {
struct work_struct sync_channel;
/** Hardware access */
int (*hw_host_to_card) (wlan_private * priv, u8 type, u8 * payload, u16 nb);
int (*hw_get_int_status) (wlan_private * priv, u8 *);
int (*hw_read_event_cause) (wlan_private *);
int (*hw_host_to_card) (lbs_private *priv, u8 type, u8 *payload, u16 nb);
int (*hw_get_int_status) (lbs_private *priv, u8 *);
int (*hw_read_event_cause) (lbs_private *);
};
/** Association request
@ -194,7 +194,7 @@ struct assoc_request {
struct enc_key wpa_mcast_key;
struct enc_key wpa_unicast_key;
struct wlan_802_11_security secinfo;
struct lbs_802_11_security secinfo;
/** WPA Information Elements*/
u8 wpa_ie[MAX_WPA_IE_LEN];
@ -205,7 +205,7 @@ struct assoc_request {
};
/** Wlan adapter data structure*/
struct _wlan_adapter {
struct _lbs_adapter {
/** STATUS variables */
u8 fwreleasenumber[4];
u32 fwcapinfo;
@ -213,7 +213,7 @@ struct _wlan_adapter {
struct mutex lock;
u8 tmptxbuf[WLAN_UPLD_SIZE];
u8 tmptxbuf[LBS_UPLD_SIZE];
/* protected by hard_start_xmit serialization */
/** command-related variables */
@ -302,13 +302,13 @@ struct _wlan_adapter {
u32 psstate;
u8 needtowakeup;
struct PS_CMD_ConfirmSleep libertas_ps_confirm_sleep;
struct PS_CMD_ConfirmSleep lbs_ps_confirm_sleep;
struct assoc_request * pending_assoc_req;
struct assoc_request * in_progress_assoc_req;
/** Encryption parameter */
struct wlan_802_11_security secinfo;
struct lbs_802_11_security secinfo;
/** WEP keys */
struct enc_key wep_keys[4];
@ -350,7 +350,7 @@ struct _wlan_adapter {
struct region_channel universal_channel[MAX_REGION_CHANNEL_NUM];
/** 11D and Domain Regulatory Data */
struct wlan_802_11d_domain_reg domainreg;
struct lbs_802_11d_domain_reg domainreg;
struct parsed_region_chan_11d parsed_region_chan;
/** FSM variable for 11d support */
@ -358,7 +358,7 @@ struct _wlan_adapter {
/** MISCELLANEOUS */
u8 *prdeeprom;
struct wlan_offset_value offsetvalue;
struct lbs_offset_value offsetvalue;
struct cmd_ds_802_11_get_log logmsg;
@ -368,4 +368,4 @@ struct _wlan_adapter {
u8 last_scanned_channel;
};
#endif /* _WLAN_DEV_H_ */
#endif

View file

@ -19,35 +19,35 @@ static const char * mesh_stat_strings[]= {
"tx_failed_cnt"
};
static void libertas_ethtool_get_drvinfo(struct net_device *dev,
static void lbs_ethtool_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
wlan_private *priv = (wlan_private *) dev->priv;
lbs_private *priv = (lbs_private *) dev->priv;
char fwver[32];
libertas_get_fwversion(priv->adapter, fwver, sizeof(fwver) - 1);
lbs_get_fwversion(priv->adapter, fwver, sizeof(fwver) - 1);
strcpy(info->driver, "libertas");
strcpy(info->version, libertas_driver_version);
strcpy(info->version, lbs_driver_version);
strcpy(info->fw_version, fwver);
}
/* All 8388 parts have 16KiB EEPROM size at the time of writing.
* In case that changes this needs fixing.
*/
#define LIBERTAS_EEPROM_LEN 16384
#define LBS_EEPROM_LEN 16384
static int libertas_ethtool_get_eeprom_len(struct net_device *dev)
static int lbs_ethtool_get_eeprom_len(struct net_device *dev)
{
return LIBERTAS_EEPROM_LEN;
return LBS_EEPROM_LEN;
}
static int libertas_ethtool_get_eeprom(struct net_device *dev,
static int lbs_ethtool_get_eeprom(struct net_device *dev,
struct ethtool_eeprom *eeprom, u8 * bytes)
{
wlan_private *priv = (wlan_private *) dev->priv;
wlan_adapter *adapter = priv->adapter;
struct wlan_ioctl_regrdwr regctrl;
lbs_private *priv = (lbs_private *) dev->priv;
lbs_adapter *adapter = priv->adapter;
struct lbs_ioctl_regrdwr regctrl;
char *ptr;
int ret;
@ -55,7 +55,7 @@ static int libertas_ethtool_get_eeprom(struct net_device *dev,
regctrl.offset = eeprom->offset;
regctrl.NOB = eeprom->len;
if (eeprom->offset + eeprom->len > LIBERTAS_EEPROM_LEN)
if (eeprom->offset + eeprom->len > LBS_EEPROM_LEN)
return -EINVAL;
// mutex_lock(&priv->mutex);
@ -70,7 +70,7 @@ static int libertas_ethtool_get_eeprom(struct net_device *dev,
lbs_deb_ethtool("action:%d offset: %x NOB: %02x\n",
regctrl.action, regctrl.offset, regctrl.NOB);
ret = libertas_prepare_and_send_command(priv,
ret = lbs_prepare_and_send_command(priv,
CMD_802_11_EEPROM_ACCESS,
regctrl.action,
CMD_OPTION_WAITFORRSP, 0,
@ -87,7 +87,7 @@ static int libertas_ethtool_get_eeprom(struct net_device *dev,
ptr = (char *)adapter->prdeeprom;
/* skip the command header, but include the "value" u32 variable */
ptr = ptr + sizeof(struct wlan_ioctl_regrdwr) - 4;
ptr = ptr + sizeof(struct lbs_ioctl_regrdwr) - 4;
/*
* Return the result back to the user
@ -105,17 +105,17 @@ done:
return ret;
}
static void libertas_ethtool_get_stats(struct net_device * dev,
static void lbs_ethtool_get_stats(struct net_device * dev,
struct ethtool_stats * stats, u64 * data)
{
wlan_private *priv = dev->priv;
lbs_private *priv = dev->priv;
struct cmd_ds_mesh_access mesh_access;
int ret;
lbs_deb_enter(LBS_DEB_ETHTOOL);
/* Get Mesh Statistics */
ret = libertas_prepare_and_send_command(priv,
ret = lbs_prepare_and_send_command(priv,
CMD_MESH_ACCESS, CMD_ACT_MESH_GET_STATS,
CMD_OPTION_WAITFORRSP, 0, &mesh_access);
@ -143,7 +143,7 @@ static void libertas_ethtool_get_stats(struct net_device * dev,
lbs_deb_enter(LBS_DEB_ETHTOOL);
}
static int libertas_ethtool_get_sset_count(struct net_device * dev, int sset)
static int lbs_ethtool_get_sset_count(struct net_device * dev, int sset)
{
switch (sset) {
case ETH_SS_STATS:
@ -153,7 +153,7 @@ static int libertas_ethtool_get_sset_count(struct net_device * dev, int sset)
}
}
static void libertas_ethtool_get_strings (struct net_device * dev,
static void lbs_ethtool_get_strings(struct net_device *dev,
u32 stringset,
u8 * s)
{
@ -173,12 +173,12 @@ static void libertas_ethtool_get_strings (struct net_device * dev,
lbs_deb_enter(LBS_DEB_ETHTOOL);
}
struct ethtool_ops libertas_ethtool_ops = {
.get_drvinfo = libertas_ethtool_get_drvinfo,
.get_eeprom = libertas_ethtool_get_eeprom,
.get_eeprom_len = libertas_ethtool_get_eeprom_len,
.get_sset_count = libertas_ethtool_get_sset_count,
.get_ethtool_stats = libertas_ethtool_get_stats,
.get_strings = libertas_ethtool_get_strings,
struct ethtool_ops lbs_ethtool_ops = {
.get_drvinfo = lbs_ethtool_get_drvinfo,
.get_eeprom = lbs_ethtool_get_eeprom,
.get_eeprom_len = lbs_ethtool_get_eeprom_len,
.get_sset_count = lbs_ethtool_get_sset_count,
.get_ethtool_stats = lbs_ethtool_get_stats,
.get_strings = lbs_ethtool_get_strings,
};

View file

@ -2,8 +2,8 @@
* This file contains definitions of WLAN commands.
*/
#ifndef _HOST_H_
#define _HOST_H_
#ifndef _LBS_HOST_H_
#define _LBS_HOST_H_
/** PUBLIC DEFINITIONS */
#define DEFAULT_AD_HOC_CHANNEL 6
@ -287,4 +287,4 @@ enum cmd_mesh_access_opts {
#define MACREG_INT_CODE_SNR_HIGH 0x0000001d
#define MACREG_INT_CODE_MESH_AUTO_STARTED 0x00000023
#endif /* _HOST_H_ */
#endif

View file

@ -2,8 +2,8 @@
* This file contains the function prototypes, data structure
* and defines for all the host/station commands
*/
#ifndef __HOSTCMD__H
#define __HOSTCMD__H
#ifndef _LBS_HOSTCMD_H
#define _LBS_HOSTCMD_H
#include <linux/wireless.h>
#include "11d.h"
@ -86,13 +86,13 @@ struct cmd_ctrl_node {
/* Generic structure to hold all key types. */
struct enc_key {
u16 len;
u16 flags; /* KEY_INFO_* from wlan_defs.h */
u16 type; /* KEY_TYPE_* from wlan_defs.h */
u16 flags; /* KEY_INFO_* from defs.h */
u16 type; /* KEY_TYPE_* from defs.h */
u8 key[32];
};
/* wlan_offset_value */
struct wlan_offset_value {
/* lbs_offset_value */
struct lbs_offset_value {
u32 offset;
u32 value;
};

View file

@ -57,7 +57,7 @@ MODULE_LICENSE("GPL");
struct if_cs_card {
struct pcmcia_device *p_dev;
wlan_private *priv;
lbs_private *priv;
void __iomem *iobase;
};
@ -263,7 +263,7 @@ static irqreturn_t if_cs_interrupt(int irq, void *data)
if (!card->priv->adapter->cur_cmd)
wake_up_interruptible(&card->priv->waitq);
if (card->priv->adapter->connect_status == LIBERTAS_CONNECTED)
if (card->priv->adapter->connect_status == LBS_CONNECTED)
netif_wake_queue(card->priv->dev);
}
@ -271,7 +271,7 @@ static irqreturn_t if_cs_interrupt(int irq, void *data)
if_cs_write16(card, IF_CS_C_INT_CAUSE, int_cause & IF_CS_C_IC_MASK);
}
libertas_interrupt(card->priv->dev);
lbs_interrupt(card->priv->dev);
return IRQ_HANDLED;
}
@ -286,7 +286,7 @@ static irqreturn_t if_cs_interrupt(int irq, void *data)
/*
* Called from if_cs_host_to_card to send a command to the hardware
*/
static int if_cs_send_cmd(wlan_private *priv, u8 *buf, u16 nb)
static int if_cs_send_cmd(lbs_private *priv, u8 *buf, u16 nb)
{
struct if_cs_card *card = (struct if_cs_card *)priv->card;
int ret = -1;
@ -331,7 +331,7 @@ done:
/*
* Called from if_cs_host_to_card to send a data to the hardware
*/
static void if_cs_send_data(wlan_private *priv, u8 *buf, u16 nb)
static void if_cs_send_data(lbs_private *priv, u8 *buf, u16 nb)
{
struct if_cs_card *card = (struct if_cs_card *)priv->card;
@ -354,7 +354,7 @@ static void if_cs_send_data(wlan_private *priv, u8 *buf, u16 nb)
/*
* Get the command result out of the card.
*/
static int if_cs_receive_cmdres(wlan_private *priv, u8* data, u32 *len)
static int if_cs_receive_cmdres(lbs_private *priv, u8 *data, u32 *len)
{
int ret = -1;
u16 val;
@ -386,7 +386,7 @@ out:
}
static struct sk_buff *if_cs_receive_data(wlan_private *priv)
static struct sk_buff *if_cs_receive_data(lbs_private *priv)
{
struct sk_buff *skb = NULL;
u16 len;
@ -616,7 +616,7 @@ done:
/********************************************************************/
/* Send commands or data packets to the card */
static int if_cs_host_to_card(wlan_private *priv, u8 type, u8 *buf, u16 nb)
static int if_cs_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb)
{
int ret = -1;
@ -641,10 +641,10 @@ static int if_cs_host_to_card(wlan_private *priv, u8 type, u8 *buf, u16 nb)
}
static int if_cs_get_int_status(wlan_private *priv, u8 *ireg)
static int if_cs_get_int_status(lbs_private *priv, u8 *ireg)
{
struct if_cs_card *card = (struct if_cs_card *)priv->card;
//wlan_adapter *adapter = priv->adapter;
/* lbs_adapter *adapter = priv->adapter; */
int ret = 0;
u16 int_cause;
u8 *cmdbuf;
@ -668,7 +668,7 @@ sbi_get_int_status_exit:
/* is there a data packet for us? */
if (*ireg & IF_CS_C_S_RX_UPLD_RDY) {
struct sk_buff *skb = if_cs_receive_data(priv);
libertas_process_rxed_packet(priv, skb);
lbs_process_rxed_packet(priv, skb);
*ireg &= ~IF_CS_C_S_RX_UPLD_RDY;
}
@ -698,7 +698,7 @@ out:
}
static int if_cs_read_event_cause(wlan_private *priv)
static int if_cs_read_event_cause(lbs_private *priv)
{
lbs_deb_enter(LBS_DEB_CS);
@ -746,7 +746,7 @@ static void if_cs_release(struct pcmcia_device *p_dev)
static int if_cs_probe(struct pcmcia_device *p_dev)
{
int ret = -ENOMEM;
wlan_private *priv;
lbs_private *priv;
struct if_cs_card *card;
/* CIS parsing */
tuple_t tuple;
@ -856,7 +856,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
goto out2;
/* Make this card known to the libertas driver */
priv = libertas_add_card(card, &p_dev->dev);
priv = lbs_add_card(card, &p_dev->dev);
if (!priv) {
ret = -ENOMEM;
goto out2;
@ -885,7 +885,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
if_cs_enable_ints(card);
/* And finally bring the card up */
if (libertas_start_card(priv) != 0) {
if (lbs_start_card(priv) != 0) {
lbs_pr_err("could not activate card\n");
goto out3;
}
@ -894,7 +894,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
goto out;
out3:
libertas_remove_card(priv);
lbs_remove_card(priv);
out2:
ioport_unmap(card->iobase);
out1:
@ -917,8 +917,8 @@ static void if_cs_detach(struct pcmcia_device *p_dev)
lbs_deb_enter(LBS_DEB_CS);
libertas_stop_card(card->priv);
libertas_remove_card(card->priv);
lbs_stop_card(card->priv);
lbs_remove_card(card->priv);
if_cs_disable_ints(card);
if_cs_release(p_dev);
kfree(card);
@ -939,7 +939,7 @@ static struct pcmcia_device_id if_cs_ids[] = {
MODULE_DEVICE_TABLE(pcmcia, if_cs_ids);
static struct pcmcia_driver libertas_driver = {
static struct pcmcia_driver lbs_driver = {
.owner = THIS_MODULE,
.drv = {
.name = DRV_NAME,
@ -955,7 +955,7 @@ static int __init if_cs_init(void)
int ret;
lbs_deb_enter(LBS_DEB_CS);
ret = pcmcia_register_driver(&libertas_driver);
ret = pcmcia_register_driver(&lbs_driver);
lbs_deb_leave(LBS_DEB_CS);
return ret;
}
@ -964,7 +964,7 @@ static int __init if_cs_init(void)
static void __exit if_cs_exit(void)
{
lbs_deb_enter(LBS_DEB_CS);
pcmcia_unregister_driver(&libertas_driver);
pcmcia_unregister_driver(&lbs_driver);
lbs_deb_leave(LBS_DEB_CS);
}

View file

@ -40,11 +40,11 @@
#include "dev.h"
#include "if_sdio.h"
static char *libertas_helper_name = NULL;
module_param_named(helper_name, libertas_helper_name, charp, 0644);
static char *lbs_helper_name = NULL;
module_param_named(helper_name, lbs_helper_name, charp, 0644);
static char *libertas_fw_name = NULL;
module_param_named(fw_name, libertas_fw_name, charp, 0644);
static char *lbs_fw_name = NULL;
module_param_named(fw_name, lbs_fw_name, charp, 0644);
static const struct sdio_device_id if_sdio_ids[] = {
{ SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_LIBERTAS) },
@ -82,7 +82,7 @@ struct if_sdio_packet {
struct if_sdio_card {
struct sdio_func *func;
wlan_private *priv;
lbs_private *priv;
int model;
unsigned long ioport;
@ -154,7 +154,7 @@ static int if_sdio_handle_cmd(struct if_sdio_card *card,
card->int_cause |= MRVDRV_CMD_UPLD_RDY;
libertas_interrupt(card->priv->dev);
lbs_interrupt(card->priv->dev);
ret = 0;
@ -194,7 +194,7 @@ static int if_sdio_handle_data(struct if_sdio_card *card,
memcpy(data, buffer, size);
libertas_process_rxed_packet(card->priv, skb);
lbs_process_rxed_packet(card->priv, skb);
ret = 0;
@ -236,7 +236,7 @@ static int if_sdio_handle_event(struct if_sdio_card *card,
card->event = event;
card->int_cause |= MRVDRV_CARDEVENT;
libertas_interrupt(card->priv->dev);
lbs_interrupt(card->priv->dev);
spin_unlock_irqrestore(&card->priv->adapter->driver_lock, flags);
@ -694,7 +694,7 @@ out:
/* Libertas callbacks */
/*******************************************************************/
static int if_sdio_host_to_card(wlan_private *priv, u8 type, u8 *buf, u16 nb)
static int if_sdio_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb)
{
int ret;
struct if_sdio_card *card;
@ -775,7 +775,7 @@ out:
return ret;
}
static int if_sdio_get_int_status(wlan_private *priv, u8 *ireg)
static int if_sdio_get_int_status(lbs_private *priv, u8 *ireg)
{
struct if_sdio_card *card;
@ -791,7 +791,7 @@ static int if_sdio_get_int_status(wlan_private *priv, u8 *ireg)
return 0;
}
static int if_sdio_read_event_cause(wlan_private *priv)
static int if_sdio_read_event_cause(lbs_private *priv)
{
struct if_sdio_card *card;
@ -836,7 +836,7 @@ static void if_sdio_interrupt(struct sdio_func *func)
*/
if (cause & IF_SDIO_H_INT_DNLD) {
if ((card->priv->dnld_sent == DNLD_DATA_SENT) &&
(card->priv->adapter->connect_status == LIBERTAS_CONNECTED))
(card->priv->adapter->connect_status == LBS_CONNECTED))
netif_wake_queue(card->priv->dev);
card->priv->dnld_sent = DNLD_RES_RECEIVED;
}
@ -857,7 +857,7 @@ static int if_sdio_probe(struct sdio_func *func,
const struct sdio_device_id *id)
{
struct if_sdio_card *card;
wlan_private *priv;
lbs_private *priv;
int ret, i;
unsigned int model;
struct if_sdio_packet *packet;
@ -905,15 +905,15 @@ static int if_sdio_probe(struct sdio_func *func,
card->helper = if_sdio_models[i].helper;
card->firmware = if_sdio_models[i].firmware;
if (libertas_helper_name) {
if (lbs_helper_name) {
lbs_deb_sdio("overriding helper firmware: %s\n",
libertas_helper_name);
card->helper = libertas_helper_name;
lbs_helper_name);
card->helper = lbs_helper_name;
}
if (libertas_fw_name) {
lbs_deb_sdio("overriding firmware: %s\n", libertas_fw_name);
card->firmware = libertas_fw_name;
if (lbs_fw_name) {
lbs_deb_sdio("overriding firmware: %s\n", lbs_fw_name);
card->firmware = lbs_fw_name;
}
sdio_claim_host(func);
@ -951,7 +951,7 @@ static int if_sdio_probe(struct sdio_func *func,
if (ret)
goto reclaim;
priv = libertas_add_card(card, &func->dev);
priv = lbs_add_card(card, &func->dev);
if (!priv) {
ret = -ENOMEM;
goto reclaim;
@ -975,7 +975,7 @@ static int if_sdio_probe(struct sdio_func *func,
if (ret)
goto reclaim;
ret = libertas_start_card(priv);
ret = lbs_start_card(priv);
if (ret)
goto err_activate_card;
@ -1020,8 +1020,8 @@ static void if_sdio_remove(struct sdio_func *func)
card->priv->adapter->surpriseremoved = 1;
lbs_deb_sdio("call remove card\n");
libertas_stop_card(card->priv);
libertas_remove_card(card->priv);
lbs_stop_card(card->priv);
lbs_remove_card(card->priv);
flush_scheduled_work();

View file

@ -9,8 +9,8 @@
* your option) any later version.
*/
#ifndef LIBERTAS_IF_SDIO_H
#define LIBERTAS_IF_SDIO_H
#ifndef _LBS_IF_SDIO_H
#define _LBS_IF_SDIO_H
#define IF_SDIO_IOPORT 0x00

View file

@ -21,8 +21,8 @@
static const char usbdriver_name[] = "usb8xxx";
static u8 *default_fw_name = "usb8388.bin";
static char *libertas_fw_name = NULL;
module_param_named(fw_name, libertas_fw_name, charp, 0644);
static char *lbs_fw_name;
module_param_named(fw_name, lbs_fw_name, charp, 0644);
/*
* We need to send a RESET command to all USB devices before
@ -45,9 +45,9 @@ MODULE_DEVICE_TABLE(usb, if_usb_table);
static void if_usb_receive(struct urb *urb);
static void if_usb_receive_fwload(struct urb *urb);
static int if_usb_prog_firmware(struct usb_card_rec *cardp);
static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 nb);
static int if_usb_get_int_status(wlan_private * priv, u8 *);
static int if_usb_read_event_cause(wlan_private *);
static int if_usb_host_to_card(lbs_private *priv, u8 type, u8 *payload, u16 nb);
static int if_usb_get_int_status(lbs_private *priv, u8 *);
static int if_usb_read_event_cause(lbs_private *);
static int usb_tx_block(struct usb_card_rec *cardp, u8 *payload, u16 nb);
static void if_usb_free(struct usb_card_rec *cardp);
static int if_usb_submit_rx_urb(struct usb_card_rec *cardp);
@ -65,7 +65,7 @@ static void if_usb_write_bulk_callback(struct urb *urb)
/* handle the transmission complete validations */
if (urb->status == 0) {
wlan_private *priv = cardp->priv;
lbs_private *priv = cardp->priv;
/*
lbs_deb_usbd(&urb->dev->dev, "URB status is successfull\n");
@ -77,7 +77,7 @@ static void if_usb_write_bulk_callback(struct urb *urb)
* valid at firmware load time.
*/
if (priv) {
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
struct net_device *dev = priv->dev;
priv->dnld_sent = DNLD_RES_RECEIVED;
@ -86,7 +86,7 @@ static void if_usb_write_bulk_callback(struct urb *urb)
if (!adapter->cur_cmd)
wake_up_interruptible(&priv->waitq);
if ((adapter->connect_status == LIBERTAS_CONNECTED)) {
if ((adapter->connect_status == LBS_CONNECTED)) {
netif_wake_queue(dev);
netif_wake_queue(priv->mesh_dev);
}
@ -136,7 +136,7 @@ static int if_usb_probe(struct usb_interface *intf,
struct usb_device *udev;
struct usb_host_interface *iface_desc;
struct usb_endpoint_descriptor *endpoint;
wlan_private *priv;
lbs_private *priv;
struct usb_card_rec *cardp;
int i;
@ -222,12 +222,12 @@ static int if_usb_probe(struct usb_interface *intf,
goto err_prog_firmware;
}
if (!(priv = libertas_add_card(cardp, &udev->dev)))
if (!(priv = lbs_add_card(cardp, &udev->dev)))
goto err_prog_firmware;
cardp->priv = priv;
if (libertas_add_mesh(priv, &udev->dev))
if (lbs_add_mesh(priv, &udev->dev))
goto err_add_mesh;
cardp->eth_dev = priv->dev;
@ -242,7 +242,7 @@ static int if_usb_probe(struct usb_interface *intf,
msleep_interruptible(200);
priv->adapter->fw_ready = 1;
if (libertas_start_card(priv))
if (lbs_start_card(priv))
goto err_start_card;
list_add_tail(&cardp->list, &usb_devices);
@ -253,9 +253,9 @@ static int if_usb_probe(struct usb_interface *intf,
return 0;
err_start_card:
libertas_remove_mesh(priv);
lbs_remove_mesh(priv);
err_add_mesh:
libertas_remove_card(priv);
lbs_remove_card(priv);
err_prog_firmware:
if_usb_reset_device(cardp);
dealloc:
@ -273,7 +273,7 @@ error:
static void if_usb_disconnect(struct usb_interface *intf)
{
struct usb_card_rec *cardp = usb_get_intfdata(intf);
wlan_private *priv = (wlan_private *) cardp->priv;
lbs_private *priv = (lbs_private *) cardp->priv;
lbs_deb_enter(LBS_DEB_MAIN);
@ -283,12 +283,12 @@ static void if_usb_disconnect(struct usb_interface *intf)
list_del(&cardp->list);
if (priv) {
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
adapter->surpriseremoved = 1;
libertas_stop_card(priv);
libertas_remove_mesh(priv);
libertas_remove_card(priv);
lbs_stop_card(priv);
lbs_remove_mesh(priv);
lbs_remove_card(priv);
}
/* Unlink and free urb */
@ -302,7 +302,7 @@ static void if_usb_disconnect(struct usb_interface *intf)
/**
* @brief This function download FW
* @param priv pointer to wlan_private
* @param priv pointer to lbs_private
* @return 0
*/
static int if_prog_firmware(struct usb_card_rec *cardp)
@ -385,7 +385,7 @@ static int if_prog_firmware(struct usb_card_rec *cardp)
static int if_usb_reset_device(struct usb_card_rec *cardp)
{
int ret;
wlan_private * priv = cardp->priv;
lbs_private * priv = cardp->priv;
lbs_deb_enter(LBS_DEB_USB);
@ -395,7 +395,7 @@ static int if_usb_reset_device(struct usb_card_rec *cardp)
ret = usb_reset_device(cardp->udev);
if (!ret && priv) {
msleep(10);
ret = libertas_reset_device(priv);
ret = lbs_reset_device(priv);
msleep(10);
}
@ -406,7 +406,7 @@ static int if_usb_reset_device(struct usb_card_rec *cardp)
/**
* @brief This function transfer the data to the device.
* @param priv pointer to wlan_private
* @param priv pointer to lbs_private
* @param payload pointer to payload data
* @param nb data length
* @return 0 or -1
@ -583,7 +583,7 @@ exit:
static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb,
struct usb_card_rec *cardp,
wlan_private *priv)
lbs_private *priv)
{
if (recvlength > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE +
MESSAGE_HEADER_LEN || recvlength < MRVDRV_MIN_PKT_LEN) {
@ -596,14 +596,14 @@ static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb,
skb_reserve(skb, IPFIELD_ALIGN_OFFSET);
skb_put(skb, recvlength);
skb_pull(skb, MESSAGE_HEADER_LEN);
libertas_process_rxed_packet(priv, skb);
lbs_process_rxed_packet(priv, skb);
priv->upld_len = (recvlength - MESSAGE_HEADER_LEN);
}
static inline void process_cmdrequest(int recvlength, u8 *recvbuff,
struct sk_buff *skb,
struct usb_card_rec *cardp,
wlan_private *priv)
lbs_private *priv)
{
u8 *cmdbuf;
if (recvlength > MRVDRV_SIZE_OF_CMD_BUFFER) {
@ -631,7 +631,7 @@ static inline void process_cmdrequest(int recvlength, u8 *recvbuff,
priv->upld_len);
kfree_skb(skb);
libertas_interrupt(priv->dev);
lbs_interrupt(priv->dev);
spin_unlock(&priv->adapter->driver_lock);
lbs_deb_usbd(&cardp->udev->dev,
@ -652,7 +652,7 @@ static void if_usb_receive(struct urb *urb)
struct read_cb_info *rinfo = (struct read_cb_info *)urb->context;
struct sk_buff *skb = rinfo->skb;
struct usb_card_rec *cardp = (struct usb_card_rec *) rinfo->cardp;
wlan_private * priv = cardp->priv;
lbs_private * priv = cardp->priv;
int recvlength = urb->actual_length;
u8 *recvbuff = NULL;
@ -695,14 +695,14 @@ static void if_usb_receive(struct urb *urb)
lbs_deb_usbd(&cardp->udev->dev,"**EVENT** 0x%X\n",
cardp->usb_event_cause);
if (cardp->usb_event_cause & 0xffff0000) {
libertas_send_tx_feedback(priv);
lbs_send_tx_feedback(priv);
spin_unlock(&priv->adapter->driver_lock);
break;
}
cardp->usb_event_cause <<= 3;
cardp->usb_int_cause |= MRVDRV_CARDEVENT;
kfree_skb(skb);
libertas_interrupt(priv->dev);
lbs_interrupt(priv->dev);
spin_unlock(&priv->adapter->driver_lock);
goto rx_exit;
default:
@ -720,13 +720,13 @@ rx_exit:
/**
* @brief This function downloads data to FW
* @param priv pointer to wlan_private structure
* @param priv pointer to lbs_private structure
* @param type type of data
* @param buf pointer to data buffer
* @param len number of bytes
* @return 0 or -1
*/
static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 nb)
static int if_usb_host_to_card(lbs_private *priv, u8 type, u8 *payload, u16 nb)
{
struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card;
@ -753,7 +753,7 @@ static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 n
}
/* called with adapter->driver_lock held */
static int if_usb_get_int_status(wlan_private * priv, u8 * ireg)
static int if_usb_get_int_status(lbs_private *priv, u8 *ireg)
{
struct usb_card_rec *cardp = priv->card;
@ -765,7 +765,7 @@ static int if_usb_get_int_status(wlan_private * priv, u8 * ireg)
return 0;
}
static int if_usb_read_event_cause(wlan_private * priv)
static int if_usb_read_event_cause(lbs_private * priv)
{
struct usb_card_rec *cardp = priv->card;
@ -856,10 +856,10 @@ static int if_usb_prog_firmware(struct usb_card_rec *cardp)
lbs_deb_enter(LBS_DEB_USB);
if ((ret = request_firmware(&cardp->fw, libertas_fw_name,
if ((ret = request_firmware(&cardp->fw, lbs_fw_name,
&cardp->udev->dev)) < 0) {
lbs_pr_err("request_firmware() failed with %#x\n", ret);
lbs_pr_err("firmware %s not found\n", libertas_fw_name);
lbs_pr_err("firmware %s not found\n", lbs_fw_name);
goto done;
}
@ -940,7 +940,7 @@ done:
static int if_usb_suspend(struct usb_interface *intf, pm_message_t message)
{
struct usb_card_rec *cardp = usb_get_intfdata(intf);
wlan_private *priv = cardp->priv;
lbs_private *priv = cardp->priv;
lbs_deb_enter(LBS_DEB_USB);
@ -954,7 +954,7 @@ static int if_usb_suspend(struct usb_interface *intf, pm_message_t message)
struct cmd_ds_mesh_access mesh_access;
memset(&mesh_access, 0, sizeof(mesh_access));
mesh_access.data[0] = cpu_to_le32(1);
libertas_prepare_and_send_command(priv,
lbs_prepare_and_send_command(priv,
CMD_MESH_ACCESS,
CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
@ -976,7 +976,7 @@ static int if_usb_suspend(struct usb_interface *intf, pm_message_t message)
static int if_usb_resume(struct usb_interface *intf)
{
struct usb_card_rec *cardp = usb_get_intfdata(intf);
wlan_private *priv = cardp->priv;
lbs_private *priv = cardp->priv;
lbs_deb_enter(LBS_DEB_USB);
@ -994,7 +994,7 @@ static int if_usb_resume(struct usb_interface *intf)
struct cmd_ds_mesh_access mesh_access;
memset(&mesh_access, 0, sizeof(mesh_access));
mesh_access.data[0] = cpu_to_le32(0);
libertas_prepare_and_send_command(priv,
lbs_prepare_and_send_command(priv,
CMD_MESH_ACCESS,
CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
@ -1027,8 +1027,8 @@ static int if_usb_init_module(void)
lbs_deb_enter(LBS_DEB_MAIN);
if (libertas_fw_name == NULL) {
libertas_fw_name = default_fw_name;
if (lbs_fw_name == NULL) {
lbs_fw_name = default_fw_name;
}
ret = usb_register(&if_usb_driver);
@ -1044,7 +1044,7 @@ static void if_usb_exit_module(void)
lbs_deb_enter(LBS_DEB_MAIN);
list_for_each_entry_safe(cardp, cardp_temp, &usb_devices, list) {
libertas_prepare_and_send_command(cardp->priv, CMD_802_11_RESET,
lbs_prepare_and_send_command(cardp->priv, CMD_802_11_RESET,
CMD_ACT_HALT, 0, 0, NULL);
}

View file

@ -1,5 +1,5 @@
#ifndef _LIBERTAS_IF_USB_H
#define _LIBERTAS_IF_USB_H
#ifndef _LBS_IF_USB_H
#define _LBS_IF_USB_H
#include <linux/list.h>

View file

@ -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_flags(u8 * rates, size_t len)
* @param rates buffer of data rates
* @param len size of buffer
*/
void libertas_unset_basic_rate_flags(u8 * rates, size_t len)
void lbs_unset_basic_rate_flags(u8 *rates, size_t len)
{
int i;
@ -116,19 +116,19 @@ void libertas_unset_basic_rate_flags(u8 * rates, size_t len)
/**
* @brief Associate to a specific BSS discovered in a scan
*
* @param priv A pointer to wlan_private structure
* @param priv A pointer to lbs_private structure
* @param pbssdesc Pointer to the BSS descriptor to associate with.
*
* @return 0-success, otherwise fail
*/
int wlan_associate(wlan_private * priv, struct assoc_request * assoc_req)
int lbs_associate(lbs_private *priv, struct assoc_request *assoc_req)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int ret;
lbs_deb_enter(LBS_DEB_JOIN);
ret = libertas_prepare_and_send_command(priv, CMD_802_11_AUTHENTICATE,
ret = lbs_prepare_and_send_command(priv, CMD_802_11_AUTHENTICATE,
0, CMD_OPTION_WAITFORRSP,
0, assoc_req->bss.bssid);
@ -142,9 +142,9 @@ int wlan_associate(wlan_private * priv, struct assoc_request * assoc_req)
else
adapter->preamble = CMD_TYPE_LONG_PREAMBLE;
libertas_set_radio_control(priv);
lbs_set_radio_control(priv);
ret = libertas_prepare_and_send_command(priv, CMD_802_11_ASSOCIATE,
ret = lbs_prepare_and_send_command(priv, CMD_802_11_ASSOCIATE,
0, CMD_OPTION_WAITFORRSP, 0, assoc_req);
done:
@ -155,13 +155,13 @@ done:
/**
* @brief Start an Adhoc Network
*
* @param priv A pointer to wlan_private structure
* @param priv A pointer to lbs_private structure
* @param adhocssid The ssid of the Adhoc Network
* @return 0--success, -1--fail
*/
int libertas_start_adhoc_network(wlan_private * priv, struct assoc_request * assoc_req)
int lbs_start_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int ret = 0;
adapter->adhoccreate = 1;
@ -174,12 +174,12 @@ int libertas_start_adhoc_network(wlan_private * priv, struct assoc_request * ass
adapter->preamble = CMD_TYPE_LONG_PREAMBLE;
}
libertas_set_radio_control(priv);
lbs_set_radio_control(priv);
lbs_deb_join("AdhocStart: channel = %d\n", assoc_req->channel);
lbs_deb_join("AdhocStart: band = %d\n", assoc_req->band);
ret = libertas_prepare_and_send_command(priv, CMD_802_11_AD_HOC_START,
ret = lbs_prepare_and_send_command(priv, CMD_802_11_AD_HOC_START,
0, CMD_OPTION_WAITFORRSP, 0, assoc_req);
return ret;
@ -188,15 +188,15 @@ int libertas_start_adhoc_network(wlan_private * priv, struct assoc_request * ass
/**
* @brief Join an adhoc network found in a previous scan
*
* @param priv A pointer to wlan_private structure
* @param priv A pointer to lbs_private structure
* @param pbssdesc Pointer to a BSS descriptor found in a previous scan
* to attempt to join
*
* @return 0--success, -1--fail
*/
int libertas_join_adhoc_network(wlan_private * priv, struct assoc_request * assoc_req)
int lbs_join_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
struct bss_descriptor * bss = &assoc_req->bss;
int ret = 0;
@ -211,11 +211,11 @@ int libertas_join_adhoc_network(wlan_private * priv, struct assoc_request * asso
/* check if the requested SSID is already joined */
if ( adapter->curbssparams.ssid_len
&& !libertas_ssid_cmp(adapter->curbssparams.ssid,
&& !lbs_ssid_cmp(adapter->curbssparams.ssid,
adapter->curbssparams.ssid_len,
bss->ssid, bss->ssid_len)
&& (adapter->mode == IW_MODE_ADHOC)
&& (adapter->connect_status == LIBERTAS_CONNECTED)) {
&& (adapter->connect_status == LBS_CONNECTED)) {
union iwreq_data wrqu;
lbs_deb_join("ADHOC_J_CMD: New ad-hoc SSID is the same as "
@ -243,14 +243,14 @@ int libertas_join_adhoc_network(wlan_private * priv, struct assoc_request * asso
adapter->preamble = CMD_TYPE_SHORT_PREAMBLE;
}
libertas_set_radio_control(priv);
lbs_set_radio_control(priv);
lbs_deb_join("AdhocJoin: channel = %d\n", assoc_req->channel);
lbs_deb_join("AdhocJoin: band = %c\n", assoc_req->band);
adapter->adhoccreate = 0;
ret = libertas_prepare_and_send_command(priv, CMD_802_11_AD_HOC_JOIN,
ret = lbs_prepare_and_send_command(priv, CMD_802_11_AD_HOC_JOIN,
0, CMD_OPTION_WAITFORRSP,
OID_802_11_SSID, assoc_req);
@ -258,38 +258,38 @@ out:
return ret;
}
int libertas_stop_adhoc_network(wlan_private * priv)
int lbs_stop_adhoc_network(lbs_private * priv)
{
return libertas_prepare_and_send_command(priv, CMD_802_11_AD_HOC_STOP,
return lbs_prepare_and_send_command(priv, CMD_802_11_AD_HOC_STOP,
0, CMD_OPTION_WAITFORRSP, 0, NULL);
}
/**
* @brief Send Deauthentication Request
*
* @param priv A pointer to wlan_private structure
* @param priv A pointer to lbs_private structure
* @return 0--success, -1--fail
*/
int libertas_send_deauthentication(wlan_private * priv)
int lbs_send_deauthentication(lbs_private *priv)
{
return libertas_prepare_and_send_command(priv, CMD_802_11_DEAUTHENTICATE,
return lbs_prepare_and_send_command(priv, CMD_802_11_DEAUTHENTICATE,
0, CMD_OPTION_WAITFORRSP, 0, NULL);
}
/**
* @brief This function prepares command of authenticate.
*
* @param priv A pointer to wlan_private structure
* @param priv A pointer to lbs_private structure
* @param cmd A pointer to cmd_ds_command structure
* @param pdata_buf Void cast of pointer to a BSSID to authenticate with
*
* @return 0 or -1
*/
int libertas_cmd_80211_authenticate(wlan_private * priv,
int lbs_cmd_80211_authenticate(lbs_private *priv,
struct cmd_ds_command *cmd,
void *pdata_buf)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth;
int ret = -1;
u8 *bssid = pdata_buf;
@ -329,10 +329,10 @@ out:
return ret;
}
int libertas_cmd_80211_deauthenticate(wlan_private * priv,
int lbs_cmd_80211_deauthenticate(lbs_private *priv,
struct cmd_ds_command *cmd)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_deauthenticate *dauth = &cmd->params.deauth;
lbs_deb_enter(LBS_DEB_JOIN);
@ -352,10 +352,10 @@ int libertas_cmd_80211_deauthenticate(wlan_private * priv,
return 0;
}
int libertas_cmd_80211_associate(wlan_private * priv,
int lbs_cmd_80211_associate(lbs_private *priv,
struct cmd_ds_command *cmd, void *pdata_buf)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_associate *passo = &cmd->params.associate;
int ret = 0;
struct assoc_request * assoc_req = pdata_buf;
@ -431,7 +431,7 @@ int libertas_cmd_80211_associate(wlan_private * priv,
/* Set MSB on basic rates as the firmware requires, but _after_
* copying to current bss rates.
*/
libertas_set_basic_rate_flags(rates->rates, tmplen);
lbs_set_basic_rate_flags(rates->rates, tmplen);
if (assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled) {
rsn = (struct mrvlietypes_rsnparamset *) pos;
@ -448,7 +448,7 @@ int libertas_cmd_80211_associate(wlan_private * priv,
/* update curbssparams */
adapter->curbssparams.channel = bss->phyparamset.dsparamset.currentchan;
if (libertas_parse_dnld_countryinfo_11d(priv, bss)) {
if (lbs_parse_dnld_countryinfo_11d(priv, bss)) {
ret = -1;
goto done;
}
@ -468,10 +468,10 @@ done:
return ret;
}
int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
int lbs_cmd_80211_ad_hoc_start(lbs_private *priv,
struct cmd_ds_command *cmd, void *pdata_buf)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_ad_hoc_start *adhs = &cmd->params.ads;
int ret = 0;
int cmdappendsize = 0;
@ -548,8 +548,8 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
adhs->probedelay = cpu_to_le16(CMD_SCAN_PROBE_DELAY_TIME);
memset(adhs->rates, 0, sizeof(adhs->rates));
ratesize = min(sizeof(adhs->rates), sizeof(libertas_bg_rates));
memcpy(adhs->rates, libertas_bg_rates, ratesize);
ratesize = min(sizeof(adhs->rates), sizeof(lbs_bg_rates));
memcpy(adhs->rates, lbs_bg_rates, ratesize);
/* Copy the ad-hoc creating rates into Current BSS state structure */
memset(&adapter->curbssparams.rates, 0, sizeof(adapter->curbssparams.rates));
@ -558,14 +558,14 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
/* Set MSB on basic rates as the firmware requires, but _after_
* copying to current bss rates.
*/
libertas_set_basic_rate_flags(adhs->rates, ratesize);
lbs_set_basic_rate_flags(adhs->rates, ratesize);
lbs_deb_join("ADHOC_S_CMD: rates=%02x %02x %02x %02x \n",
adhs->rates[0], adhs->rates[1], adhs->rates[2], adhs->rates[3]);
lbs_deb_join("ADHOC_S_CMD: AD HOC Start command is ready\n");
if (libertas_create_dnld_countryinfo_11d(priv)) {
if (lbs_create_dnld_countryinfo_11d(priv)) {
lbs_deb_join("ADHOC_S_CMD: dnld_countryinfo_11d failed\n");
ret = -1;
goto done;
@ -580,7 +580,7 @@ done:
return ret;
}
int libertas_cmd_80211_ad_hoc_stop(wlan_private * priv,
int lbs_cmd_80211_ad_hoc_stop(lbs_private *priv,
struct cmd_ds_command *cmd)
{
cmd->command = cpu_to_le16(CMD_802_11_AD_HOC_STOP);
@ -589,10 +589,10 @@ int libertas_cmd_80211_ad_hoc_stop(wlan_private * priv,
return 0;
}
int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
int lbs_cmd_80211_ad_hoc_join(lbs_private *priv,
struct cmd_ds_command *cmd, void *pdata_buf)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_ad_hoc_join *join_cmd = &cmd->params.adj;
struct assoc_request * assoc_req = pdata_buf;
struct bss_descriptor *bss = &assoc_req->bss;
@ -652,7 +652,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
/* Set MSB on basic rates as the firmware requires, but _after_
* copying to current bss rates.
*/
libertas_set_basic_rate_flags(join_cmd->bss.rates, ratesize);
lbs_set_basic_rate_flags(join_cmd->bss.rates, ratesize);
join_cmd->bss.ssparamset.ibssparamset.atimwindow =
cpu_to_le16(bss->atimwindow);
@ -663,12 +663,12 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
join_cmd->bss.capability = cpu_to_le16(tmp);
}
if (adapter->psmode == WLAN802_11POWERMODEMAX_PSP) {
if (adapter->psmode == LBS802_11POWERMODEMAX_PSP) {
/* wake up first */
__le32 Localpsmode;
Localpsmode = cpu_to_le32(WLAN802_11POWERMODECAM);
ret = libertas_prepare_and_send_command(priv,
Localpsmode = cpu_to_le32(LBS802_11POWERMODECAM);
ret = lbs_prepare_and_send_command(priv,
CMD_802_11_PS_MODE,
CMD_ACT_SET,
0, 0, &Localpsmode);
@ -679,7 +679,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
}
}
if (libertas_parse_dnld_countryinfo_11d(priv, bss)) {
if (lbs_parse_dnld_countryinfo_11d(priv, bss)) {
ret = -1;
goto done;
}
@ -692,10 +692,10 @@ done:
return ret;
}
int libertas_ret_80211_associate(wlan_private * priv,
int lbs_ret_80211_associate(lbs_private *priv,
struct cmd_ds_command *resp)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int ret = 0;
union iwreq_data wrqu;
struct ieeetypes_assocrsp *passocrsp;
@ -762,7 +762,7 @@ int libertas_ret_80211_associate(wlan_private * priv,
}
if (status_code) {
libertas_mac_event_disconnected(priv);
lbs_mac_event_disconnected(priv);
ret = -1;
goto done;
}
@ -771,7 +771,7 @@ int libertas_ret_80211_associate(wlan_private * priv,
le16_to_cpu(resp->size) - S_DS_GEN);
/* Send a Media Connected event, according to the Spec */
adapter->connect_status = LIBERTAS_CONNECTED;
adapter->connect_status = LBS_CONNECTED;
lbs_deb_join("ASSOC_RESP: assocated to '%s'\n",
escape_essid(bss->ssid, bss->ssid_len));
@ -809,21 +809,21 @@ done:
return ret;
}
int libertas_ret_80211_disassociate(wlan_private * priv,
int lbs_ret_80211_disassociate(lbs_private *priv,
struct cmd_ds_command *resp)
{
lbs_deb_enter(LBS_DEB_JOIN);
libertas_mac_event_disconnected(priv);
lbs_mac_event_disconnected(priv);
lbs_deb_leave(LBS_DEB_JOIN);
return 0;
}
int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
int lbs_ret_80211_ad_hoc_start(lbs_private *priv,
struct cmd_ds_command *resp)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
int ret = 0;
u16 command = le16_to_cpu(resp->command);
u16 result = le16_to_cpu(resp->result);
@ -852,8 +852,8 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
*/
if (result) {
lbs_deb_join("ADHOC_RESP: failed\n");
if (adapter->connect_status == LIBERTAS_CONNECTED) {
libertas_mac_event_disconnected(priv);
if (adapter->connect_status == LBS_CONNECTED) {
lbs_mac_event_disconnected(priv);
}
ret = -1;
goto done;
@ -867,7 +867,7 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
escape_essid(bss->ssid, bss->ssid_len));
/* Send a Media Connected event, according to the Spec */
adapter->connect_status = LIBERTAS_CONNECTED;
adapter->connect_status = LBS_CONNECTED;
if (command == CMD_RET(CMD_802_11_AD_HOC_START)) {
/* Update the created network descriptor with the new BSSID */
@ -904,12 +904,12 @@ done:
return ret;
}
int libertas_ret_80211_ad_hoc_stop(wlan_private * priv,
int lbs_ret_80211_ad_hoc_stop(lbs_private *priv,
struct cmd_ds_command *resp)
{
lbs_deb_enter(LBS_DEB_JOIN);
libertas_mac_event_disconnected(priv);
lbs_mac_event_disconnected(priv);
lbs_deb_leave(LBS_DEB_JOIN);
return 0;

View file

@ -2,52 +2,52 @@
* Interface for the wlan infrastructure and adhoc join routines
*
* Driver interface functions and type declarations for the join module
* implemented in wlan_join.c. Process all start/join requests for
* implemented in join.c. Process all start/join requests for
* both adhoc and infrastructure networks
*/
#ifndef _WLAN_JOIN_H
#define _WLAN_JOIN_H
#ifndef _LBS_JOIN_H
#define _LBS_JOIN_H
#include "defs.h"
#include "dev.h"
struct cmd_ds_command;
int libertas_cmd_80211_authenticate(wlan_private * priv,
int lbs_cmd_80211_authenticate(lbs_private *priv,
struct cmd_ds_command *cmd,
void *pdata_buf);
int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
int lbs_cmd_80211_ad_hoc_join(lbs_private *priv,
struct cmd_ds_command *cmd,
void *pdata_buf);
int libertas_cmd_80211_ad_hoc_stop(wlan_private * priv,
int lbs_cmd_80211_ad_hoc_stop(lbs_private *priv,
struct cmd_ds_command *cmd);
int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
int lbs_cmd_80211_ad_hoc_start(lbs_private *priv,
struct cmd_ds_command *cmd,
void *pdata_buf);
int libertas_cmd_80211_deauthenticate(wlan_private * priv,
int lbs_cmd_80211_deauthenticate(lbs_private *priv,
struct cmd_ds_command *cmd);
int libertas_cmd_80211_associate(wlan_private * priv,
int lbs_cmd_80211_associate(lbs_private *priv,
struct cmd_ds_command *cmd,
void *pdata_buf);
int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
int lbs_ret_80211_ad_hoc_start(lbs_private *priv,
struct cmd_ds_command *resp);
int libertas_ret_80211_ad_hoc_stop(wlan_private * priv,
int lbs_ret_80211_ad_hoc_stop(lbs_private *priv,
struct cmd_ds_command *resp);
int libertas_ret_80211_disassociate(wlan_private * priv,
int lbs_ret_80211_disassociate(lbs_private *priv,
struct cmd_ds_command *resp);
int libertas_ret_80211_associate(wlan_private * priv,
int lbs_ret_80211_associate(lbs_private *priv,
struct cmd_ds_command *resp);
int libertas_start_adhoc_network(wlan_private * priv,
int lbs_start_adhoc_network(lbs_private *priv,
struct assoc_request * assoc_req);
int libertas_join_adhoc_network(wlan_private * priv,
int lbs_join_adhoc_network(lbs_private *priv,
struct assoc_request * assoc_req);
int libertas_stop_adhoc_network(wlan_private * priv);
int lbs_stop_adhoc_network(lbs_private *priv);
int libertas_send_deauthentication(wlan_private * priv);
int lbs_send_deauthentication(lbs_private *priv);
int wlan_associate(wlan_private * priv, struct assoc_request * assoc_req);
int lbs_associate(lbs_private *priv, struct assoc_request *assoc_req);
void libertas_unset_basic_rate_flags(u8 * rates, size_t len);
void lbs_unset_basic_rate_flags(u8 *rates, size_t len);
#endif

File diff suppressed because it is too large Load diff

View file

@ -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 * priv)
/**
* @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 * priv)
/**
* @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_private * priv, struct rxpd *p_rx_pd)
/**
* @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_private * priv, struct rxpd *p_rx_pd)
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_private * priv, struct rxpd *p_rx_pd)
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_private * priv, struct sk_buff *skb)
* @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_private * priv, struct sk_buff *skb)
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_private * priv, struct sk_buff *skb)
* 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 rate)
* @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(wlan_private * priv, struct sk_buff *skb)
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(wlan_private * priv, struct sk_buff *skb)
* 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;

View file

@ -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 (struct bss_descriptor * bss)
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(struct wlan_802_11_security * secinfo,
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(struct wlan_802_11_security * secinfo,
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 wlan_802_11_security * secinfo,
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 wlan_802_11_security * secinfo,
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(struct wlan_802_11_security * secinfo,
* 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 ssid1_len, u8 *ssid2, u8 ssid2_len)
/**
* @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 ssid1_len, u8 *ssid2, u8 ssid2_len)
*
* @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_list(wlan_private * priv,
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_list(wlan_private * priv,
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_list(wlan_private * priv,
/* 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_struct *work)
* 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_struct *work)
*
* @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 * priv,
{
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 * priv,
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_private * priv,
}
/* 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;
@ -846,13 +846,13 @@ int wlan_scan_networks(wlan_private * priv,
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,
@ -876,7 +876,7 @@ int wlan_scan_networks(wlan_private * priv,
}
}
ret = wlan_scan_channel_list(priv,
ret = lbs_scan_channel_list(priv,
maxchanperscan,
filteredscan,
scan_cfg,
@ -897,7 +897,7 @@ int wlan_scan_networks(wlan_private * priv,
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) {
@ -928,7 +928,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;
@ -1139,7 +1139,7 @@ static int libertas_process_bss(struct bss_descriptor * bss,
/* 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;
@ -1153,13 +1153,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;
@ -1205,14 +1205,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)
{
@ -1230,7 +1230,7 @@ struct bss_descriptor * libertas_find_ssid_in_list(wlan_adapter * adapter,
|| (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)
@ -1277,11 +1277,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;
@ -1323,27 +1323,27 @@ static struct bss_descriptor * libertas_find_best_ssid_in_list(wlan_adapter * ad
*
* 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;
@ -1366,11 +1366,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);
@ -1392,7 +1392,7 @@ int libertas_set_scan(struct net_device *dev, struct iw_request_info *info,
*
* 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
@ -1402,11 +1402,11 @@ int libertas_set_scan(struct net_device *dev, struct iw_request_info *info,
*
* @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",
@ -1420,7 +1420,7 @@ int libertas_send_specific_ssid_scan(wlan_private * priv,
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;
@ -1443,11 +1443,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 */
@ -1459,7 +1459,7 @@ static inline char *libertas_translate_scan(wlan_private *priv,
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;
@ -1515,7 +1515,7 @@ static inline char *libertas_translate_scan(wlan_private *priv,
*/
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;
@ -1549,7 +1549,7 @@ static inline char *libertas_translate_scan(wlan_private *priv,
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) {
@ -1606,12 +1606,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;
@ -1622,7 +1622,7 @@ int libertas_get_scan(struct net_device *dev, struct iw_request_info *info,
/* 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);
}
@ -1650,7 +1650,7 @@ int libertas_get_scan(struct net_device *dev, struct iw_request_info *info,
}
/* 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;
@ -1677,24 +1677,24 @@ int libertas_get_scan(struct net_device *dev, struct iw_request_info *info,
/**
* @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);
@ -1750,14 +1750,14 @@ static inline int is_same_network(struct bss_descriptor *src,
* | 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;
@ -1821,7 +1821,7 @@ int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp)
/* 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;

View file

@ -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

View file

@ -52,11 +52,11 @@ static u32 convert_radiotap_rate_to_mv(u8 rate)
* @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 * priv, struct sk_buff *skb)
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 * priv, struct sk_buff *skb)
}
/* 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 *priv)
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 *priv, struct sk_buff *skb)
* @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 * priv, struct sk_buff *skb)
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_private * 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);

View file

@ -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

File diff suppressed because it is too large Load diff

View file

@ -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