From: Ashok Raj Nagarajan <arnagara@qti.qualcomm.com>
Date: Thu, 19 Mar 2015 11:07:59 +0000 (+0530)
Subject: ath10k: enable Adaptive Noise Immunity (ANI) by default
X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=575f1c3d5c909d26e169da01eaed44f00f7eb88f;p=openwrt%2Fstaging%2Fblogic.git

ath10k: enable Adaptive Noise Immunity (ANI) by default

ANI helps to improve connectvity and performance in a noisy environment.
Enabling this feature would help the user experience a better and stable
wireless connection in a noisy environmnet. This feature is currently not
enabled for ath10k. Enable this feature by default.

Signed-off-by: Ashok Raj Nagarajan <arnagara@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 6299166ab04e..76a9bedf8ae2 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3153,6 +3153,14 @@ static int ath10k_start(struct ieee80211_hw *hw)
 		goto err_core_stop;
 	}
 
+	ret = ath10k_wmi_pdev_set_param(ar,
+					ar->wmi.pdev_param->ani_enable, 1);
+	if (ret) {
+		ath10k_warn(ar, "failed to enable ani by default: %d\n",
+			    ret);
+		goto err_core_stop;
+	}
+
 	ar->num_started_vdevs = 0;
 	ath10k_regd_update(ar);