]> git.baikalelectronics.ru Git - kernel.git/commit
ath10k: add thermal cooling device support
authorRajkumar Manoharan <rmanohar@qti.qualcomm.com>
Wed, 17 Dec 2014 10:22:07 +0000 (12:22 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 23 Dec 2014 15:18:27 +0000 (17:18 +0200)
commit780955c2cffbdb40720590035b943c1d8666072d
treebd2bdba90078f7af4b53b54a7eda3ff8a8a4bb42
parentaf93d9258d5e35daa3399417c20448b13fcf74f3
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>
drivers/net/wireless/ath/ath10k/Makefile
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/core.h
drivers/net/wireless/ath/ath10k/thermal.c [new file with mode: 0644]
drivers/net/wireless/ath/ath10k/thermal.h [new file with mode: 0644]