summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/sta_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/mwifiex/sta_ioctl.c')
-rw-r--r--drivers/net/wireless/mwifiex/sta_ioctl.c50
1 files changed, 24 insertions, 26 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index e7adaab35226..4585c1bb9fa9 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -149,7 +149,7 @@ int mwifiex_request_set_multicast_list(struct mwifiex_private *priv,
int mwifiex_bss_start(struct mwifiex_private *priv,
struct mwifiex_ssid_bssid *ssid_bssid)
{
- int ret = 0;
+ int ret;
struct mwifiex_adapter *adapter = priv->adapter;
s32 i = -1;
@@ -376,7 +376,7 @@ int mwifiex_get_bss_info(struct mwifiex_private *priv,
{
struct mwifiex_adapter *adapter = priv->adapter;
struct mwifiex_bssdescriptor *bss_desc;
- s32 tbl_idx = 0;
+ s32 tbl_idx;
if (!info)
return -1;
@@ -436,9 +436,8 @@ int mwifiex_set_radio_band_cfg(struct mwifiex_private *priv,
struct mwifiex_ds_band_cfg *radio_cfg)
{
struct mwifiex_adapter *adapter = priv->adapter;
- u8 infra_band = 0;
- u8 adhoc_band = 0;
- u32 adhoc_channel = 0;
+ u8 infra_band, adhoc_band;
+ u32 adhoc_channel;
infra_band = (u8) radio_cfg->config_bands;
adhoc_band = (u8) radio_cfg->adhoc_start_band;
@@ -636,7 +635,7 @@ int mwifiex_bss_ioctl_find_bss(struct mwifiex_private *priv,
int
mwifiex_drv_change_adhoc_chan(struct mwifiex_private *priv, int channel)
{
- int ret = 0;
+ int ret;
struct mwifiex_bss_info bss_info;
struct mwifiex_ssid_bssid ssid_bssid;
u16 curr_chan = 0;
@@ -755,11 +754,10 @@ static int mwifiex_rate_ioctl_set_rate_value(struct mwifiex_private *priv,
struct mwifiex_rate_cfg *rate_cfg)
{
u8 rates[MWIFIEX_SUPPORTED_RATES];
- u8 *rate = NULL;
- int rate_index = 0;
+ u8 *rate;
+ int rate_index, ret;
u16 bitmap_rates[MAX_BITMAP_RATES_SIZE];
- u32 i = 0;
- int ret = 0;
+ u32 i;
struct mwifiex_adapter *adapter = priv->adapter;
if (rate_cfg->is_rate_auto) {
@@ -819,7 +817,7 @@ static int mwifiex_rate_ioctl_set_rate_value(struct mwifiex_private *priv,
static int mwifiex_rate_ioctl_cfg(struct mwifiex_private *priv,
struct mwifiex_rate_cfg *rate_cfg)
{
- int status = 0;
+ int status;
if (!rate_cfg)
return -1;
@@ -841,7 +839,7 @@ static int mwifiex_rate_ioctl_cfg(struct mwifiex_private *priv,
int mwifiex_drv_get_data_rate(struct mwifiex_private *priv,
struct mwifiex_rate_cfg *rate)
{
- int ret = 0;
+ int ret;
memset(rate, 0, sizeof(struct mwifiex_rate_cfg));
rate->action = HostCmd_ACT_GEN_GET;
@@ -875,11 +873,11 @@ int mwifiex_drv_get_data_rate(struct mwifiex_private *priv,
int mwifiex_set_tx_power(struct mwifiex_private *priv,
struct mwifiex_power_cfg *power_cfg)
{
- int ret = 0;
- struct host_cmd_ds_txpwr_cfg *txp_cfg = NULL;
- struct mwifiex_types_power_group *pg_tlv = NULL;
- struct mwifiex_power_group *pg = NULL;
- u8 *buf = NULL;
+ int ret;
+ struct host_cmd_ds_txpwr_cfg *txp_cfg;
+ struct mwifiex_types_power_group *pg_tlv;
+ struct mwifiex_power_group *pg;
+ u8 *buf;
u16 dbm = 0;
if (!power_cfg->is_power_auto) {
@@ -960,7 +958,7 @@ int mwifiex_set_tx_power(struct mwifiex_private *priv,
*/
int mwifiex_drv_set_power(struct mwifiex_private *priv, u32 *ps_mode)
{
- int ret = 0;
+ int ret;
struct mwifiex_adapter *adapter = priv->adapter;
u16 sub_cmd;
@@ -1078,8 +1076,8 @@ static int mwifiex_sec_ioctl_set_wapi_key(struct mwifiex_private *priv,
static int mwifiex_sec_ioctl_set_wep_key(struct mwifiex_private *priv,
struct mwifiex_ds_encrypt_key *encrypt_key)
{
- int ret = 0;
- struct mwifiex_wep_key *wep_key = NULL;
+ int ret;
+ struct mwifiex_wep_key *wep_key;
int index;
if (priv->wep_key_curr_index >= NUM_WEP_KEYS)
@@ -1142,7 +1140,7 @@ static int mwifiex_sec_ioctl_set_wep_key(struct mwifiex_private *priv,
static int mwifiex_sec_ioctl_set_wpa_key(struct mwifiex_private *priv,
struct mwifiex_ds_encrypt_key *encrypt_key)
{
- int ret = 0;
+ int ret;
u8 remove_key = false;
struct host_cmd_ds_802_11_key_material *ibss_key;
@@ -1209,7 +1207,7 @@ static int
mwifiex_sec_ioctl_encrypt_key(struct mwifiex_private *priv,
struct mwifiex_ds_encrypt_key *encrypt_key)
{
- int status = 0;
+ int status;
if (encrypt_key->is_wapi_key)
status = mwifiex_sec_ioctl_set_wapi_key(priv, encrypt_key);
@@ -1253,7 +1251,7 @@ int mwifiex_get_signal_info(struct mwifiex_private *priv,
struct mwifiex_ds_get_signal *signal)
{
struct mwifiex_ds_get_signal info;
- int status = 0;
+ int status;
memset(&info, 0, sizeof(struct mwifiex_ds_get_signal));
info.selector = ALL_RSSI_INFO_MASK;
@@ -1334,7 +1332,7 @@ int
mwifiex_get_stats_info(struct mwifiex_private *priv,
struct mwifiex_ds_get_stats *log)
{
- int ret = 0;
+ int ret;
struct mwifiex_ds_get_stats get_log;
memset(&get_log, 0, sizeof(struct mwifiex_ds_get_stats));
@@ -1425,7 +1423,7 @@ int
mwifiex_reg_read(struct mwifiex_private *priv, u32 reg_type,
u32 reg_offset, u32 *value)
{
- int ret = 0;
+ int ret;
struct mwifiex_ds_reg_rw reg_rw;
reg_rw.type = cpu_to_le32(reg_type);
@@ -1451,7 +1449,7 @@ int
mwifiex_eeprom_read(struct mwifiex_private *priv, u16 offset, u16 bytes,
u8 *value)
{
- int ret = 0;
+ int ret;
struct mwifiex_ds_read_eeprom rd_eeprom;
rd_eeprom.offset = cpu_to_le16((u16) offset);