Commit 10078321 authored by Holger Schurig's avatar Holger Schurig Committed by David S. Miller

libertas: move to uniform lbs_/LBS_ namespace

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

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

While passing, I fixed some checkpatch.pl errors too.
Signed-off-by: default avatarHolger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9a62f73b
......@@ -43,7 +43,7 @@ static struct chan_freq_power channel_freq_power_UN_BG[] = {
{14, 2484, TX_PWR_DEFAULT}
};
static u8 wlan_region_2_code(u8 * region)
static u8 lbs_region_2_code(u8 *region)
{
u8 i;
......@@ -60,7 +60,7 @@ static u8 wlan_region_2_code(u8 * region)
return (region_code_mapping[0].code);
}
static u8 *wlan_code_2_region(u8 code)
static u8 *lbs_code_2_region(u8 code)
{
u8 i;
......@@ -79,7 +79,7 @@ static u8 *wlan_code_2_region(u8 code)
* @param nrchan number of channels
* @return the nrchan-th chan number
*/
static u8 wlan_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 * chan)
static u8 lbs_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 *chan)
/*find the nrchan-th chan after the firstchan*/
{
u8 i;
......@@ -113,7 +113,7 @@ static u8 wlan_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 * chan)
* @param parsed_region_chan pointer to parsed_region_chan_11d
* @return TRUE; FALSE
*/
static u8 wlan_channel_known_11d(u8 chan,
static u8 lbs_channel_known_11d(u8 chan,
struct parsed_region_chan_11d * parsed_region_chan)
{
struct chan_power_11d *chanpwr = parsed_region_chan->chanpwr;
......@@ -134,7 +134,7 @@ static u8 wlan_channel_known_11d(u8 chan,
return 0;
}
u32 libertas_chan_2_freq(u8 chan, u8 band)
u32 lbs_chan_2_freq(u8 chan, u8 band)
{
struct chan_freq_power *cf;
u16 i;
......@@ -152,7 +152,7 @@ u32 libertas_chan_2_freq(u8 chan, u8 band)
static int generate_domain_info_11d(struct parsed_region_chan_11d
*parsed_region_chan,
struct wlan_802_11d_domain_reg * domaininfo)
struct lbs_802_11d_domain_reg *domaininfo)
{
u8 nr_subband = 0;
......@@ -217,7 +217,7 @@ static int generate_domain_info_11d(struct parsed_region_chan_11d
* @param *parsed_region_chan pointer to parsed_region_chan_11d
* @return N/A
*/
static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_chan,
static void lbs_generate_parsed_region_chan_11d(struct region_channel *region_chan,
struct parsed_region_chan_11d *
parsed_region_chan)
{
......@@ -238,7 +238,7 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_
parsed_region_chan->band = region_chan->band;
parsed_region_chan->region = region_chan->region;
memcpy(parsed_region_chan->countrycode,
wlan_code_2_region(region_chan->region), COUNTRY_CODE_LEN);
lbs_code_2_region(region_chan->region), COUNTRY_CODE_LEN);
lbs_deb_11d("region 0x%x, band %d\n", parsed_region_chan->region,
parsed_region_chan->band);
......@@ -264,7 +264,7 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_
* @param chan chan
* @return TRUE;FALSE
*/
static u8 wlan_region_chan_supported_11d(u8 region, u8 band, u8 chan)
static u8 lbs_region_chan_supported_11d(u8 region, u8 band, u8 chan)
{
struct chan_freq_power *cfp;
int cfp_no;
......@@ -273,7 +273,7 @@ static u8 wlan_region_chan_supported_11d(u8 region, u8 band, u8 chan)
lbs_deb_enter(LBS_DEB_11D);
cfp = libertas_get_region_cfp_table(region, band, &cfp_no);
cfp = lbs_get_region_cfp_table(region, band, &cfp_no);
if (cfp == NULL)
return 0;
......@@ -338,7 +338,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
/*Step1: check region_code */
parsed_region_chan->region = region =
wlan_region_2_code(countryinfo->countrycode);
lbs_region_2_code(countryinfo->countrycode);
lbs_deb_11d("regioncode=%x\n", (u8) parsed_region_chan->region);
lbs_deb_hex(LBS_DEB_11D, "countrycode", (char *)countryinfo->countrycode,
......@@ -367,7 +367,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
for (i = 0; idx < MAX_NO_OF_CHAN && i < nrchan; i++) {
/*step4: channel is supported? */
if (!wlan_get_chan_11d(band, firstchan, i, &curchan)) {
if (!lbs_get_chan_11d(band, firstchan, i, &curchan)) {
/* Chan is not found in UN table */
lbs_deb_11d("chan is not supported: %d \n", i);
break;
......@@ -375,7 +375,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
lastchan = curchan;
if (wlan_region_chan_supported_11d
if (lbs_region_chan_supported_11d
(region, band, curchan)) {
/*step5: Check if curchan is supported by mrvl in region */
parsed_region_chan->chanpwr[idx].chan = curchan;
......@@ -411,14 +411,14 @@ done:
* @param parsed_region_chan pointer to parsed_region_chan_11d
* @return PASSIVE if chan is unknown; ACTIVE if chan is known
*/
u8 libertas_get_scan_type_11d(u8 chan,
u8 lbs_get_scan_type_11d(u8 chan,
struct parsed_region_chan_11d * parsed_region_chan)
{
u8 scan_type = CMD_SCAN_TYPE_PASSIVE;
lbs_deb_enter(LBS_DEB_11D);
if (wlan_channel_known_11d(chan, parsed_region_chan)) {
if (lbs_channel_known_11d(chan, parsed_region_chan)) {
lbs_deb_11d("found, do active scan\n");
scan_type = CMD_SCAN_TYPE_ACTIVE;
} else {
......@@ -430,7 +430,7 @@ u8 libertas_get_scan_type_11d(u8 chan,
}
void libertas_init_11d(wlan_private * priv)
void lbs_init_11d(lbs_private * priv)
{
priv->adapter->enable11d = 0;
memset(&(priv->adapter->parsed_region_chan), 0,
......@@ -440,10 +440,10 @@ void libertas_init_11d(wlan_private * priv)
/**
* @brief This function sets DOMAIN INFO to FW
* @param priv pointer to wlan_private
* @param priv pointer to lbs_private
* @return 0; -1
*/
static int set_domain_info_11d(wlan_private * priv)
static int set_domain_info_11d(lbs_private * priv)
{
int ret;
......@@ -452,7 +452,7 @@ static int set_domain_info_11d(wlan_private * priv)
return 0;
}
ret = libertas_prepare_and_send_command(priv, CMD_802_11D_DOMAIN_INFO,
ret = lbs_prepare_and_send_command(priv, CMD_802_11D_DOMAIN_INFO,
CMD_ACT_SET,
CMD_OPTION_WAITFORRSP, 0, NULL);
if (ret)
......@@ -463,13 +463,13 @@ static int set_domain_info_11d(wlan_private * priv)
/**
* @brief This function setups scan channels
* @param priv pointer to wlan_private
* @param priv pointer to lbs_private
* @param band band
* @return 0
*/
int libertas_set_universaltable(wlan_private * priv, u8 band)
int lbs_set_universaltable(lbs_private * priv, u8 band)
{
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
u16 size = sizeof(struct chan_freq_power);
u16 i = 0;
......@@ -492,20 +492,20 @@ int libertas_set_universaltable(wlan_private * priv, u8 band)
/**
* @brief This function implements command CMD_802_11D_DOMAIN_INFO
* @param priv pointer to wlan_private
* @param priv pointer to lbs_private
* @param cmd pointer to cmd buffer
* @param cmdno cmd ID
* @param cmdOption cmd action
* @return 0
*/
int libertas_cmd_802_11d_domain_info(wlan_private * priv,
int lbs_cmd_802_11d_domain_info(lbs_private * priv,
struct cmd_ds_command *cmd, u16 cmdno,
u16 cmdoption)
{
struct cmd_ds_802_11d_domain_info *pdomaininfo =
&cmd->params.domaininfo;
struct mrvlietypes_domainparamset *domain = &pdomaininfo->domain;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
u8 nr_subband = adapter->domainreg.nr_subband;
lbs_deb_enter(LBS_DEB_11D);
......@@ -552,11 +552,11 @@ done:
/**
* @brief This function parses countryinfo from AP and download country info to FW
* @param priv pointer to wlan_private
* @param priv pointer to lbs_private
* @param resp pointer to command response buffer
* @return 0; -1
*/
int libertas_ret_802_11d_domain_info(wlan_private * priv,
int lbs_ret_802_11d_domain_info(lbs_private * priv,
struct cmd_ds_command *resp)
{
struct cmd_ds_802_11d_domain_info *domaininfo = &resp->params.domaininforesp;
......@@ -598,14 +598,14 @@ int libertas_ret_802_11d_domain_info(wlan_private * priv,
/**
* @brief This function parses countryinfo from AP and download country info to FW
* @param priv pointer to wlan_private
* @param priv pointer to lbs_private
* @return 0; -1
*/
int libertas_parse_dnld_countryinfo_11d(wlan_private * priv,
int lbs_parse_dnld_countryinfo_11d(lbs_private * priv,
struct bss_descriptor * bss)
{
int ret;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_11D);
if (priv->adapter->enable11d) {
......@@ -620,7 +620,7 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv,
}
memset(&adapter->domainreg, 0,
sizeof(struct wlan_802_11d_domain_reg));
sizeof(struct lbs_802_11d_domain_reg));
generate_domain_info_11d(&adapter->parsed_region_chan,
&adapter->domainreg);
......@@ -640,13 +640,13 @@ done:
/**
* @brief This function generates 11D info from user specified regioncode and download to FW
* @param priv pointer to wlan_private
* @param priv pointer to lbs_private
* @return 0; -1
*/
int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
int lbs_create_dnld_countryinfo_11d(lbs_private * priv)
{
int ret;
wlan_adapter *adapter = priv->adapter;
lbs_adapter *adapter = priv->adapter;
struct region_channel *region_chan;
u8 j;
......@@ -679,12 +679,12 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
memset(&adapter->parsed_region_chan, 0,
sizeof(struct parsed_region_chan_11d));
wlan_generate_parsed_region_chan_11d(region_chan,
lbs_generate_parsed_region_chan_11d(region_chan,
&adapter->
parsed_region_chan);
memset(&adapter->domainreg, 0,
sizeof(struct wlan_802_11d_domain_reg));
sizeof(struct lbs_802_11d_domain_reg));
generate_domain_info_11d(&adapter->parsed_region_chan,
&adapter->domainreg);
......
......@@ -2,8 +2,8 @@
* This header file contains data structures and
* function declarations of 802.11d
*/
#ifndef _WLAN_11D_
#define _WLAN_11D_
#ifndef _LBS_11D_
#define _LBS_11D_
#include "types.h"
#include "defs.h"
......@@ -52,7 +52,7 @@ struct cmd_ds_802_11d_domain_info {
} __attribute__ ((packed));
/** domain regulatory information */
struct wlan_802_11d_domain_reg {
struct lbs_802_11d_domain_reg {
/** country Code*/
u8 countrycode[COUNTRY_CODE_LEN];
/** No. of subband*/
......@@ -78,26 +78,26 @@ struct region_code_mapping {
u8 code;
};
u8 libertas_get_scan_type_11d(u8 chan,
u8 lbs_get_scan_type_11d(u8 chan,
struct parsed_region_chan_11d *parsed_region_chan);
u32 libertas_chan_2_freq(u8 chan, u8 band);
u32 lbs_chan_2_freq(u8 chan, u8 band);
void libertas_init_11d(wlan_private * priv);
void lbs_init_11d(lbs_private * priv);
int libertas_set_universaltable(wlan_private * priv, u8 band);
int lbs_set_universaltable(lbs_private * priv, u8 band);
int libertas_cmd_802_11d_domain_info(wlan_private * priv,
int lbs_cmd_802_11d_domain_info(lbs_private * priv,
struct cmd_ds_command *cmd, u16 cmdno,
u16 cmdOption);
int libertas_ret_802_11d_domain_info(wlan_private * priv,
int lbs_ret_802_11d_domain_info(lbs_private * priv,
struct cmd_ds_command *resp);
struct bss_descriptor;
int libertas_parse_dnld_countryinfo_11d(wlan_private * priv,
int lbs_parse_dnld_countryinfo_11d(lbs_private * priv,
struct bss_descriptor * bss);
int libertas_create_dnld_countryinfo_11d(wlan_private * priv);
int lbs_create_dnld_countryinfo_11d(lbs_private * priv);
#endif /* _WLAN_11D_ */
#endif
This diff is collapsed.
/* 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 */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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
......@@ -3,80 +3,80 @@
* functions defined in other source files
*/
#ifndef _WLAN_DECL_H_
#define _WLAN_DECL_H_
#ifndef _LBS_DECL_H_
#define _LBS_DECL_H_
#include <linux/device.h>
#include "defs.h"
/** Function Prototype Declaration */
struct wlan_private;
struct lbs_private;
struct sk_buff;
struct net_device;
int libertas_set_mac_packet_filter(wlan_private * priv);
int lbs_set_mac_packet_filter(lbs_private * priv);
void libertas_send_tx_feedback(wlan_private * priv);
void lbs_send_tx_feedback(lbs_private * priv);
int libertas_free_cmd_buffer(wlan_private * priv);
int lbs_free_cmd_buffer(lbs_private * priv);
struct cmd_ctrl_node;
struct cmd_ctrl_node *libertas_get_free_cmd_ctrl_node(wlan_private * priv);
struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(lbs_private * priv);
void libertas_set_cmd_ctrl_node(wlan_private * priv,
void lbs_set_cmd_ctrl_node(lbs_private * priv,
struct cmd_ctrl_node *ptempnode,
u32 cmd_oid, u16 wait_option, void *pdata_buf);
int libertas_prepare_and_send_command(wlan_private * priv,
int lbs_prepare_and_send_command(lbs_private * priv,
u16 cmd_no,
u16 cmd_action,
u16 wait_option, u32 cmd_oid, void *pdata_buf);
void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail);
void lbs_queue_cmd(lbs_adapter *adapter, struct cmd_ctrl_node *cmdnode, u8 addtail);
int libertas_allocate_cmd_buffer(wlan_private * priv);
int libertas_execute_next_command(wlan_private * priv);
int libertas_process_event(wlan_private * priv);
void libertas_interrupt(struct net_device *);
int libertas_set_radio_control(wlan_private * priv);
u32 libertas_fw_index_to_data_rate(u8 index);
u8 libertas_data_rate_to_fw_index(u32 rate);
void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen);
int lbs_allocate_cmd_buffer(lbs_private * priv);
int lbs_execute_next_command(lbs_private * priv);
int lbs_process_event(lbs_private * priv);
void lbs_interrupt(struct net_device *);
int lbs_set_radio_control(lbs_private * priv);
u32 lbs_fw_index_to_data_rate(u8 index);
u8 lbs_data_rate_to_fw_index(u32 rate);
void lbs_get_fwversion(lbs_adapter *adapter, char *fwversion, int maxlen);
void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb);
void lbs_upload_rx_packet(lbs_private * priv, struct sk_buff *skb);
/** The proc fs interface */
int libertas_process_rx_command(wlan_private * priv);
int libertas_process_tx(wlan_private * priv, struct sk_buff *skb);
void __libertas_cleanup_and_insert_cmd(wlan_private * priv,
int lbs_process_rx_command(lbs_private * priv);
int lbs_process_tx(lbs_private * priv, struct sk_buff *skb);
void __lbs_cleanup_and_insert_cmd(lbs_private * priv,
struct cmd_ctrl_node *ptempcmd);
int libertas_set_regiontable(wlan_private * priv, u8 region, u8 band);
int lbs_set_regiontable(lbs_private * priv, u8 region, u8 band);
int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *);
int lbs_process_rxed_packet(lbs_private * priv, struct sk_buff *);
void libertas_ps_sleep(wlan_private * priv, int wait_option);
void libertas_ps_confirm_sleep(wlan_private * priv, u16 psmode);
void libertas_ps_wakeup(wlan_private * priv, int wait_option);
void lbs_ps_sleep(lbs_private * priv, int wait_option);
void lbs_ps_confirm_sleep(lbs_private * priv, u16 psmode);
void lbs_ps_wakeup(lbs_private * priv, int wait_option);
void libertas_tx_runqueue(wlan_private *priv);
void lbs_tx_runqueue(lbs_private *priv);
struct chan_freq_power *libertas_find_cfp_by_band_and_channel(
wlan_adapter * adapter, u8 band, u16 channel);
struct chan_freq_power *lbs_find_cfp_by_band_and_channel(
lbs_adapter *adapter, u8 band, u16 channel);
void libertas_mac_event_disconnected(wlan_private * priv);
void lbs_mac_event_disconnected(lbs_private * priv);
void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str);
void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str);
/* main.c */
struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band,
struct chan_freq_power *lbs_get_region_cfp_table(u8 region, u8 band,
int *cfp_no);
wlan_private *libertas_add_card(void *card, struct device *dmdev);
int libertas_remove_card(wlan_private *priv);
int libertas_start_card(wlan_private *priv);
int libertas_stop_card(wlan_private *priv);
int libertas_add_mesh(wlan_private *priv, struct device *dev);
void libertas_remove_mesh(wlan_private *priv);
int libertas_reset_device(wlan_private *priv);
#endif /* _WLAN_DECL_H_ */
lbs_private *lbs_add_card(void *card, struct device *dmdev);
int lbs_remove_card(lbs_private *priv);
int lbs_start_card(lbs_private *priv);
int lbs_stop_card(lbs_private *priv);
int lbs_add_mesh(lbs_private *priv, struct device *dev);
void lbs_remove_mesh(lbs_private *priv);
int lbs_reset_device(lbs_private *priv);
#endif
......@@ -2,8 +2,8 @@
* This header file contains global constant/enum definitions,
* global variable declaration.
*/
#ifndef _WLAN_DEFS_H_
#define _WLAN_DEFS_H_
#ifndef _LBS_DEFS_H_
#define _LBS_DEFS_H_
#include <linux/spinlock.h>
......@@ -41,11 +41,11 @@
#define LBS_DEB_HEX 0x00200000
#define LBS_DEB_SDIO 0x00400000
extern unsigned int libertas_debug;
extern unsigned int lbs_debug;
#ifdef DEBUG
#define LBS_DEB_LL(grp, grpnam, fmt, args...) \
do { if ((libertas_debug & (grp)) == (grp)) \
do { if ((lbs_debug & (grp)) == (grp)) \
printk(KERN_DEBUG DRV_NAME grpnam "%s: " fmt, \
in_interrupt() ? " (INT)" : "", ## args); } while (0)
#else
......@@ -96,8 +96,8 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
int i = 0;
if (len &&
(libertas_debug & LBS_DEB_HEX) &&
(libertas_debug & grp))
(lbs_debug & LBS_DEB_HEX) &&
(lbs_debug & grp))
{
for (i = 1; i <= len; i++) {
if ((i & 0xf) == 1) {
......@@ -138,7 +138,7 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
#define MRVDRV_ASSOCIATION_TIME_OUT 255
#define MRVDRV_SNAP_HEADER_LEN 8
#define WLAN_UPLD_SIZE 2312
#define LBS_UPLD_SIZE 2312
#define DEV_NAME_LEN 32
/** Misc constants */
......@@ -262,12 +262,12 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
#define UNSET_MESH_FRAME(x) (x->cb[6]=0)
/** Global Variable Declaration */
typedef struct _wlan_private wlan_private;
typedef struct _wlan_adapter wlan_adapter;
extern const char libertas_driver_version[];
extern u16 libertas_region_code_to_index[MRVDRV_MAX_REGION_CODE];
typedef struct _lbs_private lbs_private;
typedef struct _lbs_adapter lbs_adapter;
extern const char lbs_driver_version[];
extern u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE];
extern u8 libertas_bg_rates[MAX_RATES];
extern u8 lbs_bg_rates[MAX_RATES];
/** ENUM definition*/
/** SNRNF_TYPE */
......@@ -284,13 +284,13 @@ enum SNRNF_DATA {
MAX_TYPE_AVG
};
/** WLAN_802_11_POWER_MODE */
enum WLAN_802_11_POWER_MODE {
WLAN802_11POWERMODECAM,
WLAN802_11POWERMODEMAX_PSP,
WLAN802_11POWERMODEFAST_PSP,
/** LBS_802_11_POWER_MODE */
enum LBS_802_11_POWER_MODE {
LBS802_11POWERMODECAM,
LBS802_11POWERMODEMAX_PSP,
LBS802_11POWERMODEFAST_PSP,
/*not a real mode, defined as an upper bound */
WLAN802_11POWEMODEMAX
LBS802_11POWEMODEMAX
};
/** PS_STATE */
......@@ -308,16 +308,16 @@ enum DNLD_STATE {
DNLD_CMD_SENT
};
/** WLAN_MEDIA_STATE */
enum WLAN_MEDIA_STATE {
LIBERTAS_CONNECTED,
LIBERTAS_DISCONNECTED
/** LBS_MEDIA_STATE */
enum LBS_MEDIA_STATE {
LBS_CONNECTED,
LBS_DISCONNECTED
};
/** WLAN_802_11_PRIVACY_FILTER */
enum WLAN_802_11_PRIVACY_FILTER {
WLAN802_11PRIVFILTERACCEPTALL,
WLAN802_11PRIVFILTER8021XWEP
/** LBS_802_11_PRIVACY_FILTER */
enum LBS_802_11_PRIVACY_FILTER {
LBS802_11PRIVFILTERACCEPTALL,
LBS802_11PRIVFILTER8021XWEP
};
/** mv_ms_type */
......@@ -382,4 +382,4 @@ enum SNMP_MIB_VALUE_e {
#define FWT_DEFAULT_SLEEPMODE 0
#define FWT_DEFAULT_SNR 0
#endif /* _WLAN_DEFS_H_ */
#endif
/**
* This file contains definitions and data structures specific
* to Marvell 802.11 NIC. It contains the Device Information
* structure wlan_adapter.
* structure lbs_adapter.
*/
#ifndef _WLAN_DEV_H_
#define _WLAN_DEV_H_
#ifndef _LBS_DEV_H_
#define _LBS_DEV_H_
#include <linux/netdevice.h>
#include <linux/wireless.h>
......@@ -15,7 +15,7 @@
#include "defs.h"
#include "scan.h"
extern struct ethtool_ops libertas_ethtool_ops;
extern struct ethtool_ops lbs_ethtool_ops;
#define MAX_BSSID_PER_CHANNEL 16
......@@ -53,7 +53,7 @@ struct region_channel {
struct chan_freq_power *CFP;
};
struct wlan_802_11_security {
struct lbs_802_11_security {
u8 WPAenabled;
u8 WPA2enabled;
u8 wep_enabled;
......@@ -87,7 +87,7 @@ struct sleep_params {
};
/* Mesh statistics */
struct wlan_mesh_stats {
struct lbs_mesh_stats {
u32 fwd_bcast_cnt; /* Fwd: Broadcast counter */
u32 fwd_unicast_cnt; /* Fwd: Unicast counter */
u32 fwd_drop_ttl; /* Fwd: TTL zero */
......@@ -99,7 +99,7 @@ struct wlan_mesh_stats {
};
/** Private structure for the MV device */
struct _wlan_private {
struct _lbs_private {
int open;
int mesh_open;
int infra_open;
......@@ -109,7 +109,7 @@ struct _wlan_private {
char name[DEV_NAME_LEN];
void *card;
wlan_adapter *adapter;
lbs_adapter *adapter;
struct net_device *dev;
struct net_device_stats stats;
......@@ -118,7 +118,7 @@ struct _wlan_private {
struct ieee80211_device *ieee;
struct iw_statistics wstats;
struct wlan_mesh_stats mstats;
struct lbs_mesh_stats mstats;
struct dentry *debugfs_dir;
struct dentry *debugfs_debug;
struct dentry *debugfs_files[6];
......@@ -136,7 +136,7 @@ struct _wlan_private {
/** Upload length */
u32 upld_len;
/* Upload buffer */
u8 upld_buf[WLAN_UPLD_SIZE];
u8 upld_buf[LBS_UPLD_SIZE];
/* Download sent:
bit0 1/0=data_sent/data_tx_done,
bit1 1/0=cmd_sent/cmd_tx_done,
......@@ -155,9 +155,9 @@ struct _wlan_private {
struct work_struct sync_channel;
/** Hardware access */
int (*hw_host_to_card) (wlan_private * priv, u8 type, u8 * payload, u16 nb);
int (*hw_get_int_status) (wlan_private * priv, u8 *);
int (*hw_read_event_cause) (wlan_private *);
int (*hw_host_to_card) (lbs_private *priv, u8 type, u8 *payload, u16 nb);
int (*hw_get_int_status) (lbs_private *priv, u8 *);
int (*hw_read_event_cause) (lbs_private *);
};
/** Association request
......@@ -194,7 +194,7 @@ struct assoc_request {
struct enc_key wpa_mcast_key;
struct enc_key wpa_unicast_key;
struct wlan_802_11_security secinfo;
struct lbs_802_11_security secinfo;
/** WPA Information Elements*/
u8 wpa_ie[MAX_WPA_IE_LEN];
......@@ -205,7 +205,7 @@ struct assoc_request {
};
/** Wlan adapter data structure*/
struct _wlan_adapter {
struct _lbs_adapter {
/** STATUS variables */
u8 fwreleasenumber[4];
u32 fwcapinfo;
......@@ -213,7 +213,7 @@ struct _wlan_adapter {
struct mutex lock;
u8 tmptxbuf[WLAN_UPLD_SIZE];
u8 tmptxbuf[LBS_UPLD_SIZE];
/* protected by hard_start_xmit serialization */
/** command-related variables */
......@@ -302,13 +302,13 @@ struct _wlan_adapter {
u32 psstate;
u8 needtowakeup;
struct PS_CMD_ConfirmSleep libertas_ps_confirm_sleep;
struct PS_CMD_ConfirmSleep lbs_ps_confirm_sleep;
struct assoc_request * pending_assoc_req;
struct assoc_request * in_progress_assoc_req;
/** Encryption parameter */
struct wlan_802_11_security secinfo;
struct lbs_802_11_security secinfo;
/** WEP keys */
struct enc_key wep_keys[4];
......@@ -350,7 +350,7 @@ struct _wlan_adapter {
struct region_channel universal_channel[MAX_REGION_CHANNEL_NUM];
/** 11D and Domain Regulatory Data */
struct wlan_802_11d_domain_reg domainreg;
struct lbs_802_11d_domain_reg domainreg;
struct parsed_region_chan_11d parsed_region_chan;
/** FSM variable for 11d support */
......@@ -358,7 +358,7 @@ struct _wlan_adapter {
/** MISCELLANEOUS */
u8 *prdeeprom;
struct wlan_offset_value offsetvalue;
struct lbs_offset_value offsetvalue;
struct cmd_ds_802_11_get_log logmsg;
......@@ -368,4 +368,4 @@ struct _wlan_adapter {
u8 last_scanned_channel;
};
#endif /* _WLAN_DEV_H_ */
#endif
......@@ -19,35 +19,35 @@ static const char * mesh_stat_strings[]= {
"tx_failed_cnt"
};
static void libertas_ethtool_get_drvinfo(struct net_device *dev,
static void lbs_ethtool_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
wlan_private *priv = (wlan_private *) dev->priv;
lbs_private *priv = (lbs_private *) dev->priv;
char fwver[32];
libertas_get_fwversion(priv->adapter, fwver, sizeof(fwver) - 1);
lbs_get_fwversion(priv->adapter, fwver, sizeof(fwver) - 1);
strcpy(info->driver, "libertas");
strcpy(info->version, libertas_driver_version);
strcpy(info->version, lbs_driver_version);
strcpy(info->fw_version, fwver);
}
/* All 8388 parts have 16KiB EEPROM size at the time of writing.
* In case that changes this needs fixing.
*/
#define LIBERTAS_EEPROM_LEN 16384
#define LBS_EEPROM_LEN 16384
static int libertas_ethtool_get_eeprom_len(struct net_device *dev)
static int lbs_ethtool_get_eeprom_len(struct net_device *dev)
{
return LIBERTAS_EEPROM_LEN;
return LBS_EEPROM_LEN;
}
static int libertas_ethtool_get_eeprom(struct net_device *dev,
static int lbs_ethtool_get_eeprom(struct net_device *dev,
struct ethtool_eeprom *eeprom, u8 * bytes)
{
wlan_private *priv = (wlan_private *) dev->priv;
wlan_adapter *adapter = priv->adapter;
struct wlan_ioctl_regrdwr regctrl;
lbs_private *priv = (lbs_private *) dev->priv;
lbs_adapter *adapter = priv->adapter;
struct lbs_ioctl_regrdwr regctrl;
char *ptr;
int ret;
......@@ -55,7 +55,7 @@ static int libertas_ethtool_get_eeprom(struct net_device *dev,
regctrl.offset = eeprom->offset;
regctrl.NOB = eeprom->len;
if (eeprom->offset + eeprom->len > LIBERTAS_EEPROM_LEN)
if (eeprom->offset + eeprom->len > LBS_EEPROM_LEN)
return -EINVAL;
// mutex_lock(&priv->mutex);
......@@ -70,7 +70,7 @@ static int libertas_ethtool_get_eeprom(struct net_device *dev,
lbs_deb_ethtool("action:%d offset: %x NOB: %02x\n",
regctrl.action, regctrl.offset, regctrl.NOB);
ret = libertas_prepare_and_send_command(priv,
ret = lbs_prepare_and_send_command(priv,
CMD_802_11_EEPROM_ACCESS,
regctrl.action,
CMD_OPTION_WAITFORRSP, 0,
......@@ -87,7 +87,7 @@ static int libertas_ethtool_get_eeprom(struct net_device *dev,
ptr = (char *)adapter->prdeeprom;
/* skip the command header, but include the "value" u32 variable */
ptr = ptr + sizeof(struct wlan_ioctl_regrdwr) - 4;
ptr = ptr + sizeof(struct lbs_ioctl_regrdwr) - 4;
/*
* Return the result back to the user
......@@ -105,17 +105,17 @@ done:
return ret;
}
static void libertas_ethtool_get_stats(struct net_device * dev,
static void lbs_ethtool_get_stats(struct net_device * dev,
struct ethtool_stats * stats, u64 * data)
{
wlan_private *priv = dev->priv;
lbs_private *priv = dev->priv;
struct cmd_ds_mesh_access mesh_access;
int ret;
lbs_deb_enter(LBS_DEB_ETHTOOL);
/* Get Mesh Statistics */
ret = libertas_prepare_and_send_command(priv,
ret = lbs_prepare_and_send_command(priv,
CMD_MESH_ACCESS, CMD_ACT_MESH_GET_STATS,
CMD_OPTION_WAITFORRSP, 0, &mesh_access);
......@@ -143,7 +143,7 @@ static void libertas_ethtool_get_stats(struct net_device * dev,
lbs_deb_enter(LBS_DEB_ETHTOOL);
}
static int libertas_ethtool_get_sset_count(struct net_device * dev, int sset)
static int lbs_ethtool_get_sset_count(struct net_device * dev, int sset)
{
switch (sset) {
case ETH_SS_STATS:
......@@ -153,7 +153,7 @@ static int libertas_ethtool_get_sset_count(struct net_device * dev, int sset)
}
}
static void libertas_ethtool_get_strings (struct net_device * dev,
static void lbs_ethtool_get_strings(struct net_device *dev,
u32 stringset,
u8 * s)
{
......@@ -173,12 +173,12 @@ static void libertas_ethtool_get_strings (struct net_device * dev,
lbs_deb_enter(LBS_DEB_ETHTOOL);
}
struct ethtool_ops libertas_ethtool_ops = {
.get_drvinfo = libertas_ethtool_get_drvinfo,
.get_eeprom = libertas_ethtool_get_eeprom,
.get_eeprom_len = libertas_ethtool_get_eeprom_len,
.get_sset_count = libertas_ethtool_get_sset_count,
.get_ethtool_stats = libertas_ethtool_get_stats,
.get_strings = libertas_ethtool_get_strings,
struct ethtool_ops lbs_ethtool_ops = {
.get_drvinfo = lbs_ethtool_get_drvinfo,
.get_eeprom = lbs_ethtool_get_eeprom,
.get_eeprom_len = lbs_ethtool_get_eeprom_len,
.get_sset_count = lbs_ethtool_get_sset_count,
.get_ethtool_stats = lbs_ethtool_get_stats,
.get_strings = lbs_ethtool_get_strings,
};
......@@ -2,8 +2,8 @@
* This file contains definitions of WLAN commands.
*/
#ifndef _HOST_H_
#define _HOST_H_
#ifndef _LBS_HOST_H_
#define _LBS_HOST_H_
/** PUBLIC DEFINITIONS */
#define DEFAULT_AD_HOC_CHANNEL 6
......@@ -287,4 +287,4 @@ enum cmd_mesh_access_opts {
#define MACREG_INT_CODE_SNR_HIGH 0x0000001d
#define MACREG_INT_CODE_MESH_AUTO_STARTED 0x00000023
#endif /* _HOST_H_ */
#endif
......@@ -2,8 +2,8 @@
* This file contains the function prototypes, data structure
* and defines for all the host/station commands
*/
#ifndef __HOSTCMD__H
#define __HOSTCMD__H
#ifndef _LBS_HOSTCMD_H
#define _LBS_HOSTCMD_H
#include <linux/wireless.h>
#include "11d.h"
......@@ -86,13 +86,13 @@ struct cmd_ctrl_node {
/* Generic structure to hold all key types. */
struct enc_key {
u16 len;
u16 flags; /* KEY_INFO_* from wlan_defs.h */
u16 type; /* KEY_TYPE_* from wlan_defs.h */
u16 flags; /* KEY_INFO_* from defs.h */
u16 type; /* KEY_TYPE_* from defs.h */
u8 key[32];
};
/* wlan_offset_value */
struct wlan_offset_value {
/* lbs_offset_value */
struct lbs_offset_value {
u32 offset;
u32 value;
};
......
......@@ -57,7 +57,7 @@ MODULE_LICENSE("GPL");
struct if_cs_card {
struct pcmcia_device *p_dev;
wlan_private *priv;
lbs_private *priv;
void __iomem *iobase;
};
......@@ -263,7 +263,7 @@ static irqreturn_t if_cs_interrupt(int irq, void *data)
if (!card->priv->adapter->cur_cmd)
wake_up_interruptible(&card->priv->waitq);
if (card->priv->adapter->connect_status == LIBERTAS_CONNECTED)
if (card->priv->adapter->connect_status == LBS_CONNECTED)
netif_wake_queue(card->priv->dev);
}
......@@ -271,7 +271,7 @@ static irqreturn_t if_cs_interrupt(int irq, void *data)
if_cs_write16(card, IF_CS_C_INT_CAUSE, int_cause & IF_CS_C_IC_MASK);
}
libertas_interrupt(card->priv->dev);
lbs_interrupt(card->priv->dev);
return IRQ_HANDLED;
}
......@@ -286,7 +286,7 @@ static irqreturn_t if_cs_interrupt(int irq, void *data)
/*
* Called from if_cs_host_to_card to send a command to the hardware
*/
static int if_cs_send_cmd(wlan_private *priv, u8 *buf, u16 nb)
static int if_cs_send_cmd(lbs_private *priv, u8 *buf, u16 nb)
{
struct if_cs_card *card = (struct if_cs_card *)priv->card;
int ret = -1;
......@@ -331,7 +331,7 @@ done:
/*
* Called from if_cs_host_to_card to send a data to the hardware
*/
static void if_cs_send_data(wlan_private *priv, u8 *buf, u16 nb)
static void if_cs_send_data(lbs_private *priv, u8 *buf, u16 nb)
{
struct if_cs_card *card = (struct if_cs_card *)priv->card;
......@@ -354,7 +354,7 @@ static void if_cs_send_data(wlan_private *priv, u8 *buf, u16 nb)
/*
* Get the command result out of the card.
*/
static int if_cs_receive_cmdres(wlan_private *priv, u8* data, u32 *len)
static int if_cs_receive_cmdres(lbs_private *priv, u8 *data, u32 *len)
{
int ret = -1;
u16 val;
......@@ -386,7 +386,7 @@ out:
}
static struct sk_buff *if_cs_receive_data(wlan_private *priv)
static struct sk_buff *if_cs_receive_data(lbs_private *priv)
{
struct sk_buff *skb = NULL;
u16 len;
......@@ -616,7 +616,7 @@ done:
/********************************************************************/
/* Send commands or data packets to the card */
static int if_cs_host_to_card(wlan_private *priv, u8 type, u8 *buf, u16 nb)
static int if_cs_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb)
{
int ret = -1;
......@@ -641,10 +641,10 @@ static int if_cs_host_to_card(wlan_private *priv, u8 type, u8 *buf, u16 nb)
}
static int if_cs_get_int_status(wlan_private *priv, u8 *ireg)
static int if_cs_get_int_status(lbs_private *priv, u8 *ireg)
{
struct if_cs_card *card = (struct if_cs_card *)priv->card;
//wlan_adapter *adapter = priv->adapter;
/* lbs_adapter *adapter = priv->adapter; */
int ret = 0;
u16 int_cause;
u8 *cmdbuf;
......@@ -668,7 +668,7 @@ sbi_get_int_status_exit:
/* is there a data packet for us? */
if (*ireg & IF_CS_C_S_RX_UPLD_RDY) {
struct sk_buff *skb = if_cs_receive_data(priv);
libertas_process_rxed_packet(priv, skb);
lbs_process_rxed_packet(priv, skb);
*ireg &= ~IF_CS_C_S_RX_UPLD_RDY;
}
......@@ -698,7 +698,7 @@ out:
}
static int if_cs_read_event_cause(wlan_private *priv)
static int if_cs_read_event_cause(lbs_private *priv)
{
lbs_deb_enter(LBS_DEB_CS);
......@@ -746,7 +746,7 @@ static void if_cs_release(struct pcmcia_device *p_dev)
static int if_cs_probe(struct pcmcia_device *p_dev)
{
int ret = -ENOMEM;
wlan_private *priv;
lbs_private *priv;
struct if_cs_card *card;
/* CIS parsing */
tuple_t tuple;
......@@ -856,7 +856,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
goto out2;
/* Make this card known to the libertas driver */
priv = libertas_add_card(card, &p_dev->dev);
priv = lbs_add_card(card, &p_dev->dev);
if (!priv) {
ret = -ENOMEM;
goto out2;
......@@ -885,7 +885,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
if_cs_enable_ints(card);
/* And finally bring the card up */
if (libertas_start_card(priv) != 0) {
if (lbs_start_card(priv) != 0) {
lbs_pr_err("could not activate card\n");
goto out3;
}
......@@ -894,7 +894,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
goto out;
out3:
libertas_remove_card(priv);
lbs_remove_card(priv);
out2:
ioport_unmap(card->iobase);
out1:
......@@ -917,8 +917,8 @@ static void if_cs_detach(struct pcmcia_device *p_dev)
lbs_deb_enter(LBS_DEB_CS);
libertas_stop_card(card->priv);
libertas_remove_card(card->priv);
lbs_stop_card(card->priv);
lbs_remove_card(card->priv);
if_cs_disable_ints(card);
if_cs_release(p_dev);
kfree(card);
......@@ -939,7 +939,7 @@ static struct pcmcia_device_id if_cs_ids[] = {
MODULE_DEVICE_TABLE(pcmcia, if_cs_ids);
static struct pcmcia_driver libertas_driver = {
static struct pcmcia_driver lbs_driver = {
.owner = THIS_MODULE,
.drv = {
.name = DRV_NAME,
......@@ -955,7 +955,7 @@ static int __init if_cs_init(void)
int ret;
lbs_deb_enter(LBS_DEB_CS);
ret = pcmcia_register_driver(&libertas_driver);
ret = pcmcia_register_driver(&lbs_driver);
lbs_deb_leave(LBS_DEB_CS);
return ret;
}
......@@ -964,7 +964,7 @@ static int __init if_cs_init(void)
static void __exit if_cs_exit(void)
{
lbs_deb_enter(LBS_DEB_CS);
pcmcia_unregister_driver(&libertas_driver);
pcmcia_unregister_driver(&lbs_driver);
lbs_deb_leave(LBS_DEB_CS);
}
......
......@@ -40,11 +40,11 @@
#include "dev.h"
#include "if_sdio.h"
static char *libertas_helper_name = NULL;
module_param_named(helper_name, libertas_helper_name, charp, 0644);
static char *lbs_helper_name = NULL;
module_param_named(helper_name, lbs_helper_name, charp, 0644);
static char *libertas_fw_name = NULL;
module_param_named(fw_name, libertas_fw_name, charp, 0644);
static char *lbs_fw_name = NULL;
module_param_named(fw_name, lbs_fw_name, charp, 0644);
static const struct sdio_device_id if_sdio_ids[] = {
{ SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_LIBERTAS) },
......@@ -82,7 +82,7 @@ struct if_sdio_packet {
struct if_sdio_card {
struct sdio_func *func;
wlan_private *priv;
lbs_private *priv;
int model;
unsigned long ioport;
......@@ -154,7 +154,7 @@ static int if_sdio_handle_cmd(struct if_sdio_card *card,
card->int_cause |= MRVDRV_CMD_UPLD_RDY;
libertas_interrupt(card->priv->dev);
lbs_interrupt(card->priv->dev);
ret = 0;
......@@ -194,7 +194,7 @@ static int if_sdio_handle_data(struct if_sdio_card *card,
memcpy(data, buffer, size);
libertas_process_rxed_packet(card->priv, skb);
lbs_process_rxed_packet(card->priv, skb);
ret = 0;
......@@ -236,7 +236,7 @@ static int if_sdio_handle_event(struct if_sdio_card *card,
card->event = event;
card->int_cause |= MRVDRV_CARDEVENT;
libertas_interrupt(card->priv->dev);
lbs_interrupt(card->priv->dev);
spin_unlock_irqrestore(&card->priv->adapter->driver_lock, flags);
......@@ -694,7 +694,7 @@ out:
/* Libertas callbacks */
/*******************************************************************/
static int if_sdio_host_to_card(wlan_private *priv, u8 type, u8 *buf, u16 nb)
static int if_sdio_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb)
{
int ret;
struct if_sdio_card *card;
......@@ -775,7 +775,7 @@ out:
return ret;
}
static int if_sdio_get_int_status(wlan_private *priv, u8 *ireg)
static int if_sdio_get_int_status(lbs_private *priv, u8 *ireg)
{
struct if_sdio_card *card;
......@@ -791,7 +791,7 @@ static int if_sdio_get_int_status(wlan_private *priv, u8 *ireg)
return 0;
}
static int if_sdio_read_event_cause(wlan_private *priv)
static int if_sdio_read_event_cause(lbs_private *priv)
{
struct if_sdio_card *card;
......@@ -836,7 +836,7 @@ static void if_sdio_interrupt(struct sdio_func *func)
*/
if (cause & IF_SDIO_H_INT_DNLD) {
if ((card->priv->dnld_sent == DNLD_DATA_SENT) &&
(card->priv->adapter->connect_status == LIBERTAS_CONNECTED))
(card->priv->adapter->connect_status == LBS_CONNECTED))
netif_wake_queue(card->priv->dev);
card->priv->dnld_sent = DNLD_RES_RECEIVED;
}
......@@ -857,7 +857,7 @@ static int if_sdio_probe(struct sdio_func *func,
const struct sdio_device_id *id)
{
struct if_sdio_card *card;
wlan_private *priv;
lbs_private *priv;
int ret, i;
unsigned int model;
struct if_sdio_packet *packet;
......@@ -905,15 +905,15 @@ static int if_sdio_probe(struct sdio_func *func,
card->helper = if_sdio_models[i].helper;
card->firmware = if_sdio_models[i].firmware;
if (libertas_helper_name) {
if (lbs_helper_name) {
lbs_deb_sdio("overriding helper firmware: %s\n",
libertas_helper_name);
card->helper = libertas_helper_name;
lbs_helper_name);
card->helper = lbs_helper_name;
}
if (libertas_fw_name) {
lbs_deb_sdio("overriding firmware: %s\n", libertas_fw_name);
card->firmware = libertas_fw_name;
if (lbs_fw_name) {
lbs_deb_sdio("overriding firmware: %s\n", lbs_fw_name);
card->firmware = lbs_fw_name;
}
sdio_claim_host(func);
......@@ -951,7 +951,7 @@ static int if_sdio_probe(struct sdio_func *func,
if (ret)
goto reclaim;
priv = libertas_add_card(card, &func->dev);
priv = lbs_add_card(card, &func->dev);
if (!priv) {
ret = -ENOMEM;
goto reclaim;
......@@ -975,7 +975,7 @@ static int if_sdio_probe(struct sdio_func *func,
if (ret)
goto reclaim;
ret = libertas_start_card(priv);
ret = lbs_start_card(priv);
if (ret)
goto err_activate_card;
......@@ -1020,8 +1020,8 @@ static void if_sdio_remove(struct sdio_func *func)
card->priv->adapter->surpriseremoved = 1;
lbs_deb_sdio("call remove card\n");
libertas_stop_card(card->priv);
libertas_remove_card(card->priv);
lbs_stop_card(card->priv);
lbs_remove_card(card->priv);
flush_scheduled_work();
......
......@@ -9,8 +9,8 @@
* your option) any later version.
*/
#ifndef LIBERTAS_IF_SDIO_H
#define LIBERTAS_IF_SDIO_H
#ifndef _LBS_IF_SDIO_H
#define _LBS_IF_SDIO_H
#define IF_SDIO_IOPORT 0x00
......
This diff is collapsed.
#ifndef _LIBERTAS_IF_USB_H
#define _LIBERTAS_IF_USB_H
#ifndef _LBS_IF_USB_H
#define _LBS_IF_USB_H
#include <linux/list.h>
......
This diff is collapsed.
......@@ -2,52 +2,52 @@
* Interface for the wlan infrastructure and adhoc join routines
*
* Driver interface functions and type declarations for the join module
* implemented in wlan_join.c. Process all start/join requests for
* implemented in join.c. Process all start/join requests for
* both adhoc and infrastructure networks
*/
#ifndef _WLAN_JOIN_H
#define _WLAN_JOIN_H
#ifndef _LBS_JOIN_H
#define _LBS_JOIN_H
#include "defs.h"
#include "dev.h"
struct cmd_ds_command;
int libertas_cmd_80211_authenticate(wlan_private * priv,
int lbs_cmd_80211_authenticate(lbs_private *priv,
struct cmd_ds_command *cmd,
void *pdata_buf);
int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
int lbs_cmd_80211_ad_hoc_join(lbs_private *priv,
struct cmd_ds_command *cmd,
void *pdata_buf);
int libertas_cmd_80211_ad_hoc_stop(wlan_private * priv,
int lbs_cmd_80211_ad_hoc_stop(lbs_private *priv,
struct cmd_ds_command *cmd);
int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
int lbs_cmd_80211_ad_hoc_start(lbs_private *priv,
struct cmd_ds_command *cmd,
void *pdata_buf);
int libertas_cmd_80211_deauthenticate(wlan_private * priv,
int lbs_cmd_80211_deauthenticate(lbs_private *priv,
struct cmd_ds_command *cmd);
int libertas_cmd_80211_associate(wlan_private * priv,
int lbs_cmd_80211_associate(lbs_private *priv,
struct cmd_ds_command *cmd,
void *pdata_buf);
int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
int lbs_ret_80211_ad_hoc_start(lbs_private *priv,
struct cmd_ds_command *resp);
int libertas_ret_80211_ad_hoc_stop(wlan_private * priv,
int lbs_ret_80211_ad_hoc_stop(lbs_private *priv,
struct cmd_ds_command *resp);
int libertas_ret_80211_disassociate(wlan_private * priv,
int lbs_ret_80211_disassociate(lbs_private *priv,
struct cmd_ds_command *resp);
int libertas_ret_80211_associate(wlan_private * priv,
int lbs_ret_80211_associate(lbs_private *priv,
struct cmd_ds_command *resp);
int libertas_start_adhoc_network(wlan_private * priv,
int lbs_start_adhoc_network(lbs_private *priv,
struct assoc_request * assoc_req);
int libertas_join_adhoc_network(wlan_private * priv,
int lbs_join_adhoc_network(lbs_private *priv,
struct assoc_request * assoc_req);
int libertas_stop_adhoc_network(wlan_private * priv);
int lbs_stop_adhoc_network(lbs_private *priv);
int libertas_send_deauthentication(wlan_private * priv);
int lbs_send_deauthentication(lbs_private *priv);
int wlan_associate(wlan_private * priv, struct assoc_request * assoc_req);
int lbs_associate(lbs_private *priv, struct assoc_request *assoc_req);
void libertas_unset_basic_rate_flags(u8 * rates, size_t len);
void lbs_unset_basic_rate_flags(u8 *rates, size_t len);
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2,10 +2,10 @@
* Interface for the wlan network scan routines
*
* Driver interface functions and type declarations for the scan module
* implemented in wlan_scan.c.
* implemented in scan.c.
*/
#ifndef _WLAN_SCAN_H
#define _WLAN_SCAN_H
#ifndef _LBS_SCAN_H
#define _LBS_SCAN_H
#include <net/ieee80211.h>
#include "hostcmd.h"
......@@ -13,38 +13,38 @@
/**
* @brief Maximum number of channels that can be sent in a setuserscan ioctl
*
* @sa wlan_ioctl_user_scan_cfg
* @sa lbs_ioctl_user_scan_cfg
*/
#define WLAN_IOCTL_USER_SCAN_CHAN_MAX 50
#define LBS_IOCTL_USER_SCAN_CHAN_MAX 50
//! Infrastructure BSS scan type in wlan_scan_cmd_config
#define WLAN_SCAN_BSS_TYPE_BSS 1
//! Infrastructure BSS scan type in lbs_scan_cmd_config
#define LBS_SCAN_BSS_TYPE_BSS 1
//! Adhoc BSS scan type in wlan_scan_cmd_config
#define WLAN_SCAN_BSS_TYPE_IBSS 2
//! Adhoc BSS scan type in lbs_scan_cmd_config
#define LBS_SCAN_BSS_TYPE_IBSS 2
//! Adhoc or Infrastructure BSS scan type in wlan_scan_cmd_config, no filter
#define WLAN_SCAN_BSS_TYPE_ANY 3
//! Adhoc or Infrastructure BSS scan type in lbs_scan_cmd_config, no filter
#define LBS_SCAN_BSS_TYPE_ANY 3
/**
* @brief Structure used internally in the wlan driver to configure a scan.
*
* Sent to the command processing module to configure the firmware
* scan command prepared by libertas_cmd_80211_scan.
* scan command prepared by lbs_cmd_80211_scan.
*
* @sa wlan_scan_networks
* @sa lbs_scan_networks
*
*/
struct wlan_scan_cmd_config {
struct lbs_scan_cmd_config {
/**
* @brief BSS type to be sent in the firmware command
*
* Field can be used to restrict the types of networks returned in the
* scan. valid settings are:
*
* - WLAN_SCAN_BSS_TYPE_BSS (infrastructure)
* - WLAN_SCAN_BSS_TYPE_IBSS (adhoc)
* - WLAN_SCAN_BSS_TYPE_ANY (unrestricted, adhoc and infrastructure)
* - LBS_SCAN_BSS_TYPE_BSS (infrastructure)
* - LBS_SCAN_BSS_TYPE_IBSS (adhoc)
* - LBS_SCAN_BSS_TYPE_ANY (unrestricted, adhoc and infrastructure)
*/
u8 bsstype;
......@@ -68,12 +68,12 @@ struct wlan_scan_cmd_config {
};
/**
* @brief IOCTL channel sub-structure sent in wlan_ioctl_user_scan_cfg
* @brief IOCTL channel sub-structure sent in lbs_ioctl_user_scan_cfg
*
* Multiple instances of this structure are included in the IOCTL command
* to configure a instance of a scan on the specific channel.
*/
struct wlan_ioctl_user_scan_chan {
struct lbs_ioctl_user_scan_chan {
u8 channumber; //!< channel Number to scan
u8 radiotype; //!< Radio type: 'B/G' band = 0, 'A' band = 1
u8 scantype; //!< Scan type: Active = 0, Passive = 1
......@@ -83,23 +83,23 @@ struct wlan_ioctl_user_scan_chan {
/**
* @brief IOCTL input structure to configure an immediate scan cmd to firmware
*
* Used in the setuserscan (WLAN_SET_USER_SCAN) private ioctl. Specifies
* Used in the setuserscan (LBS_SET_USER_SCAN) private ioctl. Specifies
* a number of parameters to be used in general for the scan as well
* as a channel list (wlan_ioctl_user_scan_chan) for each scan period
* as a channel list (lbs_ioctl_user_scan_chan) for each scan period
* desired.
*
* @sa libertas_set_user_scan_ioctl
* @sa lbs_set_user_scan_ioctl
*/
struct wlan_ioctl_user_scan_cfg {
struct lbs_ioctl_user_scan_cfg {
/**
* @brief BSS type to be sent in the firmware command
*
* Field can be used to restrict the types of networks returned in the
* scan. valid settings are:
*
* - WLAN_SCAN_BSS_TYPE_BSS (infrastructure)
* - WLAN_SCAN_BSS_TYPE_IBSS (adhoc)
* - WLAN_SCAN_BSS_TYPE_ANY (unrestricted, adhoc and infrastructure)
* - LBS_SCAN_BSS_TYPE_BSS (infrastructure)
* - LBS_SCAN_BSS_TYPE_IBSS (adhoc)
* - LBS_SCAN_BSS_TYPE_ANY (unrestricted, adhoc and infrastructure)
*/
u8 bsstype;
......@@ -128,7 +128,7 @@ struct wlan_ioctl_user_scan_cfg {
/**
* @brief Variable number (fixed maximum) of channels to scan up
*/
struct wlan_ioctl_user_scan_chan chanlist[WLAN_IOCTL_USER_SCAN_CHAN_MAX];
struct lbs_ioctl_user_scan_chan chanlist[LBS_IOCTL_USER_SCAN_CHAN_MAX];
};
/**
......@@ -174,30 +174,30 @@ struct bss_descriptor {
struct list_head list;
};
int libertas_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len);
int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len);
struct bss_descriptor * libertas_find_ssid_in_list(wlan_adapter * adapter,
u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode,
int channel);
struct bss_descriptor *lbs_find_ssid_in_list(lbs_adapter *adapter,
u8 *ssid, u8 ssid_len, u8 *bssid, u8 mode,
int channel);
struct bss_descriptor * libertas_find_bssid_in_list(wlan_adapter * adapter,
u8 * bssid, u8 mode);
struct bss_descriptor *lbs_find_bssid_in_list(lbs_adapter *adapter,
u8 *bssid, u8 mode);
int libertas_find_best_network_ssid(wlan_private * priv, u8 *out_ssid,
int lbs_find_best_network_ssid(lbs_private *priv, u8 *out_ssid,
u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode);
int libertas_send_specific_ssid_scan(wlan_private * priv, u8 *ssid,
int lbs_send_specific_ssid_scan(lbs_private *priv, u8 *ssid,
u8 ssid_len, u8 clear_ssid);
int libertas_cmd_80211_scan(wlan_private * priv,
int lbs_cmd_80211_scan(lbs_private *priv,
struct cmd_ds_command *cmd,
void *pdata_buf);
int libertas_ret_80211_scan(wlan_private * priv,
int lbs_ret_80211_scan(lbs_private *priv,
struct cmd_ds_command *resp);
int wlan_scan_networks(wlan_private * priv,
const struct wlan_ioctl_user_scan_cfg * puserscanin,
int lbs_scan_networks(lbs_private *priv,
const struct lbs_ioctl_user_scan_cfg *puserscanin,
int full_scan);
struct ifreq;
......@@ -205,11 +205,11 @@ struct ifreq;
struct iw_point;
struct iw_param;
struct iw_request_info;
int libertas_get_scan(struct net_device *dev, struct iw_request_info *info,
int lbs_get_scan(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra);
int libertas_set_scan(struct net_device *dev, struct iw_request_info *info,
int lbs_set_scan(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra);
void libertas_scan_worker(struct work_struct *work);
void lbs_scan_worker(struct work_struct *work);
#endif /* _WLAN_SCAN_H */
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment