diff options
author | Rajkumar Manoharan <rmanohar@qti.qualcomm.com> | 2015-01-12 07:07:25 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2015-01-13 09:12:32 -0500 |
commit | dc8ab27861b2c1277bd9603a85f317708149d844 (patch) | |
tree | d8833e49720d5af588fdc7a28427b0b77eb05997 /drivers/net/wireless | |
parent | b6c8e287f6089559146e2a388a63fbe5460d7f44 (diff) |
ath10k: add wmi support for addba_clear_resp
Add WMI support for clearing addba response before switching aggregation
mode (auto/manual) 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')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/wmi-ops.h | 18 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/wmi-tlv.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/wmi.c | 28 |
3 files changed, 47 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h index 20e2c3002bb5..b161043c7740 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-ops.h +++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h | |||
@@ -119,6 +119,8 @@ struct wmi_ops { | |||
119 | u32 next_offset, | 119 | u32 next_offset, |
120 | u32 enabled); | 120 | u32 enabled); |
121 | struct sk_buff *(*gen_pdev_get_temperature)(struct ath10k *ar); | 121 | struct sk_buff *(*gen_pdev_get_temperature)(struct ath10k *ar); |
122 | struct sk_buff *(*gen_addba_clear_resp)(struct ath10k *ar, u32 vdev_id, | ||
123 | const u8 *mac); | ||
122 | }; | 124 | }; |
123 | 125 | ||
124 | int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id); | 126 | int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id); |
@@ -857,4 +859,20 @@ ath10k_wmi_pdev_get_temperature(struct ath10k *ar) | |||
857 | ar->wmi.cmd->pdev_get_temperature_cmdid); | 859 | ar->wmi.cmd->pdev_get_temperature_cmdid); |
858 | } | 860 | } |
859 | 861 | ||
862 | static inline int | ||
863 | ath10k_wmi_addba_clear_resp(struct ath10k *ar, u32 vdev_id, const u8 *mac) | ||
864 | { | ||
865 | struct sk_buff *skb; | ||
866 | |||
867 | if (!ar->wmi.ops->gen_addba_clear_resp) | ||
868 | return -EOPNOTSUPP; | ||
869 | |||
870 | skb = ar->wmi.ops->gen_addba_clear_resp(ar, vdev_id, mac); | ||
871 | if (IS_ERR(skb)) | ||
872 | return PTR_ERR(skb); | ||
873 | |||
874 | return ath10k_wmi_cmd_send(ar, skb, | ||
875 | ar->wmi.cmd->addba_clear_resp_cmdid); | ||
876 | } | ||
877 | |||
860 | #endif | 878 | #endif |
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c index 4c050cec3966..499a7797b4de 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c | |||
@@ -2207,6 +2207,7 @@ static const struct wmi_ops wmi_tlv_ops = { | |||
2207 | .gen_pktlog_disable = ath10k_wmi_tlv_op_gen_pktlog_disable, | 2207 | .gen_pktlog_disable = ath10k_wmi_tlv_op_gen_pktlog_disable, |
2208 | /* .gen_pdev_set_quiet_mode not implemented */ | 2208 | /* .gen_pdev_set_quiet_mode not implemented */ |
2209 | /* .gen_pdev_get_temperature not implemented */ | 2209 | /* .gen_pdev_get_temperature not implemented */ |
2210 | /* .gen_addba_clear_resp not implemented */ | ||
2210 | }; | 2211 | }; |
2211 | 2212 | ||
2212 | /************/ | 2213 | /************/ |
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index c56d2fa5edb8..47ef1a9ada21 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c | |||
@@ -4880,6 +4880,30 @@ ath10k_wmi_op_gen_pdev_set_quiet_mode(struct ath10k *ar, u32 period, | |||
4880 | return skb; | 4880 | return skb; |
4881 | } | 4881 | } |
4882 | 4882 | ||
4883 | static struct sk_buff * | ||
4884 | ath10k_wmi_op_gen_addba_clear_resp(struct ath10k *ar, u32 vdev_id, | ||
4885 | const u8 *mac) | ||
4886 | { | ||
4887 | struct wmi_addba_clear_resp_cmd *cmd; | ||
4888 | struct sk_buff *skb; | ||
4889 | |||
4890 | if (!mac) | ||
4891 | return ERR_PTR(-EINVAL); | ||
4892 | |||
4893 | skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); | ||
4894 | if (!skb) | ||
4895 | return ERR_PTR(-ENOMEM); | ||
4896 | |||
4897 | cmd = (struct wmi_addba_clear_resp_cmd *)skb->data; | ||
4898 | cmd->vdev_id = __cpu_to_le32(vdev_id); | ||
4899 | ether_addr_copy(cmd->peer_macaddr.addr, mac); | ||
4900 | |||
4901 | ath10k_dbg(ar, ATH10K_DBG_WMI, | ||
4902 | "wmi addba clear resp vdev_id 0x%X mac_addr %pM\n", | ||
4903 | vdev_id, mac); | ||
4904 | return skb; | ||
4905 | } | ||
4906 | |||
4883 | static const struct wmi_ops wmi_ops = { | 4907 | static const struct wmi_ops wmi_ops = { |
4884 | .rx = ath10k_wmi_op_rx, | 4908 | .rx = ath10k_wmi_op_rx, |
4885 | .map_svc = wmi_main_svc_map, | 4909 | .map_svc = wmi_main_svc_map, |
@@ -4931,6 +4955,7 @@ static const struct wmi_ops wmi_ops = { | |||
4931 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, | 4955 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, |
4932 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, | 4956 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, |
4933 | /* .gen_pdev_get_temperature not implemented */ | 4957 | /* .gen_pdev_get_temperature not implemented */ |
4958 | .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp, | ||
4934 | }; | 4959 | }; |
4935 | 4960 | ||
4936 | static const struct wmi_ops wmi_10_1_ops = { | 4961 | static const struct wmi_ops wmi_10_1_ops = { |
@@ -4985,6 +5010,7 @@ static const struct wmi_ops wmi_10_1_ops = { | |||
4985 | .gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable, | 5010 | .gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable, |
4986 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, | 5011 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, |
4987 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, | 5012 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, |
5013 | .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp, | ||
4988 | }; | 5014 | }; |
4989 | 5015 | ||
4990 | static const struct wmi_ops wmi_10_2_ops = { | 5016 | static const struct wmi_ops wmi_10_2_ops = { |
@@ -5040,6 +5066,7 @@ static const struct wmi_ops wmi_10_2_ops = { | |||
5040 | .gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable, | 5066 | .gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable, |
5041 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, | 5067 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, |
5042 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, | 5068 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, |
5069 | .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp, | ||
5043 | }; | 5070 | }; |
5044 | 5071 | ||
5045 | static const struct wmi_ops wmi_10_2_4_ops = { | 5072 | static const struct wmi_ops wmi_10_2_4_ops = { |
@@ -5095,6 +5122,7 @@ static const struct wmi_ops wmi_10_2_4_ops = { | |||
5095 | .gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable, | 5122 | .gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable, |
5096 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, | 5123 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, |
5097 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, | 5124 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, |
5125 | .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp, | ||
5098 | }; | 5126 | }; |
5099 | 5127 | ||
5100 | int ath10k_wmi_attach(struct ath10k *ar) | 5128 | int ath10k_wmi_attach(struct ath10k *ar) |