aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/debugfs_sta.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/debugfs_sta.c')
-rw-r--r--net/mac80211/debugfs_sta.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index c7591f73dbc3..44e201d60a13 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -54,6 +54,7 @@ STA_FILE(aid, sta.aid, D);
54STA_FILE(dev, sdata->name, S); 54STA_FILE(dev, sdata->name, S);
55STA_FILE(last_signal, last_signal, D); 55STA_FILE(last_signal, last_signal, D);
56STA_FILE(last_ack_signal, last_ack_signal, D); 56STA_FILE(last_ack_signal, last_ack_signal, D);
57STA_FILE(beacon_loss_count, beacon_loss_count, D);
57 58
58static ssize_t sta_flags_read(struct file *file, char __user *userbuf, 59static ssize_t sta_flags_read(struct file *file, char __user *userbuf,
59 size_t count, loff_t *ppos) 60 size_t count, loff_t *ppos)
@@ -325,6 +326,36 @@ static ssize_t sta_ht_capa_read(struct file *file, char __user *userbuf,
325} 326}
326STA_OPS(ht_capa); 327STA_OPS(ht_capa);
327 328
329static ssize_t sta_vht_capa_read(struct file *file, char __user *userbuf,
330 size_t count, loff_t *ppos)
331{
332 char buf[128], *p = buf;
333 struct sta_info *sta = file->private_data;
334 struct ieee80211_sta_vht_cap *vhtc = &sta->sta.vht_cap;
335
336 p += scnprintf(p, sizeof(buf) + buf - p, "VHT %ssupported\n",
337 vhtc->vht_supported ? "" : "not ");
338 if (vhtc->vht_supported) {
339 p += scnprintf(p, sizeof(buf)+buf-p, "cap: %#.8x\n", vhtc->cap);
340
341 p += scnprintf(p, sizeof(buf)+buf-p, "RX MCS: %.4x\n",
342 le16_to_cpu(vhtc->vht_mcs.rx_mcs_map));
343 if (vhtc->vht_mcs.rx_highest)
344 p += scnprintf(p, sizeof(buf)+buf-p,
345 "MCS RX highest: %d Mbps\n",
346 le16_to_cpu(vhtc->vht_mcs.rx_highest));
347 p += scnprintf(p, sizeof(buf)+buf-p, "TX MCS: %.4x\n",
348 le16_to_cpu(vhtc->vht_mcs.tx_mcs_map));
349 if (vhtc->vht_mcs.tx_highest)
350 p += scnprintf(p, sizeof(buf)+buf-p,
351 "MCS TX highest: %d Mbps\n",
352 le16_to_cpu(vhtc->vht_mcs.tx_highest));
353 }
354
355 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
356}
357STA_OPS(vht_capa);
358
328static ssize_t sta_current_tx_rate_read(struct file *file, char __user *userbuf, 359static ssize_t sta_current_tx_rate_read(struct file *file, char __user *userbuf,
329 size_t count, loff_t *ppos) 360 size_t count, loff_t *ppos)
330{ 361{
@@ -404,7 +435,9 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
404 DEBUGFS_ADD(agg_status); 435 DEBUGFS_ADD(agg_status);
405 DEBUGFS_ADD(dev); 436 DEBUGFS_ADD(dev);
406 DEBUGFS_ADD(last_signal); 437 DEBUGFS_ADD(last_signal);
438 DEBUGFS_ADD(beacon_loss_count);
407 DEBUGFS_ADD(ht_capa); 439 DEBUGFS_ADD(ht_capa);
440 DEBUGFS_ADD(vht_capa);
408 DEBUGFS_ADD(last_ack_signal); 441 DEBUGFS_ADD(last_ack_signal);
409 DEBUGFS_ADD(current_tx_rate); 442 DEBUGFS_ADD(current_tx_rate);
410 DEBUGFS_ADD(last_rx_rate); 443 DEBUGFS_ADD(last_rx_rate);