aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/debugfs_netdev.c
diff options
context:
space:
mode:
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>2012-01-28 11:25:33 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-30 15:48:26 -0500
commit19468413e8d98d44be8daf0acaf8d576dfc53fa2 (patch)
tree99d7df720566824c4588ccff03c65e60c381e60d /net/mac80211/debugfs_netdev.c
parent24db78c05b1e3ccb5a78aedd17aa1008c91dab5a (diff)
mac80211: add support for mcs masks
* Handle MCS masks set by the user. * Match rates provided by the rate control algorithm to the mask set, also in HT mode, and switch back to legacy mode if necessary. * add debugfs files to observate the rate selection Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/debugfs_netdev.c')
-rw-r--r--net/mac80211/debugfs_netdev.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 81d12e65a23c..510ed1dab3c7 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -87,6 +87,21 @@ static ssize_t ieee80211_if_fmt_##name( \
87#define IEEE80211_IF_FMT_SIZE(name, field) \ 87#define IEEE80211_IF_FMT_SIZE(name, field) \
88 IEEE80211_IF_FMT(name, field, "%zd\n") 88 IEEE80211_IF_FMT(name, field, "%zd\n")
89 89
90#define IEEE80211_IF_FMT_HEXARRAY(name, field) \
91static ssize_t ieee80211_if_fmt_##name( \
92 const struct ieee80211_sub_if_data *sdata, \
93 char *buf, int buflen) \
94{ \
95 char *p = buf; \
96 int i; \
97 for (i = 0; i < sizeof(sdata->field); i++) { \
98 p += scnprintf(p, buflen + buf - p, "%.2x ", \
99 sdata->field[i]); \
100 } \
101 p += scnprintf(p, buflen + buf - p, "\n"); \
102 return p - buf; \
103}
104
90#define IEEE80211_IF_FMT_ATOMIC(name, field) \ 105#define IEEE80211_IF_FMT_ATOMIC(name, field) \
91static ssize_t ieee80211_if_fmt_##name( \ 106static ssize_t ieee80211_if_fmt_##name( \
92 const struct ieee80211_sub_if_data *sdata, \ 107 const struct ieee80211_sub_if_data *sdata, \
@@ -148,6 +163,11 @@ IEEE80211_IF_FILE(rc_rateidx_mask_2ghz, rc_rateidx_mask[IEEE80211_BAND_2GHZ],
148 HEX); 163 HEX);
149IEEE80211_IF_FILE(rc_rateidx_mask_5ghz, rc_rateidx_mask[IEEE80211_BAND_5GHZ], 164IEEE80211_IF_FILE(rc_rateidx_mask_5ghz, rc_rateidx_mask[IEEE80211_BAND_5GHZ],
150 HEX); 165 HEX);
166IEEE80211_IF_FILE(rc_rateidx_mcs_mask_2ghz,
167 rc_rateidx_mcs_mask[IEEE80211_BAND_2GHZ], HEXARRAY);
168IEEE80211_IF_FILE(rc_rateidx_mcs_mask_5ghz,
169 rc_rateidx_mcs_mask[IEEE80211_BAND_5GHZ], HEXARRAY);
170
151IEEE80211_IF_FILE(flags, flags, HEX); 171IEEE80211_IF_FILE(flags, flags, HEX);
152IEEE80211_IF_FILE(state, state, LHEX); 172IEEE80211_IF_FILE(state, state, LHEX);
153IEEE80211_IF_FILE(channel_type, vif.bss_conf.channel_type, DEC); 173IEEE80211_IF_FILE(channel_type, vif.bss_conf.channel_type, DEC);
@@ -442,6 +462,8 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata)
442 DEBUGFS_ADD(channel_type); 462 DEBUGFS_ADD(channel_type);
443 DEBUGFS_ADD(rc_rateidx_mask_2ghz); 463 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
444 DEBUGFS_ADD(rc_rateidx_mask_5ghz); 464 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
465 DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
466 DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
445 467
446 DEBUGFS_ADD(bssid); 468 DEBUGFS_ADD(bssid);
447 DEBUGFS_ADD(aid); 469 DEBUGFS_ADD(aid);
@@ -459,6 +481,8 @@ static void add_ap_files(struct ieee80211_sub_if_data *sdata)
459 DEBUGFS_ADD(channel_type); 481 DEBUGFS_ADD(channel_type);
460 DEBUGFS_ADD(rc_rateidx_mask_2ghz); 482 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
461 DEBUGFS_ADD(rc_rateidx_mask_5ghz); 483 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
484 DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
485 DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
462 486
463 DEBUGFS_ADD(num_sta_authorized); 487 DEBUGFS_ADD(num_sta_authorized);
464 DEBUGFS_ADD(num_sta_ps); 488 DEBUGFS_ADD(num_sta_ps);
@@ -469,6 +493,12 @@ static void add_ap_files(struct ieee80211_sub_if_data *sdata)
469 493
470static void add_ibss_files(struct ieee80211_sub_if_data *sdata) 494static void add_ibss_files(struct ieee80211_sub_if_data *sdata)
471{ 495{
496 DEBUGFS_ADD(channel_type);
497 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
498 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
499 DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
500 DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
501
472 DEBUGFS_ADD_MODE(tsf, 0600); 502 DEBUGFS_ADD_MODE(tsf, 0600);
473} 503}
474 504
@@ -480,6 +510,8 @@ static void add_wds_files(struct ieee80211_sub_if_data *sdata)
480 DEBUGFS_ADD(channel_type); 510 DEBUGFS_ADD(channel_type);
481 DEBUGFS_ADD(rc_rateidx_mask_2ghz); 511 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
482 DEBUGFS_ADD(rc_rateidx_mask_5ghz); 512 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
513 DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
514 DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
483 515
484 DEBUGFS_ADD(peer); 516 DEBUGFS_ADD(peer);
485} 517}
@@ -492,6 +524,8 @@ static void add_vlan_files(struct ieee80211_sub_if_data *sdata)
492 DEBUGFS_ADD(channel_type); 524 DEBUGFS_ADD(channel_type);
493 DEBUGFS_ADD(rc_rateidx_mask_2ghz); 525 DEBUGFS_ADD(rc_rateidx_mask_2ghz);
494 DEBUGFS_ADD(rc_rateidx_mask_5ghz); 526 DEBUGFS_ADD(rc_rateidx_mask_5ghz);
527 DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
528 DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
495} 529}
496 530
497static void add_monitor_files(struct ieee80211_sub_if_data *sdata) 531static void add_monitor_files(struct ieee80211_sub_if_data *sdata)