All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/8] ath10k: add per station debugfs support
@ 2014-12-24  7:59 ` Rajkumar Manoharan
  0 siblings, 0 replies; 30+ messages in thread
From: Rajkumar Manoharan @ 2014-12-24  7:59 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Rajkumar Manoharan

The following patches add support for sending addba/addba response/delba
for every station entries. These commands are purely for testing purpose.

Before using any of the above aggregation commands, the mode should be moved
to manual. To disable automatic aggretation in target

echo 1 >/sys/kernel/debug/ieee80211/phyX/netdev:wlanX/
        stations/XX:XX:XX:XX:XX:XX/aggr_mode

Then for sending addba request,

echo 1 32 >/sys/kernel/debug/ieee80211/phyX/netdev:wlanX/
        stations/XX:XX:XX:XX:XX:XX/addba

To send addba response,

echo 0 25 >/sys/kernel/debug/ieee80211/phyX/netdev:wlanX/
        stations/XX:XX:XX:XX:XX:XX/addba_resp

And for delba,

echo 0 1 37 >/sys/kernel/debug/ieee80211/phyX/netdev:wlanX/
        stations/XX:XX:XX:XX:XX:XX/delba

v2: Rebased on top of 10.2.4 WMI ops support

Rajkumar Manoharan (8):
  ath10k: add wmi support for addba_clear_resp
  ath10k: add wmi support for addba_send
  ath10k: add wmi support for addba_set_resp
  ath10k: add wmi support for delba_send
  ath10k: Implement sta_add_debugfs
  ath10k: add support to send addba request
  ath10k: add support to send addba response
  ath10k: add support to send delba

 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 | 256 ++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath10k/mac.c         |   3 +
 drivers/net/wireless/ath/ath10k/wmi-ops.h     |  78 ++++++++
 drivers/net/wireless/ath/ath10k/wmi-tlv.c     |   4 +
 drivers/net/wireless/ath/ath10k/wmi.c         | 119 ++++++++++++
 8 files changed, 476 insertions(+), 1 deletion(-)
 create mode 100644 drivers/net/wireless/ath/ath10k/debugfs_sta.c

-- 
2.2.1


^ permalink raw reply	[flat|nested] 30+ messages in thread
* [PATCH v2 8/8] ath10k: add support to send delba
@ 2014-12-22  9:11 ` Rajkumar Manoharan
  0 siblings, 0 replies; 30+ messages in thread
From: Rajkumar Manoharan @ 2014-12-22  9:11 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] 30+ messages in thread

end of thread, other threads:[~2015-01-13 14:16 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-24  7:59 [PATCH v2 0/8] ath10k: add per station debugfs support Rajkumar Manoharan
2014-12-24  7:59 ` Rajkumar Manoharan
2014-12-24  7:59 ` [PATCH v2 1/8] ath10k: add wmi support for addba_clear_resp Rajkumar Manoharan
2014-12-24  7:59   ` Rajkumar Manoharan
2014-12-24  7:59 ` [PATCH v2 2/8] ath10k: add wmi support for addba_send Rajkumar Manoharan
2014-12-24  7:59   ` Rajkumar Manoharan
2014-12-24  7:59 ` [PATCH v2 3/8] ath10k: add wmi support for addba_set_resp Rajkumar Manoharan
2014-12-24  7:59   ` Rajkumar Manoharan
2014-12-24  7:59 ` [PATCH v2 4/8] ath10k: add wmi support for delba_send Rajkumar Manoharan
2014-12-24  7:59   ` Rajkumar Manoharan
2014-12-24  7:59 ` [PATCH v2 5/8] ath10k: Implement sta_add_debugfs Rajkumar Manoharan
2014-12-24  7:59   ` Rajkumar Manoharan
2015-01-12 11:37   ` Kalle Valo
2015-01-12 11:37     ` Kalle Valo
2014-12-24  7:59 ` [PATCH v2 6/8] ath10k: add support to send addba request Rajkumar Manoharan
2014-12-24  7:59   ` Rajkumar Manoharan
2015-01-12 11:42   ` Kalle Valo
2015-01-12 11:42     ` Kalle Valo
2014-12-24  7:59 ` [PATCH v2 7/8] ath10k: add support to send addba response Rajkumar Manoharan
2014-12-24  7:59   ` Rajkumar Manoharan
2015-01-12 11:43   ` Kalle Valo
2015-01-12 11:43     ` Kalle Valo
2014-12-24  7:59 ` [PATCH v2 8/8] ath10k: add support to send delba Rajkumar Manoharan
2014-12-24  7:59   ` Rajkumar Manoharan
2015-01-12 11:45   ` Kalle Valo
2015-01-12 11:45     ` Kalle Valo
2015-01-13 14:15 ` [PATCH v2 0/8] ath10k: add per station debugfs support Kalle Valo
2015-01-13 14:15   ` Kalle Valo
  -- strict thread matches above, loose matches on Subject: below --
2014-12-22  9:11 [PATCH v2 8/8] ath10k: add support to send delba Rajkumar Manoharan
2014-12-22  9:11 ` Rajkumar Manoharan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.