diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-06-24 20:25:52 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-06-24 20:25:52 +0300 |
commit | b9271f0c65e12efd9b6319f57a378aac1be98b22 (patch) | |
tree | 923cd44cd4e1568d3abf2b8d69b4a4712e01f8ef /net/mac80211/tdls.c | |
parent | a3664a74a0aa0b11d8d4ade04984965b77d14d44 (diff) | |
parent | 4b972a01a7da614b4796475f933094751a295a2f (diff) | |
download | linux-b9271f0c65e12efd9b6319f57a378aac1be98b22.tar.xz |
Merge tag 'v5.2-rc6' into perf/core, to refresh branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/mac80211/tdls.c')
-rw-r--r-- | net/mac80211/tdls.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c index ca97e1598c28..fca1f5477396 100644 --- a/net/mac80211/tdls.c +++ b/net/mac80211/tdls.c @@ -1993,3 +1993,26 @@ void ieee80211_tdls_chsw_work(struct work_struct *wk) } rtnl_unlock(); } + +void ieee80211_tdls_handle_disconnect(struct ieee80211_sub_if_data *sdata, + const u8 *peer, u16 reason) +{ + struct ieee80211_sta *sta; + + rcu_read_lock(); + sta = ieee80211_find_sta(&sdata->vif, peer); + if (!sta || !sta->tdls) { + rcu_read_unlock(); + return; + } + rcu_read_unlock(); + + tdls_dbg(sdata, "disconnected from TDLS peer %pM (Reason: %u=%s)\n", + peer, reason, + ieee80211_get_reason_code_string(reason)); + + ieee80211_tdls_oper_request(&sdata->vif, peer, + NL80211_TDLS_TEARDOWN, + WLAN_REASON_TDLS_TEARDOWN_UNREACHABLE, + GFP_ATOMIC); +} |