* [PATCH 1/8] ath10k: add wmi support for addba_clear_resp
2014-12-19 6:54 [PATCH 0/8] ath10k: add per station debugfs support Rajkumar Manoharan
@ 2014-12-19 6:54 ` Rajkumar Manoharan
2014-12-19 6:54 ` [PATCH 2/8] ath10k: add wmi support for addba_send Rajkumar Manoharan
` (6 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Rajkumar Manoharan @ 2014-12-19 6:54 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Rajkumar Manoharan
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>
---
drivers/net/wireless/ath/ath10k/wmi-ops.h | 18 ++++++++++++++++++
drivers/net/wireless/ath/ath10k/wmi-tlv.c | 1 +
drivers/net/wireless/ath/ath10k/wmi.c | 27 +++++++++++++++++++++++++++
3 files changed, 46 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h
index 20e2c30..b161043 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 {
u32 next_offset,
u32 enabled);
struct sk_buff *(*gen_pdev_get_temperature)(struct ath10k *ar);
+ struct sk_buff *(*gen_addba_clear_resp)(struct ath10k *ar, u32 vdev_id,
+ const u8 *mac);
};
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)
ar->wmi.cmd->pdev_get_temperature_cmdid);
}
+static inline int
+ath10k_wmi_addba_clear_resp(struct ath10k *ar, u32 vdev_id, const u8 *mac)
+{
+ struct sk_buff *skb;
+
+ if (!ar->wmi.ops->gen_addba_clear_resp)
+ return -EOPNOTSUPP;
+
+ skb = ar->wmi.ops->gen_addba_clear_resp(ar, vdev_id, mac);
+ if (IS_ERR(skb))
+ return PTR_ERR(skb);
+
+ return ath10k_wmi_cmd_send(ar, skb,
+ ar->wmi.cmd->addba_clear_resp_cmdid);
+}
+
#endif
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
index 4c050ce..499a779 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 = {
.gen_pktlog_disable = ath10k_wmi_tlv_op_gen_pktlog_disable,
/* .gen_pdev_set_quiet_mode not implemented */
/* .gen_pdev_get_temperature not implemented */
+ /* .gen_addba_clear_resp not implemented */
};
/************/
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index f6b0de3..0053641 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -4644,6 +4644,30 @@ ath10k_wmi_op_gen_pdev_set_quiet_mode(struct ath10k *ar, u32 period,
return skb;
}
+static struct sk_buff *
+ath10k_wmi_op_gen_addba_clear_resp(struct ath10k *ar, u32 vdev_id,
+ const u8 *mac)
+{
+ struct wmi_addba_clear_resp_cmd *cmd;
+ struct sk_buff *skb;
+
+ if (!mac)
+ return ERR_PTR(-EINVAL);
+
+ skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd));
+ if (!skb)
+ return ERR_PTR(-ENOMEM);
+
+ cmd = (struct wmi_addba_clear_resp_cmd *)skb->data;
+ cmd->vdev_id = __cpu_to_le32(vdev_id);
+ ether_addr_copy(cmd->peer_macaddr.addr, mac);
+
+ ath10k_dbg(ar, ATH10K_DBG_WMI,
+ "wmi addba clear resp vdev_id 0x%X mac_addr %pM\n",
+ vdev_id, mac);
+ return skb;
+}
+
static const struct wmi_ops wmi_ops = {
.rx = ath10k_wmi_op_rx,
.map_svc = wmi_main_svc_map,
@@ -4695,6 +4719,7 @@ static const struct wmi_ops wmi_ops = {
.gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable,
.gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode,
/* .gen_pdev_get_temperature not implemented */
+ .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
};
static const struct wmi_ops wmi_10_1_ops = {
@@ -4749,6 +4774,7 @@ static const struct wmi_ops wmi_10_1_ops = {
.gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable,
.gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable,
.gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode,
+ .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
};
static const struct wmi_ops wmi_10_2_ops = {
@@ -4804,6 +4830,7 @@ static const struct wmi_ops wmi_10_2_ops = {
.gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable,
.gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable,
.gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode,
+ .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
};
int ath10k_wmi_attach(struct ath10k *ar)
--
2.2.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 2/8] ath10k: add wmi support for addba_send
2014-12-19 6:54 [PATCH 0/8] ath10k: add per station debugfs support Rajkumar Manoharan
2014-12-19 6:54 ` [PATCH 1/8] ath10k: add wmi support for addba_clear_resp Rajkumar Manoharan
@ 2014-12-19 6:54 ` Rajkumar Manoharan
2014-12-19 6:54 ` [PATCH 3/8] ath10k: add wmi support for addba_set_resp Rajkumar Manoharan
` (5 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Rajkumar Manoharan @ 2014-12-19 6:54 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Rajkumar Manoharan
Add WMI support for sending addba request. This command is meant
for debugging purpose.
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/wmi-ops.h | 19 +++++++++++++++++++
drivers/net/wireless/ath/ath10k/wmi-tlv.c | 1 +
drivers/net/wireless/ath/ath10k/wmi.c | 29 +++++++++++++++++++++++++++++
3 files changed, 49 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h
index b161043..badf422 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
+++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
@@ -121,6 +121,8 @@ struct wmi_ops {
struct sk_buff *(*gen_pdev_get_temperature)(struct ath10k *ar);
struct sk_buff *(*gen_addba_clear_resp)(struct ath10k *ar, u32 vdev_id,
const u8 *mac);
+ struct sk_buff *(*gen_addba_send)(struct ath10k *ar, u32 vdev_id,
+ const u8 *mac, u32 tid, u32 buf_size);
};
int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
@@ -875,4 +877,21 @@ ath10k_wmi_addba_clear_resp(struct ath10k *ar, u32 vdev_id, const u8 *mac)
ar->wmi.cmd->addba_clear_resp_cmdid);
}
+static inline int
+ath10k_wmi_addba_send(struct ath10k *ar, u32 vdev_id, const u8 *mac,
+ u32 tid, u32 buf_size)
+{
+ struct sk_buff *skb;
+
+ if (!ar->wmi.ops->gen_addba_send)
+ return -EOPNOTSUPP;
+
+ skb = ar->wmi.ops->gen_addba_send(ar, vdev_id, mac, tid, buf_size);
+ if (IS_ERR(skb))
+ return PTR_ERR(skb);
+
+ return ath10k_wmi_cmd_send(ar, skb,
+ ar->wmi.cmd->addba_send_cmdid);
+}
+
#endif
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
index 499a779..74a0598 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
@@ -2208,6 +2208,7 @@ static const struct wmi_ops wmi_tlv_ops = {
/* .gen_pdev_set_quiet_mode not implemented */
/* .gen_pdev_get_temperature not implemented */
/* .gen_addba_clear_resp not implemented */
+ /* .gen_addba_send not implemented */
};
/************/
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 0053641..b118795 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -4668,6 +4668,32 @@ ath10k_wmi_op_gen_addba_clear_resp(struct ath10k *ar, u32 vdev_id,
return skb;
}
+static struct sk_buff *
+ath10k_wmi_op_gen_addba_send(struct ath10k *ar, u32 vdev_id, const u8 *mac,
+ u32 tid, u32 buf_size)
+{
+ struct wmi_addba_send_cmd *cmd;
+ struct sk_buff *skb;
+
+ if (!mac)
+ return ERR_PTR(-EINVAL);
+
+ skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd));
+ if (!skb)
+ return ERR_PTR(-ENOMEM);
+
+ cmd = (struct wmi_addba_send_cmd *)skb->data;
+ cmd->vdev_id = __cpu_to_le32(vdev_id);
+ ether_addr_copy(cmd->peer_macaddr.addr, mac);
+ cmd->tid = __cpu_to_le32(tid);
+ cmd->buffersize = __cpu_to_le32(buf_size);
+
+ ath10k_dbg(ar, ATH10K_DBG_WMI,
+ "wmi addba send vdev_id 0x%X mac_addr %pM tid %u bufsize %u\n",
+ vdev_id, mac, tid, buf_size);
+ return skb;
+}
+
static const struct wmi_ops wmi_ops = {
.rx = ath10k_wmi_op_rx,
.map_svc = wmi_main_svc_map,
@@ -4720,6 +4746,7 @@ static const struct wmi_ops wmi_ops = {
.gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode,
/* .gen_pdev_get_temperature not implemented */
.gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
+ .gen_addba_send = ath10k_wmi_op_gen_addba_send,
};
static const struct wmi_ops wmi_10_1_ops = {
@@ -4775,6 +4802,7 @@ static const struct wmi_ops wmi_10_1_ops = {
.gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable,
.gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode,
.gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
+ .gen_addba_send = ath10k_wmi_op_gen_addba_send,
};
static const struct wmi_ops wmi_10_2_ops = {
@@ -4831,6 +4859,7 @@ static const struct wmi_ops wmi_10_2_ops = {
.gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable,
.gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode,
.gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
+ .gen_addba_send = ath10k_wmi_op_gen_addba_send,
};
int ath10k_wmi_attach(struct ath10k *ar)
--
2.2.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 3/8] ath10k: add wmi support for addba_set_resp
2014-12-19 6:54 [PATCH 0/8] ath10k: add per station debugfs support Rajkumar Manoharan
2014-12-19 6:54 ` [PATCH 1/8] ath10k: add wmi support for addba_clear_resp Rajkumar Manoharan
2014-12-19 6:54 ` [PATCH 2/8] ath10k: add wmi support for addba_send Rajkumar Manoharan
@ 2014-12-19 6:54 ` Rajkumar Manoharan
2014-12-19 6:54 ` [PATCH 4/8] ath10k: add wmi support for delba_send Rajkumar Manoharan
` (4 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Rajkumar Manoharan @ 2014-12-19 6:54 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Rajkumar Manoharan
Add WMI support for sending addba response manually. This command
is used for debugging purpose.
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/wmi-ops.h | 20 ++++++++++++++++++++
drivers/net/wireless/ath/ath10k/wmi-tlv.c | 1 +
drivers/net/wireless/ath/ath10k/wmi.c | 29 +++++++++++++++++++++++++++++
3 files changed, 50 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h
index badf422..e8f49de 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
+++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
@@ -123,6 +123,9 @@ struct wmi_ops {
const u8 *mac);
struct sk_buff *(*gen_addba_send)(struct ath10k *ar, u32 vdev_id,
const u8 *mac, u32 tid, u32 buf_size);
+ struct sk_buff *(*gen_addba_set_resp)(struct ath10k *ar, u32 vdev_id,
+ const u8 *mac, u32 tid,
+ u32 status);
};
int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
@@ -894,4 +897,21 @@ ath10k_wmi_addba_send(struct ath10k *ar, u32 vdev_id, const u8 *mac,
ar->wmi.cmd->addba_send_cmdid);
}
+static inline int
+ath10k_wmi_addba_set_resp(struct ath10k *ar, u32 vdev_id, const u8 *mac,
+ u32 tid, u32 status)
+{
+ struct sk_buff *skb;
+
+ if (!ar->wmi.ops->gen_addba_set_resp)
+ return -EOPNOTSUPP;
+
+ skb = ar->wmi.ops->gen_addba_set_resp(ar, vdev_id, mac, tid, status);
+ if (IS_ERR(skb))
+ return PTR_ERR(skb);
+
+ return ath10k_wmi_cmd_send(ar, skb,
+ ar->wmi.cmd->addba_set_resp_cmdid);
+}
+
#endif
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
index 74a0598..63f9860 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
@@ -2209,6 +2209,7 @@ static const struct wmi_ops wmi_tlv_ops = {
/* .gen_pdev_get_temperature not implemented */
/* .gen_addba_clear_resp not implemented */
/* .gen_addba_send not implemented */
+ /* .gen_addba_set_resp not implemented */
};
/************/
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index b118795..b5a771f 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -4694,6 +4694,32 @@ ath10k_wmi_op_gen_addba_send(struct ath10k *ar, u32 vdev_id, const u8 *mac,
return skb;
}
+static struct sk_buff *
+ath10k_wmi_op_gen_addba_set_resp(struct ath10k *ar, u32 vdev_id, const u8 *mac,
+ u32 tid, u32 status)
+{
+ struct wmi_addba_setresponse_cmd *cmd;
+ struct sk_buff *skb;
+
+ if (!mac)
+ return ERR_PTR(-EINVAL);
+
+ skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd));
+ if (!skb)
+ return ERR_PTR(-ENOMEM);
+
+ cmd = (struct wmi_addba_setresponse_cmd *)skb->data;
+ cmd->vdev_id = __cpu_to_le32(vdev_id);
+ ether_addr_copy(cmd->peer_macaddr.addr, mac);
+ cmd->tid = __cpu_to_le32(tid);
+ cmd->statuscode = __cpu_to_le32(status);
+
+ ath10k_dbg(ar, ATH10K_DBG_WMI,
+ "wmi addba set resp vdev_id 0x%X mac_addr %pM tid %u status %u\n",
+ vdev_id, mac, tid, status);
+ return skb;
+}
+
static const struct wmi_ops wmi_ops = {
.rx = ath10k_wmi_op_rx,
.map_svc = wmi_main_svc_map,
@@ -4747,6 +4773,7 @@ static const struct wmi_ops wmi_ops = {
/* .gen_pdev_get_temperature not implemented */
.gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
.gen_addba_send = ath10k_wmi_op_gen_addba_send,
+ .gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp,
};
static const struct wmi_ops wmi_10_1_ops = {
@@ -4803,6 +4830,7 @@ static const struct wmi_ops wmi_10_1_ops = {
.gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode,
.gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
.gen_addba_send = ath10k_wmi_op_gen_addba_send,
+ .gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp,
};
static const struct wmi_ops wmi_10_2_ops = {
@@ -4860,6 +4888,7 @@ static const struct wmi_ops wmi_10_2_ops = {
.gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode,
.gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
.gen_addba_send = ath10k_wmi_op_gen_addba_send,
+ .gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp,
};
int ath10k_wmi_attach(struct ath10k *ar)
--
2.2.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 4/8] ath10k: add wmi support for delba_send
2014-12-19 6:54 [PATCH 0/8] ath10k: add per station debugfs support Rajkumar Manoharan
` (2 preceding siblings ...)
2014-12-19 6:54 ` [PATCH 3/8] ath10k: add wmi support for addba_set_resp Rajkumar Manoharan
@ 2014-12-19 6:54 ` Rajkumar Manoharan
2014-12-19 6:54 ` [PATCH 5/8] ath10k: Implement sta_add_debugfs Rajkumar Manoharan
` (3 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Rajkumar Manoharan @ 2014-12-19 6:54 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Rajkumar Manoharan
Add WMI support for sending delba request. This command is used for
debugging purpose.
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/wmi-ops.h | 21 +++++++++++++++++++++
drivers/net/wireless/ath/ath10k/wmi-tlv.c | 1 +
drivers/net/wireless/ath/ath10k/wmi.c | 30 ++++++++++++++++++++++++++++++
3 files changed, 52 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h
index e8f49de..3a3d15e 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
+++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
@@ -126,6 +126,9 @@ struct wmi_ops {
struct sk_buff *(*gen_addba_set_resp)(struct ath10k *ar, u32 vdev_id,
const u8 *mac, u32 tid,
u32 status);
+ struct sk_buff *(*gen_delba_send)(struct ath10k *ar, u32 vdev_id,
+ const u8 *mac, u32 tid, u32 initiator,
+ u32 reason);
};
int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
@@ -914,4 +917,22 @@ ath10k_wmi_addba_set_resp(struct ath10k *ar, u32 vdev_id, const u8 *mac,
ar->wmi.cmd->addba_set_resp_cmdid);
}
+static inline int
+ath10k_wmi_delba_send(struct ath10k *ar, u32 vdev_id, const u8 *mac,
+ u32 tid, u32 initiator, u32 reason)
+{
+ struct sk_buff *skb;
+
+ if (!ar->wmi.ops->gen_delba_send)
+ return -EOPNOTSUPP;
+
+ skb = ar->wmi.ops->gen_delba_send(ar, vdev_id, mac, tid, initiator,
+ reason);
+ if (IS_ERR(skb))
+ return PTR_ERR(skb);
+
+ return ath10k_wmi_cmd_send(ar, skb,
+ ar->wmi.cmd->delba_send_cmdid);
+}
+
#endif
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
index 63f9860..57d2b50 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
@@ -2210,6 +2210,7 @@ static const struct wmi_ops wmi_tlv_ops = {
/* .gen_addba_clear_resp not implemented */
/* .gen_addba_send not implemented */
/* .gen_addba_set_resp not implemented */
+ /* .gen_delba_send not implemented */
};
/************/
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index b5a771f..98a7553 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -4720,6 +4720,33 @@ ath10k_wmi_op_gen_addba_set_resp(struct ath10k *ar, u32 vdev_id, const u8 *mac,
return skb;
}
+static struct sk_buff *
+ath10k_wmi_op_gen_delba_send(struct ath10k *ar, u32 vdev_id, const u8 *mac,
+ u32 tid, u32 initiator, u32 reason)
+{
+ struct wmi_delba_send_cmd *cmd;
+ struct sk_buff *skb;
+
+ if (!mac)
+ return ERR_PTR(-EINVAL);
+
+ skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd));
+ if (!skb)
+ return ERR_PTR(-ENOMEM);
+
+ cmd = (struct wmi_delba_send_cmd *)skb->data;
+ cmd->vdev_id = __cpu_to_le32(vdev_id);
+ ether_addr_copy(cmd->peer_macaddr.addr, mac);
+ cmd->tid = __cpu_to_le32(tid);
+ cmd->initiator = __cpu_to_le32(initiator);
+ cmd->reasoncode = __cpu_to_le32(reason);
+
+ ath10k_dbg(ar, ATH10K_DBG_WMI,
+ "wmi delba send vdev_id 0x%X mac_addr %pM tid %u initiator %u reason %u\n",
+ vdev_id, mac, tid, initiator, reason);
+ return skb;
+}
+
static const struct wmi_ops wmi_ops = {
.rx = ath10k_wmi_op_rx,
.map_svc = wmi_main_svc_map,
@@ -4774,6 +4801,7 @@ static const struct wmi_ops wmi_ops = {
.gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
.gen_addba_send = ath10k_wmi_op_gen_addba_send,
.gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp,
+ .gen_delba_send = ath10k_wmi_op_gen_delba_send,
};
static const struct wmi_ops wmi_10_1_ops = {
@@ -4831,6 +4859,7 @@ static const struct wmi_ops wmi_10_1_ops = {
.gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
.gen_addba_send = ath10k_wmi_op_gen_addba_send,
.gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp,
+ .gen_delba_send = ath10k_wmi_op_gen_delba_send,
};
static const struct wmi_ops wmi_10_2_ops = {
@@ -4889,6 +4918,7 @@ static const struct wmi_ops wmi_10_2_ops = {
.gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp,
.gen_addba_send = ath10k_wmi_op_gen_addba_send,
.gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp,
+ .gen_delba_send = ath10k_wmi_op_gen_delba_send,
};
int ath10k_wmi_attach(struct ath10k *ar)
--
2.2.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 5/8] ath10k: Implement sta_add_debugfs
2014-12-19 6:54 [PATCH 0/8] ath10k: add per station debugfs support Rajkumar Manoharan
` (3 preceding siblings ...)
2014-12-19 6:54 ` [PATCH 4/8] ath10k: add wmi support for delba_send Rajkumar Manoharan
@ 2014-12-19 6:54 ` Rajkumar Manoharan
2014-12-19 6:54 ` [PATCH 6/8] ath10k: add support to send addba request Rajkumar Manoharan
` (2 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Rajkumar Manoharan @ 2014-12-19 6:54 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Rajkumar Manoharan
Add per station debugfs files when a station is added to mac80211's
station list. This helps to group peer specific debugfs entries
altogether. Right now this callback adds support to test aggregation
procedures (addba/addba_resp/delba) manually.
To enable automatic aggregation in target,
echo 0 >/sys/kernel/debug/ieee80211/phyX/netdev:wlanX/
stations/XX:XX:XX:XX:XX:XX/aggr_mode
For manual mode,
echo 1 >/sys/kernel/debug/ieee80211/phyX/netdev:wlanX/
stations/XX:XX:XX:XX:XX:XX/aggr_mode
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/Makefile | 1 +
drivers/net/wireless/ath/ath10k/core.h | 5 ++
drivers/net/wireless/ath/ath10k/debug.h | 11 +++-
drivers/net/wireless/ath/ath10k/debugfs_sta.c | 89 +++++++++++++++++++++++++++
drivers/net/wireless/ath/ath10k/mac.c | 3 +
5 files changed, 108 insertions(+), 1 deletion(-)
create mode 100644 drivers/net/wireless/ath/ath10k/debugfs_sta.c
diff --git a/drivers/net/wireless/ath/ath10k/Makefile b/drivers/net/wireless/ath/ath10k/Makefile
index ffa3b1a..6c0c23e 100644
--- a/drivers/net/wireless/ath/ath10k/Makefile
+++ b/drivers/net/wireless/ath/ath10k/Makefile
@@ -15,6 +15,7 @@ ath10k_core-$(CONFIG_ATH10K_DEBUGFS) += spectral.o
ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o
ath10k_core-$(CONFIG_THERMAL) += thermal.o
+ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o
obj-$(CONFIG_ATH10K_PCI) += ath10k_pci.o
ath10k_pci-y += pci.o \
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index b7ba7cf..0ae2253 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -239,6 +239,11 @@ struct ath10k_sta {
u32 smps;
struct work_struct update_wk;
+
+#ifdef CONFIG_MAC80211_DEBUGFS
+ /* protected by conf_mutex */
+ bool aggr_mode;
+#endif
};
#define ATH10K_VDEV_SETUP_TIMEOUT_HZ (5*HZ)
diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h
index 1b87a5d..a12b832 100644
--- a/drivers/net/wireless/ath/ath10k/debug.h
+++ b/drivers/net/wireless/ath/ath10k/debug.h
@@ -48,6 +48,12 @@ enum ath10k_pktlog_filter {
ATH10K_PKTLOG_ANY = 0x00000001f,
};
+enum ath10k_dbg_aggr_mode {
+ ATH10K_DBG_AGGR_MODE_AUTO,
+ ATH10K_DBG_AGGR_MODE_MANUAL,
+ ATH10K_DBG_AGGR_MODE_MAX,
+};
+
extern unsigned int ath10k_debug_mask;
__printf(2, 3) void ath10k_info(struct ath10k *ar, const char *fmt, ...);
@@ -77,7 +83,6 @@ int ath10k_debug_get_et_sset_count(struct ieee80211_hw *hw,
void ath10k_debug_get_et_stats(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ethtool_stats *stats, u64 *data);
-
#else
static inline int ath10k_debug_start(struct ath10k *ar)
{
@@ -129,6 +134,10 @@ ath10k_debug_get_new_fw_crash_data(struct ath10k *ar)
#define ath10k_debug_get_et_stats NULL
#endif /* CONFIG_ATH10K_DEBUGFS */
+#ifdef CONFIG_MAC80211_DEBUGFS
+void ath10k_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta, struct dentry *dir);
+#endif /* CONFIG_MAC80211_DEBUGFS */
#ifdef CONFIG_ATH10K_DEBUG
__printf(3, 4) void ath10k_dbg(struct ath10k *ar,
diff --git a/drivers/net/wireless/ath/ath10k/debugfs_sta.c b/drivers/net/wireless/ath/ath10k/debugfs_sta.c
new file mode 100644
index 0000000..d5fca70
--- /dev/null
+++ b/drivers/net/wireless/ath/ath10k/debugfs_sta.c
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2014 Qualcomm Atheros, Inc.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+#include <linux/utsname.h>
+
+#include "core.h"
+#include "wmi-ops.h"
+#include "debug.h"
+
+static ssize_t ath10k_dbg_sta_read_aggr_mode(struct file *file,
+ char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ieee80211_sta *sta = file->private_data;
+ struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
+ struct ath10k *ar = arsta->arvif->ar;
+ char buf[32];
+ int len = 0;
+
+ mutex_lock(&ar->conf_mutex);
+ len = scnprintf(buf, sizeof(buf) - len, "aggregation mode: %s\n",
+ (arsta->aggr_mode == ATH10K_DBG_AGGR_MODE_AUTO) ?
+ "auto" : "manual");
+ mutex_unlock(&ar->conf_mutex);
+
+ return simple_read_from_buffer(user_buf, count, ppos, buf, len);
+}
+
+static ssize_t ath10k_dbg_sta_write_aggr_mode(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ieee80211_sta *sta = file->private_data;
+ struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
+ struct ath10k *ar = arsta->arvif->ar;
+ u32 aggr_mode;
+ int ret;
+
+ if (kstrtouint_from_user(user_buf, count, 0, &aggr_mode))
+ return -EINVAL;
+
+ if (aggr_mode >= ATH10K_DBG_AGGR_MODE_MAX)
+ return -EINVAL;
+
+ mutex_lock(&ar->conf_mutex);
+ if ((ar->state != ATH10K_STATE_ON) ||
+ (aggr_mode == arsta->aggr_mode)) {
+ ret = count;
+ goto out;
+ }
+
+ ret = ath10k_wmi_addba_clear_resp(ar, arsta->arvif->vdev_id, sta->addr);
+ if (ret) {
+ ath10k_warn(ar, "failed to clear addba session ret: %d\n", ret);
+ goto out;
+ }
+
+ arsta->aggr_mode = aggr_mode;
+out:
+ mutex_unlock(&ar->conf_mutex);
+ return ret;
+}
+
+static const struct file_operations fops_aggr_mode = {
+ .read = ath10k_dbg_sta_read_aggr_mode,
+ .write = ath10k_dbg_sta_write_aggr_mode,
+ .open = simple_open,
+ .owner = THIS_MODULE,
+ .llseek = default_llseek,
+};
+
+void ath10k_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta, struct dentry *dir)
+{
+ debugfs_create_file("aggr_mode", S_IRUGO | S_IWUSR, dir, sta,
+ &fops_aggr_mode);
+}
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 5475f0f..2b6f272 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4678,6 +4678,9 @@ static const struct ieee80211_ops ath10k_ops = {
.suspend = ath10k_suspend,
.resume = ath10k_resume,
#endif
+#ifdef CONFIG_MAC80211_DEBUGFS
+ .sta_add_debugfs = ath10k_sta_add_debugfs,
+#endif
};
#define RATETAB_ENT(_rate, _rateid, _flags) { \
--
2.2.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 6/8] ath10k: add support to send addba request
2014-12-19 6:54 [PATCH 0/8] ath10k: add per station debugfs support Rajkumar Manoharan
` (4 preceding siblings ...)
2014-12-19 6:54 ` [PATCH 5/8] ath10k: Implement sta_add_debugfs Rajkumar Manoharan
@ 2014-12-19 6:54 ` Rajkumar Manoharan
2014-12-19 6:54 ` [PATCH 7/8] ath10k: add support to send addba response Rajkumar Manoharan
2014-12-19 6:54 ` [PATCH 8/8] ath10k: ath10k: add support to send delba Rajkumar Manoharan
7 siblings, 0 replies; 13+ messages in thread
From: Rajkumar Manoharan @ 2014-12-19 6:54 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Rajkumar Manoharan
This per-station debugfs entry helps to send addba request in manual
mode. Need to pass two configuration parameters (tid, buffer size)
as input.
To send addba,
echo 1 32 >/sys/kernel/debug/ieee80211/phyX/netdev:wlanX/
stations/XX:XX:XX:XX:XX:XX/addba
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/debugfs_sta.c | 56 +++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/debugfs_sta.c b/drivers/net/wireless/ath/ath10k/debugfs_sta.c
index d5fca70..89e5e5a 100644
--- a/drivers/net/wireless/ath/ath10k/debugfs_sta.c
+++ b/drivers/net/wireless/ath/ath10k/debugfs_sta.c
@@ -81,9 +81,65 @@ static const struct file_operations fops_aggr_mode = {
.llseek = default_llseek,
};
+static ssize_t ath10k_dbg_sta_write_addba(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ieee80211_sta *sta = file->private_data;
+ struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
+ struct ath10k *ar = arsta->arvif->ar;
+ u32 tid, buf_size;
+ int ret;
+ char buf[64];
+
+ simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count);
+
+ /* make sure that buf is null terminated */
+ buf[sizeof(buf) - 1] = '\0';
+
+ ret = sscanf(buf, "%u %u", &tid, &buf_size);
+ if (ret != 2) {
+ ath10k_warn(ar, "ex: echo <tid> <buffer size> >addba\n");
+ return -EINVAL;
+ }
+
+ /* Valid TID values are 0 through 15 */
+ if (tid > HTT_DATA_TX_EXT_TID_MGMT - 2) {
+ ath10k_warn(ar, "Invalid TID %u\n", tid);
+ return -EINVAL;
+ }
+
+ mutex_lock(&ar->conf_mutex);
+ if ((ar->state != ATH10K_STATE_ON) ||
+ (arsta->aggr_mode != ATH10K_DBG_AGGR_MODE_MANUAL)) {
+ ret = count;
+ goto out;
+ }
+
+ ret = ath10k_wmi_addba_send(ar, arsta->arvif->vdev_id, sta->addr,
+ tid, buf_size);
+ if (ret) {
+ ath10k_warn(ar, "failed to send addba request: vdev_id %u peer %pM tid %u buf_size %u\n",
+ arsta->arvif->vdev_id, sta->addr, tid, buf_size);
+ }
+
+ ret = count;
+out:
+ mutex_unlock(&ar->conf_mutex);
+ return ret;
+}
+
+static const struct file_operations fops_addba = {
+ .write = ath10k_dbg_sta_write_addba,
+ .open = simple_open,
+ .owner = THIS_MODULE,
+ .llseek = default_llseek,
+};
+
void ath10k_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta, struct dentry *dir)
{
debugfs_create_file("aggr_mode", S_IRUGO | S_IWUSR, dir, sta,
&fops_aggr_mode);
+ debugfs_create_file("addba", S_IWUSR, dir, sta, &fops_addba);
}
--
2.2.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 7/8] ath10k: add support to send addba response
2014-12-19 6:54 [PATCH 0/8] ath10k: add per station debugfs support Rajkumar Manoharan
` (5 preceding siblings ...)
2014-12-19 6:54 ` [PATCH 6/8] ath10k: add support to send addba request Rajkumar Manoharan
@ 2014-12-19 6:54 ` Rajkumar Manoharan
2014-12-19 6:54 ` [PATCH 8/8] ath10k: ath10k: add support to send delba Rajkumar Manoharan
7 siblings, 0 replies; 13+ messages in thread
From: Rajkumar Manoharan @ 2014-12-19 6:54 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Rajkumar Manoharan
This per-station debugfs entry helps to send addba response in
manual mode for debugging purpose. It accepts tid and status code
as input arguments.
To send addba response,
echo 0 25 >/sys/kernel/debug/ieee80211/phyX/netdev:wlanX/
stations/XX:XX:XX:XX:XX:XX/addba_resp
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/debugfs_sta.c | 55 +++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/debugfs_sta.c b/drivers/net/wireless/ath/ath10k/debugfs_sta.c
index 89e5e5a..95eb5a1 100644
--- a/drivers/net/wireless/ath/ath10k/debugfs_sta.c
+++ b/drivers/net/wireless/ath/ath10k/debugfs_sta.c
@@ -136,10 +136,65 @@ static const struct file_operations fops_addba = {
.llseek = default_llseek,
};
+static ssize_t ath10k_dbg_sta_write_addba_resp(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ieee80211_sta *sta = file->private_data;
+ struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
+ struct ath10k *ar = arsta->arvif->ar;
+ u32 tid, status;
+ int ret;
+ char buf[64];
+
+ simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count);
+
+ /* make sure that buf is null terminated */
+ buf[sizeof(buf) - 1] = '\0';
+
+ ret = sscanf(buf, "%u %u", &tid, &status);
+ if (ret != 2) {
+ ath10k_warn(ar, "ex: echo <tid> <status code> >addba_resp\n");
+ return -EINVAL;
+ }
+
+ /* Valid TID values are 0 through 15 */
+ if (tid > HTT_DATA_TX_EXT_TID_MGMT - 2) {
+ ath10k_warn(ar, "Invalid TID %u\n", tid);
+ return -EINVAL;
+ }
+
+ mutex_lock(&ar->conf_mutex);
+ if ((ar->state != ATH10K_STATE_ON) ||
+ (arsta->aggr_mode != ATH10K_DBG_AGGR_MODE_MANUAL)) {
+ ret = count;
+ goto out;
+ }
+
+ ret = ath10k_wmi_addba_set_resp(ar, arsta->arvif->vdev_id, sta->addr,
+ tid, status);
+ if (ret) {
+ ath10k_warn(ar, "failed to send addba response: vdev_id %u peer %pM tid %u status%u\n",
+ arsta->arvif->vdev_id, sta->addr, tid, status);
+ }
+ ret = count;
+out:
+ mutex_unlock(&ar->conf_mutex);
+ return ret;
+}
+
+static const struct file_operations fops_addba_resp = {
+ .write = ath10k_dbg_sta_write_addba_resp,
+ .open = simple_open,
+ .owner = THIS_MODULE,
+ .llseek = default_llseek,
+};
+
void ath10k_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta, struct dentry *dir)
{
debugfs_create_file("aggr_mode", S_IRUGO | S_IWUSR, dir, sta,
&fops_aggr_mode);
debugfs_create_file("addba", S_IWUSR, dir, sta, &fops_addba);
+ debugfs_create_file("addba_resp", S_IWUSR, dir, sta, &fops_addba_resp);
}
--
2.2.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 8/8] ath10k: ath10k: add support to send delba
2014-12-19 6:54 [PATCH 0/8] ath10k: add per station debugfs support Rajkumar Manoharan
` (6 preceding siblings ...)
2014-12-19 6:54 ` [PATCH 7/8] ath10k: add support to send addba response Rajkumar Manoharan
@ 2014-12-19 6:54 ` Rajkumar Manoharan
2014-12-21 6:13 ` Manoharan, Rajkumar
7 siblings, 1 reply; 13+ messages in thread
From: Rajkumar Manoharan @ 2014-12-19 6:54 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Rajkumar Manoharan
This per-station debugfs entry helps to send delba in manual mode
for debugging purpose. It accepts tid, initiator and reason code
as inputs.
To send delba,
echo 0 1 37 >/sys/kernel/debug/ieee80211/phyX/netdev:wlanX/
stations/XX:XX:XX:XX:XX:XX/delba
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/debugfs_sta.c | 56 +++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/debugfs_sta.c b/drivers/net/wireless/ath/ath10k/debugfs_sta.c
index 95eb5a1..5effd7bb 100644
--- a/drivers/net/wireless/ath/ath10k/debugfs_sta.c
+++ b/drivers/net/wireless/ath/ath10k/debugfs_sta.c
@@ -190,6 +190,61 @@ static const struct file_operations fops_addba_resp = {
.llseek = default_llseek,
};
+static ssize_t ath10k_dbg_sta_write_delba(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ieee80211_sta *sta = file->private_data;
+ struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
+ struct ath10k *ar = arsta->arvif->ar;
+ u32 tid, initiator, reason;
+ int ret;
+ char buf[64];
+
+ simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count);
+
+ /* make sure that buf is null terminated */
+ buf[sizeof(buf) - 1] = '\0';
+
+ ret = sscanf(buf, "%u %u %u", &tid, &initiator, &reason);
+ if (ret != 3) {
+ ath10k_warn(ar, "ex: echo <tid> <initiator> <reason code> >delba\n");
+ return -EINVAL;
+ }
+
+ /* Valid TID values are 0 through 15 */
+ if (tid > HTT_DATA_TX_EXT_TID_MGMT - 2) {
+ ath10k_warn(ar, "Invalid TID %u\n", tid);
+ return -EINVAL;
+ }
+
+ mutex_lock(&ar->conf_mutex);
+ if ((ar->state != ATH10K_STATE_ON) ||
+ (arsta->aggr_mode != ATH10K_DBG_AGGR_MODE_MANUAL)) {
+ ret = count;
+ goto out;
+ }
+
+ ret = ath10k_wmi_delba_send(ar, arsta->arvif->vdev_id, sta->addr,
+ tid, initiator, reason);
+ if (ret) {
+ ath10k_warn(ar, "failed to send delba: vdev_id %u peer %pM tid %u initiator %u reason %u\n",
+ arsta->arvif->vdev_id, sta->addr, tid, initiator,
+ reason);
+ }
+ ret = count;
+out:
+ mutex_unlock(&ar->conf_mutex);
+ return ret;
+}
+
+static const struct file_operations fops_delba = {
+ .write = ath10k_dbg_sta_write_delba,
+ .open = simple_open,
+ .owner = THIS_MODULE,
+ .llseek = default_llseek,
+};
+
void ath10k_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta, struct dentry *dir)
{
@@ -197,4 +252,5 @@ void ath10k_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
&fops_aggr_mode);
debugfs_create_file("addba", S_IWUSR, dir, sta, &fops_addba);
debugfs_create_file("addba_resp", S_IWUSR, dir, sta, &fops_addba_resp);
+ debugfs_create_file("delba", S_IWUSR, dir, sta, &fops_delba);
}
--
2.2.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* RE: [PATCH 8/8] ath10k: ath10k: add support to send delba
2014-12-19 6:54 ` [PATCH 8/8] ath10k: ath10k: add support to send delba Rajkumar Manoharan
@ 2014-12-21 6:13 ` Manoharan, Rajkumar
2014-12-23 7:46 ` Kalle Valo
0 siblings, 1 reply; 13+ messages in thread
From: Manoharan, Rajkumar @ 2014-12-21 6:13 UTC (permalink / raw)
To: ath10k@lists.infradead.org; +Cc: linux-wireless@vger.kernel.org
> Subject: [PATCH 8/8] ath10k: ath10k: add support to send delba
>
> This per-station debugfs entry helps to send delba in manual mode
> for debugging purpose. It accepts tid, initiator and reason code
> as inputs.
Kalle,
Subject needs small correction (ath10k: ath10k:). Do you want
me send v2 patch for this change?
Sorry for the inconvenience.
-Rajkumar
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 8/8] ath10k: ath10k: add support to send delba
2014-12-21 6:13 ` Manoharan, Rajkumar
@ 2014-12-23 7:46 ` Kalle Valo
2014-12-24 7:54 ` Rajkumar
0 siblings, 1 reply; 13+ messages in thread
From: Kalle Valo @ 2014-12-23 7:46 UTC (permalink / raw)
To: Manoharan, Rajkumar
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
"Manoharan, Rajkumar" <rmanohar@qti.qualcomm.com> writes:
>> Subject: [PATCH 8/8] ath10k: ath10k: add support to send delba
>>
>> This per-station debugfs entry helps to send delba in manual mode
>> for debugging purpose. It accepts tid, initiator and reason code
>> as inputs.
> Kalle,
>
> Subject needs small correction (ath10k: ath10k:). Do you want
> me send v2 patch for this change?
No need to send v2, I can do the change myself. But I noticed that you
already sent it :)
But in the future please don't resubmit individual patches, that's just
too error prone. Instead just resubmit the whole series.
--
Kalle Valo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 8/8] ath10k: ath10k: add support to send delba
2014-12-23 7:46 ` Kalle Valo
@ 2014-12-24 7:54 ` Rajkumar
2014-12-24 8:11 ` Kalle Valo
0 siblings, 1 reply; 13+ messages in thread
From: Rajkumar @ 2014-12-24 7:54 UTC (permalink / raw)
To: Kalle Valo; +Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
On Tue, Dec 23, 2014 at 09:46:28AM +0200, Kalle Valo wrote:
> "Manoharan, Rajkumar" <rmanohar@qti.qualcomm.com> writes:
>
> >> Subject: [PATCH 8/8] ath10k: ath10k: add support to send delba
> >>
> >> This per-station debugfs entry helps to send delba in manual mode
> >> for debugging purpose. It accepts tid, initiator and reason code
> >> as inputs.
> > Kalle,
> >
> > Subject needs small correction (ath10k: ath10k:). Do you want
> > me send v2 patch for this change?
>
> No need to send v2, I can do the change myself. But I noticed that you
> already sent it :)
>
> But in the future please don't resubmit individual patches, that's just
> too error prone. Instead just resubmit the whole series.
>
Agree... I will resend the whole series. Recently separate WMI ops for 10.2.4
is added. So newer WMI APIs has to be registered in 10.2.4 table.
Will send v2 series.
-Rajkumar
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 8/8] ath10k: ath10k: add support to send delba
2014-12-24 7:54 ` Rajkumar
@ 2014-12-24 8:11 ` Kalle Valo
0 siblings, 0 replies; 13+ messages in thread
From: Kalle Valo @ 2014-12-24 8:11 UTC (permalink / raw)
To: Rajkumar; +Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Rajkumar <rmanohar@qti.qualcomm.com> writes:
> On Tue, Dec 23, 2014 at 09:46:28AM +0200, Kalle Valo wrote:
>> "Manoharan, Rajkumar" <rmanohar@qti.qualcomm.com> writes:
>>
>> >> Subject: [PATCH 8/8] ath10k: ath10k: add support to send delba
>> >>
>> >> This per-station debugfs entry helps to send delba in manual mode
>> >> for debugging purpose. It accepts tid, initiator and reason code
>> >> as inputs.
>> > Kalle,
>> >
>> > Subject needs small correction (ath10k: ath10k:). Do you want
>> > me send v2 patch for this change?
>>
>> No need to send v2, I can do the change myself. But I noticed that you
>> already sent it :)
>>
>> But in the future please don't resubmit individual patches, that's just
>> too error prone. Instead just resubmit the whole series.
>>
> Agree... I will resend the whole series. Recently separate WMI ops for 10.2.4
> is added. So newer WMI APIs has to be registered in 10.2.4 table.
Perfect, I was just about to mention that.
--
Kalle Valo
^ permalink raw reply [flat|nested] 13+ messages in thread