diff options
Diffstat (limited to 'net/mac80211/debugfs_netdev.c')
-rw-r--r-- | net/mac80211/debugfs_netdev.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index 9affe2cd185f..ee61a9f6fabc 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c | |||
@@ -95,6 +95,14 @@ static ssize_t ieee80211_if_fmt_##name( \ | |||
95 | return scnprintf(buf, buflen, "%pM\n", sdata->field); \ | 95 | return scnprintf(buf, buflen, "%pM\n", sdata->field); \ |
96 | } | 96 | } |
97 | 97 | ||
98 | #define IEEE80211_IF_FMT_DEC_DIV_16(name, field) \ | ||
99 | static ssize_t ieee80211_if_fmt_##name( \ | ||
100 | const struct ieee80211_sub_if_data *sdata, \ | ||
101 | char *buf, int buflen) \ | ||
102 | { \ | ||
103 | return scnprintf(buf, buflen, "%d\n", sdata->field / 16); \ | ||
104 | } | ||
105 | |||
98 | #define __IEEE80211_IF_FILE(name, _write) \ | 106 | #define __IEEE80211_IF_FILE(name, _write) \ |
99 | static ssize_t ieee80211_if_read_##name(struct file *file, \ | 107 | static ssize_t ieee80211_if_read_##name(struct file *file, \ |
100 | char __user *userbuf, \ | 108 | char __user *userbuf, \ |
@@ -135,6 +143,8 @@ IEEE80211_IF_FILE(rc_rateidx_mask_5ghz, rc_rateidx_mask[IEEE80211_BAND_5GHZ], | |||
135 | /* STA attributes */ | 143 | /* STA attributes */ |
136 | IEEE80211_IF_FILE(bssid, u.mgd.bssid, MAC); | 144 | IEEE80211_IF_FILE(bssid, u.mgd.bssid, MAC); |
137 | IEEE80211_IF_FILE(aid, u.mgd.aid, DEC); | 145 | IEEE80211_IF_FILE(aid, u.mgd.aid, DEC); |
146 | IEEE80211_IF_FILE(last_beacon, u.mgd.last_beacon_signal, DEC); | ||
147 | IEEE80211_IF_FILE(ave_beacon, u.mgd.ave_beacon_signal, DEC_DIV_16); | ||
138 | 148 | ||
139 | static int ieee80211_set_smps(struct ieee80211_sub_if_data *sdata, | 149 | static int ieee80211_set_smps(struct ieee80211_sub_if_data *sdata, |
140 | enum ieee80211_smps_mode smps_mode) | 150 | enum ieee80211_smps_mode smps_mode) |
@@ -271,6 +281,8 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata) | |||
271 | 281 | ||
272 | DEBUGFS_ADD(bssid); | 282 | DEBUGFS_ADD(bssid); |
273 | DEBUGFS_ADD(aid); | 283 | DEBUGFS_ADD(aid); |
284 | DEBUGFS_ADD(last_beacon); | ||
285 | DEBUGFS_ADD(ave_beacon); | ||
274 | DEBUGFS_ADD_MODE(smps, 0600); | 286 | DEBUGFS_ADD_MODE(smps, 0600); |
275 | } | 287 | } |
276 | 288 | ||