diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2016-08-19 13:37:41 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2016-08-31 10:27:26 +0300 |
commit | e25854f2404cc92882e42fe8002b0fd75a77d842 (patch) | |
tree | dbb87d47e619ffea5b90268b5cf9600ca884ebaf /drivers/net/wireless/ath/ath10k/wmi-ops.h | |
parent | ebce1a5e3a0e2c035f201c21ae9f403b42efcbcb (diff) | |
download | linux-stable-e25854f2404cc92882e42fe8002b0fd75a77d842.tar.gz linux-stable-e25854f2404cc92882e42fe8002b0fd75a77d842.tar.bz2 linux-stable-e25854f2404cc92882e42fe8002b0fd75a77d842.zip |
ath10k: implement wmi echo command
Will be useful for implementing command barriers.
Signed-off-by: Michal Kazior <michal.kazior@tieto.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.h | 17 |
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 64ebd304f907..b1d88fa60d11 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-ops.h +++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h @@ -194,6 +194,7 @@ struct wmi_ops { struct sk_buff *(*gen_pdev_bss_chan_info_req) (struct ath10k *ar, enum wmi_bss_survey_req_type type); + struct sk_buff *(*gen_echo)(struct ath10k *ar, u32 value); }; int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id); @@ -1382,4 +1383,20 @@ ath10k_wmi_pdev_bss_chan_info_request(struct ath10k *ar, wmi->cmd->pdev_bss_chan_info_request_cmdid); } +static inline int +ath10k_wmi_echo(struct ath10k *ar, u32 value) +{ + struct ath10k_wmi *wmi = &ar->wmi; + struct sk_buff *skb; + + if (!wmi->ops->gen_echo) + return -EOPNOTSUPP; + + skb = wmi->ops->gen_echo(ar, value); + if (IS_ERR(skb)) + return PTR_ERR(skb); + + return ath10k_wmi_cmd_send(ar, skb, wmi->cmd->echo_cmdid); +} + #endif |