aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/wmi.c
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qti.qualcomm.com>2015-01-12 07:07:26 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2015-01-13 09:13:01 -0500
commit50abef85e7cc7576b37ba8dbe480f0537fe74d6d (patch)
tree3ee0d6d1d8fa1fbca9f508e9ca15a18c2ddfcd2b /drivers/net/wireless/ath/ath10k/wmi.c
parent11597413b22d1a2ee02501d4167ae712a2b7929e (diff)
ath10k: add wmi support for delba_send
Add WMI support for sending delba request. This command is used for debugging purpose. 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.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 9872181d33aa..2d3c700e2cbb 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -4956,6 +4956,33 @@ ath10k_wmi_op_gen_addba_set_resp(struct ath10k *ar, u32 vdev_id, const u8 *mac,
4956 return skb; 4956 return skb;
4957} 4957}
4958 4958
4959static struct sk_buff *
4960ath10k_wmi_op_gen_delba_send(struct ath10k *ar, u32 vdev_id, const u8 *mac,
4961 u32 tid, u32 initiator, u32 reason)
4962{
4963 struct wmi_delba_send_cmd *cmd;
4964 struct sk_buff *skb;
4965
4966 if (!mac)
4967 return ERR_PTR(-EINVAL);
4968
4969 skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd));
4970 if (!skb)
4971 return ERR_PTR(-ENOMEM);
4972
4973 cmd = (struct wmi_delba_send_cmd *)skb->data;
4974 cmd->vdev_id = __cpu_to_le32(vdev_id);
4975 ether_addr_copy(cmd->peer_macaddr.addr, mac);
4976 cmd->tid = __cpu_to_le32(tid);
4977 cmd->initiator = __cpu_to_le32(initiator);
4978 cmd->reasoncode = __cpu_to_le32(reason);
4979
4980 ath10k_dbg(ar, ATH10K_DBG_WMI,
4981 "wmi delba send vdev_id 0x%X mac_addr %pM tid %u initiator %u reason %u\n",
4982 vdev_id, mac, tid, initiator, reason);
4983 return skb;
4984}
4985
4959static const struct wmi_ops wmi_ops = { 4986static const struct wmi_ops wmi_ops = {
4960 .rx = ath10k_wmi_op_rx, 4987 .rx = ath10k_wmi_op_rx,
4961 .map_svc = wmi_main_svc_map, 4988 .map_svc = wmi_main_svc_map,
@@ -5010,6 +5037,7 @@ static const struct wmi_ops wmi_ops = {
5010 .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp, 5037 .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
5011 .gen_addba_send = ath10k_wmi_op_gen_addba_send, 5038 .gen_addba_send = ath10k_wmi_op_gen_addba_send,
5012 .gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp, 5039 .gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp,
5040 .gen_delba_send = ath10k_wmi_op_gen_delba_send,
5013}; 5041};
5014 5042
5015static const struct wmi_ops wmi_10_1_ops = { 5043static const struct wmi_ops wmi_10_1_ops = {
@@ -5067,6 +5095,7 @@ static const struct wmi_ops wmi_10_1_ops = {
5067 .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp, 5095 .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
5068 .gen_addba_send = ath10k_wmi_op_gen_addba_send, 5096 .gen_addba_send = ath10k_wmi_op_gen_addba_send,
5069 .gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp, 5097 .gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp,
5098 .gen_delba_send = ath10k_wmi_op_gen_delba_send,
5070}; 5099};
5071 5100
5072static const struct wmi_ops wmi_10_2_ops = { 5101static const struct wmi_ops wmi_10_2_ops = {
@@ -5125,6 +5154,7 @@ static const struct wmi_ops wmi_10_2_ops = {
5125 .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp, 5154 .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
5126 .gen_addba_send = ath10k_wmi_op_gen_addba_send, 5155 .gen_addba_send = ath10k_wmi_op_gen_addba_send,
5127 .gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp, 5156 .gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp,
5157 .gen_delba_send = ath10k_wmi_op_gen_delba_send,
5128}; 5158};
5129 5159
5130static const struct wmi_ops wmi_10_2_4_ops = { 5160static const struct wmi_ops wmi_10_2_4_ops = {
@@ -5183,6 +5213,7 @@ static const struct wmi_ops wmi_10_2_4_ops = {
5183 .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp, 5213 .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
5184 .gen_addba_send = ath10k_wmi_op_gen_addba_send, 5214 .gen_addba_send = ath10k_wmi_op_gen_addba_send,
5185 .gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp, 5215 .gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp,
5216 .gen_delba_send = ath10k_wmi_op_gen_delba_send,
5186}; 5217};
5187 5218
5188int ath10k_wmi_attach(struct ath10k *ar) 5219int ath10k_wmi_attach(struct ath10k *ar)