linux/drivers/net/wireless/ath/ath10k
Mohammed Shafi Shajakhan a28f6f27a8 ath10k: fix fetching channel during potential radar detection
Fetch target operating channel during potential radar detection when
the interface is just brought up, but no channel is assigned from
userspace. In this scenario rx_channel may not be having a valid pointer
hence fetch the target operating channel to avoid warnings as below
which can be triggered by the commands with DFS testing over longer run

comamnds:
iw wlan1 set type mesh
ifconfig wlan1 up (valid tgt_oper_chan only)
iw wlan1 cac trigger freq 5260 HT20 (valid rx_channel, tgt_oper_chan)
iw wlan1 cac trigger freq 5280 HT20
iw wlan1 cac trigger freq 5300 HT20

Once the CAC expires, current channel context will be removed and
we are only left with the fallback option of using 'target operating
channel'

Firmware and driver log:
ath: phy1: DFS: radar found on freq=5300: id=1, pri=1125, count=5,
count_false=4
ath: phy1: DFS: radar found on freq=5260: id=5, pri=3151, count=6,
count_false=11
ath: phy1: DFS: radar found on freq=5280: id=1, pri=1351, count=6,
count_false=4
ath: phy1: DFS: radar found on freq=5300: id=1, pri=1125, count=5,
count_false=4
ath10k_pci 0001:01:00.0: failed to derive channel for radar pulse,
treating as radar
ath10k_pci 0001:01:00.0: failed to derive channel for radar pulse,
treating as radar

Call trace:

WARNING: CPU: 1 PID: 2145 at
backports-20161201-3.14.77-9ab3068/net/wireless/chan.c:265
cfg80211_set_dfs_state+0x3c/0x88 [cfg80211]()

 Workqueue: phy1 ieee80211_dfs_radar_detected_work
[mac80211]
[<c0320770>] (warn_slowpath_null) from [<bf79b90c>]
(cfg80211_set_dfs_state+0x3c/0x88 [cfg80211])
[<bf79b90c>] (cfg80211_set_dfs_state [cfg80211]) from
[<bf79697c>] (cfg80211_radar_event+0xc4/0x140 [cfg80211])
[<bf79697c>] (cfg80211_radar_event [cfg80211]) from
[<bf83c058>] (ieee80211_dfs_radar_detected_work+0xa8/0xb4 [mac80211])
[<bf83c058>] (ieee80211_dfs_radar_detected_work
[mac80211]) from [<c0339518>] (process_one_work+0x298/0x4a4)

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-03-16 10:58:20 +02:00
..
ahb.c ath10k: fix reading sram contents for QCA4019 2017-02-07 10:57:49 +02:00
ahb.h ath10k: expose hif ops for ahb 2016-01-28 10:47:28 +02:00
bmi.c ath10k: improve the firmware download time for QCA6174 2017-03-09 09:55:48 +02:00
bmi.h ath10k: improve the firmware download time for QCA6174 2017-03-09 09:55:48 +02:00
ce.c ath10k: few whitespace fixes 2017-02-07 10:43:30 +02:00
ce.h ath10k: dump Copy Engine registers during firmware crash 2017-01-19 15:19:24 +02:00
core.c ath10k: improve the firmware download time for QCA9377 2017-03-09 09:55:54 +02:00
core.h ath10k: update available channel list for 5G radio 2017-03-16 10:53:49 +02:00
debug.c ath10k: disallow DFS simulation if DFS channel is not enabled 2017-03-16 10:51:35 +02:00
debug.h ath10k: support dev_coredump for crash dump 2016-12-30 11:14:07 +02:00
debugfs_sta.c ath10k: add debugfs support to get per peer tids log via tracing 2017-02-07 10:49:24 +02:00
hif.h ath10k: add board data download from target 2016-06-07 14:28:35 +03:00
htc.c ath10k: htc: simplified credit distribution 2017-01-12 12:51:29 +02:00
htc.h ath10k: htc: simplified credit distribution 2017-01-12 12:51:29 +02:00
htt_rx.c ath10k: remove unneeded semicolon 2017-02-08 17:00:31 +02:00
htt_tx.c ath10k: Avoid potential page alloc BUG_ON in tx free path 2016-12-15 11:17:52 +02:00
htt.c ath10k: add per peer htt tx stats support for 10.4 2016-11-23 21:40:02 +02:00
htt.h ath10k: use names in function definition arguments 2017-02-07 10:43:25 +02:00
hw.c ath10k: improve the firmware download time for QCA6174 2017-03-09 09:55:48 +02:00
hw.h ath10k: improve the firmware download time for QCA6174 2017-03-09 09:55:48 +02:00
Kconfig ath10k: select WANT_DEV_COREDUMP 2017-02-08 17:01:53 +02:00
mac.c ath10k: update available channel list for 5G radio 2017-03-16 10:53:49 +02:00
mac.h ath10k: remove ath10k_vif_to_arvif() 2017-02-14 19:38:15 +02:00
Makefile ath10k: add basic skeleton to support ahb 2016-01-28 10:47:19 +02:00
p2p.c ath10k: remove ath10k_vif_to_arvif() 2017-02-14 19:38:15 +02:00
p2p.h ath10k: implement handling of p2p noa event 2015-03-07 09:57:42 +02:00
pci.c ath10k: remove redundant error check 2017-03-16 10:56:46 +02:00
pci.h ath10k: fix reading sram contents for QCA4019 2017-02-07 10:57:49 +02:00
rx_desc.h ath10k: remove duplicate and unused rx rate flags 2016-06-14 14:56:00 +03:00
spectral.c ath10k: use size_t for len variables 2017-02-14 19:38:20 +02:00
spectral.h ath10k: refactor phyerr event handlers 2015-08-17 17:43:29 +03:00
swap.c ath10k: move firmware_swap_code_seg_info to ath10k_fw_file 2016-08-31 10:18:37 +03:00
swap.h ath10k: move firmware_swap_code_seg_info to ath10k_fw_file 2016-08-31 10:18:37 +03:00
targaddrs.h ath10k: spelling and miscellaneous neatening 2016-09-27 15:00:48 +03:00
testmode_i.h
testmode.c ath10k: silence firmware file probing warnings 2017-02-14 19:52:35 +02:00
testmode.h
thermal.c ath10k: replace config_enabled() with IS_REACHABLE() 2016-09-02 18:57:06 +03:00
thermal.h ath10k: fix checkpatch warnings related to spaces 2016-04-14 17:30:51 +03:00
trace.c
trace.h ath10k: add hw_rev to trace events to support pktlog 2016-03-03 19:20:00 +02:00
txrx.c ath10k: fix throughput regression in multi client mode 2016-09-09 15:07:11 +03:00
txrx.h ath10k: move mgmt descriptor limit handle under mgmt_tx 2016-03-18 09:52:27 +02:00
wmi-ops.h ath10k: fix null deref on wmi-tlv when trying spectral scan 2016-11-23 15:55:38 +02:00
wmi-tlv.c ath10k: add VHT160 support 2017-01-13 15:26:30 +02:00
wmi-tlv.h ath10k: add VHT160 support 2017-01-13 15:26:30 +02:00
wmi.c ath10k: fix fetching channel during potential radar detection 2017-03-16 10:58:20 +02:00
wmi.h ath10k: update available channel list for 5G radio 2017-03-16 10:53:49 +02:00
wow.c ath10k: move fw_features to struct ath10k_fw_file 2016-04-20 20:00:25 +03:00
wow.h ath10k: add WOW patterns support 2015-03-30 09:10:24 +03:00