[OpenWrt-Devel] [PATCH 9/9] kernel/mac80211: Skip ath10k OTP check if caldata found

Darryl Sokoloski darryl at sokoloski.ca
Wed Apr 20 01:55:35 EDT 2016


Signed-off-by: Josh Bendavid <joshbendavid at gmail.com>
[darryl at sokoloski.ca: submitting patches on behalf of Josh Bendavid]
Signed-off-by: Darryl Sokoloski <darryl at sokoloski.ca>
---
 .../patches/941-ath10k_skip_otp_check.patch        | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 package/kernel/mac80211/patches/941-ath10k_skip_otp_check.patch

diff --git a/package/kernel/mac80211/patches/941-ath10k_skip_otp_check.patch b/package/kernel/mac80211/patches/941-ath10k_skip_otp_check.patch
new file mode 100644
index 0000000..1465ec7
--- /dev/null
+++ b/package/kernel/mac80211/patches/941-ath10k_skip_otp_check.patch
@@ -0,0 +1,44 @@
+Index: compat-wireless-2016-01-10/drivers/net/wireless/ath/ath10k/core.c
+===================================================================
+--- compat-wireless-2016-01-10.orig/drivers/net/wireless/ath/ath10k/core.c
++++ compat-wireless-2016-01-10/drivers/net/wireless/ath/ath10k/core.c
+@@ -1183,9 +1183,6 @@ static int ath10k_core_fetch_firmware_fi
+ {
+ 	int ret;
+ 
+-	/* calibration file is optional, don't check for any errors */
+-	ath10k_fetch_cal_file(ar);
+-
+ 	ar->fw_api = 5;
+ 	ath10k_dbg(ar, ATH10K_DBG_BOOT, "trying fw api %d\n", ar->fw_api);
+ 
+@@ -1790,6 +1787,9 @@ static int ath10k_core_probe_fw(struct a
+ 		goto err_power_down;
+ 	}
+ 
++	/* calibration file is optional, don't check for any errors */
++	int calret = ath10k_fetch_cal_file(ar);
++
+ 	ret = ath10k_core_fetch_firmware_files(ar);
+ 	if (ret) {
+ 		ath10k_err(ar, "could not fetch firmware files (%d)\n", ret);
+@@ -1798,11 +1798,14 @@ static int ath10k_core_probe_fw(struct a
+ 
+ 	ath10k_debug_print_hwfw_info(ar);
+ 
+-	ret = ath10k_core_get_board_id_from_otp(ar);
+-	if (ret && ret != -EOPNOTSUPP) {
+-		ath10k_err(ar, "failed to get board id from otp: %d\n",
+-			   ret);
+-		return ret;
++	/* otp and board file not needed if calibration data is present */
++	if (calret) {
++		ret = ath10k_core_get_board_id_from_otp(ar);
++		if (ret && ret != -EOPNOTSUPP) {
++			ath10k_err(ar, "failed to get board id from otp: %d\n",
++				ret);
++			return ret;
++		}
+ 	}
+ 
+ 	ret = ath10k_core_fetch_board_file(ar);
-- 
2.4.10
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list