diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-09-29 23:30:51 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-09-29 23:30:51 +0200 |
commit | accc3b4a572bba903a801a393532272727f83f5b (patch) | |
tree | b6677755ec43793d5719246f51e27f0e9d12b6c0 /net/mac80211/mlme.c | |
parent | net: cpmac: Add __init/__exit annotations to module init/exit funcs (diff) | |
parent | Merge tag 'net-6.0-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netd... (diff) | |
download | linux-accc3b4a572bba903a801a393532272727f83f5b.tar.xz linux-accc3b4a572bba903a801a393532272727f83f5b.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 699e409ef45a..d7cf6fa4c491 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -4064,7 +4064,6 @@ static bool ieee80211_assoc_config_link(struct ieee80211_link_data *link, if (!(link->u.mgd.conn_flags & IEEE80211_CONN_DISABLE_HE) && (!elems->he_cap || !elems->he_operation)) { - mutex_unlock(&sdata->local->sta_mtx); sdata_info(sdata, "HE AP is missing HE capability/operation\n"); ret = false; @@ -5635,12 +5634,16 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_link_data *link, mutex_lock(&local->sta_mtx); sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr); - if (WARN_ON(!sta)) + if (WARN_ON(!sta)) { + mutex_unlock(&local->sta_mtx); goto free; + } link_sta = rcu_dereference_protected(sta->link[link->link_id], lockdep_is_held(&local->sta_mtx)); - if (WARN_ON(!link_sta)) + if (WARN_ON(!link_sta)) { + mutex_unlock(&local->sta_mtx); goto free; + } changed |= ieee80211_recalc_twt_req(link, link_sta, elems); |