rtw88: 8821c: add power tracking
authorTzu-En Huang <tehuang@realtek.com>
Wed, 3 Jun 2020 09:42:15 +0000 (17:42 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 15 Jul 2020 09:08:12 +0000 (12:08 +0300)
commit3a4312828ce13e1645fd3af76e4314a2623b3361
tree417f0ca79050a68616624d8534573b6d228cc2c4
parent11fcb119a758e1e03ec77e20b386f4b93ae06601
rtw88: 8821c: add power tracking

The TX power requires to be adjusted based on the thermal value.
The actual power will decrease if the thermal value raised, and
will increase if the thermal value lowered. Driver comapres the
thermal value, as moving averages. If it changes over a limit,
driver will modify the TX power index to compensate.

Implement rtw_chip_ops::pwr_track() for 8821c.

Signed-off-by: Tzu-En Huang <tehuang@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200603094218.19942-3-yhchuang@realtek.com
drivers/net/wireless/realtek/rtw88/main.h
drivers/net/wireless/realtek/rtw88/rtw8821c.c
drivers/net/wireless/realtek/rtw88/rtw8821c.h