Skip to contentSkip to conversation

ath11k: Add sta debugfs support to configure ADDBA and DELBA

PATCH In review Maharaja Kennadyrajan 2 participants 3 messages Mar 26, 2020 – Apr 6, 2020 Qualcomm Atheros ATH11K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 ath11k: Add sta debugfs support to configure ADDBA and DELBA

Add support to test aggregation procedures (addba/addba_resp/delba) manually by adding the required callbacks in sta debugfs files.

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

To send addba response,

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

To send addba,

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

To send delba,

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

---

V3: Rebased on top of latest ath.git tree and cc'ed linux-wireless.

V2: Rebased on top of latest ath.git tree.

 drivers/net/wireless/ath/ath11k/core.h        |   5 +
 drivers/net/wireless/ath/ath11k/debug.h       |   6 +
 drivers/net/wireless/ath/ath11k/debugfs_sta.c | 221 ++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath11k/wmi.c         | 140 ++++++++++++++++
 drivers/net/wireless/ath/ath11k/wmi.h         |  38 +++++
 5 files changed, 410 insertions(+)
drivers/net/wireless/ath/ath11k/core.h +5 -0
index 6e7b8ec..96ca114c 100644
@@ -341,6 +341,11 @@ struct ath11k_sta {
 	u8 rssi_comb;
 	struct ath11k_htt_tx_stats *tx_stats;
 	struct ath11k_rx_peer_stats *rx_stats;
+
+#ifdef CONFIG_MAC80211_DEBUGFS
+	/* protected by conf_mutex */
+	bool aggr_mode;
+#endif
 };
 
 #define ATH11K_NUM_CHANS 41
drivers/net/wireless/ath/ath11k/debug.h +6 -0
index 97e7306..4a3ff82 100644
@@ -112,6 +112,12 @@ enum ath11k_pktlog_enum {
 	ATH11K_PKTLOG_TYPE_LITE_RX      = 24,
 };
 
+enum ath11k_dbg_aggr_mode {
+	ATH11K_DBG_AGGR_MODE_AUTO,
+	ATH11K_DBG_AGGR_MODE_MANUAL,
+	ATH11K_DBG_AGGR_MODE_MAX,
+};
+
 __printf(2, 3) void ath11k_info(struct ath11k_base *ab, const char *fmt, ...);
 __printf(2, 3) void ath11k_err(struct ath11k_base *ab, const char *fmt, ...);
 __printf(2, 3) void ath11k_warn(struct ath11k_base *ab, const char *fmt, ...);
drivers/net/wireless/ath/ath11k/debugfs_sta.c +221 -0

231 lines not on this page · raw message

drivers/net/wireless/ath/ath11k/wmi.c +140 -0

146 lines not on this page · raw message

drivers/net/wireless/ath/ath11k/wmi.h +38 -0
index 510f9c6..780e662 100644
@@ -3649,6 +3649,37 @@ struct wmi_therm_throt_level_config_info {
 	u32 prio;
 } __packed;
 
+struct wmi_delba_send_cmd {
+	u32 tlv_header;
+	u32 vdev_id;
+	struct wmi_mac_addr peer_macaddr;
+	u32 tid;
+	u32 initiator;
+	u32 reasoncode;
+} __packed;
+
+struct wmi_addba_setresponse_cmd {
+	u32 tlv_header;
+	u32 vdev_id;
+	struct wmi_mac_addr peer_macaddr;
+	u32 tid;
+	u32 statuscode;
+} __packed;
+
+struct wmi_addba_send_cmd {
+	u32 tlv_header;
+	u32 vdev_id;
+	struct wmi_mac_addr peer_macaddr;
+	u32 tid;
+	u32 buffersize;
+} __packed;
+
+struct wmi_addba_clear_resp_cmd {
+	u32 tlv_header;
+	u32 vdev_id;
+	struct wmi_mac_addr peer_macaddr;
+} __packed;
+
 struct wmi_pdev_pktlog_filter_info {
 	u32 tlv_header;
 	struct wmi_mac_addr peer_macaddr;
@@ -4822,6 +4853,13 @@ int ath11k_wmi_send_scan_chan_list_cmd(struct ath11k *ar,
 				       struct scan_chan_list_params *chan_list);
 int ath11k_wmi_send_dfs_phyerr_offload_enable_cmd(struct ath11k *ar,
 						  u32 pdev_id);
+int ath11k_wmi_addba_clear_resp(struct ath11k *ar, u32 vdev_id, const u8 *mac);
+int ath11k_wmi_addba_send(struct ath11k *ar, u32 vdev_id, const u8 *mac,
+			  u32 tid, u32 buf_size);
+int ath11k_wmi_addba_set_resp(struct ath11k *ar, u32 vdev_id, const u8 *mac,
+			      u32 tid, u32 status);
+int ath11k_wmi_delba_send(struct ath11k *ar, u32 vdev_id, const u8 *mac,
+			  u32 tid, u32 initiator, u32 reason);
 int ath11k_wmi_send_bcn_offload_control_cmd(struct ath11k *ar,
 					    u32 vdev_id, u32 bcn_ctrl_op);
 int
Signature · 1 line
1.9.1
#1 lore raw
Quoted 21 lines · Maharaja Kennadyrajan

Add support to test aggregation procedures (addba/addba_resp/delba) manually by adding the required callbacks in sta debugfs files.

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

To send addba response,

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

To send addba,

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

To send delba,

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

Patch applied to ath-next branch of ath.git, thanks.

9556dfa28b4d ath11k: Add sta debugfs support to configure ADDBA and DELBA

Signature · 3 lines
https://patchwork.kernel.org/patch/11459699/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#2 lore raw
In reply to Maharaja Kennadyrajan
Quoted 21 lines · Maharaja Kennadyrajan

Add support to test aggregation procedures (addba/addba_resp/delba) manually by adding the required callbacks in sta debugfs files.

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

To send addba response,

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

To send addba,

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

To send delba,

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

Patch applied to ath-next branch of ath.git, thanks.

9556dfa28b4d ath11k: Add sta debugfs support to configure ADDBA and DELBA

Signature · 8 lines
https://patchwork.kernel.org/patch/11459699/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k