aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/wmi-ops.h
diff options
context:
space:
mode:
authorMaharaja Kennadyrajan <c_mkenna@qti.qualcomm.com>2015-10-05 17:56:38 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2015-10-06 14:42:59 +0300
commit295426669cd68efc84657e6ee426499cfb54346e (patch)
treebb0bb4bb6336c8593459526990578a4b62544cf5 /drivers/net/wireless/ath/ath10k/wmi-ops.h
parentath10k: add a_sle32_to_cpu() (diff)
downloadlinux-dev-295426669cd68efc84657e6ee426499cfb54346e.tar.xz
linux-dev-295426669cd68efc84657e6ee426499cfb54346e.zip
ath10k: implement debugfs interface for Transmit Power Control stats
The Transmit Power Control (TPC) dump will show the power control values for each rate which makes it easier to debug calibration problems. Example usage: # cat /sys/kernel/debug/ieee80211/phy0/ath10k/tpc_stats TPC config for channel 5180 mode 10 CTL = 0x10 Reg. Domain = 58 Antenna Gain = 1 Reg. Max Antenna Gain = 0 Power Limit = 34 Reg. Max Power = 34 Num tx chains = 3 Num supported rates = 155 **********CDD POWER TABLE******* No. Preamble Rate_code tpc_valu1 tpc_value2 tpc_value3 0 CCK 0x40 0 0 0 1 CCk 0x41 0 0 0 [...] 154 HTCUP 0x 0 24 0 0 **********STBC POWER TABLE****** No. Preamble Rate_code tpc_valu1 tpc_value2 tpc_value3 0 CCK 0x40 0 0 0 [...] 154 HTCUP 0x 0 24 24 0 **********TXBF POWER TABLE****** is used to dump the tx power control stats. Signed-off-by: Maharaja Kennadyrajan <c_mkenna@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/wmi-ops.h')
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi-ops.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h
index 248ffc3d6620..d3bc6df861e4 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
+++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
@@ -177,6 +177,8 @@ struct wmi_ops {
const struct wmi_tdls_peer_capab_arg *cap,
const struct wmi_channel_arg *chan);
struct sk_buff *(*gen_adaptive_qcs)(struct ath10k *ar, bool enable);
+ struct sk_buff *(*gen_pdev_get_tpc_config)(struct ath10k *ar,
+ u32 param);
};
int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
@@ -1270,4 +1272,21 @@ ath10k_wmi_adaptive_qcs(struct ath10k *ar, bool enable)
return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->adaptive_qcs_cmdid);
}
+static inline int
+ath10k_wmi_pdev_get_tpc_config(struct ath10k *ar, u32 param)
+{
+ struct sk_buff *skb;
+
+ if (!ar->wmi.ops->gen_pdev_get_tpc_config)
+ return -EOPNOTSUPP;
+
+ skb = ar->wmi.ops->gen_pdev_get_tpc_config(ar, param);
+
+ if (IS_ERR(skb))
+ return PTR_ERR(skb);
+
+ return ath10k_wmi_cmd_send(ar, skb,
+ ar->wmi.cmd->pdev_get_tpc_config_cmdid);
+}
+
#endif