Commit fbc976c1 authored by Chaehyun Lim's avatar Chaehyun Lim Committed by Greg Kroah-Hartman

staging: wilc1000: change handle_cfg_param's return type to void

When handle_cfg_param is called in hostIFthread that is a kernel thread,
it is not checked return type of this function. This patch changes
return type to void.
Signed-off-by: default avatarChaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9936913e
...@@ -417,8 +417,8 @@ static void handle_get_mac_address(struct wilc_vif *vif, ...@@ -417,8 +417,8 @@ static void handle_get_mac_address(struct wilc_vif *vif,
complete(&hif_wait_response); complete(&hif_wait_response);
} }
static s32 handle_cfg_param(struct wilc_vif *vif, static void handle_cfg_param(struct wilc_vif *vif,
struct cfg_param_attr *cfg_param_attr) struct cfg_param_attr *cfg_param_attr)
{ {
s32 result = 0; s32 result = 0;
struct wid wid_list[32]; struct wid wid_list[32];
...@@ -436,7 +436,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -436,7 +436,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.bss_type = (u8)cfg_param_attr->bss_type; hif_drv->cfg_values.bss_type = (u8)cfg_param_attr->bss_type;
} else { } else {
netdev_err(vif->ndev, "check value 6 over\n"); netdev_err(vif->ndev, "check value 6 over\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -452,7 +451,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -452,7 +451,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.auth_type = (u8)cfg_param_attr->auth_type; hif_drv->cfg_values.auth_type = (u8)cfg_param_attr->auth_type;
} else { } else {
netdev_err(vif->ndev, "Impossible value\n"); netdev_err(vif->ndev, "Impossible value\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -467,7 +465,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -467,7 +465,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.auth_timeout = cfg_param_attr->auth_timeout; hif_drv->cfg_values.auth_timeout = cfg_param_attr->auth_timeout;
} else { } else {
netdev_err(vif->ndev, "Range(1 ~ 65535) over\n"); netdev_err(vif->ndev, "Range(1 ~ 65535) over\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -481,7 +478,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -481,7 +478,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.power_mgmt_mode = (u8)cfg_param_attr->power_mgmt_mode; hif_drv->cfg_values.power_mgmt_mode = (u8)cfg_param_attr->power_mgmt_mode;
} else { } else {
netdev_err(vif->ndev, "Invalid power mode\n"); netdev_err(vif->ndev, "Invalid power mode\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -496,7 +492,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -496,7 +492,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.short_retry_limit = cfg_param_attr->short_retry_limit; hif_drv->cfg_values.short_retry_limit = cfg_param_attr->short_retry_limit;
} else { } else {
netdev_err(vif->ndev, "Range(1~256) over\n"); netdev_err(vif->ndev, "Range(1~256) over\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -511,7 +506,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -511,7 +506,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.long_retry_limit = cfg_param_attr->long_retry_limit; hif_drv->cfg_values.long_retry_limit = cfg_param_attr->long_retry_limit;
} else { } else {
netdev_err(vif->ndev, "Range(1~256) over\n"); netdev_err(vif->ndev, "Range(1~256) over\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -526,7 +520,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -526,7 +520,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.frag_threshold = cfg_param_attr->frag_threshold; hif_drv->cfg_values.frag_threshold = cfg_param_attr->frag_threshold;
} else { } else {
netdev_err(vif->ndev, "Threshold Range fail\n"); netdev_err(vif->ndev, "Threshold Range fail\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -541,7 +534,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -541,7 +534,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.rts_threshold = cfg_param_attr->rts_threshold; hif_drv->cfg_values.rts_threshold = cfg_param_attr->rts_threshold;
} else { } else {
netdev_err(vif->ndev, "Threshold Range fail\n"); netdev_err(vif->ndev, "Threshold Range fail\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -555,7 +547,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -555,7 +547,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.preamble_type = cfg_param_attr->preamble_type; hif_drv->cfg_values.preamble_type = cfg_param_attr->preamble_type;
} else { } else {
netdev_err(vif->ndev, "Preamle Range(0~2) over\n"); netdev_err(vif->ndev, "Preamle Range(0~2) over\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -569,7 +560,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -569,7 +560,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.short_slot_allowed = (u8)cfg_param_attr->short_slot_allowed; hif_drv->cfg_values.short_slot_allowed = (u8)cfg_param_attr->short_slot_allowed;
} else { } else {
netdev_err(vif->ndev, "Short slot(2) over\n"); netdev_err(vif->ndev, "Short slot(2) over\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -583,7 +573,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -583,7 +573,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.txop_prot_disabled = (u8)cfg_param_attr->txop_prot_disabled; hif_drv->cfg_values.txop_prot_disabled = (u8)cfg_param_attr->txop_prot_disabled;
} else { } else {
netdev_err(vif->ndev, "TXOP prot disable\n"); netdev_err(vif->ndev, "TXOP prot disable\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -598,7 +587,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -598,7 +587,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.beacon_interval = cfg_param_attr->beacon_interval; hif_drv->cfg_values.beacon_interval = cfg_param_attr->beacon_interval;
} else { } else {
netdev_err(vif->ndev, "Beacon interval(1~65535)fail\n"); netdev_err(vif->ndev, "Beacon interval(1~65535)fail\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -613,7 +601,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -613,7 +601,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.dtim_period = cfg_param_attr->dtim_period; hif_drv->cfg_values.dtim_period = cfg_param_attr->dtim_period;
} else { } else {
netdev_err(vif->ndev, "DTIM range(1~255) fail\n"); netdev_err(vif->ndev, "DTIM range(1~255) fail\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -627,7 +614,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -627,7 +614,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.site_survey_enabled = (u8)cfg_param_attr->site_survey_enabled; hif_drv->cfg_values.site_survey_enabled = (u8)cfg_param_attr->site_survey_enabled;
} else { } else {
netdev_err(vif->ndev, "Site survey disable\n"); netdev_err(vif->ndev, "Site survey disable\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -642,7 +628,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -642,7 +628,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.site_survey_scan_time = cfg_param_attr->site_survey_scan_time; hif_drv->cfg_values.site_survey_scan_time = cfg_param_attr->site_survey_scan_time;
} else { } else {
netdev_err(vif->ndev, "Site scan time(1~65535) over\n"); netdev_err(vif->ndev, "Site scan time(1~65535) over\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -657,7 +642,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -657,7 +642,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.active_scan_time = cfg_param_attr->active_scan_time; hif_drv->cfg_values.active_scan_time = cfg_param_attr->active_scan_time;
} else { } else {
netdev_err(vif->ndev, "Active time(1~65535) over\n"); netdev_err(vif->ndev, "Active time(1~65535) over\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -672,7 +656,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -672,7 +656,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.passive_scan_time = cfg_param_attr->passive_scan_time; hif_drv->cfg_values.passive_scan_time = cfg_param_attr->passive_scan_time;
} else { } else {
netdev_err(vif->ndev, "Passive time(1~65535) over\n"); netdev_err(vif->ndev, "Passive time(1~65535) over\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -694,7 +677,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -694,7 +677,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
hif_drv->cfg_values.curr_tx_rate = (u8)curr_tx_rate; hif_drv->cfg_values.curr_tx_rate = (u8)curr_tx_rate;
} else { } else {
netdev_err(vif->ndev, "out of TX rate\n"); netdev_err(vif->ndev, "out of TX rate\n");
result = -EINVAL;
goto unlock; goto unlock;
} }
i++; i++;
...@@ -708,7 +690,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, ...@@ -708,7 +690,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
unlock: unlock:
mutex_unlock(&hif_drv->cfg_values_lock); mutex_unlock(&hif_drv->cfg_values_lock);
return result;
} }
static s32 handle_scan(struct wilc_vif *vif, struct scan_attr *scan_info) static s32 handle_scan(struct wilc_vif *vif, struct scan_attr *scan_info)
......
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