diff options
author | Janusz.Dziedzic@tieto.com <Janusz.Dziedzic@tieto.com> | 2015-02-21 10:52:39 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-03-03 09:56:04 -0500 |
commit | ffc1199122d83d60ad99f9c55df32feb650b7bff (patch) | |
tree | 65398ef57e1478724b065762d0bdf6ac410ece73 | |
parent | 6eb18137643fee5f182d85c818062b4feddfb76b (diff) |
cfg80211: add VHT support for IBSS
Add NL80211_EXT_FEATURE_VHT_IBSS flag and VHT
support for IBSS.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | include/uapi/linux/nl80211.h | 2 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 2dcf9bba317c..8ee31f108407 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
@@ -4328,11 +4328,13 @@ enum nl80211_feature_flags { | |||
4328 | 4328 | ||
4329 | /** | 4329 | /** |
4330 | * enum nl80211_ext_feature_index - bit index of extended features. | 4330 | * enum nl80211_ext_feature_index - bit index of extended features. |
4331 | * @NL80211_EXT_FEATURE_VHT_IBSS: This driver supports IBSS with VHT datarates. | ||
4331 | * | 4332 | * |
4332 | * @NUM_NL80211_EXT_FEATURES: number of extended features. | 4333 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
4333 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. | 4334 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
4334 | */ | 4335 | */ |
4335 | enum nl80211_ext_feature_index { | 4336 | enum nl80211_ext_feature_index { |
4337 | NL80211_EXT_FEATURE_VHT_IBSS, | ||
4336 | 4338 | ||
4337 | /* add new features before the definition below */ | 4339 | /* add new features before the definition below */ |
4338 | NUM_NL80211_EXT_FEATURES, | 4340 | NUM_NL80211_EXT_FEATURES, |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 9c6e23ede5b2..66666fdf1c8d 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -7265,8 +7265,18 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info) | |||
7265 | break; | 7265 | break; |
7266 | case NL80211_CHAN_WIDTH_20: | 7266 | case NL80211_CHAN_WIDTH_20: |
7267 | case NL80211_CHAN_WIDTH_40: | 7267 | case NL80211_CHAN_WIDTH_40: |
7268 | if (rdev->wiphy.features & NL80211_FEATURE_HT_IBSS) | 7268 | if (!(rdev->wiphy.features & NL80211_FEATURE_HT_IBSS)) |
7269 | break; | 7269 | return -EINVAL; |
7270 | break; | ||
7271 | case NL80211_CHAN_WIDTH_80: | ||
7272 | case NL80211_CHAN_WIDTH_80P80: | ||
7273 | case NL80211_CHAN_WIDTH_160: | ||
7274 | if (!(rdev->wiphy.features & NL80211_FEATURE_HT_IBSS)) | ||
7275 | return -EINVAL; | ||
7276 | if (!wiphy_ext_feature_isset(&rdev->wiphy, | ||
7277 | NL80211_EXT_FEATURE_VHT_IBSS)) | ||
7278 | return -EINVAL; | ||
7279 | break; | ||
7270 | default: | 7280 | default: |
7271 | return -EINVAL; | 7281 | return -EINVAL; |
7272 | } | 7282 | } |