mac80211: remove unnecessary mesh check
authorJohannes Berg <johannes.berg@intel.com>
Tue, 4 Oct 2016 13:32:16 +0000 (15:32 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 12 Oct 2016 08:50:36 +0000 (10:50 +0200)
sta_info_get_bss() is equivalent to sta_info_get() in the
mesh case, since sta->sdata->bss will be NULL (it's only
set for AP/AP_VLAN interfaces.) Thus, the mesh check here
isn't actually needed - remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c

index fd6541f..7d01723 100644 (file)
@@ -357,10 +357,7 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev,
        mutex_lock(&local->sta_mtx);
 
        if (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);
+               sta = sta_info_get_bss(sdata, mac_addr);
                /*
                 * The ASSOC test makes sure the driver is ready to
                 * receive the key. When wpa_supplicant has roamed