aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/wmi-ops.h
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qti.qualcomm.com>2014-12-17 12:22:17 +0200
committerKalle Valo <kvalo@qca.qualcomm.com>2014-12-23 17:18:35 +0200
commita57a6a2753ac4a85cb083dd32dc0be414d52e001 (patch)
tree3e5f21f0b14ee7029330b83de1bc6a61917189f9 /drivers/net/wireless/ath/ath10k/wmi-ops.h
parentath10k: add thermal cooling device support (diff)
downloadlinux-dev-a57a6a2753ac4a85cb083dd32dc0be414d52e001.tar.xz
linux-dev-a57a6a2753ac4a85cb083dd32dc0be414d52e001.zip
ath10k: add wmi interface for pdev_get_temperature
Add WMI command support for reading temperature from the target and corresponding WMI temperature event handler. The pdev_get_temperature command is currently supported in 10.2 firmware alone. Signed-off-by: Rajkumar Manoharan <rmanohar@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.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h
index feed0fe5e117..20e2c3002bb5 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
+++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
@@ -118,6 +118,7 @@ struct wmi_ops {
u32 period, u32 duration,
u32 next_offset,
u32 enabled);
+ struct sk_buff *(*gen_pdev_get_temperature)(struct ath10k *ar);
};
int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
@@ -840,4 +841,20 @@ ath10k_wmi_pdev_set_quiet_mode(struct ath10k *ar, u32 period, u32 duration,
ar->wmi.cmd->pdev_set_quiet_mode_cmdid);
}
+static inline int
+ath10k_wmi_pdev_get_temperature(struct ath10k *ar)
+{
+ struct sk_buff *skb;
+
+ if (!ar->wmi.ops->gen_pdev_get_temperature)
+ return -EOPNOTSUPP;
+
+ skb = ar->wmi.ops->gen_pdev_get_temperature(ar);
+ if (IS_ERR(skb))
+ return PTR_ERR(skb);
+
+ return ath10k_wmi_cmd_send(ar, skb,
+ ar->wmi.cmd->pdev_get_temperature_cmdid);
+}
+
#endif