ath10k: move driver state check before setting throttle
authorRajkumar Manoharan <rmanohar@qti.qualcomm.com>
Sun, 15 Mar 2015 15:06:25 +0000 (20:36 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Mon, 23 Mar 2015 15:16:57 +0000 (17:16 +0200)
commit9936fa5908a4bef7fffc0758f0e6307e83103644
tree1dcee13467ee9c0fef5fb2a52d31b3d59400859e
parent28bf0c4e3fdd3bfde8b2252f38d1d7ddb70449d6
ath10k: move driver state check before setting throttle

Since thermal daemon is unaware of the device state, it might
try to adjust the throttle state when the device is powered down.
So the driver caches the value and will configure it while
powering up the target. The cached value will be programed later
once the device is brought up. In such case, returning error
status is confusing and misleading the user application. Hence
moving the driver state check before sending wmi command to target.

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>
drivers/net/wireless/ath/ath10k/thermal.c