summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2024-05-23 08:37:30 +0100
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2025-04-04 15:28:54 +0100
commit48987d7fd478729a4af21eeb490ecf58dfc524d9 (patch)
tree1143b93eb9ab76f14946768c40126baa2f7c6fdc
parentcbbff49941749c1aa92054c086b1848f9e64a6a8 (diff)
net: wlcore: debugfs: export information on queued firmware frames
Add information about the frames queued to firmware into the debugfs driver state output. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
-rw-r--r--drivers/net/wireless/ti/wlcore/debugfs.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/drivers/net/wireless/ti/wlcore/debugfs.c b/drivers/net/wireless/ti/wlcore/debugfs.c
index 27ac27364fe0..9432aeb4902e 100644
--- a/drivers/net/wireless/ti/wlcore/debugfs.c
+++ b/drivers/net/wireless/ti/wlcore/debugfs.c
@@ -423,7 +423,7 @@ static ssize_t driver_state_read(struct file *file, char __user *user_buf,
char *buf;
struct wl12xx_vif *wlvif;
-#define DRIVER_STATE_BUF_LEN 1024
+#define DRIVER_STATE_BUF_LEN 2048
buf = kmalloc(DRIVER_STATE_BUF_LEN, GFP_KERNEL);
if (!buf)
@@ -505,6 +505,33 @@ static ssize_t driver_state_read(struct file *file, char __user *user_buf,
}
}
+ if (wl->fw_status) {
+ DRIVER_STATE_PRINT(fw_status->fw_localtime, "%u");
+ }
+
+ {
+ struct wl1271_tx_hw_descr *tx_desc;
+ struct sk_buff *skb;
+ u32 start, end;
+ u16 lt;
+ int id;
+
+ for (id = 0; id < WLCORE_MAX_TX_DESCRIPTORS; id++) {
+ skb = wl->tx_frames[id];
+ if (!skb)
+ continue;
+
+ tx_desc = (struct wl1271_tx_hw_descr *)skb->data;
+ start = le32_to_cpu(tx_desc->start_time);
+ lt = le16_to_cpu(tx_desc->life_time);
+ end = start + 1024 * lt;
+
+ res += scnprintf(buf + res, DRIVER_STATE_BUF_LEN - res,
+ "tx_frames[%2u] hlid = %2u st %10u lt %u et %10u\n",
+ id, tx_desc->hlid, start, lt, end);
+ }
+ }
+
#undef DRIVER_STATE_PRINT_INT
#undef DRIVER_STATE_PRINT_LONG
#undef DRIVER_STATE_PRINT_HEX