]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.5.7/ath10k-fix-rx_channel-during-hw-reconfigure.patch
Linux 4.14.95
[thirdparty/kernel/stable-queue.git] / releases / 4.5.7 / ath10k-fix-rx_channel-during-hw-reconfigure.patch
CommitLineData
bfaf5c73
GKH
1From 1ce8c1484e80010a6e4b9611c65668ff77556f45 Mon Sep 17 00:00:00 2001
2From: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
3Date: Thu, 7 Apr 2016 12:11:54 +0530
4Subject: ath10k: fix rx_channel during hw reconfigure
5
6From: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
7
8commit 1ce8c1484e80010a6e4b9611c65668ff77556f45 upstream.
9
10Upon firmware assert, restart work will be triggered so that mac80211
11will reconfigure the driver. An issue is reported that after restart
12work, survey dump data do not contain in-use (SURVEY_INFO_IN_USE) info
13for operating channel. During reconfigure, since mac80211 already has
14valid channel context for given radio, channel context iteration return
15num_chanctx > 0. Hence rx_channel is always NULL. Fix this by assigning
16channel context to rx_channel when driver restart is in progress.
17
18Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
19Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21
22---
23 drivers/net/wireless/ath/ath10k/mac.c | 8 +++++++-
24 1 file changed, 7 insertions(+), 1 deletion(-)
25
26--- a/drivers/net/wireless/ath/ath10k/mac.c
27+++ b/drivers/net/wireless/ath/ath10k/mac.c
28@@ -6437,7 +6437,13 @@ ath10k_mac_update_rx_channel(struct ath1
29 def = &vifs[0].new_ctx->def;
30
31 ar->rx_channel = def->chan;
32- } else if (ctx && ath10k_mac_num_chanctxs(ar) == 0) {
33+ } else if ((ctx && ath10k_mac_num_chanctxs(ar) == 0) ||
34+ (ctx && (ar->state == ATH10K_STATE_RESTARTED))) {
35+ /* During driver restart due to firmware assert, since mac80211
36+ * already has valid channel context for given radio, channel
37+ * context iteration return num_chanctx > 0. So fix rx_channel
38+ * when restart is in progress.
39+ */
40 ar->rx_channel = ctx->def.chan;
41 } else {
42 ar->rx_channel = NULL;