ath9k: fix misc debugfs when not using chan context
authorBen Greear <greearb@candelatech.com>
Tue, 4 Nov 2014 23:22:49 +0000 (15:22 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 17 Nov 2014 20:32:13 +0000 (15:32 -0500)
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 <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/debug.c

index db388405bf0c747e0179f7ed2a2f6a702b78f6c9..3f21b1bbc52e9efa4e2c019487e9d4269587b3e6 100644 (file)
@@ -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",