linux/drivers/net/wireless/ath/ath6kl
Eric Bentley cabd34d0e9 ath6kl: Allow the radio to report 0 dbm txpower without timing out
The ath6kl driver attempts to get the txpower value from the radio by first
clearing the existing stored value and then watching the value to become
non-zero.

APs allow setting client power to values from -127..127, but this radio
is not capable of setting values less then 0 and so will report txpower
as 0dbm for both negative and 0 client power values.

When the radio has txpower set to 0dbm txpower (equivalent to 1mw) the
ath6kl_cfg80211_get_txpower() function will remain in the
wait_event_interruptible_timeout() loop waiting for the value to be
non-zero, and will eventually timeout. This results in a 5 second delay in
response. However, the correct value of zero is eventually returned.

The 6004 defaults to 63dbm which is then limited by regulatory and
hardware limits with max of 18dbm (6003 max is 16dbm), therefore we can
use values larger then these to be able to determine when the value has
been updated.

To correct the issue, set the value to a nonsensical value (255) and wait
for it to change to the valid value.

Tested on both 6003 and 6004 based radios.  Return value of zero is
correctly returned in an expected amount of time (similar to when
returning non-zero values) when AP client power is set to both 0 and
negative values.

Signed-off-by: Eric Bentley <eric.bentley@lairdtech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-09-09 15:13:40 +03:00
..
bmi.c
bmi.h ath6kl: Fix ath6kl_bmi_read_hi32 macro 2014-07-14 15:49:23 +03:00
cfg80211.c ath6kl: Allow the radio to report 0 dbm txpower without timing out 2016-09-09 15:13:40 +03:00
cfg80211.h cfg80211: pass name_assign_type to rdev_add_virtual_intf() 2015-03-30 10:36:17 +02:00
common.h ath: change logging functions to return void 2014-09-29 14:29:23 +03:00
core.c ath6kl: add ability to set debug uart baud rate 2016-04-26 14:57:44 +03:00
core.h ath6kl: fix typo 2016-05-28 11:21:39 +03:00
debug.c ath6kl: break stats gathering code into separate method 2015-10-29 13:06:58 +02:00
debug.h ath6kl: break stats gathering code into separate method 2015-10-29 13:06:58 +02:00
hif-ops.h
hif.c ath6kl: enable firmware crash dumps on the AR6004 2016-09-09 15:12:59 +03:00
hif.h ath6kl: fix struct hif_scatter_req list handling 2014-03-13 07:20:00 +02:00
htc_mbox.c ath6kl: Don't print error message when recv is canceled 2015-12-08 16:50:21 +02:00
htc_pipe.c ath6kl: implement rx flush for htc pipe 2014-07-14 16:03:01 +03:00
htc-ops.h
htc.h ath6kl: spell "distribution" correctly in a comment. 2015-07-29 11:14:04 +03:00
init.c ath6kl: add ability to set debug uart baud rate 2016-04-26 14:57:44 +03:00
Kconfig ath6kl: update Kconfig descriptions 2014-03-13 07:47:26 +02:00
main.c wireless: Use eth_<foo>_addr instead of memset 2015-03-03 17:01:36 -05:00
Makefile ath6kl: add tracing support and tracing points for wmi packets 2013-03-18 13:42:20 +02:00
recovery.c
sdio.c ath6kl: Add SDIO device ID for QCA6234X Support 2014-08-14 15:26:15 +03:00
target.h ath6kl: remove spaces before semicolon 2014-03-13 07:47:05 +02:00
testmode.c cfg80211: add wdev to testmode cmd 2013-08-12 14:11:37 +02:00
testmode.h cfg80211: add wdev to testmode cmd 2013-08-12 14:11:37 +02:00
trace.c ath6kl: add tracing points for sdio transfers 2013-03-18 13:42:20 +02:00
trace.h ath6kl: fix size_t printf warnings 2013-03-20 08:55:26 -04:00
txrx.c ath6kl: Fix WLAN tethering authentication problem. 2016-07-19 16:22:32 +03:00
usb.c ath6kl: remove incorrect reset_resume handler 2014-11-04 00:59:05 +02:00
wmi.c ath6kl: simplify logical condition 2016-05-28 11:23:18 +03:00
wmi.h cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00