ath10k: add spectral scan feature

Adds the spectral scan feature for ath10k. The spectral scan is triggered by
configuring a mode through a debugfs control file. Samples can be gathered via
another relay debugfs file.

Essentially, to try it out:

ip link set dev wlan0 up
echo background > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
echo trigger > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
iw dev wlan0 scan
echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
cat /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan0 > samples

This feature is still experimental. Based on the original RFC patch of
Sven Eckelmann.

kvalo: CPTCFG_ -> CONFIG_

Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>

--
PATCHv3-ath-resend:
 * based on ath/master

PATCHv3:
 * fix compilation with debugfs disabled (Thanks Kalle)
 * add trigger command to commit message (Thanks Chun-Yeow)
 * change error message capitalization (Thanks Michal)
 * don't send WMI on core halt (Thanks Michal)
 * various style changes: indetation, empty lines before comments, moved
   initialization into separate function, create substruct for spectral
   parameters (Thanks Kalle)

PATCHv2:
 * fixed usage example in commit message (Thanks Chun-Yeow Yeoh)
 * adding lockdep asserts and comment (Thanks Michal)
 * debug message cleanups (Michal)
 * disable spectral on firmware crash (Michal)

PATCH:
 * change the tlv format to a variable-length format, depending on the
   number of bins
 * perform dc interpolation and max_exp calculation in the driver (as
   for ath9k)
 * make fft_size configurable
 * background scan will only start after beeing trigger, like in ath9k
 * document at least some spectral configuration members (thanks Kathy)
 * fix sparse problems
 * sample bandwidth appears to be 110% of what is reported by the
   hardware according to the plotter (e.g. 20->22, 40->44 MHz etc),
   so fix that in the driver.
 * disable spectral for a vif when it's beeing deleted and still active
   (Michals comment)
 * modify ath_ prefix of function/struct/enum to ath10k_ (Michal)
 * changed variable ret to res (Michal)
 * added ath10k_warn messages (Michal)
 * renamed wmi functions (Michal)
 * use ar->conf_mutex for locking (Michal)
 * renamed mhz to chan_width_mhz (Michal)
 * only enable spectral scan files when ATH10K_DEBUGFS is enabled
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>