summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorAlexander Wetzel <alexander@wetzel-home.de>2019-04-22 23:34:11 +0200
committerJohannes Berg <johannes.berg@intel.com>2019-04-26 13:02:11 +0200
commit622fce81280aadb277dd3fc55c676b4bdc3e0527 (patch)
treebd4b5c68760c5d607b62efe03ac87d0536942fa1 /net/mac80211
parent5809a5d54bb9eda3a388b5a712657970c2cb9f8e (diff)
downloadlinux-622fce81280aadb277dd3fc55c676b4bdc3e0527.tar.gz
linux-622fce81280aadb277dd3fc55c676b4bdc3e0527.tar.bz2
linux-622fce81280aadb277dd3fc55c676b4bdc3e0527.zip
mac80211: Fix Extended Key ID auto activation
Only enable Extended Key ID support for drivers which are not supporting crypto offload and also do not support A-MPDU. While any driver using SW crypto from mac80211 is generally able to also support Extended Key ID these drivers are likely to mix keyIDs in AMPDUs when rekeying. According to IEEE 802.11-2016 "9.7.3 A-MPDU contents" this is not allowed. Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de> [reword comment a bit, move ! into logic expression] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 5d6b93050c0b..e56650a9838e 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1051,7 +1051,11 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
}
}
- if (!local->ops->set_key ||
+ /* Enable Extended Key IDs when driver allowed it, or when it
+ * supports neither HW crypto nor A-MPDUs
+ */
+ if ((!local->ops->set_key &&
+ !ieee80211_hw_check(hw, AMPDU_AGGREGATION)) ||
ieee80211_hw_check(&local->hw, EXT_KEY_ID_NATIVE))
wiphy_ext_feature_set(local->hw.wiphy,
NL80211_EXT_FEATURE_EXT_KEY_ID);