{14, 2484, TX_PWR_DEFAULT}
};
-static u8 wlan_region_2_code(u8 * region)
+static u8 lbs_region_2_code(u8 *region)
{
u8 i;
return (region_code_mapping[0].code);
}
-static u8 *wlan_code_2_region(u8 code)
+static u8 *lbs_code_2_region(u8 code)
{
u8 i;
* @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;
* @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;
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;
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;
* @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)
{
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);
* @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;
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;
/*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,
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;
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;
* @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 {
}
-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,
/**
* @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;
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)
/**
* @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;
/**
* @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);
/**
* @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;
/**
* @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) {
}
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);
/**
* @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;
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);
* 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"
} __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*/
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
}
-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;
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");
}
/* 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);
}
}
}
-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);
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, "
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:
}
-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;
}
-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);
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,
}
-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);
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) {
}
-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;
|| 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,
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;
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;
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;
*/
/* 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,
/* 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,
}
-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;
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,
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,
}
-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);
}
-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)) {
}
-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;
}
-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;
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");
*/
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",
}
} 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",
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;
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 {
/*
* 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;
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)) {
/* 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 */
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;
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)
{
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)
{
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);
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;
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)
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)
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;
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);
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);
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);
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);
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)
{
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)
{
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 =
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);
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) {
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) +
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)
{
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);
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:
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);
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);
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)
{
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)
{
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)
{
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)
{
}
/*
- * 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;
* 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;
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;
}
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);
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;
* 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;
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);
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);
/**
* @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
* @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;
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");
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;
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;
}
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;
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;
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:
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:
/* 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) {
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);
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;
/**
* @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);
* @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);
/**
* @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)
{
* 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);
/*
* 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:
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;
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;
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;
* 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 */
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);
}
}
}
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];
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);
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);
* 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);
/**
* @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);
* @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);
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");
* 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);
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.
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);
}
/**
* @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];
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);
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);
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;
}
}
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;
}
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);
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,
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;
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);
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);
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);
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);
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);
/* 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);
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);
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));
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);
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);
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);
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):
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);
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;
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);
/*
* 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);
}
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);
}
- __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);
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;
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);
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:
}
adapter->psstate = PS_STATE_PRE_SLEEP;
- libertas_ps_confirm_sleep(priv, (u16) adapter->psmode);
+ lbs_ps_confirm_sleep(priv, (u16) adapter->psmode);
break;
* 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;
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);
#include "host.h"
#include "debugfs.h"
-static struct dentry *libertas_dir = NULL;
+static struct dentry *lbs_dir;
static char *szStates[] = {
"Connected",
"Disconnected"
};
#ifdef PROC_DEBUG
-static void libertas_debug_init(wlan_private * priv, struct net_device *dev);
+static void lbs_debug_init(lbs_private * priv, struct net_device *dev);
#endif
static int open_file_generic(struct inode *inode, struct file *file)
static const size_t len = PAGE_SIZE;
-static ssize_t libertas_dev_info(struct file *file, char __user *userbuf,
+static ssize_t lbs_dev_info(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
+ lbs_private *priv = file->private_data;
size_t pos = 0;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
}
-static ssize_t libertas_getscantable(struct file *file, char __user *userbuf,
+static ssize_t lbs_getscantable(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
+ lbs_private *priv = file->private_data;
size_t pos = 0;
int numscansdone = 0, res;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
return res;
}
-static ssize_t libertas_sleepparams_write(struct file *file,
+static ssize_t lbs_sleepparams_write(struct file *file,
const char __user *user_buf, size_t count,
loff_t *ppos)
{
- wlan_private *priv = file->private_data;
+ lbs_private *priv = file->private_data;
ssize_t buf_size, res;
int p1, p2, p3, p4, p5, p6;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
priv->adapter->sp.sp_extsleepclk = p5;
priv->adapter->sp.sp_reserved = p6;
- res = libertas_prepare_and_send_command(priv,
+ res = lbs_prepare_and_send_command(priv,
CMD_802_11_SLEEP_PARAMS,
CMD_ACT_SET,
CMD_OPTION_WAITFORRSP, 0, NULL);
return res;
}
-static ssize_t libertas_sleepparams_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_sleepparams_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
ssize_t res;
size_t pos = 0;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
- res = libertas_prepare_and_send_command(priv,
+ res = lbs_prepare_and_send_command(priv,
CMD_802_11_SLEEP_PARAMS,
CMD_ACT_GET,
CMD_OPTION_WAITFORRSP, 0, NULL);
return res;
}
-static ssize_t libertas_extscan(struct file *file, const char __user *userbuf,
+static ssize_t lbs_extscan(struct file *file, const char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
+ lbs_private *priv = file->private_data;
ssize_t res, buf_size;
union iwreq_data wrqu;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
goto out_unlock;
}
- libertas_send_specific_ssid_scan(priv, buf, strlen(buf)-1, 0);
+ lbs_send_specific_ssid_scan(priv, buf, strlen(buf)-1, 0);
memset(&wrqu, 0, sizeof(union iwreq_data));
wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL);
return count;
}
-static int libertas_parse_chan(char *buf, size_t count,
- struct wlan_ioctl_user_scan_cfg *scan_cfg, int dur)
+static int lbs_parse_chan(char *buf, size_t count,
+ struct lbs_ioctl_user_scan_cfg *scan_cfg, int dur)
{
char *start, *end, *hold, *str;
int i = 0;
return i;
}
-static void libertas_parse_bssid(char *buf, size_t count,
- struct wlan_ioctl_user_scan_cfg *scan_cfg)
+static void lbs_parse_bssid(char *buf, size_t count,
+ struct lbs_ioctl_user_scan_cfg *scan_cfg)
{
char *hold;
unsigned int mac[ETH_ALEN];
memcpy(scan_cfg->bssid, mac, ETH_ALEN);
}
-static void libertas_parse_ssid(char *buf, size_t count,
- struct wlan_ioctl_user_scan_cfg *scan_cfg)
+static void lbs_parse_ssid(char *buf, size_t count,
+ struct lbs_ioctl_user_scan_cfg *scan_cfg)
{
char *hold, *end;
ssize_t size;
return;
}
-static int libertas_parse_clear(char *buf, size_t count, const char *tag)
+static int lbs_parse_clear(char *buf, size_t count, const char *tag)
{
char *hold;
int val;
return val;
}
-static int libertas_parse_dur(char *buf, size_t count,
- struct wlan_ioctl_user_scan_cfg *scan_cfg)
+static int lbs_parse_dur(char *buf, size_t count,
+ struct lbs_ioctl_user_scan_cfg *scan_cfg)
{
char *hold;
int val;
return val;
}
-static void libertas_parse_probes(char *buf, size_t count,
- struct wlan_ioctl_user_scan_cfg *scan_cfg)
+static void lbs_parse_probes(char *buf, size_t count,
+ struct lbs_ioctl_user_scan_cfg *scan_cfg)
{
char *hold;
int val;
return;
}
-static void libertas_parse_type(char *buf, size_t count,
- struct wlan_ioctl_user_scan_cfg *scan_cfg)
+static void lbs_parse_type(char *buf, size_t count,
+ struct lbs_ioctl_user_scan_cfg *scan_cfg)
{
char *hold;
int val;
return;
}
-static ssize_t libertas_setuserscan(struct file *file,
+static ssize_t lbs_setuserscan(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
+ lbs_private *priv = file->private_data;
ssize_t res, buf_size;
- struct wlan_ioctl_user_scan_cfg *scan_cfg;
+ struct lbs_ioctl_user_scan_cfg *scan_cfg;
union iwreq_data wrqu;
int dur;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
- scan_cfg = kzalloc(sizeof(struct wlan_ioctl_user_scan_cfg), GFP_KERNEL);
+ scan_cfg = kzalloc(sizeof(struct lbs_ioctl_user_scan_cfg), GFP_KERNEL);
if (!scan_cfg)
return -ENOMEM;
goto out_unlock;
}
- scan_cfg->bsstype = WLAN_SCAN_BSS_TYPE_ANY;
+ scan_cfg->bsstype = LBS_SCAN_BSS_TYPE_ANY;
- dur = libertas_parse_dur(buf, count, scan_cfg);
- libertas_parse_chan(buf, count, scan_cfg, dur);
- libertas_parse_bssid(buf, count, scan_cfg);
- scan_cfg->clear_bssid = libertas_parse_clear(buf, count, "clear_bssid=");
- libertas_parse_ssid(buf, count, scan_cfg);
- scan_cfg->clear_ssid = libertas_parse_clear(buf, count, "clear_ssid=");
- libertas_parse_probes(buf, count, scan_cfg);
- libertas_parse_type(buf, count, scan_cfg);
+ dur = lbs_parse_dur(buf, count, scan_cfg);
+ lbs_parse_chan(buf, count, scan_cfg, dur);
+ lbs_parse_bssid(buf, count, scan_cfg);
+ scan_cfg->clear_bssid = lbs_parse_clear(buf, count, "clear_bssid=");
+ lbs_parse_ssid(buf, count, scan_cfg);
+ scan_cfg->clear_ssid = lbs_parse_clear(buf, count, "clear_ssid=");
+ lbs_parse_probes(buf, count, scan_cfg);
+ lbs_parse_type(buf, count, scan_cfg);
- wlan_scan_networks(priv, scan_cfg, 1);
+ lbs_scan_networks(priv, scan_cfg, 1);
wait_event_interruptible(priv->adapter->cmd_pending,
!priv->adapter->nr_cmd_pending);
return count;
}
-static int libertas_event_initcmd(wlan_private *priv, void **response_buf,
+static int lbs_event_initcmd(lbs_private *priv, void **response_buf,
struct cmd_ctrl_node **cmdnode,
struct cmd_ds_command **cmd)
{
u16 wait_option = CMD_OPTION_WAITFORRSP;
- if (!(*cmdnode = libertas_get_free_cmd_ctrl_node(priv))) {
- lbs_deb_debugfs("failed libertas_get_free_cmd_ctrl_node\n");
+ if (!(*cmdnode = lbs_get_free_cmd_ctrl_node(priv))) {
+ lbs_deb_debugfs("failed lbs_get_free_cmd_ctrl_node\n");
return -ENOMEM;
}
if (!(*response_buf = kmalloc(3000, GFP_KERNEL))) {
lbs_deb_debugfs("failed to allocate response buffer!\n");
return -ENOMEM;
}
- libertas_set_cmd_ctrl_node(priv, *cmdnode, 0, wait_option, NULL);
+ lbs_set_cmd_ctrl_node(priv, *cmdnode, 0, wait_option, NULL);
init_waitqueue_head(&(*cmdnode)->cmdwait_q);
(*cmdnode)->pdata_buf = *response_buf;
(*cmdnode)->cmdflags |= CMD_F_HOSTCMD;
return 0;
}
-static ssize_t libertas_lowrssi_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_lowrssi_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *pcmdnode;
struct cmd_ds_command *pcmdptr;
struct cmd_ds_802_11_subscribe_event *event;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
- res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+ res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
if (res < 0) {
free_page(addr);
return res;
event = &pcmdptr->params.subscribe_event;
event->action = cpu_to_le16(CMD_ACT_GET);
pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
- libertas_queue_cmd(adapter, pcmdnode, 1);
+ lbs_queue_cmd(adapter, pcmdnode, 1);
wake_up_interruptible(&priv->waitq);
/* Sleep until response is generated by FW */
return res;
}
-static u16 libertas_get_events_bitmap(wlan_private *priv)
+static u16 lbs_get_events_bitmap(lbs_private *priv)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *pcmdnode;
struct cmd_ds_command *pcmdptr;
struct cmd_ds_802_11_subscribe_event *event;
int res;
u16 event_bitmap;
- res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+ res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
if (res < 0)
return res;
event = &pcmdptr->params.subscribe_event;
event->action = cpu_to_le16(CMD_ACT_GET);
pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
- libertas_queue_cmd(adapter, pcmdnode, 1);
+ lbs_queue_cmd(adapter, pcmdnode, 1);
wake_up_interruptible(&priv->waitq);
/* Sleep until response is generated by FW */
return event_bitmap;
}
-static ssize_t libertas_lowrssi_write(struct file *file,
+static ssize_t lbs_lowrssi_write(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
ssize_t res, buf_size;
int value, freq, subscribed, cmd_len;
struct cmd_ctrl_node *pcmdnode;
goto out_unlock;
}
- event_bitmap = libertas_get_events_bitmap(priv);
+ event_bitmap = lbs_get_events_bitmap(priv);
- res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+ res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
if (res < 0)
goto out_unlock;
event_bitmap |= subscribed ? 0x0001 : 0x0;
event->events = cpu_to_le16(event_bitmap);
- libertas_queue_cmd(adapter, pcmdnode, 1);
+ lbs_queue_cmd(adapter, pcmdnode, 1);
wake_up_interruptible(&priv->waitq);
/* Sleep until response is generated by FW */
return res;
}
-static ssize_t libertas_lowsnr_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_lowsnr_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *pcmdnode;
struct cmd_ds_command *pcmdptr;
struct cmd_ds_802_11_subscribe_event *event;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
- res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+ res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
if (res < 0) {
free_page(addr);
return res;
event = &pcmdptr->params.subscribe_event;
event->action = cpu_to_le16(CMD_ACT_GET);
pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
- libertas_queue_cmd(adapter, pcmdnode, 1);
+ lbs_queue_cmd(adapter, pcmdnode, 1);
wake_up_interruptible(&priv->waitq);
/* Sleep until response is generated by FW */
return res;
}
-static ssize_t libertas_lowsnr_write(struct file *file,
+static ssize_t lbs_lowsnr_write(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
ssize_t res, buf_size;
int value, freq, subscribed, cmd_len;
struct cmd_ctrl_node *pcmdnode;
goto out_unlock;
}
- event_bitmap = libertas_get_events_bitmap(priv);
+ event_bitmap = lbs_get_events_bitmap(priv);
- res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+ res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
if (res < 0)
goto out_unlock;
event_bitmap |= subscribed ? 0x0002 : 0x0;
event->events = cpu_to_le16(event_bitmap);
- libertas_queue_cmd(adapter, pcmdnode, 1);
+ lbs_queue_cmd(adapter, pcmdnode, 1);
wake_up_interruptible(&priv->waitq);
/* Sleep until response is generated by FW */
return res;
}
-static ssize_t libertas_failcount_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_failcount_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *pcmdnode;
struct cmd_ds_command *pcmdptr;
struct cmd_ds_802_11_subscribe_event *event;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
- res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+ res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
if (res < 0) {
free_page(addr);
return res;
event = &pcmdptr->params.subscribe_event;
event->action = cpu_to_le16(CMD_ACT_GET);
pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
- libertas_queue_cmd(adapter, pcmdnode, 1);
+ lbs_queue_cmd(adapter, pcmdnode, 1);
wake_up_interruptible(&priv->waitq);
/* Sleep until response is generated by FW */
return res;
}
-static ssize_t libertas_failcount_write(struct file *file,
+static ssize_t lbs_failcount_write(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
ssize_t res, buf_size;
int value, freq, subscribed, cmd_len;
struct cmd_ctrl_node *pcmdnode;
goto out_unlock;
}
- event_bitmap = libertas_get_events_bitmap(priv);
+ event_bitmap = lbs_get_events_bitmap(priv);
- res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+ res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
if (res < 0)
goto out_unlock;
event_bitmap |= subscribed ? 0x0004 : 0x0;
event->events = cpu_to_le16(event_bitmap);
- libertas_queue_cmd(adapter, pcmdnode, 1);
+ lbs_queue_cmd(adapter, pcmdnode, 1);
wake_up_interruptible(&priv->waitq);
/* Sleep until response is generated by FW */
return res;
}
-static ssize_t libertas_bcnmiss_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_bcnmiss_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *pcmdnode;
struct cmd_ds_command *pcmdptr;
struct cmd_ds_802_11_subscribe_event *event;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
- res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+ res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
if (res < 0) {
free_page(addr);
return res;
event = &pcmdptr->params.subscribe_event;
event->action = cpu_to_le16(CMD_ACT_GET);
pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
- libertas_queue_cmd(adapter, pcmdnode, 1);
+ lbs_queue_cmd(adapter, pcmdnode, 1);
wake_up_interruptible(&priv->waitq);
/* Sleep until response is generated by FW */
return res;
}
-static ssize_t libertas_bcnmiss_write(struct file *file,
+static ssize_t lbs_bcnmiss_write(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
ssize_t res, buf_size;
int value, freq, subscribed, cmd_len;
struct cmd_ctrl_node *pcmdnode;
goto out_unlock;
}
- event_bitmap = libertas_get_events_bitmap(priv);
+ event_bitmap = lbs_get_events_bitmap(priv);
- res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+ res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
if (res < 0)
goto out_unlock;
event_bitmap |= subscribed ? 0x0008 : 0x0;
event->events = cpu_to_le16(event_bitmap);
- libertas_queue_cmd(adapter, pcmdnode, 1);
+ lbs_queue_cmd(adapter, pcmdnode, 1);
wake_up_interruptible(&priv->waitq);
/* Sleep until response is generated by FW */
return res;
}
-static ssize_t libertas_highrssi_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_highrssi_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *pcmdnode;
struct cmd_ds_command *pcmdptr;
struct cmd_ds_802_11_subscribe_event *event;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
- res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+ res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
if (res < 0) {
free_page(addr);
return res;
event = &pcmdptr->params.subscribe_event;
event->action = cpu_to_le16(CMD_ACT_GET);
pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
- libertas_queue_cmd(adapter, pcmdnode, 1);
+ lbs_queue_cmd(adapter, pcmdnode, 1);
wake_up_interruptible(&priv->waitq);
/* Sleep until response is generated by FW */
return res;
}
-static ssize_t libertas_highrssi_write(struct file *file,
+static ssize_t lbs_highrssi_write(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
ssize_t res, buf_size;
int value, freq, subscribed, cmd_len;
struct cmd_ctrl_node *pcmdnode;
goto out_unlock;
}
- event_bitmap = libertas_get_events_bitmap(priv);
+ event_bitmap = lbs_get_events_bitmap(priv);
- res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+ res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
if (res < 0)
goto out_unlock;
event_bitmap |= subscribed ? 0x0010 : 0x0;
event->events = cpu_to_le16(event_bitmap);
- libertas_queue_cmd(adapter, pcmdnode, 1);
+ lbs_queue_cmd(adapter, pcmdnode, 1);
wake_up_interruptible(&priv->waitq);
/* Sleep until response is generated by FW */
return res;
}
-static ssize_t libertas_highsnr_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_highsnr_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *pcmdnode;
struct cmd_ds_command *pcmdptr;
struct cmd_ds_802_11_subscribe_event *event;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
- res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+ res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
if (res < 0) {
free_page(addr);
return res;
event = &pcmdptr->params.subscribe_event;
event->action = cpu_to_le16(CMD_ACT_GET);
pcmdptr->size = cpu_to_le16(sizeof(*event) + S_DS_GEN);
- libertas_queue_cmd(adapter, pcmdnode, 1);
+ lbs_queue_cmd(adapter, pcmdnode, 1);
wake_up_interruptible(&priv->waitq);
/* Sleep until response is generated by FW */
return res;
}
-static ssize_t libertas_highsnr_write(struct file *file,
+static ssize_t lbs_highsnr_write(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
ssize_t res, buf_size;
int value, freq, subscribed, cmd_len;
struct cmd_ctrl_node *pcmdnode;
goto out_unlock;
}
- event_bitmap = libertas_get_events_bitmap(priv);
+ event_bitmap = lbs_get_events_bitmap(priv);
- res = libertas_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
+ res = lbs_event_initcmd(priv, &response_buf, &pcmdnode, &pcmdptr);
if (res < 0)
goto out_unlock;
event_bitmap |= subscribed ? 0x0020 : 0x0;
event->events = cpu_to_le16(event_bitmap);
- libertas_queue_cmd(adapter, pcmdnode, 1);
+ lbs_queue_cmd(adapter, pcmdnode, 1);
wake_up_interruptible(&priv->waitq);
/* Sleep until response is generated by FW */
return res;
}
-static ssize_t libertas_rdmac_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_rdmac_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
- struct wlan_offset_value offval;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
+ struct lbs_offset_value offval;
ssize_t pos = 0;
int ret;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
offval.offset = priv->mac_offset;
offval.value = 0;
- ret = libertas_prepare_and_send_command(priv,
+ ret = lbs_prepare_and_send_command(priv,
CMD_MAC_REG_ACCESS, 0,
CMD_OPTION_WAITFORRSP, 0, &offval);
mdelay(10);
return ret;
}
-static ssize_t libertas_rdmac_write(struct file *file,
+static ssize_t lbs_rdmac_write(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
+ lbs_private *priv = file->private_data;
ssize_t res, buf_size;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
return res;
}
-static ssize_t libertas_wrmac_write(struct file *file,
+static ssize_t lbs_wrmac_write(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
+ lbs_private *priv = file->private_data;
ssize_t res, buf_size;
u32 offset, value;
- struct wlan_offset_value offval;
+ struct lbs_offset_value offval;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
offval.offset = offset;
offval.value = value;
- res = libertas_prepare_and_send_command(priv,
+ res = lbs_prepare_and_send_command(priv,
CMD_MAC_REG_ACCESS, 1,
CMD_OPTION_WAITFORRSP, 0, &offval);
mdelay(10);
return res;
}
-static ssize_t libertas_rdbbp_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_rdbbp_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
- struct wlan_offset_value offval;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
+ struct lbs_offset_value offval;
ssize_t pos = 0;
int ret;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
offval.offset = priv->bbp_offset;
offval.value = 0;
- ret = libertas_prepare_and_send_command(priv,
+ ret = lbs_prepare_and_send_command(priv,
CMD_BBP_REG_ACCESS, 0,
CMD_OPTION_WAITFORRSP, 0, &offval);
mdelay(10);
return ret;
}
-static ssize_t libertas_rdbbp_write(struct file *file,
+static ssize_t lbs_rdbbp_write(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
+ lbs_private *priv = file->private_data;
ssize_t res, buf_size;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
return res;
}
-static ssize_t libertas_wrbbp_write(struct file *file,
+static ssize_t lbs_wrbbp_write(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
+ lbs_private *priv = file->private_data;
ssize_t res, buf_size;
u32 offset, value;
- struct wlan_offset_value offval;
+ struct lbs_offset_value offval;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
offval.offset = offset;
offval.value = value;
- res = libertas_prepare_and_send_command(priv,
+ res = lbs_prepare_and_send_command(priv,
CMD_BBP_REG_ACCESS, 1,
CMD_OPTION_WAITFORRSP, 0, &offval);
mdelay(10);
return res;
}
-static ssize_t libertas_rdrf_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_rdrf_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
- wlan_adapter *adapter = priv->adapter;
- struct wlan_offset_value offval;
+ lbs_private *priv = file->private_data;
+ lbs_adapter *adapter = priv->adapter;
+ struct lbs_offset_value offval;
ssize_t pos = 0;
int ret;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
offval.offset = priv->rf_offset;
offval.value = 0;
- ret = libertas_prepare_and_send_command(priv,
+ ret = lbs_prepare_and_send_command(priv,
CMD_RF_REG_ACCESS, 0,
CMD_OPTION_WAITFORRSP, 0, &offval);
mdelay(10);
return ret;
}
-static ssize_t libertas_rdrf_write(struct file *file,
+static ssize_t lbs_rdrf_write(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
+ lbs_private *priv = file->private_data;
ssize_t res, buf_size;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
return res;
}
-static ssize_t libertas_wrrf_write(struct file *file,
+static ssize_t lbs_wrrf_write(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
- wlan_private *priv = file->private_data;
+ lbs_private *priv = file->private_data;
ssize_t res, buf_size;
u32 offset, value;
- struct wlan_offset_value offval;
+ struct lbs_offset_value offval;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
offval.offset = offset;
offval.value = value;
- res = libertas_prepare_and_send_command(priv,
+ res = lbs_prepare_and_send_command(priv,
CMD_RF_REG_ACCESS, 1,
CMD_OPTION_WAITFORRSP, 0, &offval);
mdelay(10);
.write = (fwrite), \
}
-struct libertas_debugfs_files {
+struct lbs_debugfs_files {
char *name;
int perm;
struct file_operations fops;
};
-static struct libertas_debugfs_files debugfs_files[] = {
- { "info", 0444, FOPS(libertas_dev_info, write_file_dummy), },
- { "getscantable", 0444, FOPS(libertas_getscantable,
+static struct lbs_debugfs_files debugfs_files[] = {
+ { "info", 0444, FOPS(lbs_dev_info, write_file_dummy), },
+ { "getscantable", 0444, FOPS(lbs_getscantable,
write_file_dummy), },
- { "sleepparams", 0644, FOPS(libertas_sleepparams_read,
- libertas_sleepparams_write), },
- { "extscan", 0600, FOPS(NULL, libertas_extscan), },
- { "setuserscan", 0600, FOPS(NULL, libertas_setuserscan), },
+ { "sleepparams", 0644, FOPS(lbs_sleepparams_read,
+ lbs_sleepparams_write), },
+ { "extscan", 0600, FOPS(NULL, lbs_extscan), },
+ { "setuserscan", 0600, FOPS(NULL, lbs_setuserscan), },
};
-static struct libertas_debugfs_files debugfs_events_files[] = {
- {"low_rssi", 0644, FOPS(libertas_lowrssi_read,
- libertas_lowrssi_write), },
- {"low_snr", 0644, FOPS(libertas_lowsnr_read,
- libertas_lowsnr_write), },
- {"failure_count", 0644, FOPS(libertas_failcount_read,
- libertas_failcount_write), },
- {"beacon_missed", 0644, FOPS(libertas_bcnmiss_read,
- libertas_bcnmiss_write), },
- {"high_rssi", 0644, FOPS(libertas_highrssi_read,
- libertas_highrssi_write), },
- {"high_snr", 0644, FOPS(libertas_highsnr_read,
- libertas_highsnr_write), },
+static struct lbs_debugfs_files debugfs_events_files[] = {
+ {"low_rssi", 0644, FOPS(lbs_lowrssi_read,
+ lbs_lowrssi_write), },
+ {"low_snr", 0644, FOPS(lbs_lowsnr_read,
+ lbs_lowsnr_write), },
+ {"failure_count", 0644, FOPS(lbs_failcount_read,
+ lbs_failcount_write), },
+ {"beacon_missed", 0644, FOPS(lbs_bcnmiss_read,
+ lbs_bcnmiss_write), },
+ {"high_rssi", 0644, FOPS(lbs_highrssi_read,
+ lbs_highrssi_write), },
+ {"high_snr", 0644, FOPS(lbs_highsnr_read,
+ lbs_highsnr_write), },
};
-static struct libertas_debugfs_files debugfs_regs_files[] = {
- {"rdmac", 0644, FOPS(libertas_rdmac_read, libertas_rdmac_write), },
- {"wrmac", 0600, FOPS(NULL, libertas_wrmac_write), },
- {"rdbbp", 0644, FOPS(libertas_rdbbp_read, libertas_rdbbp_write), },
- {"wrbbp", 0600, FOPS(NULL, libertas_wrbbp_write), },
- {"rdrf", 0644, FOPS(libertas_rdrf_read, libertas_rdrf_write), },
- {"wrrf", 0600, FOPS(NULL, libertas_wrrf_write), },
+static struct lbs_debugfs_files debugfs_regs_files[] = {
+ {"rdmac", 0644, FOPS(lbs_rdmac_read, lbs_rdmac_write), },
+ {"wrmac", 0600, FOPS(NULL, lbs_wrmac_write), },
+ {"rdbbp", 0644, FOPS(lbs_rdbbp_read, lbs_rdbbp_write), },
+ {"wrbbp", 0600, FOPS(NULL, lbs_wrbbp_write), },
+ {"rdrf", 0644, FOPS(lbs_rdrf_read, lbs_rdrf_write), },
+ {"wrrf", 0600, FOPS(NULL, lbs_wrrf_write), },
};
-void libertas_debugfs_init(void)
+void lbs_debugfs_init(void)
{
- if (!libertas_dir)
- libertas_dir = debugfs_create_dir("libertas_wireless", NULL);
+ if (!lbs_dir)
+ lbs_dir = debugfs_create_dir("lbs_wireless", NULL);
return;
}
-void libertas_debugfs_remove(void)
+void lbs_debugfs_remove(void)
{
- if (libertas_dir)
- debugfs_remove(libertas_dir);
+ if (lbs_dir)
+ debugfs_remove(lbs_dir);
return;
}
-void libertas_debugfs_init_one(wlan_private *priv, struct net_device *dev)
+void lbs_debugfs_init_one(lbs_private *priv, struct net_device *dev)
{
int i;
- struct libertas_debugfs_files *files;
- if (!libertas_dir)
+ struct lbs_debugfs_files *files;
+ if (!lbs_dir)
goto exit;
- priv->debugfs_dir = debugfs_create_dir(dev->name, libertas_dir);
+ priv->debugfs_dir = debugfs_create_dir(dev->name, lbs_dir);
if (!priv->debugfs_dir)
goto exit;
}
#ifdef PROC_DEBUG
- libertas_debug_init(priv, dev);
+ lbs_debug_init(priv, dev);
#endif
exit:
return;
}
-void libertas_debugfs_remove_one(wlan_private *priv)
+void lbs_debugfs_remove_one(lbs_private *priv)
{
int i;
#ifdef PROC_DEBUG
-#define item_size(n) (FIELD_SIZEOF(wlan_adapter, n))
-#define item_addr(n) (offsetof(wlan_adapter, n))
+#define item_size(n) (FIELD_SIZEOF(lbs_adapter, n))
+#define item_addr(n) (offsetof(lbs_adapter, n))
struct debug_data {
size_t addr;
};
-/* To debug any member of wlan_adapter, simply add one line here.
+/* To debug any member of lbs_adapter, simply add one line here.
*/
static struct debug_data items[] = {
{"intcounter", item_size(intcounter), item_addr(intcounter)},
* @param data data to output
* @return number of output data
*/
-static ssize_t wlan_debugfs_read(struct file *file, char __user *userbuf,
+static ssize_t lbs_debugfs_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
int val = 0;
* @param data data to write
* @return number of data
*/
-static ssize_t wlan_debugfs_write(struct file *f, const char __user *buf,
+static ssize_t lbs_debugfs_write(struct file *f, const char __user *buf,
size_t cnt, loff_t *ppos)
{
int r, i;
return (ssize_t)cnt;
}
-static struct file_operations libertas_debug_fops = {
+static struct file_operations lbs_debug_fops = {
.owner = THIS_MODULE,
.open = open_file_generic,
- .write = wlan_debugfs_write,
- .read = wlan_debugfs_read,
+ .write = lbs_debugfs_write,
+ .read = lbs_debugfs_read,
};
/**
* @brief create debug proc file
*
- * @param priv pointer wlan_private
+ * @param priv pointer lbs_private
* @param dev pointer net_device
* @return N/A
*/
-static void libertas_debug_init(wlan_private * priv, struct net_device *dev)
+static void lbs_debug_init(lbs_private * priv, struct net_device *dev)
{
int i;
priv->debugfs_debug = debugfs_create_file("debug", 0644,
priv->debugfs_dir, &items[0],
- &libertas_debug_fops);
+ &lbs_debug_fops);
}
#endif
-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
* functions defined in other source files
*/
-#ifndef _WLAN_DECL_H_
-#define _WLAN_DECL_H_
+#ifndef _LBS_DECL_H_
+#define _LBS_DECL_H_
#include <linux/device.h>
#include "defs.h"
/** Function Prototype Declaration */
-struct wlan_private;
+struct lbs_private;
struct sk_buff;
struct net_device;
-int libertas_set_mac_packet_filter(wlan_private * priv);
+int lbs_set_mac_packet_filter(lbs_private * priv);
-void libertas_send_tx_feedback(wlan_private * priv);
+void lbs_send_tx_feedback(lbs_private * priv);
-int libertas_free_cmd_buffer(wlan_private * priv);
+int lbs_free_cmd_buffer(lbs_private * priv);
struct cmd_ctrl_node;
-struct cmd_ctrl_node *libertas_get_free_cmd_ctrl_node(wlan_private * priv);
+struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(lbs_private * priv);
-void libertas_set_cmd_ctrl_node(wlan_private * priv,
+void lbs_set_cmd_ctrl_node(lbs_private * priv,
struct cmd_ctrl_node *ptempnode,
u32 cmd_oid, u16 wait_option, void *pdata_buf);
-int libertas_prepare_and_send_command(wlan_private * priv,
+int lbs_prepare_and_send_command(lbs_private * priv,
u16 cmd_no,
u16 cmd_action,
u16 wait_option, u32 cmd_oid, void *pdata_buf);
-void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail);
+void lbs_queue_cmd(lbs_adapter *adapter, struct cmd_ctrl_node *cmdnode, u8 addtail);
-int libertas_allocate_cmd_buffer(wlan_private * priv);
-int libertas_execute_next_command(wlan_private * priv);
-int libertas_process_event(wlan_private * priv);
-void libertas_interrupt(struct net_device *);
-int libertas_set_radio_control(wlan_private * priv);
-u32 libertas_fw_index_to_data_rate(u8 index);
-u8 libertas_data_rate_to_fw_index(u32 rate);
-void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen);
+int lbs_allocate_cmd_buffer(lbs_private * priv);
+int lbs_execute_next_command(lbs_private * priv);
+int lbs_process_event(lbs_private * priv);
+void lbs_interrupt(struct net_device *);
+int lbs_set_radio_control(lbs_private * priv);
+u32 lbs_fw_index_to_data_rate(u8 index);
+u8 lbs_data_rate_to_fw_index(u32 rate);
+void lbs_get_fwversion(lbs_adapter *adapter, char *fwversion, int maxlen);
-void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb);
+void lbs_upload_rx_packet(lbs_private * priv, struct sk_buff *skb);
/** The proc fs interface */
-int libertas_process_rx_command(wlan_private * priv);
-int libertas_process_tx(wlan_private * priv, struct sk_buff *skb);
-void __libertas_cleanup_and_insert_cmd(wlan_private * priv,
+int lbs_process_rx_command(lbs_private * priv);
+int lbs_process_tx(lbs_private * priv, struct sk_buff *skb);
+void __lbs_cleanup_and_insert_cmd(lbs_private * priv,
struct cmd_ctrl_node *ptempcmd);
-int libertas_set_regiontable(wlan_private * priv, u8 region, u8 band);
+int lbs_set_regiontable(lbs_private * priv, u8 region, u8 band);
-int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *);
+int lbs_process_rxed_packet(lbs_private * priv, struct sk_buff *);
-void libertas_ps_sleep(wlan_private * priv, int wait_option);
-void libertas_ps_confirm_sleep(wlan_private * priv, u16 psmode);
-void libertas_ps_wakeup(wlan_private * priv, int wait_option);
+void lbs_ps_sleep(lbs_private * priv, int wait_option);
+void lbs_ps_confirm_sleep(lbs_private * priv, u16 psmode);
+void lbs_ps_wakeup(lbs_private * priv, int wait_option);
-void libertas_tx_runqueue(wlan_private *priv);
+void lbs_tx_runqueue(lbs_private *priv);
-struct chan_freq_power *libertas_find_cfp_by_band_and_channel(
- wlan_adapter * adapter, u8 band, u16 channel);
+struct chan_freq_power *lbs_find_cfp_by_band_and_channel(
+ lbs_adapter *adapter, u8 band, u16 channel);
-void libertas_mac_event_disconnected(wlan_private * priv);
+void lbs_mac_event_disconnected(lbs_private * priv);
-void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str);
+void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str);
/* main.c */
-struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band,
+struct chan_freq_power *lbs_get_region_cfp_table(u8 region, u8 band,
int *cfp_no);
-wlan_private *libertas_add_card(void *card, struct device *dmdev);
-int libertas_remove_card(wlan_private *priv);
-int libertas_start_card(wlan_private *priv);
-int libertas_stop_card(wlan_private *priv);
-int libertas_add_mesh(wlan_private *priv, struct device *dev);
-void libertas_remove_mesh(wlan_private *priv);
-int libertas_reset_device(wlan_private *priv);
-
-#endif /* _WLAN_DECL_H_ */
+lbs_private *lbs_add_card(void *card, struct device *dmdev);
+int lbs_remove_card(lbs_private *priv);
+int lbs_start_card(lbs_private *priv);
+int lbs_stop_card(lbs_private *priv);
+int lbs_add_mesh(lbs_private *priv, struct device *dev);
+void lbs_remove_mesh(lbs_private *priv);
+int lbs_reset_device(lbs_private *priv);
+
+#endif
* This header file contains global constant/enum definitions,
* global variable declaration.
*/
-#ifndef _WLAN_DEFS_H_
-#define _WLAN_DEFS_H_
+#ifndef _LBS_DEFS_H_
+#define _LBS_DEFS_H_
#include <linux/spinlock.h>
#define LBS_DEB_HEX 0x00200000
#define LBS_DEB_SDIO 0x00400000
-extern unsigned int libertas_debug;
+extern unsigned int lbs_debug;
#ifdef DEBUG
#define LBS_DEB_LL(grp, grpnam, fmt, args...) \
-do { if ((libertas_debug & (grp)) == (grp)) \
+do { if ((lbs_debug & (grp)) == (grp)) \
printk(KERN_DEBUG DRV_NAME grpnam "%s: " fmt, \
in_interrupt() ? " (INT)" : "", ## args); } while (0)
#else
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) {
#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 */
#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 */
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 */
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 */
#define FWT_DEFAULT_SLEEPMODE 0
#define FWT_DEFAULT_SNR 0
-#endif /* _WLAN_DEFS_H_ */
+#endif
/**
* 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>
#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
struct chan_freq_power *CFP;
};
-struct wlan_802_11_security {
+struct lbs_802_11_security {
u8 WPAenabled;
u8 WPA2enabled;
u8 wep_enabled;
};
/* 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 */
};
/** Private structure for the MV device */
-struct _wlan_private {
+struct _lbs_private {
int open;
int mesh_open;
int infra_open;
char name[DEV_NAME_LEN];
void *card;
- wlan_adapter *adapter;
+ lbs_adapter *adapter;
struct net_device *dev;
struct net_device_stats stats;
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];
/** 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,
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
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];
};
/** Wlan adapter data structure*/
-struct _wlan_adapter {
+struct _lbs_adapter {
/** STATUS variables */
u8 fwreleasenumber[4];
u32 fwcapinfo;
struct mutex lock;
- u8 tmptxbuf[WLAN_UPLD_SIZE];
+ u8 tmptxbuf[LBS_UPLD_SIZE];
/* protected by hard_start_xmit serialization */
/** command-related variables */
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];
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 */
/** MISCELLANEOUS */
u8 *prdeeprom;
- struct wlan_offset_value offsetvalue;
+ struct lbs_offset_value offsetvalue;
struct cmd_ds_802_11_get_log logmsg;
u8 last_scanned_channel;
};
-#endif /* _WLAN_DEV_H_ */
+#endif
"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;
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);
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,
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
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);
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:
}
}
-static void libertas_ethtool_get_strings (struct net_device * dev,
+static void lbs_ethtool_get_strings(struct net_device *dev,
u32 stringset,
u8 * s)
{
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,
};
* 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
#define MACREG_INT_CODE_SNR_HIGH 0x0000001d
#define MACREG_INT_CODE_MESH_AUTO_STARTED 0x00000023
-#endif /* _HOST_H_ */
+#endif
* 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"
/* 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;
};
struct if_cs_card {
struct pcmcia_device *p_dev;
- wlan_private *priv;
+ lbs_private *priv;
void __iomem *iobase;
};
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);
}
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;
}
/*
* 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;
/*
* 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;
/*
* 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;
}
-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;
/********************************************************************/
/* 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;
}
-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;
/* 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;
}
}
-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);
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;
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;
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;
}
goto out;
out3:
- libertas_remove_card(priv);
+ lbs_remove_card(priv);
out2:
ioport_unmap(card->iobase);
out1:
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);
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,
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;
}
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);
}
#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) },
struct if_sdio_card {
struct sdio_func *func;
- wlan_private *priv;
+ lbs_private *priv;
int model;
unsigned long ioport;
card->int_cause |= MRVDRV_CMD_UPLD_RDY;
- libertas_interrupt(card->priv->dev);
+ lbs_interrupt(card->priv->dev);
ret = 0;
memcpy(data, buffer, size);
- libertas_process_rxed_packet(card->priv, skb);
+ lbs_process_rxed_packet(card->priv, skb);
ret = 0;
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);
/* 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;
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;
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;
*/
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;
}
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;
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);
if (ret)
goto reclaim;
- priv = libertas_add_card(card, &func->dev);
+ priv = lbs_add_card(card, &func->dev);
if (!priv) {
ret = -ENOMEM;
goto reclaim;
if (ret)
goto reclaim;
- ret = libertas_start_card(priv);
+ ret = lbs_start_card(priv);
if (ret)
goto err_activate_card;
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();
* 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
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
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);
/* 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");
* 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;
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);
}
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;
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;
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);
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:
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);
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 */
/**
* @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)
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);
ret = usb_reset_device(cardp->udev);
if (!ret && priv) {
msleep(10);
- ret = libertas_reset_device(priv);
+ ret = lbs_reset_device(priv);
msleep(10);
}
/**
* @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
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) {
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) {
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,
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;
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:
/**
* @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;
}
/* 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;
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;
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;
}
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);
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);
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);
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);
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);
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);
}
-#ifndef _LIBERTAS_IF_USB_H
-#define _LIBERTAS_IF_USB_H
+#ifndef _LBS_IF_USB_H
+#define _LBS_IF_USB_H
#include <linux/list.h>
* 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;
* @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;
* @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;
/**
* @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);
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:
/**
* @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;
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;
/**
* @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;
/* 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 "
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);
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;
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);
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;
/* 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;
/* 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;
}
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;
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));
/* 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;
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);
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;
/* 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);
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);
}
}
- if (libertas_parse_dnld_countryinfo_11d(priv, bss)) {
+ if (lbs_parse_dnld_countryinfo_11d(priv, bss)) {
ret = -1;
goto 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;
}
if (status_code) {
- libertas_mac_event_disconnected(priv);
+ lbs_mac_event_disconnected(priv);
ret = -1;
goto done;
}
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));
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);
*/
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;
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 */
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;
* 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
#include "join.h"
#define DRIVER_RELEASE_VERSION "323.p0"
-const char libertas_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION
+const char lbs_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION
#ifdef DEBUG
"-dbg"
#endif
/* Module parameters */
-unsigned int libertas_debug = 0;
-module_param(libertas_debug, int, 0644);
-EXPORT_SYMBOL_GPL(libertas_debug);
+unsigned int lbs_debug;
+EXPORT_SYMBOL_GPL(lbs_debug);
+module_param_named(libertas_debug, lbs_debug, int, 0644);
-#define WLAN_TX_PWR_DEFAULT 20 /*100mW */
-#define WLAN_TX_PWR_US_DEFAULT 20 /*100mW */
-#define WLAN_TX_PWR_JP_DEFAULT 16 /*50mW */
-#define WLAN_TX_PWR_FR_DEFAULT 20 /*100mW */
-#define WLAN_TX_PWR_EMEA_DEFAULT 20 /*100mW */
+#define LBS_TX_PWR_DEFAULT 20 /*100mW */
+#define LBS_TX_PWR_US_DEFAULT 20 /*100mW */
+#define LBS_TX_PWR_JP_DEFAULT 16 /*50mW */
+#define LBS_TX_PWR_FR_DEFAULT 20 /*100mW */
+#define LBS_TX_PWR_EMEA_DEFAULT 20 /*100mW */
/* Format { channel, frequency (MHz), maxtxpower } */
/* band: 'B/G', region: USA FCC/Canada IC */
static struct chan_freq_power channel_freq_power_US_BG[] = {
- {1, 2412, WLAN_TX_PWR_US_DEFAULT},
- {2, 2417, WLAN_TX_PWR_US_DEFAULT},
- {3, 2422, WLAN_TX_PWR_US_DEFAULT},
- {4, 2427, WLAN_TX_PWR_US_DEFAULT},
- {5, 2432, WLAN_TX_PWR_US_DEFAULT},
- {6, 2437, WLAN_TX_PWR_US_DEFAULT},
- {7, 2442, WLAN_TX_PWR_US_DEFAULT},
- {8, 2447, WLAN_TX_PWR_US_DEFAULT},
- {9, 2452, WLAN_TX_PWR_US_DEFAULT},
- {10, 2457, WLAN_TX_PWR_US_DEFAULT},
- {11, 2462, WLAN_TX_PWR_US_DEFAULT}
+ {1, 2412, LBS_TX_PWR_US_DEFAULT},
+ {2, 2417, LBS_TX_PWR_US_DEFAULT},
+ {3, 2422, LBS_TX_PWR_US_DEFAULT},
+ {4, 2427, LBS_TX_PWR_US_DEFAULT},
+ {5, 2432, LBS_TX_PWR_US_DEFAULT},
+ {6, 2437, LBS_TX_PWR_US_DEFAULT},
+ {7, 2442, LBS_TX_PWR_US_DEFAULT},
+ {8, 2447, LBS_TX_PWR_US_DEFAULT},
+ {9, 2452, LBS_TX_PWR_US_DEFAULT},
+ {10, 2457, LBS_TX_PWR_US_DEFAULT},
+ {11, 2462, LBS_TX_PWR_US_DEFAULT}
};
/* band: 'B/G', region: Europe ETSI */
static struct chan_freq_power channel_freq_power_EU_BG[] = {
- {1, 2412, WLAN_TX_PWR_EMEA_DEFAULT},
- {2, 2417, WLAN_TX_PWR_EMEA_DEFAULT},
- {3, 2422, WLAN_TX_PWR_EMEA_DEFAULT},
- {4, 2427, WLAN_TX_PWR_EMEA_DEFAULT},
- {5, 2432, WLAN_TX_PWR_EMEA_DEFAULT},
- {6, 2437, WLAN_TX_PWR_EMEA_DEFAULT},
- {7, 2442, WLAN_TX_PWR_EMEA_DEFAULT},
- {8, 2447, WLAN_TX_PWR_EMEA_DEFAULT},
- {9, 2452, WLAN_TX_PWR_EMEA_DEFAULT},
- {10, 2457, WLAN_TX_PWR_EMEA_DEFAULT},
- {11, 2462, WLAN_TX_PWR_EMEA_DEFAULT},
- {12, 2467, WLAN_TX_PWR_EMEA_DEFAULT},
- {13, 2472, WLAN_TX_PWR_EMEA_DEFAULT}
+ {1, 2412, LBS_TX_PWR_EMEA_DEFAULT},
+ {2, 2417, LBS_TX_PWR_EMEA_DEFAULT},
+ {3, 2422, LBS_TX_PWR_EMEA_DEFAULT},
+ {4, 2427, LBS_TX_PWR_EMEA_DEFAULT},
+ {5, 2432, LBS_TX_PWR_EMEA_DEFAULT},
+ {6, 2437, LBS_TX_PWR_EMEA_DEFAULT},
+ {7, 2442, LBS_TX_PWR_EMEA_DEFAULT},
+ {8, 2447, LBS_TX_PWR_EMEA_DEFAULT},
+ {9, 2452, LBS_TX_PWR_EMEA_DEFAULT},
+ {10, 2457, LBS_TX_PWR_EMEA_DEFAULT},
+ {11, 2462, LBS_TX_PWR_EMEA_DEFAULT},
+ {12, 2467, LBS_TX_PWR_EMEA_DEFAULT},
+ {13, 2472, LBS_TX_PWR_EMEA_DEFAULT}
};
/* band: 'B/G', region: Spain */
static struct chan_freq_power channel_freq_power_SPN_BG[] = {
- {10, 2457, WLAN_TX_PWR_DEFAULT},
- {11, 2462, WLAN_TX_PWR_DEFAULT}
+ {10, 2457, LBS_TX_PWR_DEFAULT},
+ {11, 2462, LBS_TX_PWR_DEFAULT}
};
/* band: 'B/G', region: France */
static struct chan_freq_power channel_freq_power_FR_BG[] = {
- {10, 2457, WLAN_TX_PWR_FR_DEFAULT},
- {11, 2462, WLAN_TX_PWR_FR_DEFAULT},
- {12, 2467, WLAN_TX_PWR_FR_DEFAULT},
- {13, 2472, WLAN_TX_PWR_FR_DEFAULT}
+ {10, 2457, LBS_TX_PWR_FR_DEFAULT},
+ {11, 2462, LBS_TX_PWR_FR_DEFAULT},
+ {12, 2467, LBS_TX_PWR_FR_DEFAULT},
+ {13, 2472, LBS_TX_PWR_FR_DEFAULT}
};
/* band: 'B/G', region: Japan */
static struct chan_freq_power channel_freq_power_JPN_BG[] = {
- {1, 2412, WLAN_TX_PWR_JP_DEFAULT},
- {2, 2417, WLAN_TX_PWR_JP_DEFAULT},
- {3, 2422, WLAN_TX_PWR_JP_DEFAULT},
- {4, 2427, WLAN_TX_PWR_JP_DEFAULT},
- {5, 2432, WLAN_TX_PWR_JP_DEFAULT},
- {6, 2437, WLAN_TX_PWR_JP_DEFAULT},
- {7, 2442, WLAN_TX_PWR_JP_DEFAULT},
- {8, 2447, WLAN_TX_PWR_JP_DEFAULT},
- {9, 2452, WLAN_TX_PWR_JP_DEFAULT},
- {10, 2457, WLAN_TX_PWR_JP_DEFAULT},
- {11, 2462, WLAN_TX_PWR_JP_DEFAULT},
- {12, 2467, WLAN_TX_PWR_JP_DEFAULT},
- {13, 2472, WLAN_TX_PWR_JP_DEFAULT},
- {14, 2484, WLAN_TX_PWR_JP_DEFAULT}
+ {1, 2412, LBS_TX_PWR_JP_DEFAULT},
+ {2, 2417, LBS_TX_PWR_JP_DEFAULT},
+ {3, 2422, LBS_TX_PWR_JP_DEFAULT},
+ {4, 2427, LBS_TX_PWR_JP_DEFAULT},
+ {5, 2432, LBS_TX_PWR_JP_DEFAULT},
+ {6, 2437, LBS_TX_PWR_JP_DEFAULT},
+ {7, 2442, LBS_TX_PWR_JP_DEFAULT},
+ {8, 2447, LBS_TX_PWR_JP_DEFAULT},
+ {9, 2452, LBS_TX_PWR_JP_DEFAULT},
+ {10, 2457, LBS_TX_PWR_JP_DEFAULT},
+ {11, 2462, LBS_TX_PWR_JP_DEFAULT},
+ {12, 2467, LBS_TX_PWR_JP_DEFAULT},
+ {13, 2472, LBS_TX_PWR_JP_DEFAULT},
+ {14, 2484, LBS_TX_PWR_JP_DEFAULT}
};
/**
/**
* the table to keep region code
*/
-u16 libertas_region_code_to_index[MRVDRV_MAX_REGION_CODE] =
+u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE] =
{ 0x10, 0x20, 0x30, 0x31, 0x32, 0x40 };
/**
* 802.11b/g supported bitrates (in 500Kb/s units)
*/
-u8 libertas_bg_rates[MAX_RATES] =
+u8 lbs_bg_rates[MAX_RATES] =
{ 0x02, 0x04, 0x0b, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c,
0x00, 0x00 };
* @param idx The index of data rate
* @return data rate or 0
*/
-u32 libertas_fw_index_to_data_rate(u8 idx)
+u32 lbs_fw_index_to_data_rate(u8 idx)
{
if (idx >= sizeof(fw_data_rates))
idx = 0;
* @param rate data rate
* @return index or 0
*/
-u8 libertas_data_rate_to_fw_index(u32 rate)
+u8 lbs_data_rate_to_fw_index(u32 rate)
{
u8 i;
/**
* @brief Get function for sysfs attribute anycast_mask
*/
-static ssize_t libertas_anycast_get(struct device * dev,
+static ssize_t lbs_anycast_get(struct device *dev,
struct device_attribute *attr, char * buf)
{
struct cmd_ds_mesh_access mesh_access;
memset(&mesh_access, 0, sizeof(mesh_access));
- libertas_prepare_and_send_command(to_net_dev(dev)->priv,
+ lbs_prepare_and_send_command(to_net_dev(dev)->priv,
CMD_MESH_ACCESS,
CMD_ACT_MESH_GET_ANYCAST,
CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
/**
* @brief Set function for sysfs attribute anycast_mask
*/
-static ssize_t libertas_anycast_set(struct device * dev,
+static ssize_t lbs_anycast_set(struct device *dev,
struct device_attribute *attr, const char * buf, size_t count)
{
struct cmd_ds_mesh_access mesh_access;
sscanf(buf, "%x", &datum);
mesh_access.data[0] = cpu_to_le32(datum);
- libertas_prepare_and_send_command((to_net_dev(dev))->priv,
+ lbs_prepare_and_send_command((to_net_dev(dev))->priv,
CMD_MESH_ACCESS,
CMD_ACT_MESH_SET_ANYCAST,
CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
return strlen(buf);
}
-int libertas_add_rtap(wlan_private *priv);
-void libertas_remove_rtap(wlan_private *priv);
+int lbs_add_rtap(lbs_private *priv);
+void lbs_remove_rtap(lbs_private *priv);
/**
* Get function for sysfs attribute rtap
*/
-static ssize_t libertas_rtap_get(struct device * dev,
+static ssize_t lbs_rtap_get(struct device *dev,
struct device_attribute *attr, char * buf)
{
- wlan_private *priv = (wlan_private *) (to_net_dev(dev))->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = (lbs_private *) (to_net_dev(dev))->priv;
+ lbs_adapter *adapter = priv->adapter;
return snprintf(buf, 5, "0x%X\n", adapter->monitormode);
}
/**
* Set function for sysfs attribute rtap
*/
-static ssize_t libertas_rtap_set(struct device * dev,
+static ssize_t lbs_rtap_set(struct device *dev,
struct device_attribute *attr, const char * buf, size_t count)
{
int monitor_mode;
- wlan_private *priv = (wlan_private *) (to_net_dev(dev))->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = (lbs_private *) (to_net_dev(dev))->priv;
+ lbs_adapter *adapter = priv->adapter;
sscanf(buf, "%x", &monitor_mode);
- if (monitor_mode != WLAN_MONITOR_OFF) {
+ if (monitor_mode != LBS_MONITOR_OFF) {
if(adapter->monitormode == monitor_mode)
return strlen(buf);
- if (adapter->monitormode == WLAN_MONITOR_OFF) {
+ if (adapter->monitormode == LBS_MONITOR_OFF) {
if (adapter->mode == IW_MODE_INFRA)
- libertas_send_deauthentication(priv);
+ lbs_send_deauthentication(priv);
else if (adapter->mode == IW_MODE_ADHOC)
- libertas_stop_adhoc_network(priv);
- libertas_add_rtap(priv);
+ lbs_stop_adhoc_network(priv);
+ lbs_add_rtap(priv);
}
adapter->monitormode = monitor_mode;
}
else {
- if(adapter->monitormode == WLAN_MONITOR_OFF)
+ if (adapter->monitormode == LBS_MONITOR_OFF)
return strlen(buf);
- adapter->monitormode = WLAN_MONITOR_OFF;
- libertas_remove_rtap(priv);
+ adapter->monitormode = LBS_MONITOR_OFF;
+ lbs_remove_rtap(priv);
netif_wake_queue(priv->dev);
netif_wake_queue(priv->mesh_dev);
}
- libertas_prepare_and_send_command(priv,
+ lbs_prepare_and_send_command(priv,
CMD_802_11_MONITOR_MODE, CMD_ACT_SET,
CMD_OPTION_WAITFORRSP, 0, &adapter->monitormode);
return strlen(buf);
}
/**
- * libertas_rtap attribute to be exported per mshX interface
+ * lbs_rtap attribute to be exported per mshX interface
* through sysfs (/sys/class/net/mshX/libertas-rtap)
*/
-static DEVICE_ATTR(libertas_rtap, 0644, libertas_rtap_get,
- libertas_rtap_set );
+static DEVICE_ATTR(lbs_rtap, 0644, lbs_rtap_get,
+ lbs_rtap_set );
/**
* anycast_mask attribute to be exported per mshX interface
* through sysfs (/sys/class/net/mshX/anycast_mask)
*/
-static DEVICE_ATTR(anycast_mask, 0644, libertas_anycast_get, libertas_anycast_set);
+static DEVICE_ATTR(anycast_mask, 0644, lbs_anycast_get, lbs_anycast_set);
-static ssize_t libertas_autostart_enabled_get(struct device * dev,
+static ssize_t lbs_autostart_enabled_get(struct device *dev,
struct device_attribute *attr, char * buf)
{
struct cmd_ds_mesh_access mesh_access;
memset(&mesh_access, 0, sizeof(mesh_access));
- libertas_prepare_and_send_command(to_net_dev(dev)->priv,
+ lbs_prepare_and_send_command(to_net_dev(dev)->priv,
CMD_MESH_ACCESS,
CMD_ACT_MESH_GET_AUTOSTART_ENABLED,
CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
return sprintf(buf, "%d\n", le32_to_cpu(mesh_access.data[0]));
}
-static ssize_t libertas_autostart_enabled_set(struct device * dev,
+static ssize_t lbs_autostart_enabled_set(struct device *dev,
struct device_attribute *attr, const char * buf, size_t count)
{
struct cmd_ds_mesh_access mesh_access;
uint32_t datum;
- wlan_private * priv = (to_net_dev(dev))->priv;
+ lbs_private *priv = (to_net_dev(dev))->priv;
int ret;
memset(&mesh_access, 0, sizeof(mesh_access));
sscanf(buf, "%d", &datum);
mesh_access.data[0] = cpu_to_le32(datum);
- ret = libertas_prepare_and_send_command(priv,
+ ret = lbs_prepare_and_send_command(priv,
CMD_MESH_ACCESS,
CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
}
static DEVICE_ATTR(autostart_enabled, 0644,
- libertas_autostart_enabled_get, libertas_autostart_enabled_set);
+ lbs_autostart_enabled_get, lbs_autostart_enabled_set);
-static struct attribute *libertas_mesh_sysfs_entries[] = {
+static struct attribute *lbs_mesh_sysfs_entries[] = {
&dev_attr_anycast_mask.attr,
&dev_attr_autostart_enabled.attr,
NULL,
};
-static struct attribute_group libertas_mesh_attr_group = {
- .attrs = libertas_mesh_sysfs_entries,
+static struct attribute_group lbs_mesh_attr_group = {
+ .attrs = lbs_mesh_sysfs_entries,
};
/**
*/
static int pre_open_check(struct net_device *dev)
{
- wlan_private *priv = (wlan_private *) dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = (lbs_private *) dev->priv;
+ lbs_adapter *adapter = priv->adapter;
int i = 0;
while (!adapter->fw_ready && i < 20) {
* @param dev A pointer to net_device structure
* @return 0
*/
-static int libertas_dev_open(struct net_device *dev)
+static int lbs_dev_open(struct net_device *dev)
{
- wlan_private *priv = (wlan_private *) dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = (lbs_private *) dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_NET);
priv->open = 1;
- if (adapter->connect_status == LIBERTAS_CONNECTED) {
+ if (adapter->connect_status == LBS_CONNECTED) {
netif_carrier_on(priv->dev);
if (priv->mesh_dev)
netif_carrier_on(priv->mesh_dev);
* @param dev A pointer to net_device structure
* @return 0
*/
-static int libertas_mesh_open(struct net_device *dev)
+static int lbs_mesh_open(struct net_device *dev)
{
- wlan_private *priv = (wlan_private *) dev->priv ;
+ lbs_private *priv = (lbs_private *) dev->priv ;
if (pre_open_check(dev) == -1)
return -1;
priv->mesh_open = 1 ;
netif_wake_queue(priv->mesh_dev);
if (priv->infra_open == 0)
- return libertas_dev_open(priv->dev) ;
+ return lbs_dev_open(priv->dev) ;
return 0;
}
* @param dev A pointer to net_device structure
* @return 0
*/
-static int libertas_open(struct net_device *dev)
+static int lbs_open(struct net_device *dev)
{
- wlan_private *priv = (wlan_private *) dev->priv ;
+ lbs_private *priv = (lbs_private *) dev->priv ;
if(pre_open_check(dev) == -1)
return -1;
priv->infra_open = 1 ;
netif_wake_queue(priv->dev);
if (priv->open == 0)
- return libertas_dev_open(priv->dev) ;
+ return lbs_dev_open(priv->dev) ;
return 0;
}
-static int libertas_dev_close(struct net_device *dev)
+static int lbs_dev_close(struct net_device *dev)
{
- wlan_private *priv = dev->priv;
+ lbs_private *priv = dev->priv;
lbs_deb_enter(LBS_DEB_NET);
* @param dev A pointer to net_device structure
* @return 0
*/
-static int libertas_mesh_close(struct net_device *dev)
+static int lbs_mesh_close(struct net_device *dev)
{
- wlan_private *priv = (wlan_private *) (dev->priv);
+ lbs_private *priv = (lbs_private *) (dev->priv);
priv->mesh_open = 0;
netif_stop_queue(priv->mesh_dev);
if (priv->infra_open == 0)
- return libertas_dev_close(dev);
+ return lbs_dev_close(dev);
else
return 0;
}
* @param dev A pointer to net_device structure
* @return 0
*/
-static int libertas_close(struct net_device *dev)
+static int lbs_close(struct net_device *dev)
{
- wlan_private *priv = (wlan_private *) dev->priv;
+ lbs_private *priv = (lbs_private *) dev->priv;
netif_stop_queue(dev);
priv->infra_open = 0;
if (priv->mesh_open == 0)
- return libertas_dev_close(dev);
+ return lbs_dev_close(dev);
else
return 0;
}
-static int libertas_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
int ret = 0;
- wlan_private *priv = dev->priv;
+ lbs_private *priv = dev->priv;
lbs_deb_enter(LBS_DEB_NET);
if (priv->mesh_dev)
netif_stop_queue(priv->mesh_dev);
- if (libertas_process_tx(priv, skb) == 0)
+ if (lbs_process_tx(priv, skb) == 0)
dev->trans_start = jiffies;
done:
lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret);
}
/**
- * @brief Mark mesh packets and handover them to libertas_hard_start_xmit
+ * @brief Mark mesh packets and handover them to lbs_hard_start_xmit
*
*/
-static int libertas_mesh_pre_start_xmit(struct sk_buff *skb,
+static int lbs_mesh_pre_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
- wlan_private *priv = dev->priv;
+ lbs_private *priv = dev->priv;
int ret;
lbs_deb_enter(LBS_DEB_MESH);
- if(priv->adapter->monitormode != WLAN_MONITOR_OFF) {
+ if (priv->adapter->monitormode != LBS_MONITOR_OFF) {
netif_stop_queue(dev);
return -EOPNOTSUPP;
}
SET_MESH_FRAME(skb);
- ret = libertas_hard_start_xmit(skb, priv->dev);
+ ret = lbs_hard_start_xmit(skb, priv->dev);
lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret);
return ret;
}
/**
- * @brief Mark non-mesh packets and handover them to libertas_hard_start_xmit
+ * @brief Mark non-mesh packets and handover them to lbs_hard_start_xmit
*
*/
-static int libertas_pre_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static int lbs_pre_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- wlan_private *priv = dev->priv;
+ lbs_private *priv = dev->priv;
int ret;
lbs_deb_enter(LBS_DEB_NET);
- if(priv->adapter->monitormode != WLAN_MONITOR_OFF) {
+ if (priv->adapter->monitormode != LBS_MONITOR_OFF) {
netif_stop_queue(dev);
return -EOPNOTSUPP;
}
UNSET_MESH_FRAME(skb);
- ret = libertas_hard_start_xmit(skb, dev);
+ ret = lbs_hard_start_xmit(skb, dev);
lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret);
return ret;
}
-static void libertas_tx_timeout(struct net_device *dev)
+static void lbs_tx_timeout(struct net_device *dev)
{
- wlan_private *priv = (wlan_private *) dev->priv;
+ lbs_private *priv = (lbs_private *) dev->priv;
lbs_deb_enter(LBS_DEB_TX);
dev->trans_start = jiffies;
if (priv->adapter->currenttxskb) {
- if (priv->adapter->monitormode != WLAN_MONITOR_OFF) {
+ if (priv->adapter->monitormode != LBS_MONITOR_OFF) {
/* If we are here, we have not received feedback from
the previous packet. Assume TX_FAIL and move on. */
priv->adapter->eventcause = 0x01000000;
- libertas_send_tx_feedback(priv);
+ lbs_send_tx_feedback(priv);
} else
wake_up_interruptible(&priv->waitq);
- } else if (priv->adapter->connect_status == LIBERTAS_CONNECTED) {
+ } else if (priv->adapter->connect_status == LBS_CONNECTED) {
netif_wake_queue(priv->dev);
if (priv->mesh_dev)
netif_wake_queue(priv->mesh_dev);
/**
* @brief This function returns the network statistics
*
- * @param dev A pointer to wlan_private structure
+ * @param dev A pointer to lbs_private structure
* @return A pointer to net_device_stats structure
*/
-static struct net_device_stats *libertas_get_stats(struct net_device *dev)
+static struct net_device_stats *lbs_get_stats(struct net_device *dev)
{
- wlan_private *priv = (wlan_private *) dev->priv;
+ lbs_private *priv = (lbs_private *) dev->priv;
return &priv->stats;
}
-static int libertas_set_mac_address(struct net_device *dev, void *addr)
+static int lbs_set_mac_address(struct net_device *dev, void *addr)
{
int ret = 0;
- wlan_private *priv = (wlan_private *) dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = (lbs_private *) dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct sockaddr *phwaddr = addr;
lbs_deb_enter(LBS_DEB_NET);
lbs_deb_hex(LBS_DEB_NET, "addr", phwaddr->sa_data, ETH_ALEN);
memcpy(adapter->current_addr, phwaddr->sa_data, ETH_ALEN);
- ret = libertas_prepare_and_send_command(priv, CMD_802_11_MAC_ADDRESS,
+ ret = lbs_prepare_and_send_command(priv, CMD_802_11_MAC_ADDRESS,
CMD_ACT_SET,
CMD_OPTION_WAITFORRSP, 0, NULL);
return ret;
}
-static int libertas_copy_multicast_address(wlan_adapter * adapter,
+static int lbs_copy_multicast_address(lbs_adapter *adapter,
struct net_device *dev)
{
int i = 0;
}
-static void libertas_set_multicast_list(struct net_device *dev)
+static void lbs_set_multicast_list(struct net_device *dev)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
int oldpacketfilter;
DECLARE_MAC_BUF(mac);
CMD_ACT_MAC_MULTICAST_ENABLE;
adapter->nr_of_multicastmacaddr =
- libertas_copy_multicast_address(adapter, dev);
+ lbs_copy_multicast_address(adapter, dev);
lbs_deb_net("multicast addresses: %d\n",
dev->mc_count);
adapter->multicastlist[i]));
}
/* send multicast addresses to firmware */
- libertas_prepare_and_send_command(priv,
+ lbs_prepare_and_send_command(priv,
CMD_MAC_MULTICAST_ADR,
CMD_ACT_SET, 0, 0,
NULL);
}
if (adapter->currentpacketfilter != oldpacketfilter) {
- libertas_set_mac_packet_filter(priv);
+ lbs_set_mac_packet_filter(priv);
}
lbs_deb_leave(LBS_DEB_NET);
}
/**
- * @brief This function handles the major jobs in the WLAN driver.
+ * @brief This function handles the major jobs in the LBS driver.
* It handles all events generated by firmware, RX data received
* from firmware and TX data sent from kernel.
*
- * @param data A pointer to wlan_thread structure
+ * @param data A pointer to lbs_thread structure
* @return 0
*/
-static int libertas_thread(void *data)
+static int lbs_thread(void *data)
{
struct net_device *dev = data;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
wait_queue_t wait;
u8 ireg = 0;
adapter->hisregcpy &= ~MRVDRV_CMD_UPLD_RDY;
spin_unlock_irq(&adapter->driver_lock);
- libertas_process_rx_command(priv);
+ lbs_process_rx_command(priv);
spin_lock_irq(&adapter->driver_lock);
}
continue;
}
spin_unlock_irq(&adapter->driver_lock);
- libertas_process_event(priv);
+ lbs_process_event(priv);
} else
spin_unlock_irq(&adapter->driver_lock);
if (adapter->psstate == PS_STATE_PRE_SLEEP) {
if (!priv->dnld_sent && !adapter->cur_cmd) {
if (adapter->connect_status ==
- LIBERTAS_CONNECTED) {
+ LBS_CONNECTED) {
lbs_deb_thread(
"main_thread: PRE_SLEEP--intcounter=%d currenttxskb=%p "
"dnld_sent=%d cur_cmd=%p, confirm now\n",
priv->dnld_sent,
adapter->cur_cmd);
- libertas_ps_confirm_sleep(priv,
+ lbs_ps_confirm_sleep(priv,
(u16) adapter->psmode);
} else {
/* workaround for firmware sending
/* Execute the next command */
if (!priv->dnld_sent && !priv->adapter->cur_cmd)
- libertas_execute_next_command(priv);
+ lbs_execute_next_command(priv);
/* Wake-up command waiters which can't sleep in
- * libertas_prepare_and_send_command
+ * lbs_prepare_and_send_command
*/
if (!adapter->nr_cmd_pending)
wake_up_all(&adapter->cmd_pending);
- libertas_tx_runqueue(priv);
+ lbs_tx_runqueue(priv);
}
del_timer(&adapter->command_timer);
* HW spec from firmware and set basic parameters to
* firmware.
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @return 0 or -1
*/
-static int wlan_setup_firmware(wlan_private * priv)
+static int lbs_setup_firmware(lbs_private *priv)
{
int ret = -1;
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
struct cmd_ds_mesh_access mesh_access;
lbs_deb_enter(LBS_DEB_FW);
*/
memset(adapter->current_addr, 0xff, ETH_ALEN);
- ret = libertas_prepare_and_send_command(priv, CMD_GET_HW_SPEC,
+ ret = lbs_prepare_and_send_command(priv, CMD_GET_HW_SPEC,
0, CMD_OPTION_WAITFORRSP, 0, NULL);
if (ret) {
goto done;
}
- libertas_set_mac_packet_filter(priv);
+ lbs_set_mac_packet_filter(priv);
/* Get the supported Data rates */
- ret = libertas_prepare_and_send_command(priv, CMD_802_11_DATA_RATE,
+ ret = lbs_prepare_and_send_command(priv, CMD_802_11_DATA_RATE,
CMD_ACT_GET_TX_RATE,
CMD_OPTION_WAITFORRSP, 0, NULL);
if (priv->mesh_dev) {
memset(&mesh_access, 0, sizeof(mesh_access));
mesh_access.data[0] = cpu_to_le32(0);
- ret = libertas_prepare_and_send_command(priv,
+ ret = lbs_prepare_and_send_command(priv,
CMD_MESH_ACCESS,
CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
CMD_OPTION_WAITFORRSP, 0, (void *)&mesh_access);
}
/* Set the boot2 version in firmware */
- ret = libertas_prepare_and_send_command(priv, CMD_SET_BOOT2_VER,
+ ret = lbs_prepare_and_send_command(priv, CMD_SET_BOOT2_VER,
0, CMD_OPTION_WAITFORRSP, 0, NULL);
ret = 0;
*/
static void command_timer_fn(unsigned long data)
{
- wlan_private *priv = (wlan_private *)data;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = (lbs_private *)data;
+ lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *ptempnode;
struct cmd_ds_command *cmd;
unsigned long flags;
spin_unlock_irqrestore(&adapter->driver_lock, flags);
lbs_deb_fw("re-sending same command because of timeout\n");
- libertas_queue_cmd(adapter, ptempnode, 0);
+ lbs_queue_cmd(adapter, ptempnode, 0);
wake_up_interruptible(&priv->waitq);
return;
}
-static int libertas_init_adapter(wlan_private * priv)
+static int lbs_init_adapter(lbs_private *priv)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
size_t bufsize;
int i, ret = 0;
&adapter->network_free_list);
}
- adapter->libertas_ps_confirm_sleep.seqnum = cpu_to_le16(++adapter->seqnum);
- adapter->libertas_ps_confirm_sleep.command =
+ adapter->lbs_ps_confirm_sleep.seqnum = cpu_to_le16(++adapter->seqnum);
+ adapter->lbs_ps_confirm_sleep.command =
cpu_to_le16(CMD_802_11_PS_MODE);
- adapter->libertas_ps_confirm_sleep.size =
+ adapter->lbs_ps_confirm_sleep.size =
cpu_to_le16(sizeof(struct PS_CMD_ConfirmSleep));
- adapter->libertas_ps_confirm_sleep.action =
+ adapter->lbs_ps_confirm_sleep.action =
cpu_to_le16(CMD_SUBCMD_SLEEP_CONFIRMED);
memset(adapter->current_addr, 0xff, ETH_ALEN);
- adapter->connect_status = LIBERTAS_DISCONNECTED;
+ adapter->connect_status = LBS_DISCONNECTED;
adapter->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
adapter->mode = IW_MODE_INFRA;
adapter->curbssparams.channel = DEFAULT_AD_HOC_CHANNEL;
adapter->radioon = RADIO_ON;
adapter->auto_rate = 1;
adapter->capability = WLAN_CAPABILITY_SHORT_PREAMBLE;
- adapter->psmode = WLAN802_11POWERMODECAM;
+ adapter->psmode = LBS802_11POWERMODECAM;
adapter->psstate = PS_STATE_FULL_POWER;
mutex_init(&adapter->lock);
adapter->nr_cmd_pending = 0;
/* Allocate the command buffers */
- if (libertas_allocate_cmd_buffer(priv)) {
+ if (lbs_allocate_cmd_buffer(priv)) {
lbs_pr_err("Out of memory allocating command buffers\n");
ret = -1;
}
return ret;
}
-static void libertas_free_adapter(wlan_private * priv)
+static void lbs_free_adapter(lbs_private *priv)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
if (!adapter) {
lbs_deb_fw("why double free adapter?\n");
}
lbs_deb_fw("free command buffer\n");
- libertas_free_cmd_buffer(priv);
+ lbs_free_cmd_buffer(priv);
lbs_deb_fw("free command_timer\n");
del_timer(&adapter->command_timer);
/**
* @brief This function adds the card. it will probe the
- * card, allocate the wlan_priv and initialize the device.
+ * card, allocate the lbs_priv and initialize the device.
*
* @param card A pointer to card
- * @return A pointer to wlan_private structure
+ * @return A pointer to lbs_private structure
*/
-wlan_private *libertas_add_card(void *card, struct device *dmdev)
+lbs_private *lbs_add_card(void *card, struct device *dmdev)
{
struct net_device *dev = NULL;
- wlan_private *priv = NULL;
+ lbs_private *priv = NULL;
lbs_deb_enter(LBS_DEB_NET);
/* Allocate an Ethernet device and register it */
- if (!(dev = alloc_etherdev(sizeof(wlan_private)))) {
+ if (!(dev = alloc_etherdev(sizeof(lbs_private)))) {
lbs_pr_err("init ethX device failed\n");
goto done;
}
priv = dev->priv;
- /* allocate buffer for wlan_adapter */
- if (!(priv->adapter = kzalloc(sizeof(wlan_adapter), GFP_KERNEL))) {
- lbs_pr_err("allocate buffer for wlan_adapter failed\n");
+ /* allocate buffer for lbs_adapter */
+ if (!(priv->adapter = kzalloc(sizeof(lbs_adapter), GFP_KERNEL))) {
+ lbs_pr_err("allocate buffer for lbs_adapter failed\n");
goto err_kzalloc;
}
- if (libertas_init_adapter(priv)) {
+ if (lbs_init_adapter(priv)) {
lbs_pr_err("failed to initialize adapter structure.\n");
goto err_init_adapter;
}
priv->hotplug_device = dmdev;
/* Setup the OS Interface to our functions */
- dev->open = libertas_open;
- dev->hard_start_xmit = libertas_pre_start_xmit;
- dev->stop = libertas_close;
- dev->set_mac_address = libertas_set_mac_address;
- dev->tx_timeout = libertas_tx_timeout;
- dev->get_stats = libertas_get_stats;
+ dev->open = lbs_open;
+ dev->hard_start_xmit = lbs_pre_start_xmit;
+ dev->stop = lbs_close;
+ dev->set_mac_address = lbs_set_mac_address;
+ dev->tx_timeout = lbs_tx_timeout;
+ dev->get_stats = lbs_get_stats;
dev->watchdog_timeo = 5 * HZ;
- dev->ethtool_ops = &libertas_ethtool_ops;
+ dev->ethtool_ops = &lbs_ethtool_ops;
#ifdef WIRELESS_EXT
- dev->wireless_handlers = (struct iw_handler_def *)&libertas_handler_def;
+ dev->wireless_handlers = (struct iw_handler_def *)&lbs_handler_def;
#endif
dev->flags |= IFF_BROADCAST | IFF_MULTICAST;
- dev->set_multicast_list = libertas_set_multicast_list;
+ dev->set_multicast_list = lbs_set_multicast_list;
SET_NETDEV_DEV(dev, dmdev);
priv->rtap_net_dev = NULL;
- if (device_create_file(dmdev, &dev_attr_libertas_rtap))
+ if (device_create_file(dmdev, &dev_attr_lbs_rtap))
goto err_init_adapter;
lbs_deb_thread("Starting main thread...\n");
init_waitqueue_head(&priv->waitq);
- priv->main_thread = kthread_run(libertas_thread, dev, "libertas_main");
+ priv->main_thread = kthread_run(lbs_thread, dev, "lbs_main");
if (IS_ERR(priv->main_thread)) {
lbs_deb_thread("Error creating main thread.\n");
goto err_kthread_run;
}
- priv->work_thread = create_singlethread_workqueue("libertas_worker");
- INIT_DELAYED_WORK(&priv->assoc_work, libertas_association_worker);
- INIT_DELAYED_WORK(&priv->scan_work, libertas_scan_worker);
- INIT_WORK(&priv->sync_channel, libertas_sync_channel);
+ priv->work_thread = create_singlethread_workqueue("lbs_worker");
+ INIT_DELAYED_WORK(&priv->assoc_work, lbs_association_worker);
+ INIT_DELAYED_WORK(&priv->scan_work, lbs_scan_worker);
+ INIT_WORK(&priv->sync_channel, lbs_sync_channel);
goto done;
err_kthread_run:
- device_remove_file(dmdev, &dev_attr_libertas_rtap);
+ device_remove_file(dmdev, &dev_attr_lbs_rtap);
err_init_adapter:
- libertas_free_adapter(priv);
+ lbs_free_adapter(priv);
err_kzalloc:
free_netdev(dev);
lbs_deb_leave_args(LBS_DEB_NET, "priv %p", priv);
return priv;
}
-EXPORT_SYMBOL_GPL(libertas_add_card);
+EXPORT_SYMBOL_GPL(lbs_add_card);
-int libertas_remove_card(wlan_private *priv)
+int lbs_remove_card(lbs_private *priv)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
struct net_device *dev = priv->dev;
union iwreq_data wrqu;
lbs_deb_enter(LBS_DEB_MAIN);
- libertas_remove_rtap(priv);
+ lbs_remove_rtap(priv);
dev = priv->dev;
- device_remove_file(priv->hotplug_device, &dev_attr_libertas_rtap);
+ device_remove_file(priv->hotplug_device, &dev_attr_lbs_rtap);
cancel_delayed_work(&priv->scan_work);
cancel_delayed_work(&priv->assoc_work);
destroy_workqueue(priv->work_thread);
- if (adapter->psmode == WLAN802_11POWERMODEMAX_PSP) {
- adapter->psmode = WLAN802_11POWERMODECAM;
- libertas_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
+ if (adapter->psmode == LBS802_11POWERMODEMAX_PSP) {
+ adapter->psmode = LBS802_11POWERMODECAM;
+ lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
}
memset(wrqu.ap_addr.sa_data, 0xaa, ETH_ALEN);
adapter->surpriseremoved = 1;
kthread_stop(priv->main_thread);
- libertas_free_adapter(priv);
+ lbs_free_adapter(priv);
priv->dev = NULL;
free_netdev(dev);
lbs_deb_leave(LBS_DEB_MAIN);
return 0;
}
-EXPORT_SYMBOL_GPL(libertas_remove_card);
+EXPORT_SYMBOL_GPL(lbs_remove_card);
-int libertas_start_card(wlan_private *priv)
+int lbs_start_card(lbs_private *priv)
{
struct net_device *dev = priv->dev;
int ret = -1;
lbs_deb_enter(LBS_DEB_MAIN);
/* poke the firmware */
- ret = wlan_setup_firmware(priv);
+ ret = lbs_setup_firmware(priv);
if (ret)
goto done;
/* init 802.11d */
- libertas_init_11d(priv);
+ lbs_init_11d(priv);
if (register_netdev(dev)) {
lbs_pr_err("cannot register ethX device\n");
goto done;
}
- libertas_debugfs_init_one(priv, dev);
+ lbs_debugfs_init_one(priv, dev);
lbs_pr_info("%s: Marvell WLAN 802.11 adapter\n", dev->name);
lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret);
return ret;
}
-EXPORT_SYMBOL_GPL(libertas_start_card);
+EXPORT_SYMBOL_GPL(lbs_start_card);
-int libertas_stop_card(wlan_private *priv)
+int lbs_stop_card(lbs_private *priv)
{
struct net_device *dev = priv->dev;
int ret = -1;
netif_stop_queue(priv->dev);
netif_carrier_off(priv->dev);
- libertas_debugfs_remove_one(priv);
+ lbs_debugfs_remove_one(priv);
/* Flush pending command nodes */
spin_lock_irqsave(&priv->adapter->driver_lock, flags);
lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret);
return ret;
}
-EXPORT_SYMBOL_GPL(libertas_stop_card);
+EXPORT_SYMBOL_GPL(lbs_stop_card);
/**
* @brief This function adds mshX interface
*
- * @param priv A pointer to the wlan_private structure
+ * @param priv A pointer to the lbs_private structure
* @return 0 if successful, -X otherwise
*/
-int libertas_add_mesh(wlan_private *priv, struct device *dev)
+int lbs_add_mesh(lbs_private *priv, struct device *dev)
{
struct net_device *mesh_dev = NULL;
int ret = 0;
mesh_dev->priv = priv;
priv->mesh_dev = mesh_dev;
- mesh_dev->open = libertas_mesh_open;
- mesh_dev->hard_start_xmit = libertas_mesh_pre_start_xmit;
- mesh_dev->stop = libertas_mesh_close;
- mesh_dev->get_stats = libertas_get_stats;
- mesh_dev->set_mac_address = libertas_set_mac_address;
- mesh_dev->ethtool_ops = &libertas_ethtool_ops;
+ mesh_dev->open = lbs_mesh_open;
+ mesh_dev->hard_start_xmit = lbs_mesh_pre_start_xmit;
+ mesh_dev->stop = lbs_mesh_close;
+ mesh_dev->get_stats = lbs_get_stats;
+ mesh_dev->set_mac_address = lbs_set_mac_address;
+ mesh_dev->ethtool_ops = &lbs_ethtool_ops;
memcpy(mesh_dev->dev_addr, priv->dev->dev_addr,
sizeof(priv->dev->dev_addr));
goto err_free;
}
- ret = sysfs_create_group(&(mesh_dev->dev.kobj), &libertas_mesh_attr_group);
+ ret = sysfs_create_group(&(mesh_dev->dev.kobj), &lbs_mesh_attr_group);
if (ret)
goto err_unregister;
lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret);
return ret;
}
-EXPORT_SYMBOL_GPL(libertas_add_mesh);
+EXPORT_SYMBOL_GPL(lbs_add_mesh);
-void libertas_remove_mesh(wlan_private *priv)
+void lbs_remove_mesh(lbs_private *priv)
{
struct net_device *mesh_dev;
netif_stop_queue(mesh_dev);
netif_carrier_off(priv->mesh_dev);
- sysfs_remove_group(&(mesh_dev->dev.kobj), &libertas_mesh_attr_group);
+ sysfs_remove_group(&(mesh_dev->dev.kobj), &lbs_mesh_attr_group);
unregister_netdev(mesh_dev);
priv->mesh_dev = NULL ;
out:
lbs_deb_leave(LBS_DEB_MAIN);
}
-EXPORT_SYMBOL_GPL(libertas_remove_mesh);
+EXPORT_SYMBOL_GPL(lbs_remove_mesh);
/**
* @brief This function finds the CFP in
* @param cfp_no A pointer to CFP number
* @return A pointer to CFP
*/
-struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band, int *cfp_no)
+struct chan_freq_power *lbs_get_region_cfp_table(u8 region, u8 band, int *cfp_no)
{
int i, end;
return NULL;
}
-int libertas_set_regiontable(wlan_private * priv, u8 region, u8 band)
+int lbs_set_regiontable(lbs_private *priv, u8 region, u8 band)
{
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
int ret = 0;
int i = 0;
memset(adapter->region_channel, 0, sizeof(adapter->region_channel));
{
- cfp = libertas_get_region_cfp_table(region, band, &cfp_no);
+ cfp = lbs_get_region_cfp_table(region, band, &cfp_no);
if (cfp != NULL) {
adapter->region_channel[i].nrcfp = cfp_no;
adapter->region_channel[i].CFP = cfp;
* @param dev A pointer to net_device structure
* @return n/a
*/
-void libertas_interrupt(struct net_device *dev)
+void lbs_interrupt(struct net_device *dev)
{
- wlan_private *priv = dev->priv;
+ lbs_private *priv = dev->priv;
lbs_deb_enter(LBS_DEB_THREAD);
- lbs_deb_thread("libertas_interrupt: intcounter=%d\n",
+ lbs_deb_thread("lbs_interrupt: intcounter=%d\n",
priv->adapter->intcounter);
priv->adapter->intcounter++;
lbs_deb_leave(LBS_DEB_THREAD);
}
-EXPORT_SYMBOL_GPL(libertas_interrupt);
+EXPORT_SYMBOL_GPL(lbs_interrupt);
-int libertas_reset_device(wlan_private *priv)
+int lbs_reset_device(lbs_private *priv)
{
int ret;
lbs_deb_enter(LBS_DEB_MAIN);
- ret = libertas_prepare_and_send_command(priv, CMD_802_11_RESET,
+ ret = lbs_prepare_and_send_command(priv, CMD_802_11_RESET,
CMD_ACT_HALT, 0, 0, NULL);
msleep_interruptible(10);
lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret);
return ret;
}
-EXPORT_SYMBOL_GPL(libertas_reset_device);
+EXPORT_SYMBOL_GPL(lbs_reset_device);
-static int libertas_init_module(void)
+static int lbs_init_module(void)
{
lbs_deb_enter(LBS_DEB_MAIN);
- libertas_debugfs_init();
+ lbs_debugfs_init();
lbs_deb_leave(LBS_DEB_MAIN);
return 0;
}
-static void libertas_exit_module(void)
+static void lbs_exit_module(void)
{
lbs_deb_enter(LBS_DEB_MAIN);
- libertas_debugfs_remove();
+ lbs_debugfs_remove();
lbs_deb_leave(LBS_DEB_MAIN);
}
* rtap interface support fuctions
*/
-static int libertas_rtap_open(struct net_device *dev)
+static int lbs_rtap_open(struct net_device *dev)
{
netif_carrier_off(dev);
netif_stop_queue(dev);
return 0;
}
-static int libertas_rtap_stop(struct net_device *dev)
+static int lbs_rtap_stop(struct net_device *dev)
{
return 0;
}
-static int libertas_rtap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static int lbs_rtap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
netif_stop_queue(dev);
return -EOPNOTSUPP;
}
-static struct net_device_stats *libertas_rtap_get_stats(struct net_device *dev)
+static struct net_device_stats *lbs_rtap_get_stats(struct net_device *dev)
{
- wlan_private *priv = dev->priv;
+ lbs_private *priv = dev->priv;
return &priv->ieee->stats;
}
-void libertas_remove_rtap(wlan_private *priv)
+void lbs_remove_rtap(lbs_private *priv)
{
if (priv->rtap_net_dev == NULL)
return;
priv->rtap_net_dev = NULL;
}
-int libertas_add_rtap(wlan_private *priv)
+int lbs_add_rtap(lbs_private *priv)
{
int rc = 0;
strcpy(priv->rtap_net_dev->name, "rtap%d");
priv->rtap_net_dev->type = ARPHRD_IEEE80211_RADIOTAP;
- priv->rtap_net_dev->open = libertas_rtap_open;
- priv->rtap_net_dev->stop = libertas_rtap_stop;
- priv->rtap_net_dev->get_stats = libertas_rtap_get_stats;
- priv->rtap_net_dev->hard_start_xmit = libertas_rtap_hard_start_xmit;
- priv->rtap_net_dev->set_multicast_list = libertas_set_multicast_list;
+ priv->rtap_net_dev->open = lbs_rtap_open;
+ priv->rtap_net_dev->stop = lbs_rtap_stop;
+ priv->rtap_net_dev->get_stats = lbs_rtap_get_stats;
+ priv->rtap_net_dev->hard_start_xmit = lbs_rtap_hard_start_xmit;
+ priv->rtap_net_dev->set_multicast_list = lbs_set_multicast_list;
priv->rtap_net_dev->priv = priv;
priv->ieee->iw_mode = IW_MODE_MONITOR;
}
-module_init(libertas_init_module);
-module_exit(libertas_exit_module);
+module_init(lbs_init_module);
+module_exit(lbs_exit_module);
MODULE_DESCRIPTION("Libertas WLAN Driver Library");
MODULE_AUTHOR("Marvell International Ltd.");
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++)
/**
* @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++)
/**
* @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;
/**
* @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);
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);
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))
* @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;
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;
* 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
* @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;
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));
* 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;
//! 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)
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
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
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
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
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
* 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;
*
* @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;
/**
* @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
*
* @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;
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;
if (priv->adapter->enable11d) {
scantype =
- libertas_get_scan_type_11d(cfp->channel,
+ lbs_get_scan_type_11d(cfp->channel,
&adapter->
parsed_region_chan);
}
/* 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
* 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
*
* @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,
{
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;
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;
/**
* @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
*
* @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;
}
/* 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;
}
/*
- * 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;
* 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;
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,
}
}
- ret = wlan_scan_channel_list(priv,
+ ret = lbs_scan_channel_list(priv,
maxchanperscan,
filteredscan,
scan_cfg,
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) {
*
* @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;
/* 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;
*
* 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;
*
* 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)
{
|| (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)
* 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;
*
* 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;
*
* @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);
*
* 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
*
* @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",
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;
#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 */
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;
*/
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;
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) {
*
* @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;
/* 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);
}
}
/* 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;
/**
* @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);
* | 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;
/* 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;
* 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"
/**
* @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;
};
/**
- * @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
/**
* @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;
/**
* @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];
};
/**
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;
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
* @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;
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;
}
/* 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);
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);
}
-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);
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);
* @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;
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;
}
* @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;
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);
/**
* 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>
struct led_pin ledpin[1];
} __attribute__ ((packed));
-#endif /* _WLAN_TYPES_ */
+#endif
#include "assoc.h"
-static inline void libertas_postpone_association_work(wlan_private *priv)
+static inline void lbs_postpone_association_work(lbs_private *priv)
{
if (priv->adapter->surpriseremoved)
return;
queue_delayed_work(priv->work_thread, &priv->assoc_work, HZ / 2);
}
-static inline void libertas_cancel_association_work(wlan_private *priv)
+static inline void lbs_cancel_association_work(lbs_private *priv)
{
cancel_delayed_work(&priv->assoc_work);
kfree(priv->adapter->pending_assoc_req);
/**
* @brief Find the channel frequency power info with specific channel
*
- * @param adapter A pointer to wlan_adapter structure
+ * @param adapter A pointer to lbs_adapter structure
* @param band it can be BAND_A, BAND_G or BAND_B
* @param channel the channel for looking
* @return A pointer to struct chan_freq_power structure or NULL if not find.
*/
-struct chan_freq_power *libertas_find_cfp_by_band_and_channel(wlan_adapter * adapter,
+struct chan_freq_power *lbs_find_cfp_by_band_and_channel(lbs_adapter *adapter,
u8 band, u16 channel)
{
struct chan_freq_power *cfp = NULL;
}
if (!cfp && channel)
- lbs_deb_wext("libertas_find_cfp_by_band_and_channel: can't find "
+ lbs_deb_wext("lbs_find_cfp_by_band_and_channel: can't find "
"cfp by band %d / channel %d\n", band, channel);
return cfp;
/**
* @brief Find the channel frequency power info with specific frequency
*
- * @param adapter A pointer to wlan_adapter structure
+ * @param adapter A pointer to lbs_adapter structure
* @param band it can be BAND_A, BAND_G or BAND_B
* @param freq the frequency for looking
* @return A pointer to struct chan_freq_power structure or NULL if not find.
*/
-static struct chan_freq_power *find_cfp_by_band_and_freq(wlan_adapter * adapter,
+static struct chan_freq_power *find_cfp_by_band_and_freq(lbs_adapter *adapter,
u8 band, u32 freq)
{
struct chan_freq_power *cfp = NULL;
/**
* @brief Set Radio On/OFF
*
- * @param priv A pointer to wlan_private structure
+ * @param priv A pointer to lbs_private structure
* @option Radio Option
* @return 0 --success, otherwise fail
*/
-static int wlan_radio_ioctl(wlan_private * priv, u8 option)
+static int lbs_radio_ioctl(lbs_private *priv, u8 option)
{
int ret = 0;
- wlan_adapter *adapter = priv->adapter;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
lbs_deb_wext("switching radio %s\n", option ? "on" : "off");
adapter->radioon = option;
- ret = libertas_prepare_and_send_command(priv,
+ ret = lbs_prepare_and_send_command(priv,
CMD_802_11_RADIO_CONTROL,
CMD_ACT_SET,
CMD_OPTION_WAITFORRSP, 0, NULL);
/**
* @brief Copy active data rates based on adapter mode and status
*
- * @param adapter A pointer to wlan_adapter structure
+ * @param adapter A pointer to lbs_adapter structure
* @param rate The buf to return the active rates
*/
-static void copy_active_data_rates(wlan_adapter * adapter, u8 * rates)
+static void copy_active_data_rates(lbs_adapter *adapter, u8 *rates)
{
lbs_deb_enter(LBS_DEB_WEXT);
- if (adapter->connect_status != LIBERTAS_CONNECTED)
- memcpy(rates, libertas_bg_rates, MAX_RATES);
+ if (adapter->connect_status != LBS_CONNECTED)
+ memcpy(rates, lbs_bg_rates, MAX_RATES);
else
memcpy(rates, adapter->curbssparams.rates, MAX_RATES);
lbs_deb_leave(LBS_DEB_WEXT);
}
-static int wlan_get_name(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_name(struct net_device *dev, struct iw_request_info *info,
char *cwrq, char *extra)
{
return 0;
}
-static int wlan_get_freq(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_freq(struct net_device *dev, struct iw_request_info *info,
struct iw_freq *fwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct chan_freq_power *cfp;
lbs_deb_enter(LBS_DEB_WEXT);
- cfp = libertas_find_cfp_by_band_and_channel(adapter, 0,
+ cfp = lbs_find_cfp_by_band_and_channel(adapter, 0,
adapter->curbssparams.channel);
if (!cfp) {
return 0;
}
-static int wlan_get_wap(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_wap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *awrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
- if (adapter->connect_status == LIBERTAS_CONNECTED) {
+ if (adapter->connect_status == LBS_CONNECTED) {
memcpy(awrq->sa_data, adapter->curbssparams.bssid, ETH_ALEN);
} else {
memset(awrq->sa_data, 0, ETH_ALEN);
return 0;
}
-static int wlan_set_nick(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_nick(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
return 0;
}
-static int wlan_get_nick(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_nick(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
/* Use nickname to indicate that mesh is on */
- if (adapter->connect_status == LIBERTAS_CONNECTED) {
+ if (adapter->connect_status == LBS_CONNECTED) {
strncpy(extra, "Mesh", 12);
extra[12] = '\0';
dwrq->length = strlen(extra);
return 0;
}
-static int wlan_set_rts(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_rts(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
u32 rthr = vwrq->value;
lbs_deb_enter(LBS_DEB_WEXT);
adapter->rtsthsd = rthr;
}
- ret = libertas_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
+ ret = lbs_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
CMD_ACT_SET, CMD_OPTION_WAITFORRSP,
OID_802_11_RTS_THRESHOLD, &rthr);
return ret;
}
-static int wlan_get_rts(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_rts(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
adapter->rtsthsd = 0;
- ret = libertas_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
+ ret = lbs_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
CMD_ACT_GET, CMD_OPTION_WAITFORRSP,
OID_802_11_RTS_THRESHOLD, NULL);
if (ret)
return ret;
}
-static int wlan_set_frag(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_frag(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
int ret = 0;
u32 fthr = vwrq->value;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
adapter->fragthsd = fthr;
}
- ret = libertas_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
+ ret = lbs_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
CMD_ACT_SET, CMD_OPTION_WAITFORRSP,
OID_802_11_FRAGMENTATION_THRESHOLD, &fthr);
return ret;
}
-static int wlan_get_frag(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_frag(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
adapter->fragthsd = 0;
- ret = libertas_prepare_and_send_command(priv,
+ ret = lbs_prepare_and_send_command(priv,
CMD_802_11_SNMP_MIB,
CMD_ACT_GET, CMD_OPTION_WAITFORRSP,
OID_802_11_FRAGMENTATION_THRESHOLD, NULL);
return ret;
}
-static int wlan_get_mode(struct net_device *dev,
+static int lbs_get_mode(struct net_device *dev,
struct iw_request_info *info, u32 * uwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
return 0;
}
-static int wlan_get_txpow(struct net_device *dev,
+static int lbs_get_txpow(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
- ret = libertas_prepare_and_send_command(priv,
+ ret = lbs_prepare_and_send_command(priv,
CMD_802_11_RF_TX_POWER,
CMD_ACT_TX_POWER_OPT_GET,
CMD_OPTION_WAITFORRSP, 0, NULL);
return ret;
}
-static int wlan_set_retry(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_retry(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
/* Adding 1 to convert retry count to try count */
adapter->txretrycount = vwrq->value + 1;
- ret = libertas_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
+ ret = lbs_prepare_and_send_command(priv, CMD_802_11_SNMP_MIB,
CMD_ACT_SET,
CMD_OPTION_WAITFORRSP,
OID_802_11_TX_RETRYCOUNT, NULL);
return ret;
}
-static int wlan_get_retry(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_retry(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
int ret = 0;
lbs_deb_enter(LBS_DEB_WEXT);
adapter->txretrycount = 0;
- ret = libertas_prepare_and_send_command(priv,
+ ret = lbs_prepare_and_send_command(priv,
CMD_802_11_SNMP_MIB,
CMD_ACT_GET, CMD_OPTION_WAITFORRSP,
OID_802_11_TX_RETRYCOUNT, NULL);
* @param extra A pointer to extra data buf
* @return 0 --success, otherwise fail
*/
-static int wlan_get_range(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_range(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
int i, j;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct iw_range *range = (struct iw_range *)extra;
struct chan_freq_power *cfp;
u8 rates[MAX_RATES + 1];
range->num_frequency = 0;
if (priv->adapter->enable11d &&
- adapter->connect_status == LIBERTAS_CONNECTED) {
+ adapter->connect_status == LBS_CONNECTED) {
u8 chan_no;
u8 band;
lbs_deb_wext("chan_no %d\n", chan_no);
range->freq[range->num_frequency].i = (long)chan_no;
range->freq[range->num_frequency].m =
- (long)libertas_chan_2_freq(chan_no, band) * 100000;
+ (long)lbs_chan_2_freq(chan_no, band) * 100000;
range->freq[range->num_frequency].e = 1;
range->num_frequency++;
}
return 0;
}
-static int wlan_set_power(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_power(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
*/
if (vwrq->disabled) {
- adapter->psmode = WLAN802_11POWERMODECAM;
+ adapter->psmode = LBS802_11POWERMODECAM;
if (adapter->psstate != PS_STATE_FULL_POWER) {
- libertas_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
+ lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
}
return 0;
return -EINVAL;
}
- if (adapter->psmode != WLAN802_11POWERMODECAM) {
+ if (adapter->psmode != LBS802_11POWERMODECAM) {
return 0;
}
- adapter->psmode = WLAN802_11POWERMODEMAX_PSP;
+ adapter->psmode = LBS802_11POWERMODEMAX_PSP;
- if (adapter->connect_status == LIBERTAS_CONNECTED) {
- libertas_ps_sleep(priv, CMD_OPTION_WAITFORRSP);
+ if (adapter->connect_status == LBS_CONNECTED) {
+ lbs_ps_sleep(priv, CMD_OPTION_WAITFORRSP);
}
lbs_deb_leave(LBS_DEB_WEXT);
return 0;
}
-static int wlan_get_power(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_power(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
int mode;
lbs_deb_enter(LBS_DEB_WEXT);
mode = adapter->psmode;
- if ((vwrq->disabled = (mode == WLAN802_11POWERMODECAM))
- || adapter->connect_status == LIBERTAS_DISCONNECTED)
+ if ((vwrq->disabled = (mode == LBS802_11POWERMODECAM))
+ || adapter->connect_status == LBS_DISCONNECTED)
{
goto out;
}
return 0;
}
-static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev)
+static struct iw_statistics *lbs_get_wireless_stats(struct net_device *dev)
{
enum {
POOR = 30,
EXCELLENT = 95,
PERFECT = 100
};
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
u32 rssi_qual;
u32 tx_qual;
u32 quality = 0;
priv->wstats.status = adapter->mode;
/* If we're not associated, all quality values are meaningless */
- if (adapter->connect_status != LIBERTAS_CONNECTED)
+ if (adapter->connect_status != LBS_CONNECTED)
goto out;
/* Quality by RSSI */
stats_valid = 1;
/* update stats asynchronously for future calls */
- libertas_prepare_and_send_command(priv, CMD_802_11_RSSI, 0,
+ lbs_prepare_and_send_command(priv, CMD_802_11_RSSI, 0,
0, 0, NULL);
- libertas_prepare_and_send_command(priv, CMD_802_11_GET_LOG, 0,
+ lbs_prepare_and_send_command(priv, CMD_802_11_GET_LOG, 0,
0, 0, NULL);
out:
if (!stats_valid) {
}
-static int wlan_set_freq(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_freq(struct net_device *dev, struct iw_request_info *info,
struct iw_freq *fwrq, char *extra)
{
int ret = -EINVAL;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct chan_freq_power *cfp;
struct assoc_request * assoc_req;
lbs_deb_enter(LBS_DEB_WEXT);
mutex_lock(&adapter->lock);
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
ret = -ENOMEM;
goto out;
goto out;
}
- cfp = libertas_find_cfp_by_band_and_channel(adapter, 0, fwrq->m);
+ cfp = lbs_find_cfp_by_band_and_channel(adapter, 0, fwrq->m);
if (!cfp) {
goto out;
}
out:
if (ret == 0) {
set_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags);
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
} else {
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
}
mutex_unlock(&adapter->lock);
return ret;
}
-static int wlan_set_rate(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
u32 new_rate;
u16 action;
int ret = -EINVAL;
adapter->auto_rate = 0;
}
- ret = libertas_prepare_and_send_command(priv, CMD_802_11_DATA_RATE,
+ ret = lbs_prepare_and_send_command(priv, CMD_802_11_DATA_RATE,
action, CMD_OPTION_WAITFORRSP, 0, NULL);
out:
return ret;
}
-static int wlan_get_rate(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_rate(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
- if (adapter->connect_status == LIBERTAS_CONNECTED) {
+ if (adapter->connect_status == LBS_CONNECTED) {
vwrq->value = adapter->cur_rate * 500000;
if (adapter->auto_rate)
return 0;
}
-static int wlan_set_mode(struct net_device *dev,
+static int lbs_set_mode(struct net_device *dev,
struct iw_request_info *info, u32 * uwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct assoc_request * assoc_req;
lbs_deb_enter(LBS_DEB_WEXT);
}
mutex_lock(&adapter->lock);
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
ret = -ENOMEM;
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
} else {
assoc_req->mode = *uwrq;
set_bit(ASSOC_FLAG_MODE, &assoc_req->flags);
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
lbs_deb_wext("Switching to mode: 0x%x\n", *uwrq);
}
mutex_unlock(&adapter->lock);
* @param extra A pointer to extra data buf
* @return 0 --success, otherwise fail
*/
-static int wlan_get_encode(struct net_device *dev,
+static int lbs_get_encode(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *dwrq, u8 * extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
lbs_deb_enter(LBS_DEB_WEXT);
* @param set_tx_key Force set TX key (1 = yes, 0 = no)
* @return 0 --success, otherwise fail
*/
-static int wlan_set_wep_key(struct assoc_request *assoc_req,
+static int lbs_set_wep_key(struct assoc_request *assoc_req,
const char *key_material,
u16 key_length,
u16 index,
* @param extra A pointer to extra data buf
* @return 0 --success, otherwise fail
*/
-static int wlan_set_encode(struct net_device *dev,
+static int lbs_set_encode(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct assoc_request * assoc_req;
u16 is_default = 0, index = 0, set_tx_key = 0;
lbs_deb_enter(LBS_DEB_WEXT);
mutex_lock(&adapter->lock);
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
ret = -ENOMEM;
goto out;
if (!assoc_req->secinfo.wep_enabled || (dwrq->length == 0 && !is_default))
set_tx_key = 1;
- ret = wlan_set_wep_key(assoc_req, extra, dwrq->length, index, set_tx_key);
+ ret = lbs_set_wep_key(assoc_req, extra, dwrq->length, index, set_tx_key);
if (ret)
goto out;
out:
if (ret == 0) {
set_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags);
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
} else {
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
}
mutex_unlock(&adapter->lock);
* @param extra A pointer to extra data buf
* @return 0 on success, otherwise failure
*/
-static int wlan_get_encodeext(struct net_device *dev,
+static int lbs_get_encodeext(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *dwrq,
char *extra)
{
int ret = -EINVAL;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
int index, max_key_len;
* @param extra A pointer to extra data buf
* @return 0 --success, otherwise fail
*/
-static int wlan_set_encodeext(struct net_device *dev,
+static int lbs_set_encodeext(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *dwrq,
char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
int alg = ext->alg;
struct assoc_request * assoc_req;
lbs_deb_enter(LBS_DEB_WEXT);
mutex_lock(&adapter->lock);
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
ret = -ENOMEM;
goto out;
set_tx_key = 1;
/* Copy key to driver */
- ret = wlan_set_wep_key (assoc_req, ext->key, ext->key_len, index,
+ ret = lbs_set_wep_key(assoc_req, ext->key, ext->key_len, index,
set_tx_key);
if (ret)
goto out;
out:
if (ret == 0) {
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
} else {
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
}
mutex_unlock(&adapter->lock);
}
-static int wlan_set_genie(struct net_device *dev,
+static int lbs_set_genie(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *dwrq,
char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
int ret = 0;
struct assoc_request * assoc_req;
lbs_deb_enter(LBS_DEB_WEXT);
mutex_lock(&adapter->lock);
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
ret = -ENOMEM;
goto out;
out:
if (ret == 0) {
set_bit(ASSOC_FLAG_WPA_IE, &assoc_req->flags);
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
} else {
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
}
mutex_unlock(&adapter->lock);
return ret;
}
-static int wlan_get_genie(struct net_device *dev,
+static int lbs_get_genie(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *dwrq,
char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
}
-static int wlan_set_auth(struct net_device *dev,
+static int lbs_set_auth(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *dwrq,
char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct assoc_request * assoc_req;
int ret = 0;
int updated = 0;
lbs_deb_enter(LBS_DEB_WEXT);
mutex_lock(&adapter->lock);
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
ret = -ENOMEM;
goto out;
if (ret == 0) {
if (updated)
set_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags);
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
} else if (ret != -EOPNOTSUPP) {
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
}
mutex_unlock(&adapter->lock);
return ret;
}
-static int wlan_get_auth(struct net_device *dev,
+static int lbs_get_auth(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *dwrq,
char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
}
-static int wlan_set_txpow(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_txpow(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
int ret = 0;
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
u16 dbm;
lbs_deb_enter(LBS_DEB_WEXT);
if (vwrq->disabled) {
- wlan_radio_ioctl(priv, RADIO_OFF);
+ lbs_radio_ioctl(priv, RADIO_OFF);
return 0;
}
adapter->preamble = CMD_TYPE_AUTO_PREAMBLE;
- wlan_radio_ioctl(priv, RADIO_ON);
+ lbs_radio_ioctl(priv, RADIO_ON);
/* Userspace check in iwrange if it should use dBm or mW,
* therefore this should never happen... Jean II */
lbs_deb_wext("txpower set %d dbm\n", dbm);
- ret = libertas_prepare_and_send_command(priv,
+ ret = lbs_prepare_and_send_command(priv,
CMD_802_11_RF_TX_POWER,
CMD_ACT_TX_POWER_OPT_SET_LOW,
CMD_OPTION_WAITFORRSP, 0, (void *)&dbm);
return ret;
}
-static int wlan_get_essid(struct net_device *dev, struct iw_request_info *info,
+static int lbs_get_essid(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT);
/*
* Get the current SSID
*/
- if (adapter->connect_status == LIBERTAS_CONNECTED) {
+ if (adapter->connect_status == LBS_CONNECTED) {
memcpy(extra, adapter->curbssparams.ssid,
adapter->curbssparams.ssid_len);
extra[adapter->curbssparams.ssid_len] = '\0';
return 0;
}
-static int wlan_set_essid(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_essid(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
int ret = 0;
u8 ssid[IW_ESSID_MAX_SIZE];
u8 ssid_len = 0;
mutex_lock(&adapter->lock);
if (ret == 0) {
/* Get or create the current association request */
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
ret = -ENOMEM;
} else {
memcpy(&assoc_req->ssid, &ssid, IW_ESSID_MAX_SIZE);
assoc_req->ssid_len = ssid_len;
set_bit(ASSOC_FLAG_SSID, &assoc_req->flags);
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
}
}
/* Cancel the association request if there was an error */
if (ret != 0) {
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
}
mutex_unlock(&adapter->lock);
* @param extra A pointer to extra data buf
* @return 0 --success, otherwise fail
*/
-static int wlan_set_wap(struct net_device *dev, struct iw_request_info *info,
+static int lbs_set_wap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *awrq, char *extra)
{
- wlan_private *priv = dev->priv;
- wlan_adapter *adapter = priv->adapter;
+ lbs_private *priv = dev->priv;
+ lbs_adapter *adapter = priv->adapter;
struct assoc_request * assoc_req;
int ret = 0;
DECLARE_MAC_BUF(mac);
mutex_lock(&adapter->lock);
/* Get or create the current association request */
- assoc_req = wlan_get_association_request(adapter);
+ assoc_req = lbs_get_association_request(adapter);
if (!assoc_req) {
- libertas_cancel_association_work(priv);
+ lbs_cancel_association_work(priv);
ret = -ENOMEM;
} else {
/* Copy the BSSID to the association request */
memcpy(&assoc_req->bssid, awrq->sa_data, ETH_ALEN);
set_bit(ASSOC_FLAG_BSSID, &assoc_req->flags);
- libertas_postpone_association_work(priv);
+ lbs_postpone_association_work(priv);
}
mutex_unlock(&adapter->lock);
return ret;
}
-void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen)
+void lbs_get_fwversion(lbs_adapter *adapter, char *fwversion, int maxlen)
{
char fwver[32];
/*
* iwconfig settable callbacks
*/
-static const iw_handler wlan_handler[] = {
+static const iw_handler lbs_handler[] = {
(iw_handler) NULL, /* SIOCSIWCOMMIT */
- (iw_handler) wlan_get_name, /* SIOCGIWNAME */
+ (iw_handler) lbs_get_name, /* SIOCGIWNAME */
(iw_handler) NULL, /* SIOCSIWNWID */
(iw_handler) NULL, /* SIOCGIWNWID */
- (iw_handler) wlan_set_freq, /* SIOCSIWFREQ */
- (iw_handler) wlan_get_freq, /* SIOCGIWFREQ */
- (iw_handler) wlan_set_mode, /* SIOCSIWMODE */
- (iw_handler) wlan_get_mode, /* SIOCGIWMODE */
+ (iw_handler) lbs_set_freq, /* SIOCSIWFREQ */
+ (iw_handler) lbs_get_freq, /* SIOCGIWFREQ */
+ (iw_handler) lbs_set_mode, /* SIOCSIWMODE */
+ (iw_handler) lbs_get_mode, /* SIOCGIWMODE */
(iw_handler) NULL, /* SIOCSIWSENS */
(iw_handler) NULL, /* SIOCGIWSENS */
(iw_handler) NULL, /* SIOCSIWRANGE */
- (iw_handler) wlan_get_range, /* SIOCGIWRANGE */
+ (iw_handler) lbs_get_range, /* SIOCGIWRANGE */
(iw_handler) NULL, /* SIOCSIWPRIV */
(iw_handler) NULL, /* SIOCGIWPRIV */
(iw_handler) NULL, /* SIOCSIWSTATS */
iw_handler_get_spy, /* SIOCGIWSPY */
iw_handler_set_thrspy, /* SIOCSIWTHRSPY */
iw_handler_get_thrspy, /* SIOCGIWTHRSPY */
- (iw_handler) wlan_set_wap, /* SIOCSIWAP */
- (iw_handler) wlan_get_wap, /* SIOCGIWAP */
+ (iw_handler) lbs_set_wap, /* SIOCSIWAP */
+ (iw_handler) lbs_get_wap, /* SIOCGIWAP */
(iw_handler) NULL, /* SIOCSIWMLME */
(iw_handler) NULL, /* SIOCGIWAPLIST - deprecated */
- (iw_handler) libertas_set_scan, /* SIOCSIWSCAN */
- (iw_handler) libertas_get_scan, /* SIOCGIWSCAN */
- (iw_handler) wlan_set_essid, /* SIOCSIWESSID */
- (iw_handler) wlan_get_essid, /* SIOCGIWESSID */
- (iw_handler) wlan_set_nick, /* SIOCSIWNICKN */
- (iw_handler) wlan_get_nick, /* SIOCGIWNICKN */
+ (iw_handler) lbs_set_scan, /* SIOCSIWSCAN */
+ (iw_handler) lbs_get_scan, /* SIOCGIWSCAN */
+ (iw_handler) lbs_set_essid, /* SIOCSIWESSID */
+ (iw_handler) lbs_get_essid, /* SIOCGIWESSID */
+ (iw_handler) lbs_set_nick, /* SIOCSIWNICKN */
+ (iw_handler) lbs_get_nick, /* SIOCGIWNICKN */
(iw_handler) NULL, /* -- hole -- */
(iw_handler) NULL, /* -- hole -- */
- (iw_handler) wlan_set_rate, /* SIOCSIWRATE */
- (iw_handler) wlan_get_rate, /* SIOCGIWRATE */
- (iw_handler) wlan_set_rts, /* SIOCSIWRTS */
- (iw_handler) wlan_get_rts, /* SIOCGIWRTS */
- (iw_handler) wlan_set_frag, /* SIOCSIWFRAG */
- (iw_handler) wlan_get_frag, /* SIOCGIWFRAG */
- (iw_handler) wlan_set_txpow, /* SIOCSIWTXPOW */
- (iw_handler) wlan_get_txpow, /* SIOCGIWTXPOW */
- (iw_handler) wlan_set_retry, /* SIOCSIWRETRY */
- (iw_handler) wlan_get_retry, /* SIOCGIWRETRY */
- (iw_handler) wlan_set_encode, /* SIOCSIWENCODE */
- (iw_handler) wlan_get_encode, /* SIOCGIWENCODE */
- (iw_handler) wlan_set_power, /* SIOCSIWPOWER */
- (iw_handler) wlan_get_power, /* SIOCGIWPOWER */
+ (iw_handler) lbs_set_rate, /* SIOCSIWRATE */
+ (iw_handler) lbs_get_rate, /* SIOCGIWRATE */
+ (iw_handler) lbs_set_rts, /* SIOCSIWRTS */
+ (iw_handler) lbs_get_rts, /* SIOCGIWRTS */
+ (iw_handler) lbs_set_frag, /* SIOCSIWFRAG */
+ (iw_handler) lbs_get_frag, /* SIOCGIWFRAG */
+ (iw_handler) lbs_set_txpow, /* SIOCSIWTXPOW */
+ (iw_handler) lbs_get_txpow, /* SIOCGIWTXPOW */
+ (iw_handler) lbs_set_retry, /* SIOCSIWRETRY */
+ (iw_handler) lbs_get_retry, /* SIOCGIWRETRY */
+ (iw_handler) lbs_set_encode, /* SIOCSIWENCODE */
+ (iw_handler) lbs_get_encode, /* SIOCGIWENCODE */
+ (iw_handler) lbs_set_power, /* SIOCSIWPOWER */
+ (iw_handler) lbs_get_power, /* SIOCGIWPOWER */
(iw_handler) NULL, /* -- hole -- */
(iw_handler) NULL, /* -- hole -- */
- (iw_handler) wlan_set_genie, /* SIOCSIWGENIE */
- (iw_handler) wlan_get_genie, /* SIOCGIWGENIE */
- (iw_handler) wlan_set_auth, /* SIOCSIWAUTH */
- (iw_handler) wlan_get_auth, /* SIOCGIWAUTH */
- (iw_handler) wlan_set_encodeext,/* SIOCSIWENCODEEXT */
- (iw_handler) wlan_get_encodeext,/* SIOCGIWENCODEEXT */
+ (iw_handler) lbs_set_genie, /* SIOCSIWGENIE */
+ (iw_handler) lbs_get_genie, /* SIOCGIWGENIE */
+ (iw_handler) lbs_set_auth, /* SIOCSIWAUTH */
+ (iw_handler) lbs_get_auth, /* SIOCGIWAUTH */
+ (iw_handler) lbs_set_encodeext,/* SIOCSIWENCODEEXT */
+ (iw_handler) lbs_get_encodeext,/* SIOCGIWENCODEEXT */
(iw_handler) NULL, /* SIOCSIWPMKSA */
};
static const iw_handler mesh_wlan_handler[] = {
(iw_handler) NULL, /* SIOCSIWCOMMIT */
- (iw_handler) wlan_get_name, /* SIOCGIWNAME */
+ (iw_handler) lbs_get_name, /* SIOCGIWNAME */
(iw_handler) NULL, /* SIOCSIWNWID */
(iw_handler) NULL, /* SIOCGIWNWID */
- (iw_handler) wlan_set_freq, /* SIOCSIWFREQ */
- (iw_handler) wlan_get_freq, /* SIOCGIWFREQ */
+ (iw_handler) lbs_set_freq, /* SIOCSIWFREQ */
+ (iw_handler) lbs_get_freq, /* SIOCGIWFREQ */
(iw_handler) NULL, /* SIOCSIWMODE */
(iw_handler) mesh_wlan_get_mode, /* SIOCGIWMODE */
(iw_handler) NULL, /* SIOCSIWSENS */
(iw_handler) NULL, /* SIOCGIWSENS */
(iw_handler) NULL, /* SIOCSIWRANGE */
- (iw_handler) wlan_get_range, /* SIOCGIWRANGE */
+ (iw_handler) lbs_get_range, /* SIOCGIWRANGE */
(iw_handler) NULL, /* SIOCSIWPRIV */
(iw_handler) NULL, /* SIOCGIWPRIV */
(iw_handler) NULL, /* SIOCSIWSTATS */
(iw_handler) NULL, /* SIOCGIWAP */
(iw_handler) NULL, /* SIOCSIWMLME */
(iw_handler) NULL, /* SIOCGIWAPLIST - deprecated */
- (iw_handler) libertas_set_scan, /* SIOCSIWSCAN */
- (iw_handler) libertas_get_scan, /* SIOCGIWSCAN */
+ (iw_handler) lbs_set_scan, /* SIOCSIWSCAN */
+ (iw_handler) lbs_get_scan, /* SIOCGIWSCAN */
(iw_handler) NULL, /* SIOCSIWESSID */
(iw_handler) NULL, /* SIOCGIWESSID */
(iw_handler) NULL, /* SIOCSIWNICKN */
(iw_handler) mesh_get_nick, /* SIOCGIWNICKN */
(iw_handler) NULL, /* -- hole -- */
(iw_handler) NULL, /* -- hole -- */
- (iw_handler) wlan_set_rate, /* SIOCSIWRATE */
- (iw_handler) wlan_get_rate, /* SIOCGIWRATE */
- (iw_handler) wlan_set_rts, /* SIOCSIWRTS */
- (iw_handler) wlan_get_rts, /* SIOCGIWRTS */
- (iw_handler) wlan_set_frag, /* SIOCSIWFRAG */
- (iw_handler) wlan_get_frag, /* SIOCGIWFRAG */
- (iw_handler) wlan_set_txpow, /* SIOCSIWTXPOW */
- (iw_handler) wlan_get_txpow, /* SIOCGIWTXPOW */
- (iw_handler) wlan_set_retry, /* SIOCSIWRETRY */
- (iw_handler) wlan_get_retry, /* SIOCGIWRETRY */
- (iw_handler) wlan_set_encode, /* SIOCSIWENCODE */
- (iw_handler) wlan_get_encode, /* SIOCGIWENCODE */
- (iw_handler) wlan_set_power, /* SIOCSIWPOWER */
- (iw_handler) wlan_get_power, /* SIOCGIWPOWER */
+ (iw_handler) lbs_set_rate, /* SIOCSIWRATE */
+ (iw_handler) lbs_get_rate, /* SIOCGIWRATE */
+ (iw_handler) lbs_set_rts, /* SIOCSIWRTS */
+ (iw_handler) lbs_get_rts, /* SIOCGIWRTS */
+ (iw_handler) lbs_set_frag, /* SIOCSIWFRAG */
+ (iw_handler) lbs_get_frag, /* SIOCGIWFRAG */
+ (iw_handler) lbs_set_txpow, /* SIOCSIWTXPOW */
+ (iw_handler) lbs_get_txpow, /* SIOCGIWTXPOW */
+ (iw_handler) lbs_set_retry, /* SIOCSIWRETRY */
+ (iw_handler) lbs_get_retry, /* SIOCGIWRETRY */
+ (iw_handler) lbs_set_encode, /* SIOCSIWENCODE */
+ (iw_handler) lbs_get_encode, /* SIOCGIWENCODE */
+ (iw_handler) lbs_set_power, /* SIOCSIWPOWER */
+ (iw_handler) lbs_get_power, /* SIOCGIWPOWER */
(iw_handler) NULL, /* -- hole -- */
(iw_handler) NULL, /* -- hole -- */
- (iw_handler) wlan_set_genie, /* SIOCSIWGENIE */
- (iw_handler) wlan_get_genie, /* SIOCGIWGENIE */
- (iw_handler) wlan_set_auth, /* SIOCSIWAUTH */
- (iw_handler) wlan_get_auth, /* SIOCGIWAUTH */
- (iw_handler) wlan_set_encodeext,/* SIOCSIWENCODEEXT */
- (iw_handler) wlan_get_encodeext,/* SIOCGIWENCODEEXT */
+ (iw_handler) lbs_set_genie, /* SIOCSIWGENIE */
+ (iw_handler) lbs_get_genie, /* SIOCGIWGENIE */
+ (iw_handler) lbs_set_auth, /* SIOCSIWAUTH */
+ (iw_handler) lbs_get_auth, /* SIOCGIWAUTH */
+ (iw_handler) lbs_set_encodeext,/* SIOCSIWENCODEEXT */
+ (iw_handler) lbs_get_encodeext,/* SIOCGIWENCODEEXT */
(iw_handler) NULL, /* SIOCSIWPMKSA */
};
-struct iw_handler_def libertas_handler_def = {
- .num_standard = ARRAY_SIZE(wlan_handler),
- .standard = (iw_handler *) wlan_handler,
- .get_wireless_stats = wlan_get_wireless_stats,
+struct iw_handler_def lbs_handler_def = {
+ .num_standard = ARRAY_SIZE(lbs_handler),
+ .standard = (iw_handler *) lbs_handler,
+ .get_wireless_stats = lbs_get_wireless_stats,
};
struct iw_handler_def mesh_handler_def = {
.num_standard = ARRAY_SIZE(mesh_wlan_handler),
.standard = (iw_handler *) mesh_wlan_handler,
- .get_wireless_stats = wlan_get_wireless_stats,
+ .get_wireless_stats = lbs_get_wireless_stats,
};
/**
* 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 */
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