summaryrefslogtreecommitdiffstats
path: root/net/wireless/sme.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-02-24 15:41:54 -0800
committerDavid S. Miller <davem@davemloft.net>2020-02-24 15:41:54 -0800
commit3b3e808cd883dd2e39c85e6d8debc0020b5ef5e7 (patch)
tree3ace0f3dd1626149f457fc7328b9b58ecd29bcda /net/wireless/sme.c
parent13ef6ae8c0d96c00476ab9c81671e39a9f714e2b (diff)
parent370f51d5edac83bfdb9a078d7098f06403dfa4bc (diff)
downloadlinux-3b3e808cd883dd2e39c85e6d8debc0020b5ef5e7.tar.gz
linux-3b3e808cd883dd2e39c85e6d8debc0020b5ef5e7.tar.bz2
linux-3b3e808cd883dd2e39c85e6d8debc0020b5ef5e7.zip
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/sme.c')
-rw-r--r--net/wireless/sme.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index d32a2ec4d96a..ac3e60aa1fc8 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -1111,9 +1111,16 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie,
* Delete all the keys ... pairwise keys can't really
* exist any more anyway, but default keys might.
*/
- if (rdev->ops->del_key)
- for (i = 0; i < 6; i++)
+ if (rdev->ops->del_key) {
+ int max_key_idx = 5;
+
+ if (wiphy_ext_feature_isset(
+ wdev->wiphy,
+ NL80211_EXT_FEATURE_BEACON_PROTECTION))
+ max_key_idx = 7;
+ for (i = 0; i <= max_key_idx; i++)
rdev_del_key(rdev, dev, i, false, NULL);
+ }
rdev_set_qos_map(rdev, dev, NULL);