summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlexander Wetzel <alexander@wetzel-home.de>2019-06-29 21:50:14 +0200
committerJohannes Berg <johannes.berg@intel.com>2019-07-26 13:29:10 +0200
commitdc3998ec5cf2d377f2e85ba16b6a15affec98a0a (patch)
treecde1eea51bcb6f321717cea130dd82df202b20f9 /net
parent3e47bf1ca4c363ba8b1f99c4c3dcda13d2979954 (diff)
downloadlinux-dc3998ec5cf2d377f2e85ba16b6a15affec98a0a.tar.gz
linux-dc3998ec5cf2d377f2e85ba16b6a15affec98a0a.tar.bz2
linux-dc3998ec5cf2d377f2e85ba16b6a15affec98a0a.zip
mac80211: AMPDU handling for rekeys with Extended Key ID
Extended Key ID allows A-MPDU sessions while rekeying as long as each A-MPDU aggregates only MPDUs with one keyid together. Drivers able to segregate MPDUs accordingly can tell mac80211 to not stop A-MPDU sessions when rekeying by setting the new flag IEEE80211_HW_AMPDU_KEYBORDER_SUPPORT. Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de> Link: https://lore.kernel.org/r/20190629195015.19680-3-alexander@wetzel-home.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/debugfs.c1
-rw-r--r--net/mac80211/key.c14
2 files changed, 9 insertions, 6 deletions
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 47435f57e086..568b3b276931 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -271,6 +271,7 @@ static const char *hw_flag_names[] = {
FLAG(TX_STATUS_NO_AMPDU_LEN),
FLAG(SUPPORTS_MULTI_BSSID),
FLAG(SUPPORTS_ONLY_HE_MULTI_BSSID),
+ FLAG(AMPDU_KEYBORDER_SUPPORT),
#undef FLAG
};
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 92c3affb0eb0..7dfee848abac 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -270,7 +270,8 @@ int ieee80211_set_tx_key(struct ieee80211_key *key)
sta->ptk_idx = key->conf.keyidx;
- clear_sta_flag(sta, WLAN_STA_BLOCK_BA);
+ if (!ieee80211_hw_check(&local->hw, AMPDU_KEYBORDER_SUPPORT))
+ clear_sta_flag(sta, WLAN_STA_BLOCK_BA);
ieee80211_check_fast_xmit(sta);
return 0;
@@ -288,15 +289,16 @@ static void ieee80211_pairwise_rekey(struct ieee80211_key *old,
if (new->conf.flags & IEEE80211_KEY_FLAG_NO_AUTO_TX) {
/* Extended Key ID key install, initial one or rekey */
- if (sta->ptk_idx != INVALID_PTK_KEYIDX) {
+ if (sta->ptk_idx != INVALID_PTK_KEYIDX &&
+ !ieee80211_hw_check(&local->hw, AMPDU_KEYBORDER_SUPPORT)) {
/* Aggregation Sessions with Extended Key ID must not
* mix MPDUs with different keyIDs within one A-MPDU.
* Tear down running Tx aggregation sessions and block
* new Rx/Tx aggregation requests during rekey to
- * ensure there are no A-MPDUs for the driver to
- * aggregate. (Blocking Tx only would be sufficient but
- * WLAN_STA_BLOCK_BA gets the job done for the few ms
- * we need it.)
+ * ensure there are no A-MPDUs when the driver is not
+ * supporting A-MPDU key borders. (Blocking Tx only
+ * would be sufficient but WLAN_STA_BLOCK_BA gets the
+ * job done for the few ms we need it.)
*/
set_sta_flag(sta, WLAN_STA_BLOCK_BA);
mutex_lock(&sta->ampdu_mlme.mtx);