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