Commit 1fe374f5 authored by Mohammed Shafi Shajakhan's avatar Mohammed Shafi Shajakhan Committed by Kalle Valo

ath10k: cleanup setting pdev paramaters

Replace the local variable 'burst_enable' with 'param'
for mapping and setting pdev paraemeters and with this patch
pretty easy to extend support for new parameters adhering to
linux kernel coding guidelines
Signed-off-by: default avatarMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 774e656e
...@@ -3988,7 +3988,7 @@ static int ath10k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) ...@@ -3988,7 +3988,7 @@ static int ath10k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
static int ath10k_start(struct ieee80211_hw *hw) static int ath10k_start(struct ieee80211_hw *hw)
{ {
struct ath10k *ar = hw->priv; struct ath10k *ar = hw->priv;
u32 burst_enable; u32 param;
int ret = 0; int ret = 0;
/* /*
...@@ -4031,13 +4031,15 @@ static int ath10k_start(struct ieee80211_hw *hw) ...@@ -4031,13 +4031,15 @@ static int ath10k_start(struct ieee80211_hw *hw)
goto err_power_down; goto err_power_down;
} }
ret = ath10k_wmi_pdev_set_param(ar, ar->wmi.pdev_param->pmf_qos, 1); param = ar->wmi.pdev_param->pmf_qos;
ret = ath10k_wmi_pdev_set_param(ar, param, 1);
if (ret) { if (ret) {
ath10k_warn(ar, "failed to enable PMF QOS: %d\n", ret); ath10k_warn(ar, "failed to enable PMF QOS: %d\n", ret);
goto err_core_stop; goto err_core_stop;
} }
ret = ath10k_wmi_pdev_set_param(ar, ar->wmi.pdev_param->dynamic_bw, 1); param = ar->wmi.pdev_param->dynamic_bw;
ret = ath10k_wmi_pdev_set_param(ar, param, 1);
if (ret) { if (ret) {
ath10k_warn(ar, "failed to enable dynamic BW: %d\n", ret); ath10k_warn(ar, "failed to enable dynamic BW: %d\n", ret);
goto err_core_stop; goto err_core_stop;
...@@ -4053,8 +4055,8 @@ static int ath10k_start(struct ieee80211_hw *hw) ...@@ -4053,8 +4055,8 @@ static int ath10k_start(struct ieee80211_hw *hw)
} }
if (test_bit(WMI_SERVICE_BURST, ar->wmi.svc_map)) { if (test_bit(WMI_SERVICE_BURST, ar->wmi.svc_map)) {
burst_enable = ar->wmi.pdev_param->burst_enable; param = ar->wmi.pdev_param->burst_enable;
ret = ath10k_wmi_pdev_set_param(ar, burst_enable, 0); ret = ath10k_wmi_pdev_set_param(ar, param, 0);
if (ret) { if (ret) {
ath10k_warn(ar, "failed to disable burst: %d\n", ret); ath10k_warn(ar, "failed to disable burst: %d\n", ret);
goto err_core_stop; goto err_core_stop;
...@@ -4072,8 +4074,8 @@ static int ath10k_start(struct ieee80211_hw *hw) ...@@ -4072,8 +4074,8 @@ static int ath10k_start(struct ieee80211_hw *hw)
* this problem. * this problem.
*/ */
ret = ath10k_wmi_pdev_set_param(ar, param = ar->wmi.pdev_param->arp_ac_override;
ar->wmi.pdev_param->arp_ac_override, 0); ret = ath10k_wmi_pdev_set_param(ar, param, 0);
if (ret) { if (ret) {
ath10k_warn(ar, "failed to set arp ac override parameter: %d\n", ath10k_warn(ar, "failed to set arp ac override parameter: %d\n",
ret); ret);
...@@ -4092,8 +4094,8 @@ static int ath10k_start(struct ieee80211_hw *hw) ...@@ -4092,8 +4094,8 @@ static int ath10k_start(struct ieee80211_hw *hw)
} }
} }
ret = ath10k_wmi_pdev_set_param(ar, param = ar->wmi.pdev_param->ani_enable;
ar->wmi.pdev_param->ani_enable, 1); ret = ath10k_wmi_pdev_set_param(ar, param, 1);
if (ret) { if (ret) {
ath10k_warn(ar, "failed to enable ani by default: %d\n", ath10k_warn(ar, "failed to enable ani by default: %d\n",
ret); ret);
......
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