[Xenial,SRU,1/1] ath10k: add max_tx_power for QCA6174 WLAN.RM.2.0 firmware

Message ID 20171205072037.22686-2-shrirang.bagul@canonical.com
State New
Headers show
Series
  • [Xenial,SRU,1/1] ath10k: add max_tx_power for QCA6174 WLAN.RM.2.0 firmware
Related show

Commit Message

Shrirang Bagul Dec. 5, 2017, 7:20 a.m.
From: Alan Liu <alanliu@qca.qualcomm.com>

BugLink: https://bugs.launchpad.net/bugs/1736317

QCA6174 WLAN.RM.2.0 firmware uses max_tx_power instead of using max_reg_power
to set transmission power. The tx power was about -50dbm, after applying this
change, it become -32dbm.

Signed-off-by: Alan Liu <alanliu@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
(cherry picked from commit 513527c87a7feab2a5b31db07e5b07864d3c08f7)
Signed-off-by: Shrirang Bagul <shrirang.bagul@canonical.com>
---
 drivers/net/wireless/ath/ath10k/wmi.c | 1 +
 drivers/net/wireless/ath/ath10k/wmi.h | 1 +
 2 files changed, 2 insertions(+)

Patch

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 7569db0f69b5..49e58b34af2a 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -1573,6 +1573,7 @@  void ath10k_wmi_put_wmi_channel(struct wmi_channel *ch,
 	ch->max_power = arg->max_power;
 	ch->reg_power = arg->max_reg_power;
 	ch->antenna_max = arg->max_antenna_gain;
+	ch->max_tx_power = arg->max_power;
 
 	/* mode & flags share storage */
 	ch->mode = arg->mode;
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index 72a4ef709577..54fdbefa8172 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -1732,6 +1732,7 @@  struct wmi_channel {
 		__le32 reginfo1;
 		struct {
 			u8 antenna_max;
+			u8 max_tx_power;
 		} __packed;
 	} __packed;
 } __packed;