Skip to contentSkip to conversation

Patch "ath10k: cache calibration data when the core is stopped" has been added to the 4.8-stable tree

PATCH [email protected] 1 participant 1 message Nov 9, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

ath10k: cache calibration data when the core is stopped

to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
ath10k-cache-calibration-data-when-the-core-is-stopped.patch
and it can be found in the queue-4.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From f67b107d4ceddcf7aa65b706aaaf50d68edb52a6 Mon Sep 17 00:00:00 2001

From: Marty Faltesek <[email protected]>
Date: Mon, 10 Oct 2016 19:00:04 +0300
Subject: ath10k: cache calibration data when the core is stopped

From: Marty Faltesek <[email protected]>

commit f67b107d4ceddcf7aa65b706aaaf50d68edb52a6 upstream.

Commit 0b8e3c4ca29f ("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.

Fixes 0b8e3c4ca29f ("ath10k: move cal data len to hw_params")
[[email protected]: improve commit log and minor other changes]
---
 drivers/net/wireless/ath/ath10k/core.h  |    1 
 drivers/net/wireless/ath/ath10k/debug.c |   75 ++++++++++++++++----------------
 2 files changed, 40 insertions(+), 36 deletions(-)
drivers/net/wireless/ath/ath10k/core.h +1 -0
@@ -445,6 +445,7 @@ struct ath10k_debug {
 	u32 pktlog_filter;
 	u32 reg_addr;
 	u32 nf_cal_period;
+	void *cal_data;
 
 	struct ath10k_fw_crash_data *fw_crash_data;
 };
drivers/net/wireless/ath/ath10k/debug.c +39 -36

144 lines not on this page · raw message

Patches currently in stable-queue which might be from [email protected] are

queue-4.8/ath10k-cache-calibration-data-when-the-core-is-stopped.patch