aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rc80211_minstrel_ht_debugfs.c
diff options
context:
space:
mode:
authorKarl Beldan <karl.beldan@rivierawaves.com>2014-10-21 04:38:38 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-10-21 07:25:26 -0400
commit9208247d74bc52dcaf370ba3cee29b5e8775464b (patch)
tree5a3c2c24e73920771f2a97015db45ebdae2d345a /net/mac80211/rc80211_minstrel_ht_debugfs.c
parent3ec373c421b6efc41b84b20265b4381beb1d7908 (diff)
mac80211: minstrel_ht: add basic support for VHT rates <= 3SS@80MHz
When the new CONFIG_MAC80211_RC_MINSTREL_VHT is not set (default 'N'), there is no behavioral change including in sampling and MCS_GROUP_RATES remains 8. Otherwise MCS_GROUP_RATES is 10, and a module parameter *vht_only* (default 'true'), restricts the rates selection to VHT when VHT is supported. Regarding the debugfs stats buffer: It is explicitly increased from 8k to 32k to fit every rates incl. when both HT and VHT rates are enabled, as for the format, before: type rate tpt eprob *prob ret *ok(*cum) ok( cum) HT20/LGI ABCDP MCS0 0.0 0.0 0.0 1 0( 0) 0( 0) after: type rate tpt eprob *prob ret *ok(*cum) ok( cum) HT20/LGI ABCDP MCS0 0.0 0.0 0.0 1 0( 0) 0( 0) VHT40/LGI MCS5/2 0.0 0.0 0.0 0 0( 0) 0( 0) Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com> Cc: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rc80211_minstrel_ht_debugfs.c')
-rw-r--r--net/mac80211/rc80211_minstrel_ht_debugfs.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht_debugfs.c b/net/mac80211/rc80211_minstrel_ht_debugfs.c
index d2f53b867660..52bb6ef55b19 100644
--- a/net/mac80211/rc80211_minstrel_ht_debugfs.c
+++ b/net/mac80211/rc80211_minstrel_ht_debugfs.c
@@ -29,6 +29,8 @@ minstrel_ht_stats_dump(struct minstrel_ht_sta *mi, int i, char *p)
29 mg = &minstrel_mcs_groups[i]; 29 mg = &minstrel_mcs_groups[i];
30 if (mg->flags & IEEE80211_TX_RC_40_MHZ_WIDTH) 30 if (mg->flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
31 htmode = '4'; 31 htmode = '4';
32 else if (mg->flags & IEEE80211_TX_RC_80_MHZ_WIDTH)
33 htmode = '8';
32 if (mg->flags & IEEE80211_TX_RC_SHORT_GI) 34 if (mg->flags & IEEE80211_TX_RC_SHORT_GI)
33 gimode = 'S'; 35 gimode = 'S';
34 36
@@ -41,9 +43,11 @@ minstrel_ht_stats_dump(struct minstrel_ht_sta *mi, int i, char *p)
41 continue; 43 continue;
42 44
43 if (i == MINSTREL_CCK_GROUP) 45 if (i == MINSTREL_CCK_GROUP)
44 p += sprintf(p, "CCK/%cP ", j < 4 ? 'L' : 'S'); 46 p += sprintf(p, " CCK/%cP ", j < 4 ? 'L' : 'S');
47 else if (i >= MINSTREL_VHT_GROUP_0)
48 p += sprintf(p, "VHT%c0/%cGI ", htmode, gimode);
45 else 49 else
46 p += sprintf(p, "HT%c0/%cGI ", htmode, gimode); 50 p += sprintf(p, " HT%c0/%cGI ", htmode, gimode);
47 51
48 *(p++) = (idx == mi->max_tp_rate[0]) ? 'A' : ' '; 52 *(p++) = (idx == mi->max_tp_rate[0]) ? 'A' : ' ';
49 *(p++) = (idx == mi->max_tp_rate[1]) ? 'B' : ' '; 53 *(p++) = (idx == mi->max_tp_rate[1]) ? 'B' : ' ';
@@ -53,9 +57,11 @@ minstrel_ht_stats_dump(struct minstrel_ht_sta *mi, int i, char *p)
53 57
54 if (i == MINSTREL_CCK_GROUP) { 58 if (i == MINSTREL_CCK_GROUP) {
55 int r = bitrates[j % 4]; 59 int r = bitrates[j % 4];
56 p += sprintf(p, " %2u.%1uM", r / 10, r % 10); 60 p += sprintf(p, " %2u.%1uM ", r / 10, r % 10);
61 } else if (i >= MINSTREL_VHT_GROUP_0) {
62 p += sprintf(p, " MCS%-1u/%1u", j, mg->streams);
57 } else { 63 } else {
58 p += sprintf(p, " MCS%-2u", (mg->streams - 1) * 8 + j); 64 p += sprintf(p, " MCS%-2u ", (mg->streams - 1) * 8 + j);
59 } 65 }
60 66
61 tp = mr->cur_tp / 10; 67 tp = mr->cur_tp / 10;
@@ -94,19 +100,20 @@ minstrel_ht_stats_open(struct inode *inode, struct file *file)
94 return ret; 100 return ret;
95 } 101 }
96 102
97 ms = kmalloc(8192, GFP_KERNEL); 103 ms = kmalloc(32768, GFP_KERNEL);
98 if (!ms) 104 if (!ms)
99 return -ENOMEM; 105 return -ENOMEM;
100 106
101 file->private_data = ms; 107 file->private_data = ms;
102 p = ms->buf; 108 p = ms->buf;
103 p += sprintf(p, "type rate tpt eprob *prob " 109 p += sprintf(p, " type rate tpt eprob *prob "
104 "ret *ok(*cum) ok( cum)\n"); 110 "ret *ok(*cum) ok( cum)\n");
105 111
106
107 p = minstrel_ht_stats_dump(mi, MINSTREL_CCK_GROUP, p); 112 p = minstrel_ht_stats_dump(mi, MINSTREL_CCK_GROUP, p);
108 for (i = 0; i < MINSTREL_CCK_GROUP; i++) 113 for (i = 0; i < MINSTREL_CCK_GROUP; i++)
109 p = minstrel_ht_stats_dump(mi, i, p); 114 p = minstrel_ht_stats_dump(mi, i, p);
115 for (i++; i < ARRAY_SIZE(mi->groups); i++)
116 p = minstrel_ht_stats_dump(mi, i, p);
110 117
111 p += sprintf(p, "\nTotal packet count:: ideal %d " 118 p += sprintf(p, "\nTotal packet count:: ideal %d "
112 "lookaround %d\n", 119 "lookaround %d\n",
@@ -117,7 +124,7 @@ minstrel_ht_stats_open(struct inode *inode, struct file *file)
117 MINSTREL_TRUNC(mi->avg_ampdu_len * 10) % 10); 124 MINSTREL_TRUNC(mi->avg_ampdu_len * 10) % 10);
118 ms->len = p - ms->buf; 125 ms->len = p - ms->buf;
119 126
120 WARN_ON(ms->len + sizeof(*ms) > 8192); 127 WARN_ON(ms->len + sizeof(*ms) > 32768);
121 128
122 return nonseekable_open(inode, file); 129 return nonseekable_open(inode, file);
123} 130}