summaryrefslogtreecommitdiff
path: root/net/wireless/util.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-02-25 02:41:54 +0300
committerDavid S. Miller <davem@davemloft.net>2020-02-25 02:41:54 +0300
commit3b3e808cd883dd2e39c85e6d8debc0020b5ef5e7 (patch)
tree3ace0f3dd1626149f457fc7328b9b58ecd29bcda /net/wireless/util.c
parent13ef6ae8c0d96c00476ab9c81671e39a9f714e2b (diff)
parent370f51d5edac83bfdb9a078d7098f06403dfa4bc (diff)
downloadlinux-3b3e808cd883dd2e39c85e6d8debc0020b5ef5e7.tar.xz
Merge tag 'mac80211-next-for-net-next-2020-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says: ==================== A new set of changes: * lots of small documentation fixes, from Jérôme Pouiller * beacon protection (BIGTK) support from Jouni Malinen * some initial code for TID configuration, from Tamizh chelvam * I reverted some new API before it's actually used, because it's wrong to mix controlled port and preauth * a few other cleanups/fixes ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r--net/wireless/util.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 80fb47c43bdd..6590efbbcbb9 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -231,7 +231,12 @@ int cfg80211_validate_key_settings(struct cfg80211_registered_device *rdev,
struct key_params *params, int key_idx,
bool pairwise, const u8 *mac_addr)
{
- if (key_idx < 0 || key_idx > 5)
+ int max_key_idx = 5;
+
+ if (wiphy_ext_feature_isset(&rdev->wiphy,
+ NL80211_EXT_FEATURE_BEACON_PROTECTION))
+ max_key_idx = 7;
+ if (key_idx < 0 || key_idx > max_key_idx)
return -EINVAL;
if (!pairwise && mac_addr && !(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN))