linux-bl808/drivers/net/wireless/ath/ath10k
Marty Faltesek f67b107d4c ath10k: cache calibration data when the core is stopped
Commit 0b8e3c4ca2 ("ath10k: move cal data len to hw_params") broke retrieving
the calibration data from cal_data debugfs file. The length of file was always
zero. The reason is:

    static ssize_t ath10k_debug_cal_data_read(struct file *file,
                                          char __user *user_buf,
                                          size_t count, loff_t *ppos)
    {
        struct ath10k *ar = file->private_data;
        void *buf = file->private_data;

This is obviously bogus, private_data cannot contain both struct ath10k and the
buffer. Fix it by caching calibration data to ar->debug.cal_data. This also
allows it to be accessed when the device is not active (interface is down).

The cal_data buffer is fixed size because during the first firmware probe we
don't yet know what will be the lenght of the calibration data. It was simplest
just to use a fixed length. There's a WARN_ON() in
ath10k_debug_cal_data_fetch() if the buffer is too small.

Tested with qca988x and firmware 10.2.4.70.56.

Reported-by: Nikolay Martynov <mar.kolya@gmail.com>
Fixes: 0b8e3c4ca2 ("ath10k: move cal data len to hw_params")
Cc: stable@vger.kernel.org # 4.7+
Signed-off-by: Marty Faltesek <mfaltesek@google.com>
[kvalo@qca.qualcomm.com: improve commit log and minor other changes]
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-10-13 14:06:20 +03:00
..
ahb.c ath10k: fix error return code in ahb 2016-09-28 12:41:04 +03:00
ahb.h
bmi.c ath10k: hide kernel addresses from logs using %pK format specifier 2016-09-02 18:29:31 +03:00
bmi.h
ce.c ath10k: fix copy engine 5 destination ring stuck 2016-09-28 12:48:35 +03:00
ce.h
core.c ath10k: support up to 64 vdevs 2016-09-27 15:18:33 +03:00
core.h ath10k: cache calibration data when the core is stopped 2016-10-13 14:06:20 +03:00
debug.c ath10k: cache calibration data when the core is stopped 2016-10-13 14:06:20 +03:00
debug.h
debugfs_sta.c
hif.h
htc.c ath10k: hide kernel addresses from logs using %pK format specifier 2016-09-02 18:29:31 +03:00
htc.h
htt.c
htt.h ath10k: spelling and miscellaneous neatening 2016-09-27 15:00:48 +03:00
htt_rx.c ath10k: fix rfc1042 header retrieval in QCA4019 with eth decap mode 2016-09-27 15:15:51 +03:00
htt_tx.c ath10k: implement NAPI support 2016-09-09 14:49:47 +03:00
hw.c ath10k: spelling and miscellaneous neatening 2016-09-27 15:00:48 +03:00
hw.h ath10k: fix rfc1042 header retrieval in QCA4019 with eth decap mode 2016-09-27 15:15:51 +03:00
Kconfig
mac.c ath10k: fix typo in logging message 2016-09-27 15:18:24 +03:00
mac.h
Makefile
p2p.c
p2p.h
pci.c ath10k: remove unused variable ar_pci 2016-09-13 15:25:09 +03:00
pci.h ath10k: implement NAPI support 2016-09-09 14:49:47 +03:00
rx_desc.h
spectral.c
spectral.h
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.c ath10k: hide kernel addresses from logs using %pK format specifier 2016-09-02 18:29:31 +03:00
testmode.h
testmode_i.h
thermal.c ath10k: replace config_enabled() with IS_REACHABLE() 2016-09-02 18:57:06 +03:00
thermal.h
trace.c
trace.h
txrx.c ath10k: fix throughput regression in multi client mode 2016-09-09 15:07:11 +03:00
txrx.h
wmi-ops.h ath10k: Added support for extended dbglog module id for 10.4 2016-09-02 18:55:55 +03:00
wmi-tlv.c ath10k: Added support for extended dbglog module id for 10.4 2016-09-02 18:55:55 +03:00
wmi-tlv.h
wmi.c ath10k: Ignore SWBA event for a vif if its marked for no beacon 2016-09-28 12:47:14 +03:00
wmi.h ath10k: document cycle count related counters 2016-09-27 15:18:29 +03:00
wow.c
wow.h