]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
nl80211: allow installing keys for a meshif
authorThomas Pedersen <thomas@cozybit.com>
Tue, 3 May 2011 23:57:12 +0000 (16:57 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 11 May 2011 18:44:47 +0000 (14:44 -0400)
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/cfg.c
net/wireless/nl80211.c

index 51f775772d9eb4f81bd9c5ae0b310f7386dffb40..c416cce5e1ed9618ab84de30a9043d8800f47be9 100644 (file)
@@ -136,7 +136,10 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev,
        mutex_lock(&sdata->local->sta_mtx);
 
        if (mac_addr) {
-               sta = sta_info_get_bss(sdata, mac_addr);
+               if (ieee80211_vif_is_mesh(&sdata->vif))
+                       sta = sta_info_get(sdata, mac_addr);
+               else
+                       sta = sta_info_get_bss(sdata, mac_addr);
                if (!sta) {
                        ieee80211_key_free(sdata->local, key);
                        err = -ENOENT;
index f698c1d116e4145cda838e2021c3da702847c3d8..b454f8960a04d2284d4cc0370294422a68da0a6b 100644 (file)
@@ -545,6 +545,7 @@ static int nl80211_key_allowed(struct wireless_dev *wdev)
        case NL80211_IFTYPE_AP:
        case NL80211_IFTYPE_AP_VLAN:
        case NL80211_IFTYPE_P2P_GO:
+       case NL80211_IFTYPE_MESH_POINT:
                break;
        case NL80211_IFTYPE_ADHOC:
                if (!wdev->current_bss)