From: Ben Greear <[email protected]>

When channel-context is not enabled, all vifs belong to
the first context, but it is not configured as 'assigned'.

Fix misc debugfs file to print out info for non-assigned
contexts, and also print whether ctx is assigned or not.

Signed-off-by: Ben Greear <[email protected]>
---

This is not overly critical, but fixes regression in 3.17 kernel.

 drivers/net/wireless/ath/ath9k/debug.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/debug.c 
b/drivers/net/wireless/ath/ath9k/debug.c
index 46f20a3..3f6d971 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -828,13 +828,14 @@ static ssize_t read_file_misc(struct file *file, char 
__user *user_buf,
 
        i = 0;
        ath_for_each_chanctx(sc, ctx) {
-               if (!ctx->assigned || list_empty(&ctx->vifs))
+               if (list_empty(&ctx->vifs))
                        continue;
                ath9k_calculate_iter_data(sc, ctx, &iter_data);
 
                len += scnprintf(buf + len, sizeof(buf) - len,
-                       "VIF-COUNTS: CTX %i AP: %i STA: %i MESH: %i WDS: %i",
-                       i++, iter_data.naps, iter_data.nstations,
+                       "VIFS: CTX %i(%i) AP: %i STA: %i MESH: %i WDS: %i",
+                       i++, (int)(ctx->assigned), iter_data.naps,
+                       iter_data.nstations,
                        iter_data.nmeshes, iter_data.nwds);
                len += scnprintf(buf + len, sizeof(buf) - len,
                        " ADHOC: %i TOTAL: %hi BEACON-VIF: %hi\n",
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to