Commit 1ca4d0b6 authored by Kalle Valo's avatar Kalle Valo

ath6kl: fix error handling ath6kl_target_config_wlan_params()

The error handling in ath6kl_target_config_wlan_params() was just weird,
fix that. This also fixes some of the open parenthesis alignment issues
reported by checkpatch.
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 80fb2686
...@@ -378,7 +378,6 @@ static int ath6kl_set_htc_params(struct ath6kl *ar, u32 mbox_isr_yield_val, ...@@ -378,7 +378,6 @@ static int ath6kl_set_htc_params(struct ath6kl *ar, u32 mbox_isr_yield_val,
static int ath6kl_target_config_wlan_params(struct ath6kl *ar, int idx) static int ath6kl_target_config_wlan_params(struct ath6kl *ar, int idx)
{ {
int status = 0;
int ret; int ret;
/* /*
...@@ -386,42 +385,53 @@ static int ath6kl_target_config_wlan_params(struct ath6kl *ar, int idx) ...@@ -386,42 +385,53 @@ static int ath6kl_target_config_wlan_params(struct ath6kl *ar, int idx)
* default values. Required if checksum offload is needed. Set * default values. Required if checksum offload is needed. Set
* RxMetaVersion to 2. * RxMetaVersion to 2.
*/ */
if (ath6kl_wmi_set_rx_frame_format_cmd(ar->wmi, idx, ret = ath6kl_wmi_set_rx_frame_format_cmd(ar->wmi, idx,
ar->rx_meta_ver, 0, 0)) { ar->rx_meta_ver, 0, 0);
ath6kl_err("unable to set the rx frame format\n"); if (ret) {
status = -EIO; ath6kl_err("unable to set the rx frame format: %d\n", ret);
return ret;
} }
if (ar->conf_flags & ATH6KL_CONF_IGNORE_PS_FAIL_EVT_IN_SCAN) if (ar->conf_flags & ATH6KL_CONF_IGNORE_PS_FAIL_EVT_IN_SCAN) {
if ((ath6kl_wmi_pmparams_cmd(ar->wmi, idx, 0, 1, 0, 0, 1, ret = ath6kl_wmi_pmparams_cmd(ar->wmi, idx, 0, 1, 0, 0, 1,
IGNORE_POWER_SAVE_FAIL_EVENT_DURING_SCAN)) != 0) { IGNORE_POWER_SAVE_FAIL_EVENT_DURING_SCAN);
ath6kl_err("unable to set power save fail event policy\n"); if (ret) {
status = -EIO; ath6kl_err("unable to set power save fail event policy: %d\n",
ret);
return ret;
}
} }
if (!(ar->conf_flags & ATH6KL_CONF_IGNORE_ERP_BARKER)) if (!(ar->conf_flags & ATH6KL_CONF_IGNORE_ERP_BARKER)) {
if ((ath6kl_wmi_set_lpreamble_cmd(ar->wmi, idx, 0, ret = ath6kl_wmi_set_lpreamble_cmd(ar->wmi, idx, 0,
WMI_DONOT_IGNORE_BARKER_IN_ERP)) != 0) { WMI_DONOT_IGNORE_BARKER_IN_ERP);
ath6kl_err("unable to set barker preamble policy\n"); if (ret) {
status = -EIO; ath6kl_err("unable to set barker preamble policy: %d\n",
ret);
return ret;
}
} }
if (ath6kl_wmi_set_keepalive_cmd(ar->wmi, idx, ret = ath6kl_wmi_set_keepalive_cmd(ar->wmi, idx,
WLAN_CONFIG_KEEP_ALIVE_INTERVAL)) { WLAN_CONFIG_KEEP_ALIVE_INTERVAL);
ath6kl_err("unable to set keep alive interval\n"); if (ret) {
status = -EIO; ath6kl_err("unable to set keep alive interval: %d\n", ret);
return ret;
} }
if (ath6kl_wmi_disctimeout_cmd(ar->wmi, idx, ret = ath6kl_wmi_disctimeout_cmd(ar->wmi, idx,
WLAN_CONFIG_DISCONNECT_TIMEOUT)) { WLAN_CONFIG_DISCONNECT_TIMEOUT);
ath6kl_err("unable to set disconnect timeout\n"); if (ret) {
status = -EIO; ath6kl_err("unable to set disconnect timeout: %d\n", ret);
return ret;
} }
if (!(ar->conf_flags & ATH6KL_CONF_ENABLE_TX_BURST)) if (!(ar->conf_flags & ATH6KL_CONF_ENABLE_TX_BURST)) {
if (ath6kl_wmi_set_wmm_txop(ar->wmi, idx, WMI_TXOP_DISABLED)) { ret = ath6kl_wmi_set_wmm_txop(ar->wmi, idx, WMI_TXOP_DISABLED);
ath6kl_err("unable to set txop bursting\n"); if (ret) {
status = -EIO; ath6kl_err("unable to set txop bursting: %d\n", ret);
return ret;
}
} }
if (ar->p2p && (ar->vif_max == 1 || idx)) { if (ar->p2p && (ar->vif_max == 1 || idx)) {
...@@ -446,7 +456,7 @@ static int ath6kl_target_config_wlan_params(struct ath6kl *ar, int idx) ...@@ -446,7 +456,7 @@ static int ath6kl_target_config_wlan_params(struct ath6kl *ar, int idx)
} }
} }
return status; return ret;
} }
int ath6kl_configure_target(struct ath6kl *ar) int ath6kl_configure_target(struct ath6kl *ar)
......
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