mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
mac80211: add rate mask logic for vht rates
Define rc_rateidx_vht_mcs_mask array and rate_idx_match_vht_mcs_mask() method in order to apply mcs mask for vht rates Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
e910867bd2
commit
b119ad6e72
6 changed files with 181 additions and 16 deletions
|
@ -186,6 +186,38 @@ IEEE80211_IF_FILE(rc_rateidx_mcs_mask_2ghz,
|
|||
IEEE80211_IF_FILE(rc_rateidx_mcs_mask_5ghz,
|
||||
rc_rateidx_mcs_mask[IEEE80211_BAND_5GHZ], HEXARRAY);
|
||||
|
||||
static ssize_t ieee80211_if_fmt_rc_rateidx_vht_mcs_mask_2ghz(
|
||||
const struct ieee80211_sub_if_data *sdata,
|
||||
char *buf, int buflen)
|
||||
{
|
||||
int i, len = 0;
|
||||
const u16 *mask = sdata->rc_rateidx_vht_mcs_mask[IEEE80211_BAND_2GHZ];
|
||||
|
||||
for (i = 0; i < NL80211_VHT_NSS_MAX; i++)
|
||||
len += scnprintf(buf + len, buflen - len, "%04x ", mask[i]);
|
||||
len += scnprintf(buf + len, buflen - len, "\n");
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
IEEE80211_IF_FILE_R(rc_rateidx_vht_mcs_mask_2ghz);
|
||||
|
||||
static ssize_t ieee80211_if_fmt_rc_rateidx_vht_mcs_mask_5ghz(
|
||||
const struct ieee80211_sub_if_data *sdata,
|
||||
char *buf, int buflen)
|
||||
{
|
||||
int i, len = 0;
|
||||
const u16 *mask = sdata->rc_rateidx_vht_mcs_mask[IEEE80211_BAND_5GHZ];
|
||||
|
||||
for (i = 0; i < NL80211_VHT_NSS_MAX; i++)
|
||||
len += scnprintf(buf + len, buflen - len, "%04x ", mask[i]);
|
||||
len += scnprintf(buf + len, buflen - len, "\n");
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
IEEE80211_IF_FILE_R(rc_rateidx_vht_mcs_mask_5ghz);
|
||||
|
||||
IEEE80211_IF_FILE(flags, flags, HEX);
|
||||
IEEE80211_IF_FILE(state, state, LHEX);
|
||||
IEEE80211_IF_FILE(txpower, vif.bss_conf.txpower, DEC);
|
||||
|
@ -565,6 +597,8 @@ static void add_common_files(struct ieee80211_sub_if_data *sdata)
|
|||
DEBUGFS_ADD(rc_rateidx_mask_5ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_vht_mcs_mask_2ghz);
|
||||
DEBUGFS_ADD(rc_rateidx_vht_mcs_mask_5ghz);
|
||||
DEBUGFS_ADD(hw_queues);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue