summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>2014-01-08 08:46:02 +0100
committerJohannes Berg <johannes.berg@intel.com>2014-02-04 21:48:11 +0100
commit0b9323f600a3e80a488e3bd14ddfa85b294e630d (patch)
tree0484780aeed03759a03edd28d8aa27289e14416d /net
parent4b5800fec6173765207abded99df3d692ed55691 (diff)
downloadop-kernel-dev-0b9323f600a3e80a488e3bd14ddfa85b294e630d.zip
op-kernel-dev-0b9323f600a3e80a488e3bd14ddfa85b294e630d.tar.gz
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')
-rw-r--r--net/wireless/nl80211.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 09b6da8..a3515eb 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
OpenPOWER on IntegriCloud