ath10k-ct: activate user space firmware loading again

This backports a patch from kernel 4.14 to the ath10k-ct version based
on kernel 4.13.
Some devices are using a user space script to load the calibration data
from the flash and this was not trigged any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
v19.07.3_mercusys_ac12_duma
Hauke Mehrtens 7 years ago
parent 3888e77c1c
commit efbd4e721d

@ -17,7 +17,7 @@
firmware = ar->normal_mode_fw.fw_file.firmware;
if (firmware)
@@ -3413,7 +3413,7 @@ int ath10k_debug_register(struct ath10k
@@ -3422,7 +3422,7 @@ int ath10k_debug_register(struct ath10k
debugfs_create_file("nf_cal_period", S_IRUSR | S_IWUSR,
ar->debug.debugfs_phy, ar, &fops_nf_cal_period);
@ -28,7 +28,7 @@
&fops_simulate_radar);
--- a/ath10k/mac.c
+++ b/ath10k/mac.c
@@ -3596,7 +3596,7 @@ static void ath10k_regd_update(struct at
@@ -3604,7 +3604,7 @@ static void ath10k_regd_update(struct at
regpair = ar->ath_common.regulatory.regpair;
@ -37,7 +37,7 @@
nl_dfs_reg = ar->dfs_detector->region;
wmi_dfs_reg = ath10k_mac_get_dfs_region(nl_dfs_reg);
ath10k_dbg(ar, ATH10K_DBG_REGULATORY,
@@ -3630,7 +3630,7 @@ static void ath10k_reg_notifier(struct w
@@ -3638,7 +3638,7 @@ static void ath10k_reg_notifier(struct w
ath_reg_notifier_apply(wiphy, request, &ar->ath_common.regulatory);
@ -46,7 +46,7 @@
ath10k_dbg(ar, ATH10K_DBG_REGULATORY, "reg-notifier: dfs region 0x%x\n",
request->dfs_region);
result = ar->dfs_detector->set_dfs_domain(ar->dfs_detector,
@@ -8925,7 +8925,7 @@ int ath10k_mac_register(struct ath10k *a
@@ -8938,7 +8938,7 @@ int ath10k_mac_register(struct ath10k *a
if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags))
ar->hw->netdev_features = NETIF_F_HW_CSUM;
@ -55,7 +55,7 @@
/* Init ath dfs pattern detector */
ar->ath_common.debug_mask = ATH_DBG_DFS;
ar->dfs_detector = dfs_pattern_detector_init(&ar->ath_common,
@@ -8970,7 +8970,7 @@ err_unregister:
@@ -8983,7 +8983,7 @@ err_unregister:
ieee80211_unregister_hw(ar->hw);
err_dfs_detector_exit:
@ -64,7 +64,7 @@
ar->dfs_detector->exit(ar->dfs_detector);
err_free:
@@ -8985,7 +8985,7 @@ void ath10k_mac_unregister(struct ath10k
@@ -8998,7 +8998,7 @@ void ath10k_mac_unregister(struct ath10k
{
ieee80211_unregister_hw(ar->hw);

@ -1,6 +1,6 @@
--- a/ath10k/htt_rx.c
+++ b/ath10k/htt_rx.c
@@ -2497,7 +2497,7 @@ bool ath10k_htt_t2h_msg_handler(struct a
@@ -2514,7 +2514,7 @@ bool ath10k_htt_t2h_msg_handler(struct a
u32 freq = __le32_to_cpu(resp->chan_change.freq);
ar->tgt_oper_chan =

@ -51,7 +51,7 @@
break;
default:
break;
@@ -883,13 +883,10 @@ static void ath10k_htt_rx_h_ppdu(struct
@@ -900,13 +900,10 @@ static void ath10k_htt_rx_h_ppdu(struct
/* New PPDU starts so clear out the old per-PPDU status. */
status->freq = 0;
status->rate_idx = 0;
@ -69,7 +69,7 @@
status->flag |= RX_FLAG_NO_SIGNAL_VAL;
ath10k_htt_rx_h_signal(ar, status, rxd);
@@ -942,7 +939,7 @@ static void ath10k_process_rx(struct ath
@@ -959,7 +956,7 @@ static void ath10k_process_rx(struct ath
*status = *rx_status;
ath10k_dbg(ar, ATH10K_DBG_DATA,
@ -78,7 +78,7 @@
skb,
skb->len,
ieee80211_get_SA(hdr),
@@ -950,15 +947,15 @@ static void ath10k_process_rx(struct ath
@@ -967,15 +964,15 @@ static void ath10k_process_rx(struct ath
is_multicast_ether_addr(ieee80211_get_DA(hdr)) ?
"mcast" : "ucast",
(__le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4,

@ -0,0 +1,36 @@
From c0cc00f250e19c717fc9cdbdb7f55aaa569c7498 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Thu, 24 Aug 2017 23:06:41 +0200
Subject: [PATCH] ath10k: activate user space firmware loading again
In commit 9f5bcfe93315 ("ath10k: silence firmware file probing
warnings") the firmware loading was changed from request_firmware() to
request_firmware_direct() to silence some warnings in case it fails.
request_firmware_direct() directly searches in the file system only and
does not send a hotplug event to user space in case it could not find
the firmware directly.
In LEDE we use a user space script to extract the calibration data from
the flash memory which gets triggered by the hotplug event. This way the
firmware gets extracted from some vendor specific partition when the
driver requests this firmware. This mechanism does not work any more
after this change.
Fixes: 9f5bcfe93315 ("ath10k: silence firmware file probing warnings")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
ath10k-4.13/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/ath10k-4.13/core.c
+++ b/ath10k-4.13/core.c
@@ -556,7 +556,7 @@ static const struct firmware *ath10k_fet
dir = ".";
snprintf(filename, sizeof(filename), "%s/%s", dir, file);
- ret = request_firmware_direct(&fw, filename, ar->dev);
+ ret = request_firmware(&fw, filename, ar->dev);
ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
filename, ret);
Loading…
Cancel
Save