306-ath9k-fix-misc-debugfs-when-not-using-chan-context.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. From: Ben Greear <[email protected]>
  2. Date: Tue, 4 Nov 2014 15:22:49 -0800
  3. Subject: [PATCH] ath9k: fix misc debugfs when not using chan context
  4. When channel-context is not enabled, all vifs belong to
  5. the first context, but it is not configured as 'assigned'.
  6. Fix misc debugfs file to print out info for non-assigned
  7. contexts, and also print whether ctx is assigned or not.
  8. Signed-off-by: Ben Greear <[email protected]>
  9. ---
  10. --- a/drivers/net/wireless/ath/ath9k/debug.c
  11. +++ b/drivers/net/wireless/ath/ath9k/debug.c
  12. @@ -828,13 +828,14 @@ static ssize_t read_file_misc(struct fil
  13. i = 0;
  14. ath_for_each_chanctx(sc, ctx) {
  15. - if (!ctx->assigned || list_empty(&ctx->vifs))
  16. + if (list_empty(&ctx->vifs))
  17. continue;
  18. ath9k_calculate_iter_data(sc, ctx, &iter_data);
  19. len += scnprintf(buf + len, sizeof(buf) - len,
  20. - "VIF-COUNTS: CTX %i AP: %i STA: %i MESH: %i WDS: %i",
  21. - i++, iter_data.naps, iter_data.nstations,
  22. + "VIFS: CTX %i(%i) AP: %i STA: %i MESH: %i WDS: %i",
  23. + i++, (int)(ctx->assigned), iter_data.naps,
  24. + iter_data.nstations,
  25. iter_data.nmeshes, iter_data.nwds);
  26. len += scnprintf(buf + len, sizeof(buf) - len,
  27. " ADHOC: %i TOTAL: %hi BEACON-VIF: %hi\n",