summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/init.c
diff options
context:
space:
mode:
authorZefir Kurtisi <zefir.kurtisi@neratec.com>2016-04-01 11:37:08 +0200
committerKalle Valo <kvalo@qca.qualcomm.com>2016-04-19 18:10:47 +0300
commit71f5137bf010c6faffab50c0ec15374c59c4a411 (patch)
tree1175343ccfdd61b19b73c09ff80f246f1d38dbb2 /drivers/net/wireless/ath/ath9k/init.c
parentf286dd899b4f1445279af6b5965c335ae6f998f7 (diff)
ath9k: interpret requested txpower in EIRP domain
Tx power limitations at upper layers are interpreted in the EIRP domain. When the user requests a given maximum txpower, e.g. with: 'iw phy0 set txpower fixed 1500', he expects the EIRP to be at or below 15dBm. In ath9k_hw_apply_txpower(), the interpretation is different: the antenna-gain is capped against the current txpower limit in the regulatory, but not against the user set value. It ensures that the resulting EIRP is below the limit defined by the active countrycode, but not below the value the user requested. In a scenario like e.g. a) antenna_gain=6 b) countrycode limits to eirp=18 c) user set txpower=15 this will cause a setting for AR_PHY_POWER_TX_RATE regs resulting in an EIRP > 15. This patch ensures that antenna-gain is considered whenever the txpower limit is adjusted and with that the user set limits are kept. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/init.c')
0 files changed, 0 insertions, 0 deletions