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

libertas: remove arbitrary typedefs

New typedefs are usually frowned upon. This patch changes
libertas_adapter -> struct libertas_adapter
libertas_priv -> struct libertas_priv

While passing, make everything checkpatch.pl-clean that gets touches.
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 96287ac4
...@@ -430,7 +430,7 @@ u8 lbs_get_scan_type_11d(u8 chan, ...@@ -430,7 +430,7 @@ u8 lbs_get_scan_type_11d(u8 chan,
} }
void lbs_init_11d(lbs_private * priv) void lbs_init_11d(struct lbs_private *priv)
{ {
priv->adapter->enable11d = 0; priv->adapter->enable11d = 0;
memset(&(priv->adapter->parsed_region_chan), 0, memset(&(priv->adapter->parsed_region_chan), 0,
...@@ -440,10 +440,10 @@ void lbs_init_11d(lbs_private * priv) ...@@ -440,10 +440,10 @@ void lbs_init_11d(lbs_private * priv)
/** /**
* @brief This function sets DOMAIN INFO to FW * @brief This function sets DOMAIN INFO to FW
* @param priv pointer to lbs_private * @param priv pointer to struct lbs_private
* @return 0; -1 * @return 0; -1
*/ */
static int set_domain_info_11d(lbs_private * priv) static int set_domain_info_11d(struct lbs_private *priv)
{ {
int ret; int ret;
...@@ -463,13 +463,13 @@ static int set_domain_info_11d(lbs_private * priv) ...@@ -463,13 +463,13 @@ static int set_domain_info_11d(lbs_private * priv)
/** /**
* @brief This function setups scan channels * @brief This function setups scan channels
* @param priv pointer to lbs_private * @param priv pointer to struct lbs_private
* @param band band * @param band band
* @return 0 * @return 0
*/ */
int lbs_set_universaltable(lbs_private * priv, u8 band) int lbs_set_universaltable(struct lbs_private *priv, u8 band)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
u16 size = sizeof(struct chan_freq_power); u16 size = sizeof(struct chan_freq_power);
u16 i = 0; u16 i = 0;
...@@ -492,20 +492,20 @@ int lbs_set_universaltable(lbs_private * priv, u8 band) ...@@ -492,20 +492,20 @@ int lbs_set_universaltable(lbs_private * priv, u8 band)
/** /**
* @brief This function implements command CMD_802_11D_DOMAIN_INFO * @brief This function implements command CMD_802_11D_DOMAIN_INFO
* @param priv pointer to lbs_private * @param priv pointer to struct lbs_private
* @param cmd pointer to cmd buffer * @param cmd pointer to cmd buffer
* @param cmdno cmd ID * @param cmdno cmd ID
* @param cmdOption cmd action * @param cmdOption cmd action
* @return 0 * @return 0
*/ */
int lbs_cmd_802_11d_domain_info(lbs_private * priv, int lbs_cmd_802_11d_domain_info(struct lbs_private *priv,
struct cmd_ds_command *cmd, u16 cmdno, struct cmd_ds_command *cmd, u16 cmdno,
u16 cmdoption) u16 cmdoption)
{ {
struct cmd_ds_802_11d_domain_info *pdomaininfo = struct cmd_ds_802_11d_domain_info *pdomaininfo =
&cmd->params.domaininfo; &cmd->params.domaininfo;
struct mrvlietypes_domainparamset *domain = &pdomaininfo->domain; struct mrvlietypes_domainparamset *domain = &pdomaininfo->domain;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
u8 nr_subband = adapter->domainreg.nr_subband; u8 nr_subband = adapter->domainreg.nr_subband;
lbs_deb_enter(LBS_DEB_11D); lbs_deb_enter(LBS_DEB_11D);
...@@ -552,11 +552,11 @@ int lbs_cmd_802_11d_domain_info(lbs_private * priv, ...@@ -552,11 +552,11 @@ int lbs_cmd_802_11d_domain_info(lbs_private * priv,
/** /**
* @brief This function parses countryinfo from AP and download country info to FW * @brief This function parses countryinfo from AP and download country info to FW
* @param priv pointer to lbs_private * @param priv pointer to struct lbs_private
* @param resp pointer to command response buffer * @param resp pointer to command response buffer
* @return 0; -1 * @return 0; -1
*/ */
int lbs_ret_802_11d_domain_info(lbs_private * priv, int lbs_ret_802_11d_domain_info(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
struct cmd_ds_802_11d_domain_info *domaininfo = &resp->params.domaininforesp; struct cmd_ds_802_11d_domain_info *domaininfo = &resp->params.domaininforesp;
...@@ -598,14 +598,14 @@ int lbs_ret_802_11d_domain_info(lbs_private * priv, ...@@ -598,14 +598,14 @@ int lbs_ret_802_11d_domain_info(lbs_private * priv,
/** /**
* @brief This function parses countryinfo from AP and download country info to FW * @brief This function parses countryinfo from AP and download country info to FW
* @param priv pointer to lbs_private * @param priv pointer to struct lbs_private
* @return 0; -1 * @return 0; -1
*/ */
int lbs_parse_dnld_countryinfo_11d(lbs_private * priv, int lbs_parse_dnld_countryinfo_11d(struct lbs_private *priv,
struct bss_descriptor * bss) struct bss_descriptor * bss)
{ {
int ret; int ret;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_11D); lbs_deb_enter(LBS_DEB_11D);
if (priv->adapter->enable11d) { if (priv->adapter->enable11d) {
...@@ -640,13 +640,13 @@ int lbs_parse_dnld_countryinfo_11d(lbs_private * priv, ...@@ -640,13 +640,13 @@ int lbs_parse_dnld_countryinfo_11d(lbs_private * priv,
/** /**
* @brief This function generates 11D info from user specified regioncode and download to FW * @brief This function generates 11D info from user specified regioncode and download to FW
* @param priv pointer to lbs_private * @param priv pointer to struct lbs_private
* @return 0; -1 * @return 0; -1
*/ */
int lbs_create_dnld_countryinfo_11d(lbs_private * priv) int lbs_create_dnld_countryinfo_11d(struct lbs_private *priv)
{ {
int ret; int ret;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct region_channel *region_chan; struct region_channel *region_chan;
u8 j; u8 j;
......
...@@ -78,26 +78,28 @@ struct region_code_mapping { ...@@ -78,26 +78,28 @@ struct region_code_mapping {
u8 code; u8 code;
}; };
struct lbs_private;
u8 lbs_get_scan_type_11d(u8 chan, u8 lbs_get_scan_type_11d(u8 chan,
struct parsed_region_chan_11d *parsed_region_chan); struct parsed_region_chan_11d *parsed_region_chan);
u32 lbs_chan_2_freq(u8 chan, u8 band); u32 lbs_chan_2_freq(u8 chan, u8 band);
void lbs_init_11d(lbs_private * priv); void lbs_init_11d(struct lbs_private *priv);
int lbs_set_universaltable(lbs_private * priv, u8 band); int lbs_set_universaltable(struct lbs_private *priv, u8 band);
int lbs_cmd_802_11d_domain_info(lbs_private * priv, int lbs_cmd_802_11d_domain_info(struct lbs_private *priv,
struct cmd_ds_command *cmd, u16 cmdno, struct cmd_ds_command *cmd, u16 cmdno,
u16 cmdOption); u16 cmdOption);
int lbs_ret_802_11d_domain_info(lbs_private * priv, int lbs_ret_802_11d_domain_info(struct lbs_private *priv,
struct cmd_ds_command *resp); struct cmd_ds_command *resp);
struct bss_descriptor; struct bss_descriptor;
int lbs_parse_dnld_countryinfo_11d(lbs_private * priv, int lbs_parse_dnld_countryinfo_11d(struct lbs_private *priv,
struct bss_descriptor * bss); struct bss_descriptor * bss);
int lbs_create_dnld_countryinfo_11d(lbs_private * priv); int lbs_create_dnld_countryinfo_11d(struct lbs_private *priv);
#endif #endif
...@@ -15,10 +15,10 @@ static const u8 bssid_any[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; ...@@ -15,10 +15,10 @@ static const u8 bssid_any[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
static const u8 bssid_off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static const u8 bssid_off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
static int assoc_helper_essid(lbs_private *priv, static int assoc_helper_essid(struct lbs_private *priv,
struct assoc_request * assoc_req) struct assoc_request * assoc_req)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
struct bss_descriptor * bss; struct bss_descriptor * bss;
int channel = -1; int channel = -1;
...@@ -75,10 +75,10 @@ static int assoc_helper_essid(lbs_private *priv, ...@@ -75,10 +75,10 @@ static int assoc_helper_essid(lbs_private *priv,
} }
static int assoc_helper_bssid(lbs_private *priv, static int assoc_helper_bssid(struct lbs_private *priv,
struct assoc_request * assoc_req) struct assoc_request * assoc_req)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
struct bss_descriptor * bss; struct bss_descriptor * bss;
DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac);
...@@ -109,7 +109,7 @@ static int assoc_helper_bssid(lbs_private *priv, ...@@ -109,7 +109,7 @@ static int assoc_helper_bssid(lbs_private *priv,
} }
static int assoc_helper_associate(lbs_private *priv, static int assoc_helper_associate(struct lbs_private *priv,
struct assoc_request * assoc_req) struct assoc_request * assoc_req)
{ {
int ret = 0, done = 0; int ret = 0, done = 0;
...@@ -135,10 +135,10 @@ static int assoc_helper_associate(lbs_private *priv, ...@@ -135,10 +135,10 @@ static int assoc_helper_associate(lbs_private *priv,
} }
static int assoc_helper_mode(lbs_private *priv, static int assoc_helper_mode(struct lbs_private *priv,
struct assoc_request * assoc_req) struct assoc_request * assoc_req)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
lbs_deb_enter(LBS_DEB_ASSOC); lbs_deb_enter(LBS_DEB_ASSOC);
...@@ -165,7 +165,7 @@ static int assoc_helper_mode(lbs_private *priv, ...@@ -165,7 +165,7 @@ static int assoc_helper_mode(lbs_private *priv,
} }
static int update_channel(lbs_private * priv) static int update_channel(struct lbs_private *priv)
{ {
int ret; int ret;
/* the channel in f/w could be out of sync, get the current channel */ /* the channel in f/w could be out of sync, get the current channel */
...@@ -179,7 +179,8 @@ static int update_channel(lbs_private * priv) ...@@ -179,7 +179,8 @@ static int update_channel(lbs_private * priv)
void lbs_sync_channel(struct work_struct *work) void lbs_sync_channel(struct work_struct *work)
{ {
lbs_private *priv = container_of(work, lbs_private, sync_channel); struct lbs_private *priv = container_of(work, struct lbs_private,
sync_channel);
lbs_deb_enter(LBS_DEB_ASSOC); lbs_deb_enter(LBS_DEB_ASSOC);
if (update_channel(priv) != 0) if (update_channel(priv) != 0)
...@@ -187,10 +188,10 @@ void lbs_sync_channel(struct work_struct *work) ...@@ -187,10 +188,10 @@ void lbs_sync_channel(struct work_struct *work)
lbs_deb_leave(LBS_DEB_ASSOC); lbs_deb_leave(LBS_DEB_ASSOC);
} }
static int assoc_helper_channel(lbs_private *priv, static int assoc_helper_channel(struct lbs_private *priv,
struct assoc_request * assoc_req) struct assoc_request * assoc_req)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
lbs_deb_enter(LBS_DEB_ASSOC); lbs_deb_enter(LBS_DEB_ASSOC);
...@@ -242,10 +243,10 @@ static int assoc_helper_channel(lbs_private *priv, ...@@ -242,10 +243,10 @@ static int assoc_helper_channel(lbs_private *priv,
} }
static int assoc_helper_wep_keys(lbs_private *priv, static int assoc_helper_wep_keys(struct lbs_private *priv,
struct assoc_request * assoc_req) struct assoc_request * assoc_req)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int i; int i;
int ret = 0; int ret = 0;
...@@ -297,10 +298,10 @@ static int assoc_helper_wep_keys(lbs_private *priv, ...@@ -297,10 +298,10 @@ static int assoc_helper_wep_keys(lbs_private *priv,
return ret; return ret;
} }
static int assoc_helper_secinfo(lbs_private *priv, static int assoc_helper_secinfo(struct lbs_private *priv,
struct assoc_request * assoc_req) struct assoc_request * assoc_req)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
u32 do_wpa; u32 do_wpa;
u32 rsn = 0; u32 rsn = 0;
...@@ -349,7 +350,7 @@ static int assoc_helper_secinfo(lbs_private *priv, ...@@ -349,7 +350,7 @@ static int assoc_helper_secinfo(lbs_private *priv,
} }
static int assoc_helper_wpa_keys(lbs_private *priv, static int assoc_helper_wpa_keys(struct lbs_private *priv,
struct assoc_request * assoc_req) struct assoc_request * assoc_req)
{ {
int ret = 0; int ret = 0;
...@@ -392,10 +393,10 @@ static int assoc_helper_wpa_keys(lbs_private *priv, ...@@ -392,10 +393,10 @@ static int assoc_helper_wpa_keys(lbs_private *priv,
} }
static int assoc_helper_wpa_ie(lbs_private *priv, static int assoc_helper_wpa_ie(struct lbs_private *priv,
struct assoc_request * assoc_req) struct assoc_request * assoc_req)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
lbs_deb_enter(LBS_DEB_ASSOC); lbs_deb_enter(LBS_DEB_ASSOC);
...@@ -413,7 +414,7 @@ static int assoc_helper_wpa_ie(lbs_private *priv, ...@@ -413,7 +414,7 @@ static int assoc_helper_wpa_ie(lbs_private *priv,
} }
static int should_deauth_infrastructure(lbs_adapter *adapter, static int should_deauth_infrastructure(struct lbs_adapter *adapter,
struct assoc_request * assoc_req) struct assoc_request * assoc_req)
{ {
int ret = 0; int ret = 0;
...@@ -465,7 +466,7 @@ static int should_deauth_infrastructure(lbs_adapter *adapter, ...@@ -465,7 +466,7 @@ static int should_deauth_infrastructure(lbs_adapter *adapter,
} }
static int should_stop_adhoc(lbs_adapter *adapter, static int should_stop_adhoc(struct lbs_adapter *adapter,
struct assoc_request * assoc_req) struct assoc_request * assoc_req)
{ {
lbs_deb_enter(LBS_DEB_ASSOC); lbs_deb_enter(LBS_DEB_ASSOC);
...@@ -496,8 +497,9 @@ static int should_stop_adhoc(lbs_adapter *adapter, ...@@ -496,8 +497,9 @@ static int should_stop_adhoc(lbs_adapter *adapter,
void lbs_association_worker(struct work_struct *work) void lbs_association_worker(struct work_struct *work)
{ {
lbs_private *priv = container_of(work, lbs_private, assoc_work.work); struct lbs_private *priv = container_of(work, struct lbs_private,
lbs_adapter *adapter = priv->adapter; assoc_work.work);
struct lbs_adapter *adapter = priv->adapter;
struct assoc_request * assoc_req = NULL; struct assoc_request * assoc_req = NULL;
int ret = 0; int ret = 0;
int find_any_ssid = 0; int find_any_ssid = 0;
...@@ -684,7 +686,7 @@ void lbs_association_worker(struct work_struct *work) ...@@ -684,7 +686,7 @@ void lbs_association_worker(struct work_struct *work)
/* /*
* Caller MUST hold any necessary locks * Caller MUST hold any necessary locks
*/ */
struct assoc_request *lbs_get_association_request(lbs_adapter *adapter) struct assoc_request *lbs_get_association_request(struct lbs_adapter *adapter)
{ {
struct assoc_request * assoc_req; struct assoc_request * assoc_req;
......
...@@ -6,9 +6,7 @@ ...@@ -6,9 +6,7 @@
#include "dev.h" #include "dev.h"
void lbs_association_worker(struct work_struct *work); void lbs_association_worker(struct work_struct *work);
struct assoc_request *lbs_get_association_request(struct lbs_adapter *adapter);
struct assoc_request * lbs_get_association_request(lbs_adapter *adapter);
void lbs_sync_channel(struct work_struct *work); void lbs_sync_channel(struct work_struct *work);
#endif /* _LBS_ASSOC_H */ #endif /* _LBS_ASSOC_H */
...@@ -37,7 +37,7 @@ static u8 is_command_allowed_in_ps(__le16 command) ...@@ -37,7 +37,7 @@ static u8 is_command_allowed_in_ps(__le16 command)
return 0; return 0;
} }
static int lbs_cmd_hw_spec(lbs_private * priv, struct cmd_ds_command *cmd) static int lbs_cmd_hw_spec(struct lbs_private *priv, struct cmd_ds_command *cmd)
{ {
struct cmd_ds_get_hw_spec *hwspec = &cmd->params.hwspec; struct cmd_ds_get_hw_spec *hwspec = &cmd->params.hwspec;
...@@ -51,7 +51,7 @@ static int lbs_cmd_hw_spec(lbs_private * priv, struct cmd_ds_command *cmd) ...@@ -51,7 +51,7 @@ static int lbs_cmd_hw_spec(lbs_private * priv, struct cmd_ds_command *cmd)
return 0; return 0;
} }
static int lbs_cmd_802_11_ps_mode(lbs_private * priv, static int lbs_cmd_802_11_ps_mode(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u16 cmd_action) u16 cmd_action)
{ {
...@@ -90,7 +90,7 @@ static int lbs_cmd_802_11_ps_mode(lbs_private * priv, ...@@ -90,7 +90,7 @@ static int lbs_cmd_802_11_ps_mode(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_802_11_inactivity_timeout(lbs_private * priv, static int lbs_cmd_802_11_inactivity_timeout(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u16 cmd_action, void *pdata_buf) u16 cmd_action, void *pdata_buf)
{ {
...@@ -114,11 +114,11 @@ static int lbs_cmd_802_11_inactivity_timeout(lbs_private * priv, ...@@ -114,11 +114,11 @@ static int lbs_cmd_802_11_inactivity_timeout(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_802_11_sleep_params(lbs_private * priv, static int lbs_cmd_802_11_sleep_params(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u16 cmd_action) u16 cmd_action)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_sleep_params *sp = &cmd->params.sleep_params; struct cmd_ds_802_11_sleep_params *sp = &cmd->params.sleep_params;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -145,13 +145,13 @@ static int lbs_cmd_802_11_sleep_params(lbs_private * priv, ...@@ -145,13 +145,13 @@ static int lbs_cmd_802_11_sleep_params(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_802_11_set_wep(lbs_private * priv, static int lbs_cmd_802_11_set_wep(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u32 cmd_act, u32 cmd_act,
void * pdata_buf) void * pdata_buf)
{ {
struct cmd_ds_802_11_set_wep *wep = &cmd->params.wep; struct cmd_ds_802_11_set_wep *wep = &cmd->params.wep;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
struct assoc_request * assoc_req = pdata_buf; struct assoc_request * assoc_req = pdata_buf;
...@@ -219,7 +219,7 @@ static int lbs_cmd_802_11_set_wep(lbs_private * priv, ...@@ -219,7 +219,7 @@ static int lbs_cmd_802_11_set_wep(lbs_private * priv,
return ret; return ret;
} }
static int lbs_cmd_802_11_enable_rsn(lbs_private * priv, static int lbs_cmd_802_11_enable_rsn(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u16 cmd_action, u16 cmd_action,
void * pdata_buf) void * pdata_buf)
...@@ -272,7 +272,7 @@ static void set_one_wpa_key(struct MrvlIEtype_keyParamSet * pkeyparamset, ...@@ -272,7 +272,7 @@ static void set_one_wpa_key(struct MrvlIEtype_keyParamSet * pkeyparamset,
lbs_deb_leave(LBS_DEB_CMD); lbs_deb_leave(LBS_DEB_CMD);
} }
static int lbs_cmd_802_11_key_material(lbs_private * priv, static int lbs_cmd_802_11_key_material(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u16 cmd_action, u16 cmd_action,
u32 cmd_oid, void *pdata_buf) u32 cmd_oid, void *pdata_buf)
...@@ -319,7 +319,7 @@ static int lbs_cmd_802_11_key_material(lbs_private * priv, ...@@ -319,7 +319,7 @@ static int lbs_cmd_802_11_key_material(lbs_private * priv,
return ret; return ret;
} }
static int lbs_cmd_802_11_reset(lbs_private * priv, static int lbs_cmd_802_11_reset(struct lbs_private *priv,
struct cmd_ds_command *cmd, int cmd_action) struct cmd_ds_command *cmd, int cmd_action)
{ {
struct cmd_ds_802_11_reset *reset = &cmd->params.reset; struct cmd_ds_802_11_reset *reset = &cmd->params.reset;
...@@ -334,7 +334,7 @@ static int lbs_cmd_802_11_reset(lbs_private * priv, ...@@ -334,7 +334,7 @@ static int lbs_cmd_802_11_reset(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_802_11_get_log(lbs_private * priv, static int lbs_cmd_802_11_get_log(struct lbs_private *priv,
struct cmd_ds_command *cmd) struct cmd_ds_command *cmd)
{ {
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -346,7 +346,7 @@ static int lbs_cmd_802_11_get_log(lbs_private * priv, ...@@ -346,7 +346,7 @@ static int lbs_cmd_802_11_get_log(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_802_11_get_stat(lbs_private * priv, static int lbs_cmd_802_11_get_stat(struct lbs_private *priv,
struct cmd_ds_command *cmd) struct cmd_ds_command *cmd)
{ {
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -358,13 +358,13 @@ static int lbs_cmd_802_11_get_stat(lbs_private * priv, ...@@ -358,13 +358,13 @@ static int lbs_cmd_802_11_get_stat(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_802_11_snmp_mib(lbs_private * priv, static int lbs_cmd_802_11_snmp_mib(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
int cmd_action, int cmd_action,
int cmd_oid, void *pdata_buf) int cmd_oid, void *pdata_buf)
{ {
struct cmd_ds_802_11_snmp_mib *pSNMPMIB = &cmd->params.smib; struct cmd_ds_802_11_snmp_mib *pSNMPMIB = &cmd->params.smib;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
u8 ucTemp; u8 ucTemp;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -479,11 +479,11 @@ static int lbs_cmd_802_11_snmp_mib(lbs_private * priv, ...@@ -479,11 +479,11 @@ static int lbs_cmd_802_11_snmp_mib(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_802_11_radio_control(lbs_private * priv, static int lbs_cmd_802_11_radio_control(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
int cmd_action) int cmd_action)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_radio_control *pradiocontrol = &cmd->params.radio; struct cmd_ds_802_11_radio_control *pradiocontrol = &cmd->params.radio;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -519,7 +519,7 @@ static int lbs_cmd_802_11_radio_control(lbs_private * priv, ...@@ -519,7 +519,7 @@ static int lbs_cmd_802_11_radio_control(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_802_11_rf_tx_power(lbs_private * priv, static int lbs_cmd_802_11_rf_tx_power(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u16 cmd_action, void *pdata_buf) u16 cmd_action, void *pdata_buf)
{ {
...@@ -563,7 +563,7 @@ static int lbs_cmd_802_11_rf_tx_power(lbs_private * priv, ...@@ -563,7 +563,7 @@ static int lbs_cmd_802_11_rf_tx_power(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_802_11_monitor_mode(lbs_private * priv, static int lbs_cmd_802_11_monitor_mode(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u16 cmd_action, void *pdata_buf) u16 cmd_action, void *pdata_buf)
{ {
...@@ -583,13 +583,13 @@ static int lbs_cmd_802_11_monitor_mode(lbs_private * priv, ...@@ -583,13 +583,13 @@ static int lbs_cmd_802_11_monitor_mode(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_802_11_rate_adapt_rateset(lbs_private * priv, static int lbs_cmd_802_11_rate_adapt_rateset(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u16 cmd_action) u16 cmd_action)
{ {
struct cmd_ds_802_11_rate_adapt_rateset struct cmd_ds_802_11_rate_adapt_rateset
*rateadapt = &cmd->params.rateset; *rateadapt = &cmd->params.rateset;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
cmd->size = cmd->size =
...@@ -605,12 +605,12 @@ static int lbs_cmd_802_11_rate_adapt_rateset(lbs_private * priv, ...@@ -605,12 +605,12 @@ static int lbs_cmd_802_11_rate_adapt_rateset(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_802_11_data_rate(lbs_private * priv, static int lbs_cmd_802_11_data_rate(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u16 cmd_action) u16 cmd_action)
{ {
struct cmd_ds_802_11_data_rate *pdatarate = &cmd->params.drate; struct cmd_ds_802_11_data_rate *pdatarate = &cmd->params.drate;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -632,12 +632,12 @@ static int lbs_cmd_802_11_data_rate(lbs_private * priv, ...@@ -632,12 +632,12 @@ static int lbs_cmd_802_11_data_rate(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_mac_multicast_adr(lbs_private * priv, static int lbs_cmd_mac_multicast_adr(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u16 cmd_action) u16 cmd_action)
{ {
struct cmd_ds_mac_multicast_adr *pMCastAdr = &cmd->params.madr; struct cmd_ds_mac_multicast_adr *pMCastAdr = &cmd->params.madr;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_multicast_adr) + cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_multicast_adr) +
...@@ -655,7 +655,7 @@ static int lbs_cmd_mac_multicast_adr(lbs_private * priv, ...@@ -655,7 +655,7 @@ static int lbs_cmd_mac_multicast_adr(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_802_11_rf_channel(lbs_private * priv, static int lbs_cmd_802_11_rf_channel(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
int option, void *pdata_buf) int option, void *pdata_buf)
{ {
...@@ -676,10 +676,10 @@ static int lbs_cmd_802_11_rf_channel(lbs_private * priv, ...@@ -676,10 +676,10 @@ static int lbs_cmd_802_11_rf_channel(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_802_11_rssi(lbs_private * priv, static int lbs_cmd_802_11_rssi(struct lbs_private *priv,
struct cmd_ds_command *cmd) struct cmd_ds_command *cmd)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
cmd->command = cpu_to_le16(CMD_802_11_RSSI); cmd->command = cpu_to_le16(CMD_802_11_RSSI);
...@@ -698,7 +698,7 @@ static int lbs_cmd_802_11_rssi(lbs_private * priv, ...@@ -698,7 +698,7 @@ static int lbs_cmd_802_11_rssi(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_reg_access(lbs_private * priv, static int lbs_cmd_reg_access(struct lbs_private *priv,
struct cmd_ds_command *cmdptr, struct cmd_ds_command *cmdptr,
u8 cmd_action, void *pdata_buf) u8 cmd_action, void *pdata_buf)
{ {
...@@ -773,11 +773,11 @@ static int lbs_cmd_reg_access(lbs_private * priv, ...@@ -773,11 +773,11 @@ static int lbs_cmd_reg_access(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_802_11_mac_address(lbs_private * priv, static int lbs_cmd_802_11_mac_address(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u16 cmd_action) u16 cmd_action)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
cmd->command = cpu_to_le16(CMD_802_11_MAC_ADDRESS); cmd->command = cpu_to_le16(CMD_802_11_MAC_ADDRESS);
...@@ -797,7 +797,7 @@ static int lbs_cmd_802_11_mac_address(lbs_private * priv, ...@@ -797,7 +797,7 @@ static int lbs_cmd_802_11_mac_address(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_802_11_eeprom_access(lbs_private * priv, static int lbs_cmd_802_11_eeprom_access(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
int cmd_action, void *pdata_buf) int cmd_action, void *pdata_buf)
{ {
...@@ -819,7 +819,7 @@ static int lbs_cmd_802_11_eeprom_access(lbs_private * priv, ...@@ -819,7 +819,7 @@ static int lbs_cmd_802_11_eeprom_access(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_bt_access(lbs_private * priv, static int lbs_cmd_bt_access(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u16 cmd_action, void *pdata_buf) u16 cmd_action, void *pdata_buf)
{ {
...@@ -857,7 +857,7 @@ static int lbs_cmd_bt_access(lbs_private * priv, ...@@ -857,7 +857,7 @@ static int lbs_cmd_bt_access(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_fwt_access(lbs_private * priv, static int lbs_cmd_fwt_access(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u16 cmd_action, void *pdata_buf) u16 cmd_action, void *pdata_buf)
{ {
...@@ -879,7 +879,7 @@ static int lbs_cmd_fwt_access(lbs_private * priv, ...@@ -879,7 +879,7 @@ static int lbs_cmd_fwt_access(lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_mesh_access(lbs_private * priv, static int lbs_cmd_mesh_access(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u16 cmd_action, void *pdata_buf) u16 cmd_action, void *pdata_buf)
{ {
...@@ -923,7 +923,7 @@ static int lbs_cmd_bcn_ctrl(struct lbs_private * priv, ...@@ -923,7 +923,7 @@ static int lbs_cmd_bcn_ctrl(struct lbs_private * priv,
return 0; return 0;
} }
static int lbs_cmd_set_boot2_ver(lbs_private * priv, static int lbs_cmd_set_boot2_ver(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
u16 cmd_action, void *pdata_buf) u16 cmd_action, void *pdata_buf)
{ {
...@@ -938,7 +938,9 @@ static int lbs_cmd_set_boot2_ver(lbs_private * priv, ...@@ -938,7 +938,9 @@ static int lbs_cmd_set_boot2_ver(lbs_private * priv,
* Note: NEVER use lbs_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. * the command timer, because it does not account for queued commands.
*/ */
void lbs_queue_cmd(lbs_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail) void lbs_queue_cmd(struct lbs_adapter *adapter,
struct cmd_ctrl_node *cmdnode,
u8 addtail)
{ {
unsigned long flags; unsigned long flags;
struct cmd_ds_command *cmdptr; struct cmd_ds_command *cmdptr;
...@@ -990,12 +992,12 @@ void lbs_queue_cmd(lbs_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addt ...@@ -990,12 +992,12 @@ void lbs_queue_cmd(lbs_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addt
* For now - we are not performing the endian conversion the second time - but * For now - we are not performing the endian conversion the second time - but
* for PS and DEEP_SLEEP we need to worry * for PS and DEEP_SLEEP we need to worry
*/ */
static int DownloadcommandToStation(lbs_private * priv, static int DownloadcommandToStation(struct lbs_private *priv,
struct cmd_ctrl_node *cmdnode) struct cmd_ctrl_node *cmdnode)
{ {
unsigned long flags; unsigned long flags;
struct cmd_ds_command *cmdptr; struct cmd_ds_command *cmdptr;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = -1; int ret = -1;
u16 cmdsize; u16 cmdsize;
u16 command; u16 command;
...@@ -1060,7 +1062,7 @@ static int DownloadcommandToStation(lbs_private * priv, ...@@ -1060,7 +1062,7 @@ static int DownloadcommandToStation(lbs_private * priv,
return ret; return ret;
} }
static int lbs_cmd_mac_control(lbs_private * priv, static int lbs_cmd_mac_control(struct lbs_private *priv,
struct cmd_ds_command *cmd) struct cmd_ds_command *cmd)
{ {
struct cmd_ds_mac_control *mac = &cmd->params.macctrl; struct cmd_ds_mac_control *mac = &cmd->params.macctrl;
...@@ -1082,9 +1084,10 @@ static int lbs_cmd_mac_control(lbs_private * priv, ...@@ -1082,9 +1084,10 @@ static int lbs_cmd_mac_control(lbs_private * priv,
* This function inserts command node to cmdfreeq * This function inserts command node to cmdfreeq
* after cleans it. Requires adapter->driver_lock held. * after cleans it. Requires adapter->driver_lock held.
*/ */
void __lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptempcmd) void __lbs_cleanup_and_insert_cmd(struct lbs_private *priv,
struct cmd_ctrl_node *ptempcmd)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
if (!ptempcmd) if (!ptempcmd)
return; return;
...@@ -1093,7 +1096,8 @@ void __lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptem ...@@ -1093,7 +1096,8 @@ void __lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptem
list_add_tail((struct list_head *)ptempcmd, &adapter->cmdfreeq); list_add_tail((struct list_head *)ptempcmd, &adapter->cmdfreeq);
} }
static void lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptempcmd) static void lbs_cleanup_and_insert_cmd(struct lbs_private *priv,
struct cmd_ctrl_node *ptempcmd)
{ {
unsigned long flags; unsigned long flags;
...@@ -1102,7 +1106,7 @@ static void lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node ...@@ -1102,7 +1106,7 @@ static void lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node
spin_unlock_irqrestore(&priv->adapter->driver_lock, flags); spin_unlock_irqrestore(&priv->adapter->driver_lock, flags);
} }
int lbs_set_radio_control(lbs_private * priv) int lbs_set_radio_control(struct lbs_private *priv)
{ {
int ret = 0; int ret = 0;
...@@ -1120,7 +1124,7 @@ int lbs_set_radio_control(lbs_private * priv) ...@@ -1120,7 +1124,7 @@ int lbs_set_radio_control(lbs_private * priv)
return ret; return ret;
} }
int lbs_set_mac_packet_filter(lbs_private * priv) int lbs_set_mac_packet_filter(struct lbs_private *priv)
{ {
int ret = 0; int ret = 0;
...@@ -1137,7 +1141,7 @@ int lbs_set_mac_packet_filter(lbs_private * priv) ...@@ -1137,7 +1141,7 @@ int lbs_set_mac_packet_filter(lbs_private * priv)
/** /**
* @brief This function prepare the command before send to firmware. * @brief This function prepare the command before send to firmware.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param cmd_no command number * @param cmd_no command number
* @param cmd_action command action: GET or SET * @param cmd_action command action: GET or SET
* @param wait_option wait option: wait response or not * @param wait_option wait option: wait response or not
...@@ -1145,13 +1149,13 @@ int lbs_set_mac_packet_filter(lbs_private * priv) ...@@ -1145,13 +1149,13 @@ int lbs_set_mac_packet_filter(lbs_private * priv)
* @param pdata_buf A pointer to informaion buffer * @param pdata_buf A pointer to informaion buffer
* @return 0 or -1 * @return 0 or -1
*/ */
int lbs_prepare_and_send_command(lbs_private * priv, int lbs_prepare_and_send_command(struct lbs_private *priv,
u16 cmd_no, u16 cmd_no,
u16 cmd_action, u16 cmd_action,
u16 wait_option, u32 cmd_oid, void *pdata_buf) u16 wait_option, u32 cmd_oid, void *pdata_buf)
{ {
int ret = 0; int ret = 0;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *cmdnode; struct cmd_ctrl_node *cmdnode;
struct cmd_ds_command *cmdptr; struct cmd_ds_command *cmdptr;
unsigned long flags; unsigned long flags;
...@@ -1470,17 +1474,17 @@ EXPORT_SYMBOL_GPL(lbs_prepare_and_send_command); ...@@ -1470,17 +1474,17 @@ EXPORT_SYMBOL_GPL(lbs_prepare_and_send_command);
* @brief This function allocates the command buffer and link * @brief This function allocates the command buffer and link
* it to command free queue. * it to command free queue.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @return 0 or -1 * @return 0 or -1
*/ */
int lbs_allocate_cmd_buffer(lbs_private * priv) int lbs_allocate_cmd_buffer(struct lbs_private *priv)
{ {
int ret = 0; int ret = 0;
u32 ulbufsize; u32 ulbufsize;
u32 i; u32 i;
struct cmd_ctrl_node *tempcmd_array; struct cmd_ctrl_node *tempcmd_array;
u8 *ptempvirtualaddr; u8 *ptempvirtualaddr;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_HOST); lbs_deb_enter(LBS_DEB_HOST);
...@@ -1522,15 +1526,15 @@ int lbs_allocate_cmd_buffer(lbs_private * priv) ...@@ -1522,15 +1526,15 @@ int lbs_allocate_cmd_buffer(lbs_private * priv)
/** /**
* @brief This function frees the command buffer. * @brief This function frees the command buffer.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @return 0 or -1 * @return 0 or -1
*/ */
int lbs_free_cmd_buffer(lbs_private * priv) int lbs_free_cmd_buffer(struct lbs_private *priv)
{ {
u32 ulbufsize; /* Someone needs to die for this. Slowly and painfully */ u32 ulbufsize; /* Someone needs to die for this. Slowly and painfully */
unsigned int i; unsigned int i;
struct cmd_ctrl_node *tempcmd_array; struct cmd_ctrl_node *tempcmd_array;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_HOST); lbs_deb_enter(LBS_DEB_HOST);
...@@ -1566,13 +1570,13 @@ int lbs_free_cmd_buffer(lbs_private * priv) ...@@ -1566,13 +1570,13 @@ int lbs_free_cmd_buffer(lbs_private * priv)
* @brief This function gets a free command node if available in * @brief This function gets a free command node if available in
* command free queue. * command free queue.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @return cmd_ctrl_node A pointer to cmd_ctrl_node structure or NULL * @return cmd_ctrl_node A pointer to cmd_ctrl_node structure or NULL
*/ */
struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(lbs_private * priv) struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(struct lbs_private *priv)
{ {
struct cmd_ctrl_node *tempnode; struct cmd_ctrl_node *tempnode;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
unsigned long flags; unsigned long flags;
lbs_deb_enter(LBS_DEB_HOST); lbs_deb_enter(LBS_DEB_HOST);
...@@ -1627,14 +1631,14 @@ static void cleanup_cmdnode(struct cmd_ctrl_node *ptempnode) ...@@ -1627,14 +1631,14 @@ static void cleanup_cmdnode(struct cmd_ctrl_node *ptempnode)
/** /**
* @brief This function initializes the command node. * @brief This function initializes the command node.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param ptempnode A pointer to cmd_ctrl_node structure * @param ptempnode A pointer to cmd_ctrl_node structure
* @param cmd_oid cmd oid: treated as sub command * @param cmd_oid cmd oid: treated as sub command
* @param wait_option wait option: wait response or not * @param wait_option wait option: wait response or not
* @param pdata_buf A pointer to informaion buffer * @param pdata_buf A pointer to informaion buffer
* @return 0 or -1 * @return 0 or -1
*/ */
void lbs_set_cmd_ctrl_node(lbs_private * priv, void lbs_set_cmd_ctrl_node(struct lbs_private *priv,
struct cmd_ctrl_node *ptempnode, struct cmd_ctrl_node *ptempnode,
u32 cmd_oid, u16 wait_option, void *pdata_buf) u32 cmd_oid, u16 wait_option, void *pdata_buf)
{ {
...@@ -1655,12 +1659,12 @@ void lbs_set_cmd_ctrl_node(lbs_private * priv, ...@@ -1655,12 +1659,12 @@ void lbs_set_cmd_ctrl_node(lbs_private * priv,
* pending queue. It will put fimware back to PS mode * pending queue. It will put fimware back to PS mode
* if applicable. * if applicable.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @return 0 or -1 * @return 0 or -1
*/ */
int lbs_execute_next_command(lbs_private * priv) int lbs_execute_next_command(struct lbs_private *priv)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *cmdnode = NULL; struct cmd_ctrl_node *cmdnode = NULL;
struct cmd_ds_command *cmdptr; struct cmd_ds_command *cmdptr;
unsigned long flags; unsigned long flags;
...@@ -1807,7 +1811,7 @@ int lbs_execute_next_command(lbs_private * priv) ...@@ -1807,7 +1811,7 @@ int lbs_execute_next_command(lbs_private * priv)
return ret; return ret;
} }
void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str) void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str)
{ {
union iwreq_data iwrq; union iwreq_data iwrq;
u8 buf[50]; u8 buf[50];
...@@ -1831,10 +1835,10 @@ void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str) ...@@ -1831,10 +1835,10 @@ void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str)
lbs_deb_leave(LBS_DEB_WEXT); lbs_deb_leave(LBS_DEB_WEXT);
} }
static int sendconfirmsleep(lbs_private *priv, u8 *cmdptr, u16 size) static int sendconfirmsleep(struct lbs_private *priv, u8 *cmdptr, u16 size)
{ {
unsigned long flags; unsigned long flags;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
lbs_deb_enter(LBS_DEB_HOST); lbs_deb_enter(LBS_DEB_HOST);
...@@ -1873,7 +1877,7 @@ static int sendconfirmsleep(lbs_private *priv, u8 *cmdptr, u16 size) ...@@ -1873,7 +1877,7 @@ static int sendconfirmsleep(lbs_private *priv, u8 *cmdptr, u16 size)
return ret; return ret;
} }
void lbs_ps_sleep(lbs_private * priv, int wait_option) void lbs_ps_sleep(struct lbs_private *priv, int wait_option)
{ {
lbs_deb_enter(LBS_DEB_HOST); lbs_deb_enter(LBS_DEB_HOST);
...@@ -1891,11 +1895,11 @@ void lbs_ps_sleep(lbs_private * priv, int wait_option) ...@@ -1891,11 +1895,11 @@ void lbs_ps_sleep(lbs_private * priv, int wait_option)
/** /**
* @brief This function sends Exit_PS command to firmware. * @brief This function sends Exit_PS command to firmware.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param wait_option wait response or not * @param wait_option wait response or not
* @return n/a * @return n/a
*/ */
void lbs_ps_wakeup(lbs_private * priv, int wait_option) void lbs_ps_wakeup(struct lbs_private *priv, int wait_option)
{ {
__le32 Localpsmode; __le32 Localpsmode;
...@@ -1914,14 +1918,14 @@ void lbs_ps_wakeup(lbs_private * priv, int wait_option) ...@@ -1914,14 +1918,14 @@ void lbs_ps_wakeup(lbs_private * priv, int wait_option)
* @brief This function checks condition and prepares to * @brief This function checks condition and prepares to
* send sleep confirm command to firmware if ok. * send sleep confirm command to firmware if ok.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param psmode Power Saving mode * @param psmode Power Saving mode
* @return n/a * @return n/a
*/ */
void lbs_ps_confirm_sleep(lbs_private * priv, u16 psmode) void lbs_ps_confirm_sleep(struct lbs_private *priv, u16 psmode)
{ {
unsigned long flags =0; unsigned long flags =0;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
u8 allowed = 1; u8 allowed = 1;
lbs_deb_enter(LBS_DEB_HOST); lbs_deb_enter(LBS_DEB_HOST);
......
...@@ -20,12 +20,12 @@ ...@@ -20,12 +20,12 @@
* reports disconnect to upper layer, clean tx/rx packets, * reports disconnect to upper layer, clean tx/rx packets,
* reset link state etc. * reset link state etc.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @return n/a * @return n/a
*/ */
void lbs_mac_event_disconnected(lbs_private * priv) void lbs_mac_event_disconnected(struct lbs_private *priv)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
union iwreq_data wrqu; union iwreq_data wrqu;
if (adapter->connect_status != LBS_CONNECTED) if (adapter->connect_status != LBS_CONNECTED)
...@@ -85,11 +85,11 @@ void lbs_mac_event_disconnected(lbs_private * priv) ...@@ -85,11 +85,11 @@ void lbs_mac_event_disconnected(lbs_private * priv)
/** /**
* @brief This function handles MIC failure event. * @brief This function handles MIC failure event.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @para event the event id * @para event the event id
* @return n/a * @return n/a
*/ */
static void handle_mic_failureevent(lbs_private * priv, u32 event) static void handle_mic_failureevent(struct lbs_private *priv, u32 event)
{ {
char buf[50]; char buf[50];
...@@ -108,11 +108,11 @@ static void handle_mic_failureevent(lbs_private * priv, u32 event) ...@@ -108,11 +108,11 @@ static void handle_mic_failureevent(lbs_private * priv, u32 event)
lbs_deb_leave(LBS_DEB_CMD); lbs_deb_leave(LBS_DEB_CMD);
} }
static int lbs_ret_reg_access(lbs_private * priv, static int lbs_ret_reg_access(struct lbs_private *priv,
u16 type, struct cmd_ds_command *resp) u16 type, struct cmd_ds_command *resp)
{ {
int ret = 0; int ret = 0;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -152,12 +152,12 @@ static int lbs_ret_reg_access(lbs_private * priv, ...@@ -152,12 +152,12 @@ static int lbs_ret_reg_access(lbs_private * priv,
return ret; return ret;
} }
static int lbs_ret_get_hw_spec(lbs_private * priv, static int lbs_ret_get_hw_spec(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
u32 i; u32 i;
struct cmd_ds_get_hw_spec *hwspec = &resp->params.hwspec; struct cmd_ds_get_hw_spec *hwspec = &resp->params.hwspec;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac);
...@@ -216,11 +216,11 @@ static int lbs_ret_get_hw_spec(lbs_private * priv, ...@@ -216,11 +216,11 @@ static int lbs_ret_get_hw_spec(lbs_private * priv,
return ret; return ret;
} }
static int lbs_ret_802_11_sleep_params(lbs_private * priv, static int lbs_ret_802_11_sleep_params(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
struct cmd_ds_802_11_sleep_params *sp = &resp->params.sleep_params; struct cmd_ds_802_11_sleep_params *sp = &resp->params.sleep_params;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -240,14 +240,14 @@ static int lbs_ret_802_11_sleep_params(lbs_private * priv, ...@@ -240,14 +240,14 @@ static int lbs_ret_802_11_sleep_params(lbs_private * priv,
return 0; return 0;
} }
static int lbs_ret_802_11_stat(lbs_private * priv, static int lbs_ret_802_11_stat(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
/* currently adapter->wlan802_11Stat is unused /* currently adapter->wlan802_11Stat is unused
struct cmd_ds_802_11_get_stat *p11Stat = &resp->params.gstat; struct cmd_ds_802_11_get_stat *p11Stat = &resp->params.gstat;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
// TODO Convert it to Big endian befor copy // TODO Convert it to Big endian befor copy
memcpy(&adapter->wlan802_11Stat, memcpy(&adapter->wlan802_11Stat,
...@@ -257,7 +257,7 @@ static int lbs_ret_802_11_stat(lbs_private * priv, ...@@ -257,7 +257,7 @@ static int lbs_ret_802_11_stat(lbs_private * priv,
return 0; return 0;
} }
static int lbs_ret_802_11_snmp_mib(lbs_private * priv, static int lbs_ret_802_11_snmp_mib(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
struct cmd_ds_802_11_snmp_mib *smib = &resp->params.smib; struct cmd_ds_802_11_snmp_mib *smib = &resp->params.smib;
...@@ -299,12 +299,12 @@ static int lbs_ret_802_11_snmp_mib(lbs_private * priv, ...@@ -299,12 +299,12 @@ static int lbs_ret_802_11_snmp_mib(lbs_private * priv,
return 0; return 0;
} }
static int lbs_ret_802_11_key_material(lbs_private * priv, static int lbs_ret_802_11_key_material(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
struct cmd_ds_802_11_key_material *pkeymaterial = struct cmd_ds_802_11_key_material *pkeymaterial =
&resp->params.keymaterial; &resp->params.keymaterial;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
u16 action = le16_to_cpu(pkeymaterial->action); u16 action = le16_to_cpu(pkeymaterial->action);
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -355,11 +355,11 @@ static int lbs_ret_802_11_key_material(lbs_private * priv, ...@@ -355,11 +355,11 @@ static int lbs_ret_802_11_key_material(lbs_private * priv,
return 0; return 0;
} }
static int lbs_ret_802_11_mac_address(lbs_private * priv, static int lbs_ret_802_11_mac_address(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
struct cmd_ds_802_11_mac_address *macadd = &resp->params.macadd; struct cmd_ds_802_11_mac_address *macadd = &resp->params.macadd;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -369,11 +369,11 @@ static int lbs_ret_802_11_mac_address(lbs_private * priv, ...@@ -369,11 +369,11 @@ static int lbs_ret_802_11_mac_address(lbs_private * priv,
return 0; return 0;
} }
static int lbs_ret_802_11_rf_tx_power(lbs_private * priv, static int lbs_ret_802_11_rf_tx_power(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
struct cmd_ds_802_11_rf_tx_power *rtp = &resp->params.txp; struct cmd_ds_802_11_rf_tx_power *rtp = &resp->params.txp;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -385,11 +385,11 @@ static int lbs_ret_802_11_rf_tx_power(lbs_private * priv, ...@@ -385,11 +385,11 @@ static int lbs_ret_802_11_rf_tx_power(lbs_private * priv,
return 0; return 0;
} }
static int lbs_ret_802_11_rate_adapt_rateset(lbs_private * priv, static int lbs_ret_802_11_rate_adapt_rateset(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
struct cmd_ds_802_11_rate_adapt_rateset *rates = &resp->params.rateset; struct cmd_ds_802_11_rate_adapt_rateset *rates = &resp->params.rateset;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -402,11 +402,11 @@ static int lbs_ret_802_11_rate_adapt_rateset(lbs_private * priv, ...@@ -402,11 +402,11 @@ static int lbs_ret_802_11_rate_adapt_rateset(lbs_private * priv,
return 0; return 0;
} }
static int lbs_ret_802_11_data_rate(lbs_private * priv, static int lbs_ret_802_11_data_rate(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
struct cmd_ds_802_11_data_rate *pdatarate = &resp->params.drate; struct cmd_ds_802_11_data_rate *pdatarate = &resp->params.drate;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -423,11 +423,11 @@ static int lbs_ret_802_11_data_rate(lbs_private * priv, ...@@ -423,11 +423,11 @@ static int lbs_ret_802_11_data_rate(lbs_private * priv,
return 0; return 0;
} }
static int lbs_ret_802_11_rf_channel(lbs_private * priv, static int lbs_ret_802_11_rf_channel(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
struct cmd_ds_802_11_rf_channel *rfchannel = &resp->params.rfchannel; struct cmd_ds_802_11_rf_channel *rfchannel = &resp->params.rfchannel;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
u16 action = le16_to_cpu(rfchannel->action); u16 action = le16_to_cpu(rfchannel->action);
u16 newchannel = le16_to_cpu(rfchannel->currentchannel); u16 newchannel = le16_to_cpu(rfchannel->currentchannel);
...@@ -446,11 +446,11 @@ static int lbs_ret_802_11_rf_channel(lbs_private * priv, ...@@ -446,11 +446,11 @@ static int lbs_ret_802_11_rf_channel(lbs_private * priv,
return 0; return 0;
} }
static int lbs_ret_802_11_rssi(lbs_private * priv, static int lbs_ret_802_11_rssi(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
struct cmd_ds_802_11_rssi_rsp *rssirsp = &resp->params.rssirsp; struct cmd_ds_802_11_rssi_rsp *rssirsp = &resp->params.rssirsp;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -477,10 +477,10 @@ static int lbs_ret_802_11_rssi(lbs_private * priv, ...@@ -477,10 +477,10 @@ static int lbs_ret_802_11_rssi(lbs_private * priv,
return 0; return 0;
} }
static int lbs_ret_802_11_eeprom_access(lbs_private * priv, static int lbs_ret_802_11_eeprom_access(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct lbs_ioctl_regrdwr *pbuf; struct lbs_ioctl_regrdwr *pbuf;
pbuf = (struct lbs_ioctl_regrdwr *) adapter->prdeeprom; pbuf = (struct lbs_ioctl_regrdwr *) adapter->prdeeprom;
...@@ -503,11 +503,11 @@ static int lbs_ret_802_11_eeprom_access(lbs_private * priv, ...@@ -503,11 +503,11 @@ static int lbs_ret_802_11_eeprom_access(lbs_private * priv,
return 0; return 0;
} }
static int lbs_ret_get_log(lbs_private * priv, static int lbs_ret_get_log(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
struct cmd_ds_802_11_get_log *logmessage = &resp->params.glog; struct cmd_ds_802_11_get_log *logmessage = &resp->params.glog;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -518,11 +518,11 @@ static int lbs_ret_get_log(lbs_private * priv, ...@@ -518,11 +518,11 @@ static int lbs_ret_get_log(lbs_private * priv,
return 0; return 0;
} }
static int lbs_ret_802_11_enable_rsn(lbs_private * priv, static int lbs_ret_802_11_enable_rsn(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
struct cmd_ds_802_11_enable_rsn *enable_rsn = &resp->params.enbrsn; struct cmd_ds_802_11_enable_rsn *enable_rsn = &resp->params.enbrsn;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
u32 * pdata_buf = adapter->cur_cmd->pdata_buf; u32 * pdata_buf = adapter->cur_cmd->pdata_buf;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
...@@ -556,11 +556,11 @@ static int lbs_ret_802_11_bcn_ctrl(struct lbs_private * priv, ...@@ -556,11 +556,11 @@ static int lbs_ret_802_11_bcn_ctrl(struct lbs_private * priv,
static inline int handle_cmd_response(u16 respcmd, static inline int handle_cmd_response(u16 respcmd,
struct cmd_ds_command *resp, struct cmd_ds_command *resp,
lbs_private *priv) struct lbs_private *priv)
{ {
int ret = 0; int ret = 0;
unsigned long flags; unsigned long flags;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_HOST); lbs_deb_enter(LBS_DEB_HOST);
...@@ -735,11 +735,11 @@ static inline int handle_cmd_response(u16 respcmd, ...@@ -735,11 +735,11 @@ static inline int handle_cmd_response(u16 respcmd,
return ret; return ret;
} }
int lbs_process_rx_command(lbs_private * priv) int lbs_process_rx_command(struct lbs_private *priv)
{ {
u16 respcmd; u16 respcmd;
struct cmd_ds_command *resp; struct cmd_ds_command *resp;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
ulong flags; ulong flags;
u16 result; u16 result;
...@@ -888,10 +888,10 @@ int lbs_process_rx_command(lbs_private * priv) ...@@ -888,10 +888,10 @@ int lbs_process_rx_command(lbs_private * priv)
return ret; return ret;
} }
int lbs_process_event(lbs_private * priv) int lbs_process_event(struct lbs_private *priv)
{ {
int ret = 0; int ret = 0;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
u32 eventcause; u32 eventcause;
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
......
...@@ -18,7 +18,7 @@ static char *szStates[] = { ...@@ -18,7 +18,7 @@ static char *szStates[] = {
}; };
#ifdef PROC_DEBUG #ifdef PROC_DEBUG
static void lbs_debug_init(lbs_private * priv, struct net_device *dev); static void lbs_debug_init(struct lbs_private *priv, struct net_device *dev);
#endif #endif
static int open_file_generic(struct inode *inode, struct file *file) static int open_file_generic(struct inode *inode, struct file *file)
...@@ -38,7 +38,7 @@ static const size_t len = PAGE_SIZE; ...@@ -38,7 +38,7 @@ static const size_t len = PAGE_SIZE;
static ssize_t lbs_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) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
size_t pos = 0; size_t pos = 0;
unsigned long addr = get_zeroed_page(GFP_KERNEL); unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr; char *buf = (char *)addr;
...@@ -59,7 +59,7 @@ static ssize_t lbs_dev_info(struct file *file, char __user *userbuf, ...@@ -59,7 +59,7 @@ static ssize_t lbs_dev_info(struct file *file, char __user *userbuf,
static ssize_t lbs_getscantable(struct file *file, char __user *userbuf, static ssize_t lbs_getscantable(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
size_t pos = 0; size_t pos = 0;
int numscansdone = 0, res; int numscansdone = 0, res;
unsigned long addr = get_zeroed_page(GFP_KERNEL); unsigned long addr = get_zeroed_page(GFP_KERNEL);
...@@ -102,7 +102,7 @@ static ssize_t lbs_sleepparams_write(struct file *file, ...@@ -102,7 +102,7 @@ static ssize_t lbs_sleepparams_write(struct file *file,
const char __user *user_buf, size_t count, const char __user *user_buf, size_t count,
loff_t *ppos) loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
ssize_t buf_size, res; ssize_t buf_size, res;
int p1, p2, p3, p4, p5, p6; int p1, p2, p3, p4, p5, p6;
unsigned long addr = get_zeroed_page(GFP_KERNEL); unsigned long addr = get_zeroed_page(GFP_KERNEL);
...@@ -143,8 +143,8 @@ static ssize_t lbs_sleepparams_write(struct file *file, ...@@ -143,8 +143,8 @@ static ssize_t lbs_sleepparams_write(struct file *file,
static ssize_t lbs_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) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
ssize_t res; ssize_t res;
size_t pos = 0; size_t pos = 0;
unsigned long addr = get_zeroed_page(GFP_KERNEL); unsigned long addr = get_zeroed_page(GFP_KERNEL);
...@@ -174,7 +174,7 @@ static ssize_t lbs_sleepparams_read(struct file *file, char __user *userbuf, ...@@ -174,7 +174,7 @@ static ssize_t lbs_sleepparams_read(struct file *file, char __user *userbuf,
static ssize_t lbs_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) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
ssize_t res, buf_size; ssize_t res, buf_size;
union iwreq_data wrqu; union iwreq_data wrqu;
unsigned long addr = get_zeroed_page(GFP_KERNEL); unsigned long addr = get_zeroed_page(GFP_KERNEL);
...@@ -342,7 +342,7 @@ static ssize_t lbs_setuserscan(struct file *file, ...@@ -342,7 +342,7 @@ static ssize_t lbs_setuserscan(struct file *file,
const char __user *userbuf, const char __user *userbuf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
ssize_t res, buf_size; ssize_t res, buf_size;
struct lbs_ioctl_user_scan_cfg *scan_cfg; struct lbs_ioctl_user_scan_cfg *scan_cfg;
union iwreq_data wrqu; union iwreq_data wrqu;
...@@ -384,7 +384,7 @@ static ssize_t lbs_setuserscan(struct file *file, ...@@ -384,7 +384,7 @@ static ssize_t lbs_setuserscan(struct file *file,
return count; return count;
} }
static int lbs_event_initcmd(lbs_private *priv, void **response_buf, static int lbs_event_initcmd(struct lbs_private *priv, void **response_buf,
struct cmd_ctrl_node **cmdnode, struct cmd_ctrl_node **cmdnode,
struct cmd_ds_command **cmd) struct cmd_ds_command **cmd)
{ {
...@@ -413,8 +413,8 @@ static int lbs_event_initcmd(lbs_private *priv, void **response_buf, ...@@ -413,8 +413,8 @@ static int lbs_event_initcmd(lbs_private *priv, void **response_buf,
static ssize_t lbs_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) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *pcmdnode; struct cmd_ctrl_node *pcmdnode;
struct cmd_ds_command *pcmdptr; struct cmd_ds_command *pcmdptr;
struct cmd_ds_802_11_subscribe_event *event; struct cmd_ds_802_11_subscribe_event *event;
...@@ -480,9 +480,9 @@ static ssize_t lbs_lowrssi_read(struct file *file, char __user *userbuf, ...@@ -480,9 +480,9 @@ static ssize_t lbs_lowrssi_read(struct file *file, char __user *userbuf,
return res; return res;
} }
static u16 lbs_get_events_bitmap(lbs_private *priv) static u16 lbs_get_events_bitmap(struct lbs_private *priv)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *pcmdnode; struct cmd_ctrl_node *pcmdnode;
struct cmd_ds_command *pcmdptr; struct cmd_ds_command *pcmdptr;
struct cmd_ds_802_11_subscribe_event *event; struct cmd_ds_802_11_subscribe_event *event;
...@@ -529,8 +529,8 @@ static ssize_t lbs_lowrssi_write(struct file *file, ...@@ -529,8 +529,8 @@ static ssize_t lbs_lowrssi_write(struct file *file,
const char __user *userbuf, const char __user *userbuf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
ssize_t res, buf_size; ssize_t res, buf_size;
int value, freq, subscribed, cmd_len; int value, freq, subscribed, cmd_len;
struct cmd_ctrl_node *pcmdnode; struct cmd_ctrl_node *pcmdnode;
...@@ -609,8 +609,8 @@ static ssize_t lbs_lowrssi_write(struct file *file, ...@@ -609,8 +609,8 @@ static ssize_t lbs_lowrssi_write(struct file *file,
static ssize_t lbs_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) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *pcmdnode; struct cmd_ctrl_node *pcmdnode;
struct cmd_ds_command *pcmdptr; struct cmd_ds_command *pcmdptr;
struct cmd_ds_802_11_subscribe_event *event; struct cmd_ds_802_11_subscribe_event *event;
...@@ -682,8 +682,8 @@ static ssize_t lbs_lowsnr_write(struct file *file, ...@@ -682,8 +682,8 @@ static ssize_t lbs_lowsnr_write(struct file *file,
const char __user *userbuf, const char __user *userbuf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
ssize_t res, buf_size; ssize_t res, buf_size;
int value, freq, subscribed, cmd_len; int value, freq, subscribed, cmd_len;
struct cmd_ctrl_node *pcmdnode; struct cmd_ctrl_node *pcmdnode;
...@@ -762,8 +762,8 @@ static ssize_t lbs_lowsnr_write(struct file *file, ...@@ -762,8 +762,8 @@ static ssize_t lbs_lowsnr_write(struct file *file,
static ssize_t lbs_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) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *pcmdnode; struct cmd_ctrl_node *pcmdnode;
struct cmd_ds_command *pcmdptr; struct cmd_ds_command *pcmdptr;
struct cmd_ds_802_11_subscribe_event *event; struct cmd_ds_802_11_subscribe_event *event;
...@@ -834,8 +834,8 @@ static ssize_t lbs_failcount_write(struct file *file, ...@@ -834,8 +834,8 @@ static ssize_t lbs_failcount_write(struct file *file,
const char __user *userbuf, const char __user *userbuf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
ssize_t res, buf_size; ssize_t res, buf_size;
int value, freq, subscribed, cmd_len; int value, freq, subscribed, cmd_len;
struct cmd_ctrl_node *pcmdnode; struct cmd_ctrl_node *pcmdnode;
...@@ -913,8 +913,8 @@ static ssize_t lbs_failcount_write(struct file *file, ...@@ -913,8 +913,8 @@ static ssize_t lbs_failcount_write(struct file *file,
static ssize_t lbs_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) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *pcmdnode; struct cmd_ctrl_node *pcmdnode;
struct cmd_ds_command *pcmdptr; struct cmd_ds_command *pcmdptr;
struct cmd_ds_802_11_subscribe_event *event; struct cmd_ds_802_11_subscribe_event *event;
...@@ -985,8 +985,8 @@ static ssize_t lbs_bcnmiss_write(struct file *file, ...@@ -985,8 +985,8 @@ static ssize_t lbs_bcnmiss_write(struct file *file,
const char __user *userbuf, const char __user *userbuf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
ssize_t res, buf_size; ssize_t res, buf_size;
int value, freq, subscribed, cmd_len; int value, freq, subscribed, cmd_len;
struct cmd_ctrl_node *pcmdnode; struct cmd_ctrl_node *pcmdnode;
...@@ -1063,8 +1063,8 @@ static ssize_t lbs_bcnmiss_write(struct file *file, ...@@ -1063,8 +1063,8 @@ static ssize_t lbs_bcnmiss_write(struct file *file,
static ssize_t lbs_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) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *pcmdnode; struct cmd_ctrl_node *pcmdnode;
struct cmd_ds_command *pcmdptr; struct cmd_ds_command *pcmdptr;
struct cmd_ds_802_11_subscribe_event *event; struct cmd_ds_802_11_subscribe_event *event;
...@@ -1136,8 +1136,8 @@ static ssize_t lbs_highrssi_write(struct file *file, ...@@ -1136,8 +1136,8 @@ static ssize_t lbs_highrssi_write(struct file *file,
const char __user *userbuf, const char __user *userbuf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
ssize_t res, buf_size; ssize_t res, buf_size;
int value, freq, subscribed, cmd_len; int value, freq, subscribed, cmd_len;
struct cmd_ctrl_node *pcmdnode; struct cmd_ctrl_node *pcmdnode;
...@@ -1213,8 +1213,8 @@ static ssize_t lbs_highrssi_write(struct file *file, ...@@ -1213,8 +1213,8 @@ static ssize_t lbs_highrssi_write(struct file *file,
static ssize_t lbs_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) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *pcmdnode; struct cmd_ctrl_node *pcmdnode;
struct cmd_ds_command *pcmdptr; struct cmd_ds_command *pcmdptr;
struct cmd_ds_802_11_subscribe_event *event; struct cmd_ds_802_11_subscribe_event *event;
...@@ -1286,8 +1286,8 @@ static ssize_t lbs_highsnr_write(struct file *file, ...@@ -1286,8 +1286,8 @@ static ssize_t lbs_highsnr_write(struct file *file,
const char __user *userbuf, const char __user *userbuf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
ssize_t res, buf_size; ssize_t res, buf_size;
int value, freq, subscribed, cmd_len; int value, freq, subscribed, cmd_len;
struct cmd_ctrl_node *pcmdnode; struct cmd_ctrl_node *pcmdnode;
...@@ -1365,8 +1365,8 @@ static ssize_t lbs_highsnr_write(struct file *file, ...@@ -1365,8 +1365,8 @@ static ssize_t lbs_highsnr_write(struct file *file,
static ssize_t lbs_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) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct lbs_offset_value offval; struct lbs_offset_value offval;
ssize_t pos = 0; ssize_t pos = 0;
int ret; int ret;
...@@ -1392,7 +1392,7 @@ static ssize_t lbs_rdmac_write(struct file *file, ...@@ -1392,7 +1392,7 @@ static ssize_t lbs_rdmac_write(struct file *file,
const char __user *userbuf, const char __user *userbuf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
ssize_t res, buf_size; ssize_t res, buf_size;
unsigned long addr = get_zeroed_page(GFP_KERNEL); unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr; char *buf = (char *)addr;
...@@ -1414,7 +1414,7 @@ static ssize_t lbs_wrmac_write(struct file *file, ...@@ -1414,7 +1414,7 @@ static ssize_t lbs_wrmac_write(struct file *file,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
ssize_t res, buf_size; ssize_t res, buf_size;
u32 offset, value; u32 offset, value;
struct lbs_offset_value offval; struct lbs_offset_value offval;
...@@ -1448,8 +1448,8 @@ static ssize_t lbs_wrmac_write(struct file *file, ...@@ -1448,8 +1448,8 @@ static ssize_t lbs_wrmac_write(struct file *file,
static ssize_t lbs_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) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct lbs_offset_value offval; struct lbs_offset_value offval;
ssize_t pos = 0; ssize_t pos = 0;
int ret; int ret;
...@@ -1476,7 +1476,7 @@ static ssize_t lbs_rdbbp_write(struct file *file, ...@@ -1476,7 +1476,7 @@ static ssize_t lbs_rdbbp_write(struct file *file,
const char __user *userbuf, const char __user *userbuf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
ssize_t res, buf_size; ssize_t res, buf_size;
unsigned long addr = get_zeroed_page(GFP_KERNEL); unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr; char *buf = (char *)addr;
...@@ -1498,7 +1498,7 @@ static ssize_t lbs_wrbbp_write(struct file *file, ...@@ -1498,7 +1498,7 @@ static ssize_t lbs_wrbbp_write(struct file *file,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
ssize_t res, buf_size; ssize_t res, buf_size;
u32 offset, value; u32 offset, value;
struct lbs_offset_value offval; struct lbs_offset_value offval;
...@@ -1532,8 +1532,8 @@ static ssize_t lbs_wrbbp_write(struct file *file, ...@@ -1532,8 +1532,8 @@ static ssize_t lbs_wrbbp_write(struct file *file,
static ssize_t lbs_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) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct lbs_offset_value offval; struct lbs_offset_value offval;
ssize_t pos = 0; ssize_t pos = 0;
int ret; int ret;
...@@ -1560,7 +1560,7 @@ static ssize_t lbs_rdrf_write(struct file *file, ...@@ -1560,7 +1560,7 @@ static ssize_t lbs_rdrf_write(struct file *file,
const char __user *userbuf, const char __user *userbuf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
ssize_t res, buf_size; ssize_t res, buf_size;
unsigned long addr = get_zeroed_page(GFP_KERNEL); unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr; char *buf = (char *)addr;
...@@ -1582,7 +1582,7 @@ static ssize_t lbs_wrrf_write(struct file *file, ...@@ -1582,7 +1582,7 @@ static ssize_t lbs_wrrf_write(struct file *file,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
lbs_private *priv = file->private_data; struct lbs_private *priv = file->private_data;
ssize_t res, buf_size; ssize_t res, buf_size;
u32 offset, value; u32 offset, value;
struct lbs_offset_value offval; struct lbs_offset_value offval;
...@@ -1675,7 +1675,7 @@ void lbs_debugfs_remove(void) ...@@ -1675,7 +1675,7 @@ void lbs_debugfs_remove(void)
return; return;
} }
void lbs_debugfs_init_one(lbs_private *priv, struct net_device *dev) void lbs_debugfs_init_one(struct lbs_private *priv, struct net_device *dev)
{ {
int i; int i;
struct lbs_debugfs_files *files; struct lbs_debugfs_files *files;
...@@ -1728,7 +1728,7 @@ void lbs_debugfs_init_one(lbs_private *priv, struct net_device *dev) ...@@ -1728,7 +1728,7 @@ void lbs_debugfs_init_one(lbs_private *priv, struct net_device *dev)
return; return;
} }
void lbs_debugfs_remove_one(lbs_private *priv) void lbs_debugfs_remove_one(struct lbs_private *priv)
{ {
int i; int i;
...@@ -1755,8 +1755,8 @@ void lbs_debugfs_remove_one(lbs_private *priv) ...@@ -1755,8 +1755,8 @@ void lbs_debugfs_remove_one(lbs_private *priv)
#ifdef PROC_DEBUG #ifdef PROC_DEBUG
#define item_size(n) (FIELD_SIZEOF(lbs_adapter, n)) #define item_size(n) (FIELD_SIZEOF(struct lbs_adapter, n))
#define item_addr(n) (offsetof(lbs_adapter, n)) #define item_addr(n) (offsetof(struct lbs_adapter, n))
struct debug_data { struct debug_data {
...@@ -1765,7 +1765,7 @@ struct debug_data { ...@@ -1765,7 +1765,7 @@ struct debug_data {
size_t addr; size_t addr;
}; };
/* To debug any member of lbs_adapter, simply add one line here. /* To debug any member of struct lbs_adapter, simply add one line here.
*/ */
static struct debug_data items[] = { static struct debug_data items[] = {
{"intcounter", item_size(intcounter), item_addr(intcounter)}, {"intcounter", item_size(intcounter), item_addr(intcounter)},
...@@ -1892,11 +1892,11 @@ static struct file_operations lbs_debug_fops = { ...@@ -1892,11 +1892,11 @@ static struct file_operations lbs_debug_fops = {
/** /**
* @brief create debug proc file * @brief create debug proc file
* *
* @param priv pointer lbs_private * @param priv pointer struct lbs_private
* @param dev pointer net_device * @param dev pointer net_device
* @return N/A * @return N/A
*/ */
static void lbs_debug_init(lbs_private * priv, struct net_device *dev) static void lbs_debug_init(struct lbs_private *priv, struct net_device *dev)
{ {
int i; int i;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
void lbs_debugfs_init(void); void lbs_debugfs_init(void);
void lbs_debugfs_remove(void); void lbs_debugfs_remove(void);
void lbs_debugfs_init_one(lbs_private *priv, struct net_device *dev); void lbs_debugfs_init_one(struct lbs_private *priv, struct net_device *dev);
void lbs_debugfs_remove_one(lbs_private *priv); void lbs_debugfs_remove_one(struct lbs_private *priv);
#endif #endif
...@@ -12,71 +12,79 @@ ...@@ -12,71 +12,79 @@
/** Function Prototype Declaration */ /** Function Prototype Declaration */
struct lbs_private; struct lbs_private;
struct lbs_adapter;
struct sk_buff; struct sk_buff;
struct net_device; struct net_device;
int lbs_set_mac_packet_filter(lbs_private * priv); int lbs_set_mac_packet_filter(struct lbs_private *priv);
void lbs_send_tx_feedback(lbs_private * priv); void lbs_send_tx_feedback(struct lbs_private *priv);
int lbs_free_cmd_buffer(lbs_private * priv); int lbs_free_cmd_buffer(struct lbs_private *priv);
struct cmd_ctrl_node; struct cmd_ctrl_node;
struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(lbs_private * priv); struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(struct lbs_private *priv);
void lbs_set_cmd_ctrl_node(lbs_private * priv, void lbs_set_cmd_ctrl_node(struct lbs_private *priv,
struct cmd_ctrl_node *ptempnode, struct cmd_ctrl_node *ptempnode,
u32 cmd_oid, u16 wait_option, void *pdata_buf); u32 cmd_oid, u16 wait_option, void *pdata_buf);
int lbs_prepare_and_send_command(lbs_private * priv, int lbs_prepare_and_send_command(struct lbs_private *priv,
u16 cmd_no, u16 cmd_no,
u16 cmd_action, u16 cmd_action,
u16 wait_option, u32 cmd_oid, void *pdata_buf); u16 wait_option, u32 cmd_oid, void *pdata_buf);
void lbs_queue_cmd(lbs_adapter *adapter, struct cmd_ctrl_node *cmdnode, u8 addtail); void lbs_queue_cmd(struct lbs_adapter *adapter,
struct cmd_ctrl_node *cmdnode,
u8 addtail);
int lbs_allocate_cmd_buffer(lbs_private * priv); int lbs_allocate_cmd_buffer(struct lbs_private *priv);
int lbs_execute_next_command(lbs_private * priv); int lbs_execute_next_command(struct lbs_private *priv);
int lbs_process_event(lbs_private * priv); int lbs_process_event(struct lbs_private *priv);
void lbs_interrupt(struct net_device *); void lbs_interrupt(struct net_device *);
int lbs_set_radio_control(lbs_private * priv); int lbs_set_radio_control(struct lbs_private *priv);
u32 lbs_fw_index_to_data_rate(u8 index); u32 lbs_fw_index_to_data_rate(u8 index);
u8 lbs_data_rate_to_fw_index(u32 rate); u8 lbs_data_rate_to_fw_index(u32 rate);
void lbs_get_fwversion(lbs_adapter *adapter, char *fwversion, int maxlen); void lbs_get_fwversion(struct lbs_adapter *adapter,
char *fwversion,
int maxlen);
void lbs_upload_rx_packet(lbs_private * priv, struct sk_buff *skb); void lbs_upload_rx_packet(struct lbs_private *priv, struct sk_buff *skb);
/** The proc fs interface */ /** The proc fs interface */
int lbs_process_rx_command(lbs_private * priv); int lbs_process_rx_command(struct lbs_private *priv);
int lbs_process_tx(lbs_private * priv, struct sk_buff *skb); int lbs_process_tx(struct lbs_private *priv, struct sk_buff *skb);
void __lbs_cleanup_and_insert_cmd(lbs_private * priv, void __lbs_cleanup_and_insert_cmd(struct lbs_private *priv,
struct cmd_ctrl_node *ptempcmd); struct cmd_ctrl_node *ptempcmd);
int lbs_set_regiontable(lbs_private * priv, u8 region, u8 band); int lbs_set_regiontable(struct lbs_private *priv, u8 region, u8 band);
int lbs_process_rxed_packet(lbs_private * priv, struct sk_buff *); int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *);
void lbs_ps_sleep(lbs_private * priv, int wait_option); void lbs_ps_sleep(struct lbs_private *priv, int wait_option);
void lbs_ps_confirm_sleep(lbs_private * priv, u16 psmode); void lbs_ps_confirm_sleep(struct lbs_private *priv, u16 psmode);
void lbs_ps_wakeup(lbs_private * priv, int wait_option); void lbs_ps_wakeup(struct lbs_private *priv, int wait_option);
void lbs_tx_runqueue(lbs_private *priv); void lbs_tx_runqueue(struct lbs_private *priv);
struct chan_freq_power *lbs_find_cfp_by_band_and_channel( struct chan_freq_power *lbs_find_cfp_by_band_and_channel(
lbs_adapter *adapter, u8 band, u16 channel); struct lbs_adapter *adapter,
u8 band,
u16 channel);
void lbs_mac_event_disconnected(lbs_private * priv); void lbs_mac_event_disconnected(struct lbs_private *priv);
void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str); void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str);
/* main.c */ /* main.c */
struct chan_freq_power *lbs_get_region_cfp_table(u8 region, u8 band, struct chan_freq_power *lbs_get_region_cfp_table(u8 region,
u8 band,
int *cfp_no); int *cfp_no);
lbs_private *lbs_add_card(void *card, struct device *dmdev); struct lbs_private *lbs_add_card(void *card, struct device *dmdev);
int lbs_remove_card(lbs_private *priv); int lbs_remove_card(struct lbs_private *priv);
int lbs_start_card(lbs_private *priv); int lbs_start_card(struct lbs_private *priv);
int lbs_stop_card(lbs_private *priv); int lbs_stop_card(struct lbs_private *priv);
int lbs_add_mesh(lbs_private *priv, struct device *dev); int lbs_add_mesh(struct lbs_private *priv, struct device *dev);
void lbs_remove_mesh(lbs_private *priv); void lbs_remove_mesh(struct lbs_private *priv);
int lbs_reset_device(lbs_private *priv); int lbs_reset_device(struct lbs_private *priv);
#endif #endif
...@@ -262,8 +262,6 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in ...@@ -262,8 +262,6 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
#define UNSET_MESH_FRAME(x) (x->cb[6]=0) #define UNSET_MESH_FRAME(x) (x->cb[6]=0)
/** Global Variable Declaration */ /** Global Variable Declaration */
typedef struct _lbs_private lbs_private;
typedef struct _lbs_adapter lbs_adapter;
extern const char lbs_driver_version[]; extern const char lbs_driver_version[];
extern u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE]; extern u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE];
......
/** /**
* This file contains definitions and data structures specific * This file contains definitions and data structures specific
* to Marvell 802.11 NIC. It contains the Device Information * to Marvell 802.11 NIC. It contains the Device Information
* structure lbs_adapter. * structure struct lbs_adapter.
*/ */
#ifndef _LBS_DEV_H_ #ifndef _LBS_DEV_H_
#define _LBS_DEV_H_ #define _LBS_DEV_H_
...@@ -99,7 +99,7 @@ struct lbs_mesh_stats { ...@@ -99,7 +99,7 @@ struct lbs_mesh_stats {
}; };
/** Private structure for the MV device */ /** Private structure for the MV device */
struct _lbs_private { struct lbs_private {
int open; int open;
int mesh_open; int mesh_open;
int infra_open; int infra_open;
...@@ -109,7 +109,7 @@ struct _lbs_private { ...@@ -109,7 +109,7 @@ struct _lbs_private {
char name[DEV_NAME_LEN]; char name[DEV_NAME_LEN];
void *card; void *card;
lbs_adapter *adapter; struct lbs_adapter *adapter;
struct net_device *dev; struct net_device *dev;
struct net_device_stats stats; struct net_device_stats stats;
...@@ -155,9 +155,9 @@ struct _lbs_private { ...@@ -155,9 +155,9 @@ struct _lbs_private {
struct work_struct sync_channel; struct work_struct sync_channel;
/** Hardware access */ /** Hardware access */
int (*hw_host_to_card) (lbs_private *priv, u8 type, u8 *payload, u16 nb); int (*hw_host_to_card) (struct lbs_private *priv, u8 type, u8 *payload, u16 nb);
int (*hw_get_int_status) (lbs_private *priv, u8 *); int (*hw_get_int_status) (struct lbs_private *priv, u8 *);
int (*hw_read_event_cause) (lbs_private *); int (*hw_read_event_cause) (struct lbs_private *);
}; };
/** Association request /** Association request
...@@ -205,7 +205,7 @@ struct assoc_request { ...@@ -205,7 +205,7 @@ struct assoc_request {
}; };
/** Wlan adapter data structure*/ /** Wlan adapter data structure*/
struct _lbs_adapter { struct lbs_adapter {
/** STATUS variables */ /** STATUS variables */
u8 fwreleasenumber[4]; u8 fwreleasenumber[4];
u32 fwcapinfo; u32 fwcapinfo;
......
...@@ -22,7 +22,7 @@ static const char * mesh_stat_strings[]= { ...@@ -22,7 +22,7 @@ static const char * mesh_stat_strings[]= {
static void lbs_ethtool_get_drvinfo(struct net_device *dev, static void lbs_ethtool_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info) struct ethtool_drvinfo *info)
{ {
lbs_private *priv = (lbs_private *) dev->priv; struct lbs_private *priv = (struct lbs_private *) dev->priv;
char fwver[32]; char fwver[32];
lbs_get_fwversion(priv->adapter, fwver, sizeof(fwver) - 1); lbs_get_fwversion(priv->adapter, fwver, sizeof(fwver) - 1);
...@@ -45,8 +45,8 @@ static int lbs_ethtool_get_eeprom_len(struct net_device *dev) ...@@ -45,8 +45,8 @@ static int lbs_ethtool_get_eeprom_len(struct net_device *dev)
static int lbs_ethtool_get_eeprom(struct net_device *dev, static int lbs_ethtool_get_eeprom(struct net_device *dev,
struct ethtool_eeprom *eeprom, u8 * bytes) struct ethtool_eeprom *eeprom, u8 * bytes)
{ {
lbs_private *priv = (lbs_private *) dev->priv; struct lbs_private *priv = (struct lbs_private *) dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct lbs_ioctl_regrdwr regctrl; struct lbs_ioctl_regrdwr regctrl;
char *ptr; char *ptr;
int ret; int ret;
...@@ -108,7 +108,7 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev, ...@@ -108,7 +108,7 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev,
static void lbs_ethtool_get_stats(struct net_device * dev, static void lbs_ethtool_get_stats(struct net_device * dev,
struct ethtool_stats * stats, u64 * data) struct ethtool_stats * stats, u64 * data)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
struct cmd_ds_mesh_access mesh_access; struct cmd_ds_mesh_access mesh_access;
int ret; int ret;
......
...@@ -57,7 +57,7 @@ MODULE_LICENSE("GPL"); ...@@ -57,7 +57,7 @@ MODULE_LICENSE("GPL");
struct if_cs_card { struct if_cs_card {
struct pcmcia_device *p_dev; struct pcmcia_device *p_dev;
lbs_private *priv; struct lbs_private *priv;
void __iomem *iobase; void __iomem *iobase;
}; };
...@@ -286,7 +286,7 @@ static irqreturn_t if_cs_interrupt(int irq, void *data) ...@@ -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 * Called from if_cs_host_to_card to send a command to the hardware
*/ */
static int if_cs_send_cmd(lbs_private *priv, u8 *buf, u16 nb) static int if_cs_send_cmd(struct lbs_private *priv, u8 *buf, u16 nb)
{ {
struct if_cs_card *card = (struct if_cs_card *)priv->card; struct if_cs_card *card = (struct if_cs_card *)priv->card;
int ret = -1; int ret = -1;
...@@ -331,7 +331,7 @@ static int if_cs_send_cmd(lbs_private *priv, u8 *buf, u16 nb) ...@@ -331,7 +331,7 @@ static int if_cs_send_cmd(lbs_private *priv, u8 *buf, u16 nb)
/* /*
* Called from if_cs_host_to_card to send a data to the hardware * Called from if_cs_host_to_card to send a data to the hardware
*/ */
static void if_cs_send_data(lbs_private *priv, u8 *buf, u16 nb) static void if_cs_send_data(struct lbs_private *priv, u8 *buf, u16 nb)
{ {
struct if_cs_card *card = (struct if_cs_card *)priv->card; struct if_cs_card *card = (struct if_cs_card *)priv->card;
...@@ -354,7 +354,7 @@ static void if_cs_send_data(lbs_private *priv, u8 *buf, u16 nb) ...@@ -354,7 +354,7 @@ static void if_cs_send_data(lbs_private *priv, u8 *buf, u16 nb)
/* /*
* Get the command result out of the card. * Get the command result out of the card.
*/ */
static int if_cs_receive_cmdres(lbs_private *priv, u8 *data, u32 *len) static int if_cs_receive_cmdres(struct lbs_private *priv, u8 *data, u32 *len)
{ {
int ret = -1; int ret = -1;
u16 val; u16 val;
...@@ -386,7 +386,7 @@ static int if_cs_receive_cmdres(lbs_private *priv, u8 *data, u32 *len) ...@@ -386,7 +386,7 @@ static int if_cs_receive_cmdres(lbs_private *priv, u8 *data, u32 *len)
} }
static struct sk_buff *if_cs_receive_data(lbs_private *priv) static struct sk_buff *if_cs_receive_data(struct lbs_private *priv)
{ {
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
u16 len; u16 len;
...@@ -616,7 +616,10 @@ static int if_cs_prog_real(struct if_cs_card *card) ...@@ -616,7 +616,10 @@ static int if_cs_prog_real(struct if_cs_card *card)
/********************************************************************/ /********************************************************************/
/* Send commands or data packets to the card */ /* Send commands or data packets to the card */
static int if_cs_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb) static int if_cs_host_to_card(struct lbs_private *priv,
u8 type,
u8 *buf,
u16 nb)
{ {
int ret = -1; int ret = -1;
...@@ -641,10 +644,10 @@ static int if_cs_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb) ...@@ -641,10 +644,10 @@ static int if_cs_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb)
} }
static int if_cs_get_int_status(lbs_private *priv, u8 *ireg) static int if_cs_get_int_status(struct lbs_private *priv, u8 *ireg)
{ {
struct if_cs_card *card = (struct if_cs_card *)priv->card; struct if_cs_card *card = (struct if_cs_card *)priv->card;
/* lbs_adapter *adapter = priv->adapter; */ /* struct lbs_adapter *adapter = priv->adapter; */
int ret = 0; int ret = 0;
u16 int_cause; u16 int_cause;
u8 *cmdbuf; u8 *cmdbuf;
...@@ -698,7 +701,7 @@ static int if_cs_get_int_status(lbs_private *priv, u8 *ireg) ...@@ -698,7 +701,7 @@ static int if_cs_get_int_status(lbs_private *priv, u8 *ireg)
} }
static int if_cs_read_event_cause(lbs_private *priv) static int if_cs_read_event_cause(struct lbs_private *priv)
{ {
lbs_deb_enter(LBS_DEB_CS); lbs_deb_enter(LBS_DEB_CS);
...@@ -746,7 +749,7 @@ static void if_cs_release(struct pcmcia_device *p_dev) ...@@ -746,7 +749,7 @@ static void if_cs_release(struct pcmcia_device *p_dev)
static int if_cs_probe(struct pcmcia_device *p_dev) static int if_cs_probe(struct pcmcia_device *p_dev)
{ {
int ret = -ENOMEM; int ret = -ENOMEM;
lbs_private *priv; struct lbs_private *priv;
struct if_cs_card *card; struct if_cs_card *card;
/* CIS parsing */ /* CIS parsing */
tuple_t tuple; tuple_t tuple;
......
...@@ -82,7 +82,7 @@ struct if_sdio_packet { ...@@ -82,7 +82,7 @@ struct if_sdio_packet {
struct if_sdio_card { struct if_sdio_card {
struct sdio_func *func; struct sdio_func *func;
lbs_private *priv; struct lbs_private *priv;
int model; int model;
unsigned long ioport; unsigned long ioport;
...@@ -694,7 +694,8 @@ static int if_sdio_prog_firmware(struct if_sdio_card *card) ...@@ -694,7 +694,8 @@ static int if_sdio_prog_firmware(struct if_sdio_card *card)
/* Libertas callbacks */ /* Libertas callbacks */
/*******************************************************************/ /*******************************************************************/
static int if_sdio_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb) static int if_sdio_host_to_card(struct lbs_private *priv,
u8 type, u8 *buf, u16 nb)
{ {
int ret; int ret;
struct if_sdio_card *card; struct if_sdio_card *card;
...@@ -775,7 +776,7 @@ static int if_sdio_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb) ...@@ -775,7 +776,7 @@ static int if_sdio_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb)
return ret; return ret;
} }
static int if_sdio_get_int_status(lbs_private *priv, u8 *ireg) static int if_sdio_get_int_status(struct lbs_private *priv, u8 *ireg)
{ {
struct if_sdio_card *card; struct if_sdio_card *card;
...@@ -791,7 +792,7 @@ static int if_sdio_get_int_status(lbs_private *priv, u8 *ireg) ...@@ -791,7 +792,7 @@ static int if_sdio_get_int_status(lbs_private *priv, u8 *ireg)
return 0; return 0;
} }
static int if_sdio_read_event_cause(lbs_private *priv) static int if_sdio_read_event_cause(struct lbs_private *priv)
{ {
struct if_sdio_card *card; struct if_sdio_card *card;
...@@ -857,7 +858,7 @@ static int if_sdio_probe(struct sdio_func *func, ...@@ -857,7 +858,7 @@ static int if_sdio_probe(struct sdio_func *func,
const struct sdio_device_id *id) const struct sdio_device_id *id)
{ {
struct if_sdio_card *card; struct if_sdio_card *card;
lbs_private *priv; struct lbs_private *priv;
int ret, i; int ret, i;
unsigned int model; unsigned int model;
struct if_sdio_packet *packet; struct if_sdio_packet *packet;
......
...@@ -32,9 +32,12 @@ MODULE_DEVICE_TABLE(usb, if_usb_table); ...@@ -32,9 +32,12 @@ MODULE_DEVICE_TABLE(usb, if_usb_table);
static void if_usb_receive(struct urb *urb); static void if_usb_receive(struct urb *urb);
static void if_usb_receive_fwload(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_prog_firmware(struct usb_card_rec *cardp);
static int if_usb_host_to_card(lbs_private *priv, u8 type, u8 *payload, u16 nb); static int if_usb_host_to_card(struct lbs_private *priv,
static int if_usb_get_int_status(lbs_private *priv, u8 *); u8 type,
static int if_usb_read_event_cause(lbs_private *); u8 *payload,
u16 nb);
static int if_usb_get_int_status(struct lbs_private *priv, u8 *);
static int if_usb_read_event_cause(struct lbs_private *);
static int usb_tx_block(struct usb_card_rec *cardp, u8 *payload, u16 nb); 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 void if_usb_free(struct usb_card_rec *cardp);
static int if_usb_submit_rx_urb(struct usb_card_rec *cardp); static int if_usb_submit_rx_urb(struct usb_card_rec *cardp);
...@@ -52,7 +55,7 @@ static void if_usb_write_bulk_callback(struct urb *urb) ...@@ -52,7 +55,7 @@ static void if_usb_write_bulk_callback(struct urb *urb)
/* handle the transmission complete validations */ /* handle the transmission complete validations */
if (urb->status == 0) { if (urb->status == 0) {
lbs_private *priv = cardp->priv; struct lbs_private *priv = cardp->priv;
/* /*
lbs_deb_usbd(&urb->dev->dev, "URB status is successfull\n"); lbs_deb_usbd(&urb->dev->dev, "URB status is successfull\n");
...@@ -64,7 +67,7 @@ static void if_usb_write_bulk_callback(struct urb *urb) ...@@ -64,7 +67,7 @@ static void if_usb_write_bulk_callback(struct urb *urb)
* valid at firmware load time. * valid at firmware load time.
*/ */
if (priv) { if (priv) {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct net_device *dev = priv->dev; struct net_device *dev = priv->dev;
priv->dnld_sent = DNLD_RES_RECEIVED; priv->dnld_sent = DNLD_RES_RECEIVED;
...@@ -124,7 +127,7 @@ static int if_usb_probe(struct usb_interface *intf, ...@@ -124,7 +127,7 @@ static int if_usb_probe(struct usb_interface *intf,
struct usb_device *udev; struct usb_device *udev;
struct usb_host_interface *iface_desc; struct usb_host_interface *iface_desc;
struct usb_endpoint_descriptor *endpoint; struct usb_endpoint_descriptor *endpoint;
lbs_private *priv; struct lbs_private *priv;
struct usb_card_rec *cardp; struct usb_card_rec *cardp;
int i; int i;
...@@ -259,7 +262,7 @@ static int if_usb_probe(struct usb_interface *intf, ...@@ -259,7 +262,7 @@ static int if_usb_probe(struct usb_interface *intf,
static void if_usb_disconnect(struct usb_interface *intf) static void if_usb_disconnect(struct usb_interface *intf)
{ {
struct usb_card_rec *cardp = usb_get_intfdata(intf); struct usb_card_rec *cardp = usb_get_intfdata(intf);
lbs_private *priv = (lbs_private *) cardp->priv; struct lbs_private *priv = (struct lbs_private *) cardp->priv;
lbs_deb_enter(LBS_DEB_MAIN); lbs_deb_enter(LBS_DEB_MAIN);
...@@ -267,7 +270,7 @@ static void if_usb_disconnect(struct usb_interface *intf) ...@@ -267,7 +270,7 @@ static void if_usb_disconnect(struct usb_interface *intf)
cardp->surprise_removed = 1; cardp->surprise_removed = 1;
if (priv) { if (priv) {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
adapter->surpriseremoved = 1; adapter->surpriseremoved = 1;
lbs_stop_card(priv); lbs_stop_card(priv);
...@@ -290,7 +293,7 @@ static void if_usb_disconnect(struct usb_interface *intf) ...@@ -290,7 +293,7 @@ static void if_usb_disconnect(struct usb_interface *intf)
/** /**
* @brief This function download FW * @brief This function download FW
* @param priv pointer to lbs_private * @param priv pointer to struct lbs_private
* @return 0 * @return 0
*/ */
static int if_prog_firmware(struct usb_card_rec *cardp) static int if_prog_firmware(struct usb_card_rec *cardp)
...@@ -373,7 +376,7 @@ static int if_prog_firmware(struct usb_card_rec *cardp) ...@@ -373,7 +376,7 @@ static int if_prog_firmware(struct usb_card_rec *cardp)
static int if_usb_reset_device(struct usb_card_rec *cardp) static int if_usb_reset_device(struct usb_card_rec *cardp)
{ {
int ret; int ret;
lbs_private * priv = cardp->priv; struct lbs_private *priv = cardp->priv;
lbs_deb_enter(LBS_DEB_USB); lbs_deb_enter(LBS_DEB_USB);
...@@ -394,7 +397,7 @@ static int if_usb_reset_device(struct usb_card_rec *cardp) ...@@ -394,7 +397,7 @@ static int if_usb_reset_device(struct usb_card_rec *cardp)
/** /**
* @brief This function transfer the data to the device. * @brief This function transfer the data to the device.
* @param priv pointer to lbs_private * @param priv pointer to struct lbs_private
* @param payload pointer to payload data * @param payload pointer to payload data
* @param nb data length * @param nb data length
* @return 0 or -1 * @return 0 or -1
...@@ -571,7 +574,7 @@ static void if_usb_receive_fwload(struct urb *urb) ...@@ -571,7 +574,7 @@ static void if_usb_receive_fwload(struct urb *urb)
static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb, static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb,
struct usb_card_rec *cardp, struct usb_card_rec *cardp,
lbs_private *priv) struct lbs_private *priv)
{ {
if (recvlength > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE + if (recvlength > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE +
MESSAGE_HEADER_LEN || recvlength < MRVDRV_MIN_PKT_LEN) { MESSAGE_HEADER_LEN || recvlength < MRVDRV_MIN_PKT_LEN) {
...@@ -591,7 +594,7 @@ static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb, ...@@ -591,7 +594,7 @@ static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb,
static inline void process_cmdrequest(int recvlength, u8 *recvbuff, static inline void process_cmdrequest(int recvlength, u8 *recvbuff,
struct sk_buff *skb, struct sk_buff *skb,
struct usb_card_rec *cardp, struct usb_card_rec *cardp,
lbs_private *priv) struct lbs_private *priv)
{ {
u8 *cmdbuf; u8 *cmdbuf;
if (recvlength > MRVDRV_SIZE_OF_CMD_BUFFER) { if (recvlength > MRVDRV_SIZE_OF_CMD_BUFFER) {
...@@ -640,7 +643,7 @@ static void if_usb_receive(struct urb *urb) ...@@ -640,7 +643,7 @@ static void if_usb_receive(struct urb *urb)
struct read_cb_info *rinfo = (struct read_cb_info *)urb->context; struct read_cb_info *rinfo = (struct read_cb_info *)urb->context;
struct sk_buff *skb = rinfo->skb; struct sk_buff *skb = rinfo->skb;
struct usb_card_rec *cardp = (struct usb_card_rec *) rinfo->cardp; struct usb_card_rec *cardp = (struct usb_card_rec *) rinfo->cardp;
lbs_private * priv = cardp->priv; struct lbs_private *priv = cardp->priv;
int recvlength = urb->actual_length; int recvlength = urb->actual_length;
u8 *recvbuff = NULL; u8 *recvbuff = NULL;
...@@ -708,13 +711,16 @@ static void if_usb_receive(struct urb *urb) ...@@ -708,13 +711,16 @@ static void if_usb_receive(struct urb *urb)
/** /**
* @brief This function downloads data to FW * @brief This function downloads data to FW
* @param priv pointer to lbs_private structure * @param priv pointer to struct lbs_private structure
* @param type type of data * @param type type of data
* @param buf pointer to data buffer * @param buf pointer to data buffer
* @param len number of bytes * @param len number of bytes
* @return 0 or -1 * @return 0 or -1
*/ */
static int if_usb_host_to_card(lbs_private *priv, u8 type, u8 *payload, u16 nb) static int if_usb_host_to_card(struct lbs_private *priv,
u8 type,
u8 *payload,
u16 nb)
{ {
struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card; struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card;
...@@ -741,7 +747,7 @@ static int if_usb_host_to_card(lbs_private *priv, u8 type, u8 *payload, u16 nb) ...@@ -741,7 +747,7 @@ static int if_usb_host_to_card(lbs_private *priv, u8 type, u8 *payload, u16 nb)
} }
/* called with adapter->driver_lock held */ /* called with adapter->driver_lock held */
static int if_usb_get_int_status(lbs_private *priv, u8 *ireg) static int if_usb_get_int_status(struct lbs_private *priv, u8 *ireg)
{ {
struct usb_card_rec *cardp = priv->card; struct usb_card_rec *cardp = priv->card;
...@@ -753,7 +759,7 @@ static int if_usb_get_int_status(lbs_private *priv, u8 *ireg) ...@@ -753,7 +759,7 @@ static int if_usb_get_int_status(lbs_private *priv, u8 *ireg)
return 0; return 0;
} }
static int if_usb_read_event_cause(lbs_private * priv) static int if_usb_read_event_cause(struct lbs_private *priv)
{ {
struct usb_card_rec *cardp = priv->card; struct usb_card_rec *cardp = priv->card;
...@@ -928,7 +934,7 @@ static int if_usb_prog_firmware(struct usb_card_rec *cardp) ...@@ -928,7 +934,7 @@ static int if_usb_prog_firmware(struct usb_card_rec *cardp)
static int if_usb_suspend(struct usb_interface *intf, pm_message_t message) static int if_usb_suspend(struct usb_interface *intf, pm_message_t message)
{ {
struct usb_card_rec *cardp = usb_get_intfdata(intf); struct usb_card_rec *cardp = usb_get_intfdata(intf);
lbs_private *priv = cardp->priv; struct lbs_private *priv = cardp->priv;
lbs_deb_enter(LBS_DEB_USB); lbs_deb_enter(LBS_DEB_USB);
...@@ -964,7 +970,7 @@ static int if_usb_suspend(struct usb_interface *intf, pm_message_t message) ...@@ -964,7 +970,7 @@ static int if_usb_suspend(struct usb_interface *intf, pm_message_t message)
static int if_usb_resume(struct usb_interface *intf) static int if_usb_resume(struct usb_interface *intf)
{ {
struct usb_card_rec *cardp = usb_get_intfdata(intf); struct usb_card_rec *cardp = usb_get_intfdata(intf);
lbs_private *priv = cardp->priv; struct lbs_private *priv = cardp->priv;
lbs_deb_enter(LBS_DEB_USB); lbs_deb_enter(LBS_DEB_USB);
......
...@@ -30,13 +30,15 @@ ...@@ -30,13 +30,15 @@
* NOTE: Setting the MSB of the basic rates need to be taken * NOTE: Setting the MSB of the basic rates need to be taken
* care, either before or after calling this function * care, either before or after calling this function
* *
* @param adapter A pointer to lbs_adapter structure * @param adapter A pointer to struct lbs_adapter structure
* @param rate1 the buffer which keeps input and output * @param rate1 the buffer which keeps input and output
* @param rate1_size the size of rate1 buffer; new size of buffer on return * @param rate1_size the size of rate1 buffer; new size of buffer on return
* *
* @return 0 or -1 * @return 0 or -1
*/ */
static int get_common_rates(lbs_adapter *adapter, u8 *rates, u16 *rates_size) static int get_common_rates(struct lbs_adapter *adapter,
u8 *rates,
u16 *rates_size)
{ {
u8 *card_rates = lbs_bg_rates; u8 *card_rates = lbs_bg_rates;
size_t num_card_rates = sizeof(lbs_bg_rates); size_t num_card_rates = sizeof(lbs_bg_rates);
...@@ -116,14 +118,14 @@ void lbs_unset_basic_rate_flags(u8 *rates, size_t len) ...@@ -116,14 +118,14 @@ void lbs_unset_basic_rate_flags(u8 *rates, size_t len)
/** /**
* @brief Associate to a specific BSS discovered in a scan * @brief Associate to a specific BSS discovered in a scan
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param pbssdesc Pointer to the BSS descriptor to associate with. * @param pbssdesc Pointer to the BSS descriptor to associate with.
* *
* @return 0-success, otherwise fail * @return 0-success, otherwise fail
*/ */
int lbs_associate(lbs_private *priv, struct assoc_request *assoc_req) int lbs_associate(struct lbs_private *priv, struct assoc_request *assoc_req)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret; int ret;
lbs_deb_enter(LBS_DEB_JOIN); lbs_deb_enter(LBS_DEB_JOIN);
...@@ -155,13 +157,14 @@ int lbs_associate(lbs_private *priv, struct assoc_request *assoc_req) ...@@ -155,13 +157,14 @@ int lbs_associate(lbs_private *priv, struct assoc_request *assoc_req)
/** /**
* @brief Start an Adhoc Network * @brief Start an Adhoc Network
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param adhocssid The ssid of the Adhoc Network * @param adhocssid The ssid of the Adhoc Network
* @return 0--success, -1--fail * @return 0--success, -1--fail
*/ */
int lbs_start_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req) int lbs_start_adhoc_network(struct lbs_private *priv,
struct assoc_request *assoc_req)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
adapter->adhoccreate = 1; adapter->adhoccreate = 1;
...@@ -188,15 +191,16 @@ int lbs_start_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req) ...@@ -188,15 +191,16 @@ int lbs_start_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req)
/** /**
* @brief Join an adhoc network found in a previous scan * @brief Join an adhoc network found in a previous scan
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param pbssdesc Pointer to a BSS descriptor found in a previous scan * @param pbssdesc Pointer to a BSS descriptor found in a previous scan
* to attempt to join * to attempt to join
* *
* @return 0--success, -1--fail * @return 0--success, -1--fail
*/ */
int lbs_join_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req) int lbs_join_adhoc_network(struct lbs_private *priv,
struct assoc_request *assoc_req)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct bss_descriptor * bss = &assoc_req->bss; struct bss_descriptor * bss = &assoc_req->bss;
int ret = 0; int ret = 0;
...@@ -258,7 +262,7 @@ int lbs_join_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req) ...@@ -258,7 +262,7 @@ int lbs_join_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req)
return ret; return ret;
} }
int lbs_stop_adhoc_network(lbs_private * priv) int lbs_stop_adhoc_network(struct lbs_private *priv)
{ {
return lbs_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); 0, CMD_OPTION_WAITFORRSP, 0, NULL);
...@@ -267,10 +271,10 @@ int lbs_stop_adhoc_network(lbs_private * priv) ...@@ -267,10 +271,10 @@ int lbs_stop_adhoc_network(lbs_private * priv)
/** /**
* @brief Send Deauthentication Request * @brief Send Deauthentication Request
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @return 0--success, -1--fail * @return 0--success, -1--fail
*/ */
int lbs_send_deauthentication(lbs_private *priv) int lbs_send_deauthentication(struct lbs_private *priv)
{ {
return lbs_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); 0, CMD_OPTION_WAITFORRSP, 0, NULL);
...@@ -279,17 +283,17 @@ int lbs_send_deauthentication(lbs_private *priv) ...@@ -279,17 +283,17 @@ int lbs_send_deauthentication(lbs_private *priv)
/** /**
* @brief This function prepares command of authenticate. * @brief This function prepares command of authenticate.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param cmd A pointer to cmd_ds_command structure * @param cmd A pointer to cmd_ds_command structure
* @param pdata_buf Void cast of pointer to a BSSID to authenticate with * @param pdata_buf Void cast of pointer to a BSSID to authenticate with
* *
* @return 0 or -1 * @return 0 or -1
*/ */
int lbs_cmd_80211_authenticate(lbs_private *priv, int lbs_cmd_80211_authenticate(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
void *pdata_buf) void *pdata_buf)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth; struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth;
int ret = -1; int ret = -1;
u8 *bssid = pdata_buf; u8 *bssid = pdata_buf;
...@@ -329,10 +333,10 @@ int lbs_cmd_80211_authenticate(lbs_private *priv, ...@@ -329,10 +333,10 @@ int lbs_cmd_80211_authenticate(lbs_private *priv,
return ret; return ret;
} }
int lbs_cmd_80211_deauthenticate(lbs_private *priv, int lbs_cmd_80211_deauthenticate(struct lbs_private *priv,
struct cmd_ds_command *cmd) struct cmd_ds_command *cmd)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_deauthenticate *dauth = &cmd->params.deauth; struct cmd_ds_802_11_deauthenticate *dauth = &cmd->params.deauth;
lbs_deb_enter(LBS_DEB_JOIN); lbs_deb_enter(LBS_DEB_JOIN);
...@@ -352,10 +356,10 @@ int lbs_cmd_80211_deauthenticate(lbs_private *priv, ...@@ -352,10 +356,10 @@ int lbs_cmd_80211_deauthenticate(lbs_private *priv,
return 0; return 0;
} }
int lbs_cmd_80211_associate(lbs_private *priv, int lbs_cmd_80211_associate(struct lbs_private *priv,
struct cmd_ds_command *cmd, void *pdata_buf) struct cmd_ds_command *cmd, void *pdata_buf)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_associate *passo = &cmd->params.associate; struct cmd_ds_802_11_associate *passo = &cmd->params.associate;
int ret = 0; int ret = 0;
struct assoc_request * assoc_req = pdata_buf; struct assoc_request * assoc_req = pdata_buf;
...@@ -468,10 +472,10 @@ int lbs_cmd_80211_associate(lbs_private *priv, ...@@ -468,10 +472,10 @@ int lbs_cmd_80211_associate(lbs_private *priv,
return ret; return ret;
} }
int lbs_cmd_80211_ad_hoc_start(lbs_private *priv, int lbs_cmd_80211_ad_hoc_start(struct lbs_private *priv,
struct cmd_ds_command *cmd, void *pdata_buf) struct cmd_ds_command *cmd, void *pdata_buf)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_ad_hoc_start *adhs = &cmd->params.ads; struct cmd_ds_802_11_ad_hoc_start *adhs = &cmd->params.ads;
int ret = 0; int ret = 0;
int cmdappendsize = 0; int cmdappendsize = 0;
...@@ -582,7 +586,7 @@ int lbs_cmd_80211_ad_hoc_start(lbs_private *priv, ...@@ -582,7 +586,7 @@ int lbs_cmd_80211_ad_hoc_start(lbs_private *priv,
return ret; return ret;
} }
int lbs_cmd_80211_ad_hoc_stop(lbs_private *priv, int lbs_cmd_80211_ad_hoc_stop(struct lbs_private *priv,
struct cmd_ds_command *cmd) struct cmd_ds_command *cmd)
{ {
cmd->command = cpu_to_le16(CMD_802_11_AD_HOC_STOP); cmd->command = cpu_to_le16(CMD_802_11_AD_HOC_STOP);
...@@ -591,10 +595,10 @@ int lbs_cmd_80211_ad_hoc_stop(lbs_private *priv, ...@@ -591,10 +595,10 @@ int lbs_cmd_80211_ad_hoc_stop(lbs_private *priv,
return 0; return 0;
} }
int lbs_cmd_80211_ad_hoc_join(lbs_private *priv, int lbs_cmd_80211_ad_hoc_join(struct lbs_private *priv,
struct cmd_ds_command *cmd, void *pdata_buf) struct cmd_ds_command *cmd, void *pdata_buf)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_ad_hoc_join *join_cmd = &cmd->params.adj; struct cmd_ds_802_11_ad_hoc_join *join_cmd = &cmd->params.adj;
struct assoc_request * assoc_req = pdata_buf; struct assoc_request * assoc_req = pdata_buf;
struct bss_descriptor *bss = &assoc_req->bss; struct bss_descriptor *bss = &assoc_req->bss;
...@@ -694,10 +698,10 @@ int lbs_cmd_80211_ad_hoc_join(lbs_private *priv, ...@@ -694,10 +698,10 @@ int lbs_cmd_80211_ad_hoc_join(lbs_private *priv,
return ret; return ret;
} }
int lbs_ret_80211_associate(lbs_private *priv, int lbs_ret_80211_associate(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
union iwreq_data wrqu; union iwreq_data wrqu;
struct ieeetypes_assocrsp *passocrsp; struct ieeetypes_assocrsp *passocrsp;
...@@ -807,7 +811,7 @@ int lbs_ret_80211_associate(lbs_private *priv, ...@@ -807,7 +811,7 @@ int lbs_ret_80211_associate(lbs_private *priv,
return ret; return ret;
} }
int lbs_ret_80211_disassociate(lbs_private *priv, int lbs_ret_80211_disassociate(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
lbs_deb_enter(LBS_DEB_JOIN); lbs_deb_enter(LBS_DEB_JOIN);
...@@ -818,10 +822,10 @@ int lbs_ret_80211_disassociate(lbs_private *priv, ...@@ -818,10 +822,10 @@ int lbs_ret_80211_disassociate(lbs_private *priv,
return 0; return 0;
} }
int lbs_ret_80211_ad_hoc_start(lbs_private *priv, int lbs_ret_80211_ad_hoc_start(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
u16 command = le16_to_cpu(resp->command); u16 command = le16_to_cpu(resp->command);
u16 result = le16_to_cpu(resp->result); u16 result = le16_to_cpu(resp->result);
...@@ -897,7 +901,7 @@ int lbs_ret_80211_ad_hoc_start(lbs_private *priv, ...@@ -897,7 +901,7 @@ int lbs_ret_80211_ad_hoc_start(lbs_private *priv,
return ret; return ret;
} }
int lbs_ret_80211_ad_hoc_stop(lbs_private *priv, int lbs_ret_80211_ad_hoc_stop(struct lbs_private *priv,
struct cmd_ds_command *resp) struct cmd_ds_command *resp)
{ {
lbs_deb_enter(LBS_DEB_JOIN); lbs_deb_enter(LBS_DEB_JOIN);
......
...@@ -12,41 +12,41 @@ ...@@ -12,41 +12,41 @@
#include "dev.h" #include "dev.h"
struct cmd_ds_command; struct cmd_ds_command;
int lbs_cmd_80211_authenticate(lbs_private *priv, int lbs_cmd_80211_authenticate(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
void *pdata_buf); void *pdata_buf);
int lbs_cmd_80211_ad_hoc_join(lbs_private *priv, int lbs_cmd_80211_ad_hoc_join(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
void *pdata_buf); void *pdata_buf);
int lbs_cmd_80211_ad_hoc_stop(lbs_private *priv, int lbs_cmd_80211_ad_hoc_stop(struct lbs_private *priv,
struct cmd_ds_command *cmd); struct cmd_ds_command *cmd);
int lbs_cmd_80211_ad_hoc_start(lbs_private *priv, int lbs_cmd_80211_ad_hoc_start(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
void *pdata_buf); void *pdata_buf);
int lbs_cmd_80211_deauthenticate(lbs_private *priv, int lbs_cmd_80211_deauthenticate(struct lbs_private *priv,
struct cmd_ds_command *cmd); struct cmd_ds_command *cmd);
int lbs_cmd_80211_associate(lbs_private *priv, int lbs_cmd_80211_associate(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
void *pdata_buf); void *pdata_buf);
int lbs_ret_80211_ad_hoc_start(lbs_private *priv, int lbs_ret_80211_ad_hoc_start(struct lbs_private *priv,
struct cmd_ds_command *resp); struct cmd_ds_command *resp);
int lbs_ret_80211_ad_hoc_stop(lbs_private *priv, int lbs_ret_80211_ad_hoc_stop(struct lbs_private *priv,
struct cmd_ds_command *resp); struct cmd_ds_command *resp);
int lbs_ret_80211_disassociate(lbs_private *priv, int lbs_ret_80211_disassociate(struct lbs_private *priv,
struct cmd_ds_command *resp); struct cmd_ds_command *resp);
int lbs_ret_80211_associate(lbs_private *priv, int lbs_ret_80211_associate(struct lbs_private *priv,
struct cmd_ds_command *resp); struct cmd_ds_command *resp);
int lbs_start_adhoc_network(lbs_private *priv, int lbs_start_adhoc_network(struct lbs_private *priv,
struct assoc_request * assoc_req); struct assoc_request * assoc_req);
int lbs_join_adhoc_network(lbs_private *priv, int lbs_join_adhoc_network(struct lbs_private *priv,
struct assoc_request * assoc_req); struct assoc_request * assoc_req);
int lbs_stop_adhoc_network(lbs_private *priv); int lbs_stop_adhoc_network(struct lbs_private *priv);
int lbs_send_deauthentication(lbs_private *priv); int lbs_send_deauthentication(struct lbs_private *priv);
int lbs_associate(lbs_private *priv, struct assoc_request *assoc_req); int lbs_associate(struct lbs_private *priv, struct assoc_request *assoc_req);
void lbs_unset_basic_rate_flags(u8 *rates, size_t len); void lbs_unset_basic_rate_flags(u8 *rates, size_t len);
......
...@@ -247,8 +247,8 @@ static ssize_t lbs_anycast_set(struct device *dev, ...@@ -247,8 +247,8 @@ static ssize_t lbs_anycast_set(struct device *dev,
return strlen(buf); return strlen(buf);
} }
int lbs_add_rtap(lbs_private *priv); int lbs_add_rtap(struct lbs_private *priv);
void lbs_remove_rtap(lbs_private *priv); void lbs_remove_rtap(struct lbs_private *priv);
/** /**
* Get function for sysfs attribute rtap * Get function for sysfs attribute rtap
...@@ -256,8 +256,9 @@ void lbs_remove_rtap(lbs_private *priv); ...@@ -256,8 +256,9 @@ void lbs_remove_rtap(lbs_private *priv);
static ssize_t lbs_rtap_get(struct device *dev, static ssize_t lbs_rtap_get(struct device *dev,
struct device_attribute *attr, char * buf) struct device_attribute *attr, char * buf)
{ {
lbs_private *priv = (lbs_private *) (to_net_dev(dev))->priv; struct lbs_private *priv = (struct lbs_private *)
lbs_adapter *adapter = priv->adapter; (to_net_dev(dev))->priv;
struct lbs_adapter *adapter = priv->adapter;
return snprintf(buf, 5, "0x%X\n", adapter->monitormode); return snprintf(buf, 5, "0x%X\n", adapter->monitormode);
} }
...@@ -268,8 +269,9 @@ static ssize_t lbs_rtap_set(struct device *dev, ...@@ -268,8 +269,9 @@ static ssize_t lbs_rtap_set(struct device *dev,
struct device_attribute *attr, const char * buf, size_t count) struct device_attribute *attr, const char * buf, size_t count)
{ {
int monitor_mode; int monitor_mode;
lbs_private *priv = (lbs_private *) (to_net_dev(dev))->priv; struct lbs_private *priv = (struct lbs_private *)
lbs_adapter *adapter = priv->adapter; (to_net_dev(dev))->priv;
struct lbs_adapter *adapter = priv->adapter;
sscanf(buf, "%x", &monitor_mode); sscanf(buf, "%x", &monitor_mode);
if (monitor_mode != LBS_MONITOR_OFF) { if (monitor_mode != LBS_MONITOR_OFF) {
...@@ -332,7 +334,7 @@ static ssize_t lbs_autostart_enabled_set(struct device *dev, ...@@ -332,7 +334,7 @@ static ssize_t lbs_autostart_enabled_set(struct device *dev,
{ {
struct cmd_ds_mesh_access mesh_access; struct cmd_ds_mesh_access mesh_access;
uint32_t datum; uint32_t datum;
lbs_private *priv = (to_net_dev(dev))->priv; struct lbs_private *priv = (to_net_dev(dev))->priv;
int ret; int ret;
memset(&mesh_access, 0, sizeof(mesh_access)); memset(&mesh_access, 0, sizeof(mesh_access));
...@@ -375,8 +377,8 @@ static struct attribute_group lbs_mesh_attr_group = { ...@@ -375,8 +377,8 @@ static struct attribute_group lbs_mesh_attr_group = {
*/ */
static int pre_open_check(struct net_device *dev) static int pre_open_check(struct net_device *dev)
{ {
lbs_private *priv = (lbs_private *) dev->priv; struct lbs_private *priv = (struct lbs_private *) dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int i = 0; int i = 0;
while (!adapter->fw_ready && i < 20) { while (!adapter->fw_ready && i < 20) {
...@@ -399,8 +401,8 @@ static int pre_open_check(struct net_device *dev) ...@@ -399,8 +401,8 @@ static int pre_open_check(struct net_device *dev)
*/ */
static int lbs_dev_open(struct net_device *dev) static int lbs_dev_open(struct net_device *dev)
{ {
lbs_private *priv = (lbs_private *) dev->priv; struct lbs_private *priv = (struct lbs_private *) dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_NET); lbs_deb_enter(LBS_DEB_NET);
...@@ -429,7 +431,7 @@ static int lbs_dev_open(struct net_device *dev) ...@@ -429,7 +431,7 @@ static int lbs_dev_open(struct net_device *dev)
*/ */
static int lbs_mesh_open(struct net_device *dev) static int lbs_mesh_open(struct net_device *dev)
{ {
lbs_private *priv = (lbs_private *) dev->priv ; struct lbs_private *priv = (struct lbs_private *) dev->priv ;
if (pre_open_check(dev) == -1) if (pre_open_check(dev) == -1)
return -1; return -1;
...@@ -453,7 +455,7 @@ static int lbs_mesh_open(struct net_device *dev) ...@@ -453,7 +455,7 @@ static int lbs_mesh_open(struct net_device *dev)
*/ */
static int lbs_open(struct net_device *dev) static int lbs_open(struct net_device *dev)
{ {
lbs_private *priv = (lbs_private *) dev->priv ; struct lbs_private *priv = (struct lbs_private *) dev->priv ;
if(pre_open_check(dev) == -1) if(pre_open_check(dev) == -1)
return -1; return -1;
...@@ -466,7 +468,7 @@ static int lbs_open(struct net_device *dev) ...@@ -466,7 +468,7 @@ static int lbs_open(struct net_device *dev)
static int lbs_dev_close(struct net_device *dev) static int lbs_dev_close(struct net_device *dev)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_deb_enter(LBS_DEB_NET); lbs_deb_enter(LBS_DEB_NET);
...@@ -485,7 +487,7 @@ static int lbs_dev_close(struct net_device *dev) ...@@ -485,7 +487,7 @@ static int lbs_dev_close(struct net_device *dev)
*/ */
static int lbs_mesh_close(struct net_device *dev) static int lbs_mesh_close(struct net_device *dev)
{ {
lbs_private *priv = (lbs_private *) (dev->priv); struct lbs_private *priv = (struct lbs_private *) (dev->priv);
priv->mesh_open = 0; priv->mesh_open = 0;
netif_stop_queue(priv->mesh_dev); netif_stop_queue(priv->mesh_dev);
...@@ -503,7 +505,7 @@ static int lbs_mesh_close(struct net_device *dev) ...@@ -503,7 +505,7 @@ static int lbs_mesh_close(struct net_device *dev)
*/ */
static int lbs_close(struct net_device *dev) static int lbs_close(struct net_device *dev)
{ {
lbs_private *priv = (lbs_private *) dev->priv; struct lbs_private *priv = (struct lbs_private *) dev->priv;
netif_stop_queue(dev); netif_stop_queue(dev);
priv->infra_open = 0; priv->infra_open = 0;
...@@ -517,7 +519,7 @@ static int lbs_close(struct net_device *dev) ...@@ -517,7 +519,7 @@ static int lbs_close(struct net_device *dev)
static int lbs_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; int ret = 0;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_deb_enter(LBS_DEB_NET); lbs_deb_enter(LBS_DEB_NET);
...@@ -544,7 +546,7 @@ static int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -544,7 +546,7 @@ static int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
static int lbs_mesh_pre_start_xmit(struct sk_buff *skb, static int lbs_mesh_pre_start_xmit(struct sk_buff *skb,
struct net_device *dev) struct net_device *dev)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
int ret; int ret;
lbs_deb_enter(LBS_DEB_MESH); lbs_deb_enter(LBS_DEB_MESH);
...@@ -566,7 +568,7 @@ static int lbs_mesh_pre_start_xmit(struct sk_buff *skb, ...@@ -566,7 +568,7 @@ static int lbs_mesh_pre_start_xmit(struct sk_buff *skb,
*/ */
static int lbs_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)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
int ret; int ret;
lbs_deb_enter(LBS_DEB_NET); lbs_deb_enter(LBS_DEB_NET);
...@@ -585,7 +587,7 @@ static int lbs_pre_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -585,7 +587,7 @@ static int lbs_pre_start_xmit(struct sk_buff *skb, struct net_device *dev)
static void lbs_tx_timeout(struct net_device *dev) static void lbs_tx_timeout(struct net_device *dev)
{ {
lbs_private *priv = (lbs_private *) dev->priv; struct lbs_private *priv = (struct lbs_private *) dev->priv;
lbs_deb_enter(LBS_DEB_TX); lbs_deb_enter(LBS_DEB_TX);
...@@ -617,12 +619,12 @@ static void lbs_tx_timeout(struct net_device *dev) ...@@ -617,12 +619,12 @@ static void lbs_tx_timeout(struct net_device *dev)
/** /**
* @brief This function returns the network statistics * @brief This function returns the network statistics
* *
* @param dev A pointer to lbs_private structure * @param dev A pointer to struct lbs_private structure
* @return A pointer to net_device_stats structure * @return A pointer to net_device_stats structure
*/ */
static struct net_device_stats *lbs_get_stats(struct net_device *dev) static struct net_device_stats *lbs_get_stats(struct net_device *dev)
{ {
lbs_private *priv = (lbs_private *) dev->priv; struct lbs_private *priv = (struct lbs_private *) dev->priv;
return &priv->stats; return &priv->stats;
} }
...@@ -630,8 +632,8 @@ static struct net_device_stats *lbs_get_stats(struct net_device *dev) ...@@ -630,8 +632,8 @@ static struct net_device_stats *lbs_get_stats(struct net_device *dev)
static int lbs_set_mac_address(struct net_device *dev, void *addr) static int lbs_set_mac_address(struct net_device *dev, void *addr)
{ {
int ret = 0; int ret = 0;
lbs_private *priv = (lbs_private *) dev->priv; struct lbs_private *priv = (struct lbs_private *) dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct sockaddr *phwaddr = addr; struct sockaddr *phwaddr = addr;
lbs_deb_enter(LBS_DEB_NET); lbs_deb_enter(LBS_DEB_NET);
...@@ -667,7 +669,7 @@ static int lbs_set_mac_address(struct net_device *dev, void *addr) ...@@ -667,7 +669,7 @@ static int lbs_set_mac_address(struct net_device *dev, void *addr)
return ret; return ret;
} }
static int lbs_copy_multicast_address(lbs_adapter *adapter, static int lbs_copy_multicast_address(struct lbs_adapter *adapter,
struct net_device *dev) struct net_device *dev)
{ {
int i = 0; int i = 0;
...@@ -684,8 +686,8 @@ static int lbs_copy_multicast_address(lbs_adapter *adapter, ...@@ -684,8 +686,8 @@ static int lbs_copy_multicast_address(lbs_adapter *adapter,
static void lbs_set_multicast_list(struct net_device *dev) static void lbs_set_multicast_list(struct net_device *dev)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int oldpacketfilter; int oldpacketfilter;
DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac);
...@@ -765,8 +767,8 @@ static void lbs_set_multicast_list(struct net_device *dev) ...@@ -765,8 +767,8 @@ static void lbs_set_multicast_list(struct net_device *dev)
static int lbs_thread(void *data) static int lbs_thread(void *data)
{ {
struct net_device *dev = data; struct net_device *dev = data;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
wait_queue_t wait; wait_queue_t wait;
u8 ireg = 0; u8 ireg = 0;
...@@ -928,13 +930,13 @@ static int lbs_thread(void *data) ...@@ -928,13 +930,13 @@ static int lbs_thread(void *data)
* HW spec from firmware and set basic parameters to * HW spec from firmware and set basic parameters to
* firmware. * firmware.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @return 0 or -1 * @return 0 or -1
*/ */
static int lbs_setup_firmware(lbs_private *priv) static int lbs_setup_firmware(struct lbs_private *priv)
{ {
int ret = -1; int ret = -1;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ds_mesh_access mesh_access; struct cmd_ds_mesh_access mesh_access;
lbs_deb_enter(LBS_DEB_FW); lbs_deb_enter(LBS_DEB_FW);
...@@ -995,8 +997,8 @@ static int lbs_setup_firmware(lbs_private *priv) ...@@ -995,8 +997,8 @@ static int lbs_setup_firmware(lbs_private *priv)
*/ */
static void command_timer_fn(unsigned long data) static void command_timer_fn(unsigned long data)
{ {
lbs_private *priv = (lbs_private *)data; struct lbs_private *priv = (struct lbs_private *)data;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ctrl_node *ptempnode; struct cmd_ctrl_node *ptempnode;
struct cmd_ds_command *cmd; struct cmd_ds_command *cmd;
unsigned long flags; unsigned long flags;
...@@ -1030,9 +1032,9 @@ static void command_timer_fn(unsigned long data) ...@@ -1030,9 +1032,9 @@ static void command_timer_fn(unsigned long data)
return; return;
} }
static int lbs_init_adapter(lbs_private *priv) static int lbs_init_adapter(struct lbs_private *priv)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
size_t bufsize; size_t bufsize;
int i, ret = 0; int i, ret = 0;
...@@ -1101,9 +1103,9 @@ static int lbs_init_adapter(lbs_private *priv) ...@@ -1101,9 +1103,9 @@ static int lbs_init_adapter(lbs_private *priv)
return ret; return ret;
} }
static void lbs_free_adapter(lbs_private *priv) static void lbs_free_adapter(struct lbs_private *priv)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
if (!adapter) { if (!adapter) {
lbs_deb_fw("why double free adapter?\n"); lbs_deb_fw("why double free adapter?\n");
...@@ -1131,25 +1133,27 @@ static void lbs_free_adapter(lbs_private *priv) ...@@ -1131,25 +1133,27 @@ static void lbs_free_adapter(lbs_private *priv)
* card, allocate the lbs_priv and initialize the device. * card, allocate the lbs_priv and initialize the device.
* *
* @param card A pointer to card * @param card A pointer to card
* @return A pointer to lbs_private structure * @return A pointer to struct lbs_private structure
*/ */
lbs_private *lbs_add_card(void *card, struct device *dmdev) struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
{ {
struct net_device *dev = NULL; struct net_device *dev = NULL;
lbs_private *priv = NULL; struct lbs_private *priv = NULL;
lbs_deb_enter(LBS_DEB_NET); lbs_deb_enter(LBS_DEB_NET);
/* Allocate an Ethernet device and register it */ /* Allocate an Ethernet device and register it */
if (!(dev = alloc_etherdev(sizeof(lbs_private)))) { dev = alloc_etherdev(sizeof(struct lbs_private));
if (!dev) {
lbs_pr_err("init ethX device failed\n"); lbs_pr_err("init ethX device failed\n");
goto done; goto done;
} }
priv = dev->priv; priv = dev->priv;
/* allocate buffer for lbs_adapter */ /* allocate buffer for struct lbs_adapter */
if (!(priv->adapter = kzalloc(sizeof(lbs_adapter), GFP_KERNEL))) { priv->adapter = kzalloc(sizeof(struct lbs_adapter), GFP_KERNEL);
lbs_pr_err("allocate buffer for lbs_adapter failed\n"); if (!priv->adapter) {
lbs_pr_err("allocate buffer for struct lbs_adapter failed\n");
goto err_kzalloc; goto err_kzalloc;
} }
...@@ -1217,9 +1221,9 @@ lbs_private *lbs_add_card(void *card, struct device *dmdev) ...@@ -1217,9 +1221,9 @@ lbs_private *lbs_add_card(void *card, struct device *dmdev)
EXPORT_SYMBOL_GPL(lbs_add_card); EXPORT_SYMBOL_GPL(lbs_add_card);
int lbs_remove_card(lbs_private *priv) int lbs_remove_card(struct lbs_private *priv)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct net_device *dev = priv->dev; struct net_device *dev = priv->dev;
union iwreq_data wrqu; union iwreq_data wrqu;
...@@ -1258,7 +1262,7 @@ int lbs_remove_card(lbs_private *priv) ...@@ -1258,7 +1262,7 @@ int lbs_remove_card(lbs_private *priv)
EXPORT_SYMBOL_GPL(lbs_remove_card); EXPORT_SYMBOL_GPL(lbs_remove_card);
int lbs_start_card(lbs_private *priv) int lbs_start_card(struct lbs_private *priv)
{ {
struct net_device *dev = priv->dev; struct net_device *dev = priv->dev;
int ret = -1; int ret = -1;
...@@ -1291,7 +1295,7 @@ int lbs_start_card(lbs_private *priv) ...@@ -1291,7 +1295,7 @@ int lbs_start_card(lbs_private *priv)
EXPORT_SYMBOL_GPL(lbs_start_card); EXPORT_SYMBOL_GPL(lbs_start_card);
int lbs_stop_card(lbs_private *priv) int lbs_stop_card(struct lbs_private *priv)
{ {
struct net_device *dev = priv->dev; struct net_device *dev = priv->dev;
int ret = -1; int ret = -1;
...@@ -1324,10 +1328,10 @@ EXPORT_SYMBOL_GPL(lbs_stop_card); ...@@ -1324,10 +1328,10 @@ EXPORT_SYMBOL_GPL(lbs_stop_card);
/** /**
* @brief This function adds mshX interface * @brief This function adds mshX interface
* *
* @param priv A pointer to the lbs_private structure * @param priv A pointer to the struct lbs_private structure
* @return 0 if successful, -X otherwise * @return 0 if successful, -X otherwise
*/ */
int lbs_add_mesh(lbs_private *priv, struct device *dev) int lbs_add_mesh(struct lbs_private *priv, struct device *dev)
{ {
struct net_device *mesh_dev = NULL; struct net_device *mesh_dev = NULL;
int ret = 0; int ret = 0;
...@@ -1385,7 +1389,7 @@ int lbs_add_mesh(lbs_private *priv, struct device *dev) ...@@ -1385,7 +1389,7 @@ int lbs_add_mesh(lbs_private *priv, struct device *dev)
EXPORT_SYMBOL_GPL(lbs_add_mesh); EXPORT_SYMBOL_GPL(lbs_add_mesh);
void lbs_remove_mesh(lbs_private *priv) void lbs_remove_mesh(struct lbs_private *priv)
{ {
struct net_device *mesh_dev; struct net_device *mesh_dev;
...@@ -1441,9 +1445,9 @@ struct chan_freq_power *lbs_get_region_cfp_table(u8 region, u8 band, int *cfp_no ...@@ -1441,9 +1445,9 @@ struct chan_freq_power *lbs_get_region_cfp_table(u8 region, u8 band, int *cfp_no
return NULL; return NULL;
} }
int lbs_set_regiontable(lbs_private *priv, u8 region, u8 band) int lbs_set_regiontable(struct lbs_private *priv, u8 region, u8 band)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
int i = 0; int i = 0;
...@@ -1485,7 +1489,7 @@ int lbs_set_regiontable(lbs_private *priv, u8 region, u8 band) ...@@ -1485,7 +1489,7 @@ int lbs_set_regiontable(lbs_private *priv, u8 region, u8 band)
*/ */
void lbs_interrupt(struct net_device *dev) void lbs_interrupt(struct net_device *dev)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_deb_enter(LBS_DEB_THREAD); lbs_deb_enter(LBS_DEB_THREAD);
...@@ -1507,7 +1511,7 @@ void lbs_interrupt(struct net_device *dev) ...@@ -1507,7 +1511,7 @@ void lbs_interrupt(struct net_device *dev)
} }
EXPORT_SYMBOL_GPL(lbs_interrupt); EXPORT_SYMBOL_GPL(lbs_interrupt);
int lbs_reset_device(lbs_private *priv) int lbs_reset_device(struct lbs_private *priv)
{ {
int ret; int ret;
...@@ -1562,12 +1566,12 @@ static int lbs_rtap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1562,12 +1566,12 @@ static int lbs_rtap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
static struct net_device_stats *lbs_rtap_get_stats(struct net_device *dev) static struct net_device_stats *lbs_rtap_get_stats(struct net_device *dev)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
return &priv->ieee->stats; return &priv->ieee->stats;
} }
void lbs_remove_rtap(lbs_private *priv) void lbs_remove_rtap(struct lbs_private *priv)
{ {
if (priv->rtap_net_dev == NULL) if (priv->rtap_net_dev == NULL)
return; return;
...@@ -1576,7 +1580,7 @@ void lbs_remove_rtap(lbs_private *priv) ...@@ -1576,7 +1580,7 @@ void lbs_remove_rtap(lbs_private *priv)
priv->rtap_net_dev = NULL; priv->rtap_net_dev = NULL;
} }
int lbs_add_rtap(lbs_private *priv) int lbs_add_rtap(struct lbs_private *priv)
{ {
int rc = 0; int rc = 0;
......
...@@ -35,19 +35,20 @@ struct rx80211packethdr { ...@@ -35,19 +35,20 @@ struct rx80211packethdr {
void *eth80211_hdr; void *eth80211_hdr;
} __attribute__ ((packed)); } __attribute__ ((packed));
static int process_rxed_802_11_packet(lbs_private *priv, struct sk_buff *skb); static int process_rxed_802_11_packet(struct lbs_private *priv,
struct sk_buff *skb);
/** /**
* @brief This function computes the avgSNR . * @brief This function computes the avgSNR .
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @return avgSNR * @return avgSNR
*/ */
static u8 lbs_getavgsnr(lbs_private *priv) static u8 lbs_getavgsnr(struct lbs_private *priv)
{ {
u8 i; u8 i;
u16 temp = 0; u16 temp = 0;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
if (adapter->numSNRNF == 0) if (adapter->numSNRNF == 0)
return 0; return 0;
for (i = 0; i < adapter->numSNRNF; i++) for (i = 0; i < adapter->numSNRNF; i++)
...@@ -59,14 +60,14 @@ static u8 lbs_getavgsnr(lbs_private *priv) ...@@ -59,14 +60,14 @@ static u8 lbs_getavgsnr(lbs_private *priv)
/** /**
* @brief This function computes the AvgNF * @brief This function computes the AvgNF
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @return AvgNF * @return AvgNF
*/ */
static u8 lbs_getavgnf(lbs_private *priv) static u8 lbs_getavgnf(struct lbs_private *priv)
{ {
u8 i; u8 i;
u16 temp = 0; u16 temp = 0;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
if (adapter->numSNRNF == 0) if (adapter->numSNRNF == 0)
return 0; return 0;
for (i = 0; i < adapter->numSNRNF; i++) for (i = 0; i < adapter->numSNRNF; i++)
...@@ -78,13 +79,13 @@ static u8 lbs_getavgnf(lbs_private *priv) ...@@ -78,13 +79,13 @@ static u8 lbs_getavgnf(lbs_private *priv)
/** /**
* @brief This function save the raw SNR/NF to our internel buffer * @brief This function save the raw SNR/NF to our internel buffer
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param prxpd A pointer to rxpd structure of received packet * @param prxpd A pointer to rxpd structure of received packet
* @return n/a * @return n/a
*/ */
static void lbs_save_rawSNRNF(lbs_private *priv, struct rxpd *p_rx_pd) static void lbs_save_rawSNRNF(struct lbs_private *priv, struct rxpd *p_rx_pd)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
if (adapter->numSNRNF < DEFAULT_DATA_AVG_FACTOR) if (adapter->numSNRNF < DEFAULT_DATA_AVG_FACTOR)
adapter->numSNRNF++; adapter->numSNRNF++;
adapter->rawSNR[adapter->nextSNRNF] = p_rx_pd->snr; adapter->rawSNR[adapter->nextSNRNF] = p_rx_pd->snr;
...@@ -98,13 +99,13 @@ static void lbs_save_rawSNRNF(lbs_private *priv, struct rxpd *p_rx_pd) ...@@ -98,13 +99,13 @@ static void lbs_save_rawSNRNF(lbs_private *priv, struct rxpd *p_rx_pd)
/** /**
* @brief This function computes the RSSI in received packet. * @brief This function computes the RSSI in received packet.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param prxpd A pointer to rxpd structure of received packet * @param prxpd A pointer to rxpd structure of received packet
* @return n/a * @return n/a
*/ */
static void lbs_compute_rssi(lbs_private *priv, struct rxpd *p_rx_pd) static void lbs_compute_rssi(struct lbs_private *priv, struct rxpd *p_rx_pd)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_RX); lbs_deb_enter(LBS_DEB_RX);
...@@ -134,7 +135,7 @@ static void lbs_compute_rssi(lbs_private *priv, struct rxpd *p_rx_pd) ...@@ -134,7 +135,7 @@ static void lbs_compute_rssi(lbs_private *priv, struct rxpd *p_rx_pd)
lbs_deb_leave(LBS_DEB_RX); lbs_deb_leave(LBS_DEB_RX);
} }
void lbs_upload_rx_packet(lbs_private *priv, struct sk_buff *skb) void lbs_upload_rx_packet(struct lbs_private *priv, struct sk_buff *skb)
{ {
lbs_deb_rx("skb->data %p\n", skb->data); lbs_deb_rx("skb->data %p\n", skb->data);
...@@ -154,13 +155,13 @@ void lbs_upload_rx_packet(lbs_private *priv, struct sk_buff *skb) ...@@ -154,13 +155,13 @@ void lbs_upload_rx_packet(lbs_private *priv, struct sk_buff *skb)
* @brief This function processes received packet and forwards it * @brief This function processes received packet and forwards it
* to kernel/upper layer * to kernel/upper layer
* *
* @param priv A pointer to lbs_private * @param priv A pointer to struct lbs_private
* @param skb A pointer to skb which includes the received packet * @param skb A pointer to skb which includes the received packet
* @return 0 or -1 * @return 0 or -1
*/ */
int lbs_process_rxed_packet(lbs_private *priv, struct sk_buff *skb) int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
struct rxpackethdr *p_rx_pkt; struct rxpackethdr *p_rx_pkt;
...@@ -319,13 +320,14 @@ static u8 convert_mv_rate_to_radiotap(u8 rate) ...@@ -319,13 +320,14 @@ static u8 convert_mv_rate_to_radiotap(u8 rate)
* @brief This function processes a received 802.11 packet and forwards it * @brief This function processes a received 802.11 packet and forwards it
* to kernel/upper layer * to kernel/upper layer
* *
* @param priv A pointer to lbs_private * @param priv A pointer to struct lbs_private
* @param skb A pointer to skb which includes the received packet * @param skb A pointer to skb which includes the received packet
* @return 0 or -1 * @return 0 or -1
*/ */
static int process_rxed_802_11_packet(lbs_private *priv, struct sk_buff *skb) static int process_rxed_802_11_packet(struct lbs_private *priv,
struct sk_buff *skb)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
struct rx80211packethdr *p_rx_pkt; struct rx80211packethdr *p_rx_pkt;
......
...@@ -163,13 +163,13 @@ static inline int match_bss_dynamic_wep(struct lbs_802_11_security *secinfo, ...@@ -163,13 +163,13 @@ static inline int match_bss_dynamic_wep(struct lbs_802_11_security *secinfo,
* 0 0 0 0 !=NONE 1 0 0 yes Dynamic WEP * 0 0 0 0 !=NONE 1 0 0 yes Dynamic WEP
* *
* *
* @param adapter A pointer to lbs_adapter * @param adapter A pointer to struct lbs_adapter
* @param index Index in scantable to check against current driver settings * @param index Index in scantable to check against current driver settings
* @param mode Network mode: Infrastructure or IBSS * @param mode Network mode: Infrastructure or IBSS
* *
* @return Index in scantable, or error code if negative * @return Index in scantable, or error code if negative
*/ */
static int is_network_compatible(lbs_adapter *adapter, static int is_network_compatible(struct lbs_adapter *adapter,
struct bss_descriptor * bss, u8 mode) struct bss_descriptor * bss, u8 mode)
{ {
int matched = 0; int matched = 0;
...@@ -262,7 +262,7 @@ int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len) ...@@ -262,7 +262,7 @@ int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len)
* of channels to scan. This routine is used for any scan that is not * of channels to scan. This routine is used for any scan that is not
* provided a specific channel list to scan. * provided a specific channel list to scan.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param scanchanlist Output parameter: resulting channel list to scan * @param scanchanlist Output parameter: resulting channel list to scan
* @param filteredscan Flag indicating whether or not a BSSID or SSID filter * @param filteredscan Flag indicating whether or not a BSSID or SSID filter
* is being sent in the command to firmware. Used to * is being sent in the command to firmware. Used to
...@@ -272,12 +272,12 @@ int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len) ...@@ -272,12 +272,12 @@ int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len)
* *
* @return void * @return void
*/ */
static void lbs_scan_create_channel_list(lbs_private *priv, static void lbs_scan_create_channel_list(struct lbs_private *priv,
struct chanscanparamset * scanchanlist, struct chanscanparamset * scanchanlist,
u8 filteredscan) u8 filteredscan)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct region_channel *scanregion; struct region_channel *scanregion;
struct chan_freq_power *cfp; struct chan_freq_power *cfp;
int rgnidx; int rgnidx;
...@@ -360,7 +360,9 @@ static void lbs_scan_create_channel_list(lbs_private *priv, ...@@ -360,7 +360,9 @@ static void lbs_scan_create_channel_list(lbs_private *priv,
/* Delayed partial scan worker */ /* Delayed partial scan worker */
void lbs_scan_worker(struct work_struct *work) void lbs_scan_worker(struct work_struct *work)
{ {
lbs_private *priv = container_of(work, lbs_private, scan_work.work); struct lbs_private *priv = container_of(work,
struct lbs_private,
scan_work.work);
lbs_scan_networks(priv, NULL, 0); lbs_scan_networks(priv, NULL, 0);
} }
...@@ -386,7 +388,7 @@ void lbs_scan_worker(struct work_struct *work) ...@@ -386,7 +388,7 @@ void lbs_scan_worker(struct work_struct *work)
* If the number of probes is not set, use the adapter default setting * If the number of probes is not set, use the adapter default setting
* Qualify the channel * Qualify the channel
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param puserscanin NULL or pointer to scan configuration parameters * @param puserscanin NULL or pointer to scan configuration parameters
* @param ppchantlvout Output parameter: Pointer to the start of the * @param ppchantlvout Output parameter: Pointer to the start of the
* channel TLV portion of the output scan config * channel TLV portion of the output scan config
...@@ -405,7 +407,7 @@ void lbs_scan_worker(struct work_struct *work) ...@@ -405,7 +407,7 @@ void lbs_scan_worker(struct work_struct *work)
* @return resulting scan configuration * @return resulting scan configuration
*/ */
static struct lbs_scan_cmd_config * static struct lbs_scan_cmd_config *
lbs_scan_setup_scan_config(lbs_private *priv, lbs_scan_setup_scan_config(struct lbs_private *priv,
const struct lbs_ioctl_user_scan_cfg *puserscanin, const struct lbs_ioctl_user_scan_cfg *puserscanin,
struct mrvlietypes_chanlistparamset ** ppchantlvout, struct mrvlietypes_chanlistparamset ** ppchantlvout,
struct chanscanparamset * pscanchanlist, struct chanscanparamset * pscanchanlist,
...@@ -587,7 +589,7 @@ lbs_scan_setup_scan_config(lbs_private *priv, ...@@ -587,7 +589,7 @@ lbs_scan_setup_scan_config(lbs_private *priv,
* and sends the portion of the channel TLV along with the other TLVs * and sends the portion of the channel TLV along with the other TLVs
* to the lbs_cmd routines for execution in the firmware. * to the lbs_cmd routines for execution in the firmware.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param maxchanperscan Maximum number channels to be included in each * @param maxchanperscan Maximum number channels to be included in each
* scan command sent to firmware * scan command sent to firmware
* @param filteredscan Flag indicating whether or not a BSSID or SSID * @param filteredscan Flag indicating whether or not a BSSID or SSID
...@@ -601,7 +603,7 @@ lbs_scan_setup_scan_config(lbs_private *priv, ...@@ -601,7 +603,7 @@ lbs_scan_setup_scan_config(lbs_private *priv,
* *
* @return 0 or error return otherwise * @return 0 or error return otherwise
*/ */
static int lbs_scan_channel_list(lbs_private *priv, static int lbs_scan_channel_list(struct lbs_private *priv,
int maxchanperscan, int maxchanperscan,
u8 filteredscan, u8 filteredscan,
struct lbs_scan_cmd_config *pscancfgout, struct lbs_scan_cmd_config *pscancfgout,
...@@ -754,7 +756,7 @@ static int lbs_scan_channel_list(lbs_private *priv, ...@@ -754,7 +756,7 @@ static int lbs_scan_channel_list(lbs_private *priv,
/* /*
* Only used from lbs_scan_networks() * Only used from lbs_scan_networks()
*/ */
static void clear_selected_scan_list_entries(lbs_adapter *adapter, static void clear_selected_scan_list_entries(struct lbs_adapter *adapter,
const struct lbs_ioctl_user_scan_cfg *scan_cfg) const struct lbs_ioctl_user_scan_cfg *scan_cfg)
{ {
struct bss_descriptor *bss; struct bss_descriptor *bss;
...@@ -813,18 +815,18 @@ static void clear_selected_scan_list_entries(lbs_adapter *adapter, ...@@ -813,18 +815,18 @@ static void clear_selected_scan_list_entries(lbs_adapter *adapter,
* order to send the appropriate scan commands to firmware to populate or * order to send the appropriate scan commands to firmware to populate or
* update the internal driver scan table * update the internal driver scan table
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param puserscanin Pointer to the input configuration for the requested * @param puserscanin Pointer to the input configuration for the requested
* scan. * scan.
* @param full_scan ??? * @param full_scan ???
* *
* @return 0 or < 0 if error * @return 0 or < 0 if error
*/ */
int lbs_scan_networks(lbs_private *priv, int lbs_scan_networks(struct lbs_private *priv,
const struct lbs_ioctl_user_scan_cfg *puserscanin, const struct lbs_ioctl_user_scan_cfg *puserscanin,
int full_scan) int full_scan)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct mrvlietypes_chanlistparamset *pchantlvout; struct mrvlietypes_chanlistparamset *pchantlvout;
struct chanscanparamset * scan_chan_list = NULL; struct chanscanparamset * scan_chan_list = NULL;
struct lbs_scan_cmd_config *scan_cfg = NULL; struct lbs_scan_cmd_config *scan_cfg = NULL;
...@@ -1155,13 +1157,13 @@ static int lbs_process_bss(struct bss_descriptor *bss, ...@@ -1155,13 +1157,13 @@ static int lbs_process_bss(struct bss_descriptor *bss,
* *
* Used in association code * Used in association code
* *
* @param adapter A pointer to lbs_adapter * @param adapter A pointer to struct lbs_adapter
* @param bssid BSSID to find in the scan list * @param bssid BSSID to find in the scan list
* @param mode Network mode: Infrastructure or IBSS * @param mode Network mode: Infrastructure or IBSS
* *
* @return index in BSSID list, or error return code (< 0) * @return index in BSSID list, or error return code (< 0)
*/ */
struct bss_descriptor *lbs_find_bssid_in_list(lbs_adapter *adapter, struct bss_descriptor *lbs_find_bssid_in_list(struct lbs_adapter *adapter,
u8 * bssid, u8 mode) u8 * bssid, u8 mode)
{ {
struct bss_descriptor * iter_bss; struct bss_descriptor * iter_bss;
...@@ -1207,14 +1209,14 @@ struct bss_descriptor *lbs_find_bssid_in_list(lbs_adapter *adapter, ...@@ -1207,14 +1209,14 @@ struct bss_descriptor *lbs_find_bssid_in_list(lbs_adapter *adapter,
* *
* Used in association code * Used in association code
* *
* @param adapter A pointer to lbs_adapter * @param adapter A pointer to struct lbs_adapter
* @param ssid SSID to find in the list * @param ssid SSID to find in the list
* @param bssid BSSID to qualify the SSID selection (if provided) * @param bssid BSSID to qualify the SSID selection (if provided)
* @param mode Network mode: Infrastructure or IBSS * @param mode Network mode: Infrastructure or IBSS
* *
* @return index in BSSID list * @return index in BSSID list
*/ */
struct bss_descriptor *lbs_find_ssid_in_list(lbs_adapter *adapter, struct bss_descriptor *lbs_find_ssid_in_list(struct lbs_adapter *adapter,
u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode, u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode,
int channel) int channel)
{ {
...@@ -1279,11 +1281,12 @@ struct bss_descriptor *lbs_find_ssid_in_list(lbs_adapter *adapter, ...@@ -1279,11 +1281,12 @@ struct bss_descriptor *lbs_find_ssid_in_list(lbs_adapter *adapter,
* Search the scan table for the best SSID that also matches the current * Search the scan table for the best SSID that also matches the current
* adapter network preference (infrastructure or adhoc) * adapter network preference (infrastructure or adhoc)
* *
* @param adapter A pointer to lbs_adapter * @param adapter A pointer to struct lbs_adapter
* *
* @return index in BSSID list * @return index in BSSID list
*/ */
static struct bss_descriptor *lbs_find_best_ssid_in_list(lbs_adapter *adapter, static struct bss_descriptor *lbs_find_best_ssid_in_list(
struct lbs_adapter *adapter,
u8 mode) u8 mode)
{ {
u8 bestrssi = 0; u8 bestrssi = 0;
...@@ -1325,15 +1328,15 @@ static struct bss_descriptor *lbs_find_best_ssid_in_list(lbs_adapter *adapter, ...@@ -1325,15 +1328,15 @@ static struct bss_descriptor *lbs_find_best_ssid_in_list(lbs_adapter *adapter,
* *
* Used from association worker. * Used from association worker.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param pSSID A pointer to AP's ssid * @param pSSID A pointer to AP's ssid
* *
* @return 0--success, otherwise--fail * @return 0--success, otherwise--fail
*/ */
int lbs_find_best_network_ssid(lbs_private *priv, int lbs_find_best_network_ssid(struct lbs_private *priv,
u8 *out_ssid, u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode) u8 *out_ssid, u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = -1; int ret = -1;
struct bss_descriptor * found; struct bss_descriptor * found;
...@@ -1371,8 +1374,8 @@ int lbs_find_best_network_ssid(lbs_private *priv, ...@@ -1371,8 +1374,8 @@ int lbs_find_best_network_ssid(lbs_private *priv,
int lbs_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) struct iw_param *vwrq, char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_SCAN); lbs_deb_enter(LBS_DEB_SCAN);
...@@ -1394,7 +1397,7 @@ int lbs_set_scan(struct net_device *dev, struct iw_request_info *info, ...@@ -1394,7 +1397,7 @@ int lbs_set_scan(struct net_device *dev, struct iw_request_info *info,
* *
* Used in association code and from debugfs * Used in association code and from debugfs
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param ssid A pointer to the SSID to scan for * @param ssid A pointer to the SSID to scan for
* @param ssid_len Length of the SSID * @param ssid_len Length of the SSID
* @param clear_ssid Should existing scan results with this SSID * @param clear_ssid Should existing scan results with this SSID
...@@ -1404,10 +1407,10 @@ int lbs_set_scan(struct net_device *dev, struct iw_request_info *info, ...@@ -1404,10 +1407,10 @@ int lbs_set_scan(struct net_device *dev, struct iw_request_info *info,
* *
* @return 0-success, otherwise fail * @return 0-success, otherwise fail
*/ */
int lbs_send_specific_ssid_scan(lbs_private *priv, int lbs_send_specific_ssid_scan(struct lbs_private *priv,
u8 *ssid, u8 ssid_len, u8 clear_ssid) u8 *ssid, u8 ssid_len, u8 clear_ssid)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct lbs_ioctl_user_scan_cfg scancfg; struct lbs_ioctl_user_scan_cfg scancfg;
int ret = 0; int ret = 0;
...@@ -1445,11 +1448,11 @@ int lbs_send_specific_ssid_scan(lbs_private *priv, ...@@ -1445,11 +1448,11 @@ int lbs_send_specific_ssid_scan(lbs_private *priv,
#define MAX_CUSTOM_LEN 64 #define MAX_CUSTOM_LEN 64
static inline char *lbs_translate_scan(lbs_private *priv, static inline char *lbs_translate_scan(struct lbs_private *priv,
char *start, char *stop, char *start, char *stop,
struct bss_descriptor *bss) struct bss_descriptor *bss)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct chan_freq_power *cfp; struct chan_freq_power *cfp;
char *current_val; /* For rates */ char *current_val; /* For rates */
struct iw_event iwe; /* Temporary buffer */ struct iw_event iwe; /* Temporary buffer */
...@@ -1612,8 +1615,8 @@ int lbs_get_scan(struct net_device *dev, struct iw_request_info *info, ...@@ -1612,8 +1615,8 @@ int lbs_get_scan(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra) struct iw_point *dwrq, char *extra)
{ {
#define SCAN_ITEM_SIZE 128 #define SCAN_ITEM_SIZE 128
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int err = 0; int err = 0;
char *ev = extra; char *ev = extra;
char *stop = ev + dwrq->length; char *stop = ev + dwrq->length;
...@@ -1684,7 +1687,7 @@ int lbs_get_scan(struct net_device *dev, struct iw_request_info *info, ...@@ -1684,7 +1687,7 @@ int lbs_get_scan(struct net_device *dev, struct iw_request_info *info,
* Sends a fixed lenght data part (specifying the BSS type and BSSID filters) * 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. * as well as a variable number/length of TLVs to the firmware.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param cmd A pointer to cmd_ds_command structure to be sent to * @param cmd A pointer to cmd_ds_command structure to be sent to
* firmware with the cmd_DS_801_11_SCAN structure * firmware with the cmd_DS_801_11_SCAN structure
* @param pdata_buf Void pointer cast of a lbs_scan_cmd_config struct used * @param pdata_buf Void pointer cast of a lbs_scan_cmd_config struct used
...@@ -1692,7 +1695,7 @@ int lbs_get_scan(struct net_device *dev, struct iw_request_info *info, ...@@ -1692,7 +1695,7 @@ int lbs_get_scan(struct net_device *dev, struct iw_request_info *info,
* *
* @return 0 or -1 * @return 0 or -1
*/ */
int lbs_cmd_80211_scan(lbs_private *priv, int lbs_cmd_80211_scan(struct lbs_private *priv,
struct cmd_ds_command *cmd, void *pdata_buf) struct cmd_ds_command *cmd, void *pdata_buf)
{ {
struct cmd_ds_802_11_scan *pscan = &cmd->params.scan; struct cmd_ds_802_11_scan *pscan = &cmd->params.scan;
...@@ -1752,14 +1755,14 @@ static inline int is_same_network(struct bss_descriptor *src, ...@@ -1752,14 +1755,14 @@ static inline int is_same_network(struct bss_descriptor *src,
* | bufsize and sizeof the fixed fields above) | * | bufsize and sizeof the fixed fields above) |
* .-----------------------------------------------------------. * .-----------------------------------------------------------.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param resp A pointer to cmd_ds_command * @param resp A pointer to cmd_ds_command
* *
* @return 0 or -1 * @return 0 or -1
*/ */
int lbs_ret_80211_scan(lbs_private *priv, struct cmd_ds_command *resp) int lbs_ret_80211_scan(struct lbs_private *priv, struct cmd_ds_command *resp)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_scan_rsp *pscan; struct cmd_ds_802_11_scan_rsp *pscan;
struct bss_descriptor * iter_bss; struct bss_descriptor * iter_bss;
struct bss_descriptor * safe; struct bss_descriptor * safe;
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#include <net/ieee80211.h> #include <net/ieee80211.h>
#include "hostcmd.h" #include "hostcmd.h"
struct lbs_adapter;
/** /**
* @brief Maximum number of channels that can be sent in a setuserscan ioctl * @brief Maximum number of channels that can be sent in a setuserscan ioctl
* *
...@@ -176,27 +178,27 @@ struct bss_descriptor { ...@@ -176,27 +178,27 @@ struct bss_descriptor {
int lbs_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 *lbs_find_ssid_in_list(lbs_adapter *adapter, struct bss_descriptor *lbs_find_ssid_in_list(struct lbs_adapter *adapter,
u8 *ssid, u8 ssid_len, u8 *bssid, u8 mode, u8 *ssid, u8 ssid_len, u8 *bssid, u8 mode,
int channel); int channel);
struct bss_descriptor *lbs_find_bssid_in_list(lbs_adapter *adapter, struct bss_descriptor *lbs_find_bssid_in_list(struct lbs_adapter *adapter,
u8 *bssid, u8 mode); u8 *bssid, u8 mode);
int lbs_find_best_network_ssid(lbs_private *priv, u8 *out_ssid, int lbs_find_best_network_ssid(struct lbs_private *priv, u8 *out_ssid,
u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode); u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode);
int lbs_send_specific_ssid_scan(lbs_private *priv, u8 *ssid, int lbs_send_specific_ssid_scan(struct lbs_private *priv, u8 *ssid,
u8 ssid_len, u8 clear_ssid); u8 ssid_len, u8 clear_ssid);
int lbs_cmd_80211_scan(lbs_private *priv, int lbs_cmd_80211_scan(struct lbs_private *priv,
struct cmd_ds_command *cmd, struct cmd_ds_command *cmd,
void *pdata_buf); void *pdata_buf);
int lbs_ret_80211_scan(lbs_private *priv, int lbs_ret_80211_scan(struct lbs_private *priv,
struct cmd_ds_command *resp); struct cmd_ds_command *resp);
int lbs_scan_networks(lbs_private *priv, int lbs_scan_networks(struct lbs_private *priv,
const struct lbs_ioctl_user_scan_cfg *puserscanin, const struct lbs_ioctl_user_scan_cfg *puserscanin,
int full_scan); int full_scan);
......
...@@ -52,11 +52,11 @@ static u32 convert_radiotap_rate_to_mv(u8 rate) ...@@ -52,11 +52,11 @@ static u32 convert_radiotap_rate_to_mv(u8 rate)
* @brief This function processes a single packet and sends * @brief This function processes a single packet and sends
* to IF layer * to IF layer
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param skb A pointer to skb which includes TX packet * @param skb A pointer to skb which includes TX packet
* @return 0 or -1 * @return 0 or -1
*/ */
static int SendSinglePacket(lbs_private *priv, struct sk_buff *skb) static int SendSinglePacket(struct lbs_private *priv, struct sk_buff *skb)
{ {
int ret = 0; int ret = 0;
struct txpd localtxpd; struct txpd localtxpd;
...@@ -164,9 +164,9 @@ static int SendSinglePacket(lbs_private *priv, struct sk_buff *skb) ...@@ -164,9 +164,9 @@ static int SendSinglePacket(lbs_private *priv, struct sk_buff *skb)
} }
void lbs_tx_runqueue(lbs_private *priv) void lbs_tx_runqueue(struct lbs_private *priv)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int i; int i;
spin_lock(&adapter->txqueue_lock); spin_lock(&adapter->txqueue_lock);
...@@ -180,9 +180,9 @@ void lbs_tx_runqueue(lbs_private *priv) ...@@ -180,9 +180,9 @@ void lbs_tx_runqueue(lbs_private *priv)
spin_unlock(&adapter->txqueue_lock); spin_unlock(&adapter->txqueue_lock);
} }
static void lbs_tx_queue(lbs_private *priv, struct sk_buff *skb) static void lbs_tx_queue(struct lbs_private *priv, struct sk_buff *skb)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
spin_lock(&adapter->txqueue_lock); spin_lock(&adapter->txqueue_lock);
...@@ -205,10 +205,10 @@ static void lbs_tx_queue(lbs_private *priv, struct sk_buff *skb) ...@@ -205,10 +205,10 @@ static void lbs_tx_queue(lbs_private *priv, struct sk_buff *skb)
* @brief This function checks the conditions and sends packet to IF * @brief This function checks the conditions and sends packet to IF
* layer if everything is ok. * layer if everything is ok.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @return n/a * @return n/a
*/ */
int lbs_process_tx(lbs_private *priv, struct sk_buff *skb) int lbs_process_tx(struct lbs_private *priv, struct sk_buff *skb)
{ {
int ret = -1; int ret = -1;
...@@ -239,14 +239,14 @@ int lbs_process_tx(lbs_private *priv, struct sk_buff *skb) ...@@ -239,14 +239,14 @@ int lbs_process_tx(lbs_private *priv, struct sk_buff *skb)
* @brief This function sends to the host the last transmitted packet, * @brief This function sends to the host the last transmitted packet,
* filling the radiotap headers with transmission information. * filling the radiotap headers with transmission information.
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @param status A 32 bit value containing transmission status. * @param status A 32 bit value containing transmission status.
* *
* @returns void * @returns void
*/ */
void lbs_send_tx_feedback(lbs_private *priv) void lbs_send_tx_feedback(struct lbs_private *priv)
{ {
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct tx_radiotap_hdr *radiotap_hdr; struct tx_radiotap_hdr *radiotap_hdr;
u32 status = adapter->eventcause; u32 status = adapter->eventcause;
int txfail; int txfail;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "assoc.h" #include "assoc.h"
static inline void lbs_postpone_association_work(lbs_private *priv) static inline void lbs_postpone_association_work(struct lbs_private *priv)
{ {
if (priv->adapter->surpriseremoved) if (priv->adapter->surpriseremoved)
return; return;
...@@ -29,7 +29,7 @@ static inline void lbs_postpone_association_work(lbs_private *priv) ...@@ -29,7 +29,7 @@ static inline void lbs_postpone_association_work(lbs_private *priv)
queue_delayed_work(priv->work_thread, &priv->assoc_work, HZ / 2); queue_delayed_work(priv->work_thread, &priv->assoc_work, HZ / 2);
} }
static inline void lbs_cancel_association_work(lbs_private *priv) static inline void lbs_cancel_association_work(struct lbs_private *priv)
{ {
cancel_delayed_work(&priv->assoc_work); cancel_delayed_work(&priv->assoc_work);
kfree(priv->adapter->pending_assoc_req); kfree(priv->adapter->pending_assoc_req);
...@@ -40,13 +40,15 @@ static inline void lbs_cancel_association_work(lbs_private *priv) ...@@ -40,13 +40,15 @@ static inline void lbs_cancel_association_work(lbs_private *priv)
/** /**
* @brief Find the channel frequency power info with specific channel * @brief Find the channel frequency power info with specific channel
* *
* @param adapter A pointer to lbs_adapter structure * @param adapter A pointer to struct lbs_adapter structure
* @param band it can be BAND_A, BAND_G or BAND_B * @param band it can be BAND_A, BAND_G or BAND_B
* @param channel the channel for looking * @param channel the channel for looking
* @return A pointer to struct chan_freq_power structure or NULL if not find. * @return A pointer to struct chan_freq_power structure or NULL if not find.
*/ */
struct chan_freq_power *lbs_find_cfp_by_band_and_channel(lbs_adapter *adapter, struct chan_freq_power *lbs_find_cfp_by_band_and_channel(
u8 band, u16 channel) struct lbs_adapter *adapter,
u8 band,
u16 channel)
{ {
struct chan_freq_power *cfp = NULL; struct chan_freq_power *cfp = NULL;
struct region_channel *rc; struct region_channel *rc;
...@@ -79,13 +81,15 @@ struct chan_freq_power *lbs_find_cfp_by_band_and_channel(lbs_adapter *adapter, ...@@ -79,13 +81,15 @@ struct chan_freq_power *lbs_find_cfp_by_band_and_channel(lbs_adapter *adapter,
/** /**
* @brief Find the channel frequency power info with specific frequency * @brief Find the channel frequency power info with specific frequency
* *
* @param adapter A pointer to lbs_adapter structure * @param adapter A pointer to struct lbs_adapter structure
* @param band it can be BAND_A, BAND_G or BAND_B * @param band it can be BAND_A, BAND_G or BAND_B
* @param freq the frequency for looking * @param freq the frequency for looking
* @return A pointer to struct chan_freq_power structure or NULL if not find. * @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(lbs_adapter *adapter, static struct chan_freq_power *find_cfp_by_band_and_freq(
u8 band, u32 freq) struct lbs_adapter *adapter,
u8 band,
u32 freq)
{ {
struct chan_freq_power *cfp = NULL; struct chan_freq_power *cfp = NULL;
struct region_channel *rc; struct region_channel *rc;
...@@ -119,14 +123,14 @@ static struct chan_freq_power *find_cfp_by_band_and_freq(lbs_adapter *adapter, ...@@ -119,14 +123,14 @@ static struct chan_freq_power *find_cfp_by_band_and_freq(lbs_adapter *adapter,
/** /**
* @brief Set Radio On/OFF * @brief Set Radio On/OFF
* *
* @param priv A pointer to lbs_private structure * @param priv A pointer to struct lbs_private structure
* @option Radio Option * @option Radio Option
* @return 0 --success, otherwise fail * @return 0 --success, otherwise fail
*/ */
static int lbs_radio_ioctl(lbs_private *priv, u8 option) static int lbs_radio_ioctl(struct lbs_private *priv, u8 option)
{ {
int ret = 0; int ret = 0;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -147,10 +151,10 @@ static int lbs_radio_ioctl(lbs_private *priv, u8 option) ...@@ -147,10 +151,10 @@ static int lbs_radio_ioctl(lbs_private *priv, u8 option)
/** /**
* @brief Copy active data rates based on adapter mode and status * @brief Copy active data rates based on adapter mode and status
* *
* @param adapter A pointer to lbs_adapter structure * @param adapter A pointer to struct lbs_adapter structure
* @param rate The buf to return the active rates * @param rate The buf to return the active rates
*/ */
static void copy_active_data_rates(lbs_adapter *adapter, u8 *rates) static void copy_active_data_rates(struct lbs_adapter *adapter, u8 *rates)
{ {
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -179,8 +183,8 @@ static int lbs_get_name(struct net_device *dev, struct iw_request_info *info, ...@@ -179,8 +183,8 @@ static int lbs_get_name(struct net_device *dev, struct iw_request_info *info,
static int lbs_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) struct iw_freq *fwrq, char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct chan_freq_power *cfp; struct chan_freq_power *cfp;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -206,8 +210,8 @@ static int lbs_get_freq(struct net_device *dev, struct iw_request_info *info, ...@@ -206,8 +210,8 @@ static int lbs_get_freq(struct net_device *dev, struct iw_request_info *info,
static int lbs_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) struct sockaddr *awrq, char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -225,8 +229,8 @@ static int lbs_get_wap(struct net_device *dev, struct iw_request_info *info, ...@@ -225,8 +229,8 @@ static int lbs_get_wap(struct net_device *dev, struct iw_request_info *info,
static int lbs_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) struct iw_point *dwrq, char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -250,8 +254,8 @@ static int lbs_set_nick(struct net_device *dev, struct iw_request_info *info, ...@@ -250,8 +254,8 @@ static int lbs_set_nick(struct net_device *dev, struct iw_request_info *info,
static int lbs_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) struct iw_point *dwrq, char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -268,8 +272,8 @@ static int lbs_get_nick(struct net_device *dev, struct iw_request_info *info, ...@@ -268,8 +272,8 @@ static int lbs_get_nick(struct net_device *dev, struct iw_request_info *info,
static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info, static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra) struct iw_point *dwrq, char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -294,8 +298,8 @@ static int lbs_set_rts(struct net_device *dev, struct iw_request_info *info, ...@@ -294,8 +298,8 @@ static int lbs_set_rts(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra) struct iw_param *vwrq, char *extra)
{ {
int ret = 0; int ret = 0;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
u32 rthr = vwrq->value; u32 rthr = vwrq->value;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -320,8 +324,8 @@ static int lbs_get_rts(struct net_device *dev, struct iw_request_info *info, ...@@ -320,8 +324,8 @@ static int lbs_get_rts(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra) struct iw_param *vwrq, char *extra)
{ {
int ret = 0; int ret = 0;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -347,8 +351,8 @@ static int lbs_set_frag(struct net_device *dev, struct iw_request_info *info, ...@@ -347,8 +351,8 @@ static int lbs_set_frag(struct net_device *dev, struct iw_request_info *info,
{ {
int ret = 0; int ret = 0;
u32 fthr = vwrq->value; u32 fthr = vwrq->value;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -373,8 +377,8 @@ static int lbs_get_frag(struct net_device *dev, struct iw_request_info *info, ...@@ -373,8 +377,8 @@ static int lbs_get_frag(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra) struct iw_param *vwrq, char *extra)
{ {
int ret = 0; int ret = 0;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -399,8 +403,8 @@ static int lbs_get_frag(struct net_device *dev, struct iw_request_info *info, ...@@ -399,8 +403,8 @@ static int lbs_get_frag(struct net_device *dev, struct iw_request_info *info,
static int lbs_get_mode(struct net_device *dev, static int lbs_get_mode(struct net_device *dev,
struct iw_request_info *info, u32 * uwrq, char *extra) struct iw_request_info *info, u32 * uwrq, char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -427,8 +431,8 @@ static int lbs_get_txpow(struct net_device *dev, ...@@ -427,8 +431,8 @@ static int lbs_get_txpow(struct net_device *dev,
struct iw_param *vwrq, char *extra) struct iw_param *vwrq, char *extra)
{ {
int ret = 0; int ret = 0;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -459,8 +463,8 @@ static int lbs_set_retry(struct net_device *dev, struct iw_request_info *info, ...@@ -459,8 +463,8 @@ static int lbs_set_retry(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra) struct iw_param *vwrq, char *extra)
{ {
int ret = 0; int ret = 0;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -494,8 +498,8 @@ static int lbs_set_retry(struct net_device *dev, struct iw_request_info *info, ...@@ -494,8 +498,8 @@ static int lbs_set_retry(struct net_device *dev, struct iw_request_info *info,
static int lbs_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) struct iw_param *vwrq, char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -563,8 +567,8 @@ static int lbs_get_range(struct net_device *dev, struct iw_request_info *info, ...@@ -563,8 +567,8 @@ static int lbs_get_range(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra) struct iw_point *dwrq, char *extra)
{ {
int i, j; int i, j;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct iw_range *range = (struct iw_range *)extra; struct iw_range *range = (struct iw_range *)extra;
struct chan_freq_power *cfp; struct chan_freq_power *cfp;
u8 rates[MAX_RATES + 1]; u8 rates[MAX_RATES + 1];
...@@ -740,8 +744,8 @@ static int lbs_get_range(struct net_device *dev, struct iw_request_info *info, ...@@ -740,8 +744,8 @@ static int lbs_get_range(struct net_device *dev, struct iw_request_info *info,
static int lbs_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) struct iw_param *vwrq, char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -784,8 +788,8 @@ static int lbs_set_power(struct net_device *dev, struct iw_request_info *info, ...@@ -784,8 +788,8 @@ static int lbs_set_power(struct net_device *dev, struct iw_request_info *info,
static int lbs_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) struct iw_param *vwrq, char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int mode; int mode;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -815,8 +819,8 @@ static struct iw_statistics *lbs_get_wireless_stats(struct net_device *dev) ...@@ -815,8 +819,8 @@ static struct iw_statistics *lbs_get_wireless_stats(struct net_device *dev)
EXCELLENT = 95, EXCELLENT = 95,
PERFECT = 100 PERFECT = 100
}; };
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
u32 rssi_qual; u32 rssi_qual;
u32 tx_qual; u32 tx_qual;
u32 quality = 0; u32 quality = 0;
...@@ -919,8 +923,8 @@ static int lbs_set_freq(struct net_device *dev, struct iw_request_info *info, ...@@ -919,8 +923,8 @@ static int lbs_set_freq(struct net_device *dev, struct iw_request_info *info,
struct iw_freq *fwrq, char *extra) struct iw_freq *fwrq, char *extra)
{ {
int ret = -EINVAL; int ret = -EINVAL;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct chan_freq_power *cfp; struct chan_freq_power *cfp;
struct assoc_request * assoc_req; struct assoc_request * assoc_req;
...@@ -976,8 +980,8 @@ static int lbs_set_freq(struct net_device *dev, struct iw_request_info *info, ...@@ -976,8 +980,8 @@ static int lbs_set_freq(struct net_device *dev, struct iw_request_info *info,
static int lbs_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) struct iw_param *vwrq, char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
u32 new_rate; u32 new_rate;
u16 action; u16 action;
int ret = -EINVAL; int ret = -EINVAL;
...@@ -1020,8 +1024,8 @@ static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info, ...@@ -1020,8 +1024,8 @@ static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info,
static int lbs_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) struct iw_param *vwrq, char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -1046,8 +1050,8 @@ static int lbs_set_mode(struct net_device *dev, ...@@ -1046,8 +1050,8 @@ static int lbs_set_mode(struct net_device *dev,
struct iw_request_info *info, u32 * uwrq, char *extra) struct iw_request_info *info, u32 * uwrq, char *extra)
{ {
int ret = 0; int ret = 0;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct assoc_request * assoc_req; struct assoc_request * assoc_req;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -1092,8 +1096,8 @@ static int lbs_get_encode(struct net_device *dev, ...@@ -1092,8 +1096,8 @@ static int lbs_get_encode(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, u8 * extra) struct iw_point *dwrq, u8 * extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -1297,8 +1301,8 @@ static int lbs_set_encode(struct net_device *dev, ...@@ -1297,8 +1301,8 @@ static int lbs_set_encode(struct net_device *dev,
struct iw_point *dwrq, char *extra) struct iw_point *dwrq, char *extra)
{ {
int ret = 0; int ret = 0;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct assoc_request * assoc_req; struct assoc_request * assoc_req;
u16 is_default = 0, index = 0, set_tx_key = 0; u16 is_default = 0, index = 0, set_tx_key = 0;
...@@ -1374,8 +1378,8 @@ static int lbs_get_encodeext(struct net_device *dev, ...@@ -1374,8 +1378,8 @@ static int lbs_get_encodeext(struct net_device *dev,
char *extra) char *extra)
{ {
int ret = -EINVAL; int ret = -EINVAL;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
int index, max_key_len; int index, max_key_len;
...@@ -1481,8 +1485,8 @@ static int lbs_set_encodeext(struct net_device *dev, ...@@ -1481,8 +1485,8 @@ static int lbs_set_encodeext(struct net_device *dev,
char *extra) char *extra)
{ {
int ret = 0; int ret = 0;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
int alg = ext->alg; int alg = ext->alg;
struct assoc_request * assoc_req; struct assoc_request * assoc_req;
...@@ -1606,8 +1610,8 @@ static int lbs_set_genie(struct net_device *dev, ...@@ -1606,8 +1610,8 @@ static int lbs_set_genie(struct net_device *dev,
struct iw_point *dwrq, struct iw_point *dwrq,
char *extra) char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
struct assoc_request * assoc_req; struct assoc_request * assoc_req;
...@@ -1653,8 +1657,8 @@ static int lbs_get_genie(struct net_device *dev, ...@@ -1653,8 +1657,8 @@ static int lbs_get_genie(struct net_device *dev,
char *extra) char *extra)
{ {
int ret = 0; int ret = 0;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -1682,8 +1686,8 @@ static int lbs_set_auth(struct net_device *dev, ...@@ -1682,8 +1686,8 @@ static int lbs_set_auth(struct net_device *dev,
struct iw_param *dwrq, struct iw_param *dwrq,
char *extra) char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct assoc_request * assoc_req; struct assoc_request * assoc_req;
int ret = 0; int ret = 0;
int updated = 0; int updated = 0;
...@@ -1782,8 +1786,8 @@ static int lbs_get_auth(struct net_device *dev, ...@@ -1782,8 +1786,8 @@ static int lbs_get_auth(struct net_device *dev,
char *extra) char *extra)
{ {
int ret = 0; int ret = 0;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -1820,8 +1824,8 @@ static int lbs_set_txpow(struct net_device *dev, struct iw_request_info *info, ...@@ -1820,8 +1824,8 @@ static int lbs_set_txpow(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra) struct iw_param *vwrq, char *extra)
{ {
int ret = 0; int ret = 0;
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
u16 dbm; u16 dbm;
...@@ -1862,8 +1866,8 @@ static int lbs_set_txpow(struct net_device *dev, struct iw_request_info *info, ...@@ -1862,8 +1866,8 @@ static int lbs_set_txpow(struct net_device *dev, struct iw_request_info *info,
static int lbs_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) struct iw_point *dwrq, char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
lbs_deb_enter(LBS_DEB_WEXT); lbs_deb_enter(LBS_DEB_WEXT);
...@@ -1898,8 +1902,8 @@ static int lbs_get_essid(struct net_device *dev, struct iw_request_info *info, ...@@ -1898,8 +1902,8 @@ static int lbs_get_essid(struct net_device *dev, struct iw_request_info *info,
static int lbs_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) struct iw_point *dwrq, char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
int ret = 0; int ret = 0;
u8 ssid[IW_ESSID_MAX_SIZE]; u8 ssid[IW_ESSID_MAX_SIZE];
u8 ssid_len = 0; u8 ssid_len = 0;
...@@ -1970,8 +1974,8 @@ static int lbs_set_essid(struct net_device *dev, struct iw_request_info *info, ...@@ -1970,8 +1974,8 @@ static int lbs_set_essid(struct net_device *dev, struct iw_request_info *info,
static int lbs_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) struct sockaddr *awrq, char *extra)
{ {
lbs_private *priv = dev->priv; struct lbs_private *priv = dev->priv;
lbs_adapter *adapter = priv->adapter; struct lbs_adapter *adapter = priv->adapter;
struct assoc_request * assoc_req; struct assoc_request * assoc_req;
int ret = 0; int ret = 0;
DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac);
...@@ -2002,7 +2006,7 @@ static int lbs_set_wap(struct net_device *dev, struct iw_request_info *info, ...@@ -2002,7 +2006,7 @@ static int lbs_set_wap(struct net_device *dev, struct iw_request_info *info,
return ret; return ret;
} }
void lbs_get_fwversion(lbs_adapter *adapter, char *fwversion, int maxlen) void lbs_get_fwversion(struct lbs_adapter *adapter, char *fwversion, int maxlen)
{ {
char fwver[32]; char fwver[32];
......
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