forked from coolsnowwolf/lede
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix wifi management frame protection issue with mtk 762x
- Loading branch information
1 parent
6a5c2bf
commit 1306b0d
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...el/mac80211/patches/subsys/350-mac80211-fix-setting-IEEE80211_KEY_FLAG_RX_MGMT-for-.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From: Felix Fietkau <[email protected]> | ||
Date: Sat, 29 Sep 2018 15:55:44 +0200 | ||
Subject: [PATCH] mac80211: fix setting IEEE80211_KEY_FLAG_RX_MGMT for AP mode | ||
keys | ||
|
||
key->sta is only valid after ieee80211_key_link, which is called later | ||
in this function. Because of that, the IEEE80211_KEY_FLAG_RX_MGMT is | ||
never set when management frame protection is enabled. | ||
|
||
Fixes: e548c49e6dc6b ("mac80211: add key flag for management keys") | ||
Cc: [email protected] | ||
Signed-off-by: Felix Fietkau <[email protected]> | ||
--- | ||
|
||
--- a/net/mac80211/cfg.c | ||
+++ b/net/mac80211/cfg.c | ||
@@ -427,7 +427,7 @@ static int ieee80211_add_key(struct wiph | ||
case NL80211_IFTYPE_AP: | ||
case NL80211_IFTYPE_AP_VLAN: | ||
/* Keys without a station are used for TX only */ | ||
- if (key->sta && test_sta_flag(key->sta, WLAN_STA_MFP)) | ||
+ if (sta && test_sta_flag(sta, WLAN_STA_MFP)) | ||
key->conf.flags |= IEEE80211_KEY_FLAG_RX_MGMT; | ||
break; | ||
case NL80211_IFTYPE_ADHOC: |