aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/cfg.c5
-rw-r--r--net/wireless/nl80211.c1
2 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 51f775772d9e..c416cce5e1ed 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -136,7 +136,10 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev,
136 mutex_lock(&sdata->local->sta_mtx); 136 mutex_lock(&sdata->local->sta_mtx);
137 137
138 if (mac_addr) { 138 if (mac_addr) {
139 sta = sta_info_get_bss(sdata, mac_addr); 139 if (ieee80211_vif_is_mesh(&sdata->vif))
140 sta = sta_info_get(sdata, mac_addr);
141 else
142 sta = sta_info_get_bss(sdata, mac_addr);
140 if (!sta) { 143 if (!sta) {
141 ieee80211_key_free(sdata->local, key); 144 ieee80211_key_free(sdata->local, key);
142 err = -ENOENT; 145 err = -ENOENT;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index f698c1d116e4..b454f8960a04 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -545,6 +545,7 @@ static int nl80211_key_allowed(struct wireless_dev *wdev)
545 case NL80211_IFTYPE_AP: 545 case NL80211_IFTYPE_AP:
546 case NL80211_IFTYPE_AP_VLAN: 546 case NL80211_IFTYPE_AP_VLAN:
547 case NL80211_IFTYPE_P2P_GO: 547 case NL80211_IFTYPE_P2P_GO:
548 case NL80211_IFTYPE_MESH_POINT:
548 break; 549 break;
549 case NL80211_IFTYPE_ADHOC: 550 case NL80211_IFTYPE_ADHOC:
550 if (!wdev->current_bss) 551 if (!wdev->current_bss)