diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/debugfs_sta.c | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index 9a1d1e40eca8..c833b6ce9902 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -160,7 +160,12 @@ STA_OPS(agg_status); | |||
160 | static ssize_t sta_ht_capa_read(struct file *file, char __user *userbuf, | 160 | static ssize_t sta_ht_capa_read(struct file *file, char __user *userbuf, |
161 | size_t count, loff_t *ppos) | 161 | size_t count, loff_t *ppos) |
162 | { | 162 | { |
163 | char buf[200], *p = buf; | 163 | #define PRINT_HT_CAP(_cond, _str) \ |
164 | do { \ | ||
165 | if (_cond) \ | ||
166 | p += scnprintf(p, sizeof(buf)+buf-p, "\t" _str "\n"); \ | ||
167 | } while (0) | ||
168 | char buf[1024], *p = buf; | ||
164 | int i; | 169 | int i; |
165 | struct sta_info *sta = file->private_data; | 170 | struct sta_info *sta = file->private_data; |
166 | struct ieee80211_sta_ht_cap *htc = &sta->sta.ht_cap; | 171 | struct ieee80211_sta_ht_cap *htc = &sta->sta.ht_cap; |
@@ -169,6 +174,47 @@ static ssize_t sta_ht_capa_read(struct file *file, char __user *userbuf, | |||
169 | htc->ht_supported ? "" : "not "); | 174 | htc->ht_supported ? "" : "not "); |
170 | if (htc->ht_supported) { | 175 | if (htc->ht_supported) { |
171 | p += scnprintf(p, sizeof(buf)+buf-p, "cap: %#.4x\n", htc->cap); | 176 | p += scnprintf(p, sizeof(buf)+buf-p, "cap: %#.4x\n", htc->cap); |
177 | |||
178 | PRINT_HT_CAP((htc->cap & BIT(0)), "RX LDCP"); | ||
179 | PRINT_HT_CAP((htc->cap & BIT(1)), "HT20/HT40"); | ||
180 | PRINT_HT_CAP(!(htc->cap & BIT(1)), "HT20"); | ||
181 | |||
182 | PRINT_HT_CAP(((htc->cap >> 2) & 0x3) == 0, "Static SM Power Save"); | ||
183 | PRINT_HT_CAP(((htc->cap >> 2) & 0x3) == 1, "Dynamic SM Power Save"); | ||
184 | PRINT_HT_CAP(((htc->cap >> 2) & 0x3) == 3, "SM Power Save disabled"); | ||
185 | |||
186 | PRINT_HT_CAP((htc->cap & BIT(4)), "RX Greenfield"); | ||
187 | PRINT_HT_CAP((htc->cap & BIT(5)), "RX HT20 SGI"); | ||
188 | PRINT_HT_CAP((htc->cap & BIT(6)), "RX HT40 SGI"); | ||
189 | PRINT_HT_CAP((htc->cap & BIT(7)), "TX STBC"); | ||
190 | |||
191 | PRINT_HT_CAP(((htc->cap >> 8) & 0x3) == 0, "No RX STBC"); | ||
192 | PRINT_HT_CAP(((htc->cap >> 8) & 0x3) == 1, "RX STBC 1-stream"); | ||
193 | PRINT_HT_CAP(((htc->cap >> 8) & 0x3) == 2, "RX STBC 2-streams"); | ||
194 | PRINT_HT_CAP(((htc->cap >> 8) & 0x3) == 3, "RX STBC 3-streams"); | ||
195 | |||
196 | PRINT_HT_CAP((htc->cap & BIT(10)), "HT Delayed Block Ack"); | ||
197 | |||
198 | PRINT_HT_CAP((htc->cap & BIT(11)), "Max AMSDU length: " | ||
199 | "3839 bytes"); | ||
200 | PRINT_HT_CAP(!(htc->cap & BIT(11)), "Max AMSDU length: " | ||
201 | "7935 bytes"); | ||
202 | |||
203 | /* | ||
204 | * For beacons and probe response this would mean the BSS | ||
205 | * does or does not allow the usage of DSSS/CCK HT40. | ||
206 | * Otherwise it means the STA does or does not use | ||
207 | * DSSS/CCK HT40. | ||
208 | */ | ||
209 | PRINT_HT_CAP((htc->cap & BIT(12)), "DSSS/CCK HT40"); | ||
210 | PRINT_HT_CAP(!(htc->cap & BIT(12)), "No DSSS/CCK HT40"); | ||
211 | |||
212 | /* BIT(13) is reserved */ | ||
213 | |||
214 | PRINT_HT_CAP((htc->cap & BIT(14)), "40 MHz Intolerant"); | ||
215 | |||
216 | PRINT_HT_CAP((htc->cap & BIT(15)), "L-SIG TXOP protection"); | ||
217 | |||
172 | p += scnprintf(p, sizeof(buf)+buf-p, "ampdu factor/density: %d/%d\n", | 218 | p += scnprintf(p, sizeof(buf)+buf-p, "ampdu factor/density: %d/%d\n", |
173 | htc->ampdu_factor, htc->ampdu_density); | 219 | htc->ampdu_factor, htc->ampdu_density); |
174 | p += scnprintf(p, sizeof(buf)+buf-p, "MCS mask:"); | 220 | p += scnprintf(p, sizeof(buf)+buf-p, "MCS mask:"); |