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>
This commit is contained in:
committed by
John W. Linville
parent
24db78c05b
commit
19468413e8
@@ -87,6 +87,21 @@ static ssize_t ieee80211_if_fmt_##name( \
|
||||
#define IEEE80211_IF_FMT_SIZE(name, field) \
|
||||
IEEE80211_IF_FMT(name, field, "%zd\n")
|
||||
|
||||
#define IEEE80211_IF_FMT_HEXARRAY(name, field) \
|
||||
static ssize_t ieee80211_if_fmt_##name( \
|
||||
const struct ieee80211_sub_if_data *sdata, \
|
||||
char *buf, int buflen) \
|
||||
{ \
|
||||
char *p = buf; \
|
||||
int i; \
|
||||
for (i = 0; i < sizeof(sdata->field); i++) { \
|
||||
p += scnprintf(p, buflen + buf - p, "%.2x ", \
|
||||
sdata->field[i]); \
|
||||
} \
|
||||
p += scnprintf(p, buflen + buf - p, "\n"); \
|
||||
return p - buf; \
|
||||
}
|
||||
|
||||
#define IEEE80211_IF_FMT_ATOMIC(name, field) \
|
||||
static ssize_t ieee80211_if_fmt_##name( \
|
||||
const struct ieee80211_sub_if_data *sdata, \
|
||||
@@ -148,6 +163,11 @@ IEEE80211_IF_FILE(rc_rateidx_mask_2ghz, rc_rateidx_mask[IEEE80211_BAND_2GHZ],
|
||||
HEX);
|
||||
IEEE80211_IF_FILE(rc_rateidx_mask_5ghz, rc_rateidx_mask[IEEE80211_BAND_5GHZ],
|
||||
HEX);
|
||||
IEEE80211_IF_FILE(rc_rateidx_mcs_mask_2ghz,
|
||||
rc_rateidx_mcs_mask[IEEE80211_BAND_2GHZ], HEXARRAY);
|
||||
IEEE80211_IF_FILE(rc_rateidx_mcs_mask_5ghz,
|
||||
rc_rateidx_mcs_mask[IEEE80211_BAND_5GHZ], HEXARRAY);
|
||||
|
||||
IEEE80211_IF_FILE(flags, flags, HEX);
|
||||
IEEE80211_IF_FILE(state, state, LHEX);
|
||||
IEEE80211_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)
|
||||
DEBUGFS_ADD(channel_type);
|
||||
DEBUGFS_ADD(rc_rateidx_mask_2ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mask_5ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
|
||||
|
||||
DEBUGFS_ADD(bssid);
|
||||
DEBUGFS_ADD(aid);
|
||||
@@ -459,6 +481,8 @@ static void add_ap_files(struct ieee80211_sub_if_data *sdata)
|
||||
DEBUGFS_ADD(channel_type);
|
||||
DEBUGFS_ADD(rc_rateidx_mask_2ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mask_5ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
|
||||
|
||||
DEBUGFS_ADD(num_sta_authorized);
|
||||
DEBUGFS_ADD(num_sta_ps);
|
||||
@@ -469,6 +493,12 @@ static void add_ap_files(struct ieee80211_sub_if_data *sdata)
|
||||
|
||||
static void add_ibss_files(struct ieee80211_sub_if_data *sdata)
|
||||
{
|
||||
DEBUGFS_ADD(channel_type);
|
||||
DEBUGFS_ADD(rc_rateidx_mask_2ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mask_5ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
|
||||
|
||||
DEBUGFS_ADD_MODE(tsf, 0600);
|
||||
}
|
||||
|
||||
@@ -480,6 +510,8 @@ static void add_wds_files(struct ieee80211_sub_if_data *sdata)
|
||||
DEBUGFS_ADD(channel_type);
|
||||
DEBUGFS_ADD(rc_rateidx_mask_2ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mask_5ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
|
||||
|
||||
DEBUGFS_ADD(peer);
|
||||
}
|
||||
@@ -492,6 +524,8 @@ static void add_vlan_files(struct ieee80211_sub_if_data *sdata)
|
||||
DEBUGFS_ADD(channel_type);
|
||||
DEBUGFS_ADD(rc_rateidx_mask_2ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mask_5ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
|
||||
}
|
||||
|
||||
static void add_monitor_files(struct ieee80211_sub_if_data *sdata)
|
||||
|
||||
Reference in New Issue
Block a user