diff options
author | Johannes Berg <johannes.berg@intel.com> | 2016-10-04 15:32:16 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-10-12 10:50:36 +0200 |
commit | 850092db5acfd9cd2c9c2e80ca974843c4f1283b (patch) | |
tree | 6c092371beface5633d1b0cabef4a757d30e331e /net/mac80211 | |
parent | Merge tag 'drm-for-v4.9' of git://people.freedesktop.org/~airlied/linux (diff) | |
download | linux-850092db5acfd9cd2c9c2e80ca974843c4f1283b.tar.xz linux-850092db5acfd9cd2c9c2e80ca974843c4f1283b.zip |
mac80211: remove unnecessary mesh check
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>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/cfg.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index fd6541f3ade3..7d0172395589 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -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 |