mac80211: enable ath10k AHB support for QCA4019

This patch enables the ATH10K_AHB support for the QCA4019
devices on the AHB bus.

This patch also removes 936-ath10k_skip_otp_check.patch
because it breaks the AHB device identification.
"Patch is wrong. I find it frustrating OpenWRT/LEDE doesn't
try to work with upstream on ixing these things right."

[1] <https://www.mail-archive.com/ath10k@lists.infradead.org/msg05896.html>

It also limits ath10k memory hunger (This is a problem with 128MiB RAM)

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
This commit is contained in:
Christian Lamparter 2016-11-14 04:57:38 +01:00 committed by John Crispin
parent b015a841fc
commit cc189c0b7f
4 changed files with 50 additions and 51 deletions

View File

@ -1519,6 +1519,7 @@ config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
config-$(call config_package,ath9k) += ATH9K
config-$(call config_package,ath9k-common) += ATH9K_COMMON
config-$(CONFIG_TARGET_ar71xx) += ATH9K_AHB
config-$(CONFIG_TARGET_ipq806x) += ATH10K_AHB
config-$(CONFIG_PCI) += ATH9K_PCI
config-$(CONFIG_ATH_USER_REGD) += ATH_USER_REGD
config-$(CONFIG_ATH9K_SUPPORT_PCOEM) += ATH9K_PCOEM

View File

@ -1,51 +0,0 @@
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -1362,9 +1362,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);
@@ -2149,7 +2146,7 @@ EXPORT_SYMBOL(ath10k_core_stop);
static int ath10k_core_probe_fw(struct ath10k *ar)
{
struct bmi_target_info target_info;
- int ret = 0;
+ int calret, ret = 0;
ret = ath10k_hif_power_up(ar);
if (ret) {
@@ -2173,6 +2170,9 @@ static int ath10k_core_probe_fw(struct a
goto err_power_down;
}
+ /* calibration file is optional, don't check for any errors */
+ 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);
@@ -2195,11 +2195,14 @@ static int ath10k_core_probe_fw(struct a
"could not load pre cal data: %d\n", ret);
}
- 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);
- goto err_free_firmware_files;
+ /* 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);
+ goto err_free_firmware_files;
+ }
}
ret = ath10k_core_check_smbios(ar);

View File

@ -0,0 +1,11 @@
--- a/drivers/net/wireless/ath/ath10k/htt.h 2016-12-12 16:03:58.491019030 +0100
+++ b/drivers/net/wireless/ath/ath10k/htt.h 2016-12-12 15:39:45.242298155 +0100
@@ -199,7 +199,7 @@ enum htt_rx_ring_flags {
};
#define HTT_RX_RING_SIZE_MIN 128
+#define HTT_RX_RING_SIZE_MAX 512
-#define HTT_RX_RING_SIZE_MAX 2048
struct htt_rx_ring_setup_ring {
__le32 fw_idx_shadow_reg_paddr;

View File

@ -0,0 +1,38 @@
--- a/drivers/net/wireless/ath/ath10k/pci.c 2016-12-12 16:29:42.310053558 +0100
+++ b/drivers/net/wireless/ath/ath10k/pci.c 2016-12-12 16:34:46.667203800 +0100
@@ -127,7 +127,7 @@ static struct ce_attr host_ce_config_wla
.flags = CE_ATTR_FLAGS,
.src_nentries = 0,
.src_sz_max = 2048,
- .dest_nentries = 512,
+ .dest_nentries = 128,
.recv_cb = ath10k_pci_htt_htc_rx_cb,
},
@@ -136,7 +136,7 @@ static struct ce_attr host_ce_config_wla
.flags = CE_ATTR_FLAGS,
.src_nentries = 0,
.src_sz_max = 2048,
- .dest_nentries = 128,
+ .dest_nentries = 64,
.recv_cb = ath10k_pci_htc_rx_cb,
},
@@ -163,7 +163,7 @@ static struct ce_attr host_ce_config_wla
.flags = CE_ATTR_FLAGS,
.src_nentries = 0,
.src_sz_max = 512,
- .dest_nentries = 512,
+ .dest_nentries = 128,
.recv_cb = ath10k_pci_htt_rx_cb,
},
@@ -188,7 +188,7 @@ static struct ce_attr host_ce_config_wla
.flags = CE_ATTR_FLAGS,
.src_nentries = 0,
.src_sz_max = 2048,
- .dest_nentries = 128,
+ .dest_nentries = 96,
.recv_cb = ath10k_pci_pktlog_rx_cb,
},