Commit Graph

10 Commits

Author SHA1 Message Date
Kalle Valo f0553ca9ce ath10k: switch to use SPDX license identifiers
Use SPDX identifiers everywhere in ath10k.

Makefile was incorrectly marked in commit b24413180f ("License cleanup: add
SPDX GPL-2.0 license identifier to files with no license"), fix that as well.

Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-20 10:33:00 +02:00
Kalle Valo 8b1083d618 ath10k: update copyright year
Update year for Qualcomm Atheros, Inc. copyrights.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-12-27 12:22:01 +02:00
Kalle Valo 14e105cd40 ath10k: fix checkpatch warnings related to spaces
Fix checkpatch warnings about use of spaces with operators:

spaces preferred around that '*' (ctx:VxV)

This has been recently added to checkpatch.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-14 17:30:51 +03:00
Michal Marek de5315ce36 ath10k: Fix build with CONFIG_THERMAL=m
After commit cf4f21938e ("kbuild: Allow to specify composite modules
with modname-m"), thermal.c gets included in the driver and the build
fails with

drivers/net/wireless/ath/ath10k/thermal.c:119:6: error: redefinition of ‘ath10k_thermal_event_temperature’
drivers/net/wireless/ath/ath10k/thermal.h:54:20: note: previous definition of ‘ath10k_thermal_event_temperature’ was here
drivers/net/wireless/ath/ath10k/thermal.c:136:6: error: redefinition of ‘ath10k_thermal_set_throttling’
drivers/net/wireless/ath/ath10k/thermal.h:59:20: note: previous definition of ‘ath10k_thermal_set_throttling’ was here
drivers/net/wireless/ath/ath10k/thermal.c:162:5: error: redefinition of ‘ath10k_thermal_register’
drivers/net/wireless/ath/ath10k/thermal.h:45:19: note: previous definition of ‘ath10k_thermal_register’ was here
drivers/net/wireless/ath/ath10k/thermal.c:216:6: error: redefinition of ‘ath10k_thermal_unregister’
drivers/net/wireless/ath/ath10k/thermal.h:50:20: note: previous definition of ‘ath10k_thermal_unregister’ was here

Change the #ifdef to reflect the new kbuild behavior.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Acked-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
2015-11-26 20:53:07 +01:00
Rajkumar Manoharan 8515b5c79a ath10k: configure thermal throttle while powering up
Thermal throttling is not handled in software restart and device
bootup. Also it needs to be configured whenever quiet period got
updated. Fix that.

Reported-by: Matthias Kaehlcke <mka@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-23 17:16:37 +02:00
Rajkumar Manoharan 972f051364 ath10k: fix interpretation of cooling device state
Setting the sysfs attribute ends up configuring the duty cycle,
but the interface through which the attribute is exposed
(cooling_device) is for setting the throttle/cooling state. This
is confusing the user. Hence renaming the cooling device interfaces
for better readability.

Cc: Matthias Kaehlcke <mka@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-23 17:16:13 +02:00
Rajkumar Manoharan 63fb32df97 ath10k: add debugfs entry to configure quiet period
Add support to configure quiet period (in milliseconds) via debugfs.
This is useful to experiment different quiet period values along with
different throttle ratio.

echo 100 > /sys/kernel/debug/ieee80211/phyX/ath10k/quiet_period

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-23 17:15:59 +02:00
Rajkumar Manoharan a13e6aea89 ath10k: increase duty cycle maximum limit
Allow user to configure the duty cycle upto 100%. Since thermal
mitigation algorithm is running in user space, remove the driver
level limitation and let the user to control the temperature.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-03-07 09:52:25 +02:00
Rajkumar Manoharan ac2953fcc3 ath10k: add thermal sensor device support
Temperature sensor generates electrical analog voltage from temperature
of each chain. The analog voltage is converted to digital value through
ADC. For reading temperature values fom user space, hw monitoring device
is used.

Whenever the user requests for current temperature, the driver sends WMI
command and wait for response. For reading temperature,

cat /sys/class/ieee80211/phy*/device/hwmon/hwmon2/temp1_input

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-12-23 17:18:41 +02:00
Rajkumar Manoharan fe6f36d621 ath10k: add thermal cooling device support
Thermal cooling device support is added to control the temperature
by throttling the data transmission for the given duration. Throttling
is done using hw MAC quiet time setting. Period, duration and offset
from TBTT can be set up to quiet the MAC transmits for the required duty
cycle (% of quiet duration). The thermal device allows user to configure
duty cycle.

The quiet params are derived as follows.
	period = max(25TU, beacon interval / number of bss)
	duration = period * duty cycle / 100

Quiet mode can be disabled by setting the duty cycle to 0. The cooling
device can be found under /sys/class/thermal/cooling_deviceX/.
Corresponding soft link to this device can be found under phy folder.

/sys/class/ieee80211/phy*/device/cooling_device.

To set duty cycle as 40%,

echo 40 >/sys/class/ieee80211/phy*/device/cooling_device/cur_state

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-12-23 17:18:27 +02:00