]>
Commit | Line | Data |
---|---|---|
bfaf5c73 GKH |
1 | From 1ce8c1484e80010a6e4b9611c65668ff77556f45 Mon Sep 17 00:00:00 2001 |
2 | From: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> | |
3 | Date: Thu, 7 Apr 2016 12:11:54 +0530 | |
4 | Subject: ath10k: fix rx_channel during hw reconfigure | |
5 | ||
6 | From: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> | |
7 | ||
8 | commit 1ce8c1484e80010a6e4b9611c65668ff77556f45 upstream. | |
9 | ||
10 | Upon firmware assert, restart work will be triggered so that mac80211 | |
11 | will reconfigure the driver. An issue is reported that after restart | |
12 | work, survey dump data do not contain in-use (SURVEY_INFO_IN_USE) info | |
13 | for operating channel. During reconfigure, since mac80211 already has | |
14 | valid channel context for given radio, channel context iteration return | |
15 | num_chanctx > 0. Hence rx_channel is always NULL. Fix this by assigning | |
16 | channel context to rx_channel when driver restart is in progress. | |
17 | ||
18 | Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> | |
19 | Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> | |
20 | Signed-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; |