diff options
author | Janusz Dziedzic <janusz.dziedzic@tieto.com> | 2014-01-08 02:46:02 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-04 15:48:11 -0500 |
commit | 0b9323f600a3e80a488e3bd14ddfa85b294e630d (patch) | |
tree | 0484780aeed03759a03edd28d8aa27289e14416d /net/wireless/nl80211.c | |
parent | 4b5800fec6173765207abded99df3d692ed55691 (diff) |
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/nl80211.c')
-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] = { | |||
7447 | [NL80211_TXRATE_HT] = { .type = NLA_BINARY, | 7447 | [NL80211_TXRATE_HT] = { .type = NLA_BINARY, |
7448 | .len = NL80211_MAX_SUPP_HT_RATES }, | 7448 | .len = NL80211_MAX_SUPP_HT_RATES }, |
7449 | [NL80211_TXRATE_VHT] = { .len = sizeof(struct nl80211_txrate_vht)}, | 7449 | [NL80211_TXRATE_VHT] = { .len = sizeof(struct nl80211_txrate_vht)}, |
7450 | [NL80211_TXRATE_GI] = { .type = NLA_U8 }, | ||
7450 | }; | 7451 | }; |
7451 | 7452 | ||
7452 | static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb, | 7453 | 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, | |||
7527 | mask.control[band].vht_mcs)) | 7528 | mask.control[band].vht_mcs)) |
7528 | return -EINVAL; | 7529 | return -EINVAL; |
7529 | } | 7530 | } |
7531 | if (tb[NL80211_TXRATE_GI]) { | ||
7532 | mask.control[band].gi = | ||
7533 | nla_get_u8(tb[NL80211_TXRATE_GI]); | ||
7534 | if (mask.control[band].gi > NL80211_TXRATE_FORCE_LGI) | ||
7535 | return -EINVAL; | ||
7536 | } | ||
7530 | 7537 | ||
7531 | if (mask.control[band].legacy == 0) { | 7538 | if (mask.control[band].legacy == 0) { |
7532 | /* don't allow empty legacy rates if HT or VHT | 7539 | /* don't allow empty legacy rates if HT or VHT |