diff options
author | Janusz Dziedzic <janusz.dziedzic@tieto.com> | 2014-01-08 11:46:02 +0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-05 00:48:11 +0400 |
commit | 0b9323f600a3e80a488e3bd14ddfa85b294e630d (patch) | |
tree | 0484780aeed03759a03edd28d8aa27289e14416d /net/wireless | |
parent | 4b5800fec6173765207abded99df3d692ed55691 (diff) | |
download | linux-0b9323f600a3e80a488e3bd14ddfa85b294e630d.tar.xz |
nl80211: add Guard Interval support for set_bitrate_mask
Allow to force SGI, LGI.
Mainly for test purpose.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 09b6da8ffdfe..a3515ebbd32b 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -7447,6 +7447,7 @@ static const struct nla_policy nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] = { [NL80211_TXRATE_HT] = { .type = NLA_BINARY, .len = NL80211_MAX_SUPP_HT_RATES }, [NL80211_TXRATE_VHT] = { .len = sizeof(struct nl80211_txrate_vht)}, + [NL80211_TXRATE_GI] = { .type = NLA_U8 }, }; static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb, @@ -7527,6 +7528,12 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb, mask.control[band].vht_mcs)) return -EINVAL; } + if (tb[NL80211_TXRATE_GI]) { + mask.control[band].gi = + nla_get_u8(tb[NL80211_TXRATE_GI]); + if (mask.control[band].gi > NL80211_TXRATE_FORCE_LGI) + return -EINVAL; + } if (mask.control[band].legacy == 0) { /* don't allow empty legacy rates if HT or VHT |