mac80211.c (fb40cd9d914c8a1b4acc56edaa96046c5f4f1669) mac80211.c (0c9a8f9084be45525d445bf9e55ccbb152a16e1f)
1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2/*
3 * Copyright (C) 2012-2014, 2018-2022 Intel Corporation
4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5 * Copyright (C) 2016-2017 Intel Deutschland GmbH
6 */
7#include <linux/kernel.h>
8#include <linux/slab.h>

--- 3655 unchanged lines hidden (view full) ---

3664}
3665
3666static int
3667iwl_mvm_sta_state_notexist_to_none(struct iwl_mvm *mvm,
3668 struct ieee80211_vif *vif,
3669 struct ieee80211_sta *sta,
3670 struct iwl_mvm_sta_state_ops *callbacks)
3671{
1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2/*
3 * Copyright (C) 2012-2014, 2018-2022 Intel Corporation
4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5 * Copyright (C) 2016-2017 Intel Deutschland GmbH
6 */
7#include <linux/kernel.h>
8#include <linux/slab.h>

--- 3655 unchanged lines hidden (view full) ---

3664}
3665
3666static int
3667iwl_mvm_sta_state_notexist_to_none(struct iwl_mvm *mvm,
3668 struct ieee80211_vif *vif,
3669 struct ieee80211_sta *sta,
3670 struct iwl_mvm_sta_state_ops *callbacks)
3671{
3672 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
3672 unsigned int i;
3673 int ret;
3674
3675 lockdep_assert_held(&mvm->mutex);
3676
3677 if (vif->type == NL80211_IFTYPE_STATION &&
3678 !iwl_mvm_vif_conf_from_sta(mvm, vif, sta))
3679 return -EINVAL;

--- 19 unchanged lines hidden (view full) ---

3699 link_sta = link_sta_dereference_protected(sta, i);
3700 if (!link_sta)
3701 continue;
3702
3703 link_sta->agg.max_rc_amsdu_len = 1;
3704 }
3705 ieee80211_sta_recalc_aggregates(sta);
3706
3673 unsigned int i;
3674 int ret;
3675
3676 lockdep_assert_held(&mvm->mutex);
3677
3678 if (vif->type == NL80211_IFTYPE_STATION &&
3679 !iwl_mvm_vif_conf_from_sta(mvm, vif, sta))
3680 return -EINVAL;

--- 19 unchanged lines hidden (view full) ---

3700 link_sta = link_sta_dereference_protected(sta, i);
3701 if (!link_sta)
3702 continue;
3703
3704 link_sta->agg.max_rc_amsdu_len = 1;
3705 }
3706 ieee80211_sta_recalc_aggregates(sta);
3707
3708 if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls)
3709 mvmvif->ap_sta = sta;
3710
3707 return 0;
3708}
3709
3710static int
3711iwl_mvm_sta_state_auth_to_assoc(struct ieee80211_hw *hw,
3712 struct iwl_mvm *mvm,
3713 struct ieee80211_vif *vif,
3714 struct ieee80211_sta *sta,

--- 211 unchanged lines hidden (view full) ---

3926 } else if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls)
3927 iwl_mvm_stop_session_protection(mvm, vif);
3928 ret = 0;
3929 } else if (old_state == IEEE80211_STA_AUTH &&
3930 new_state == IEEE80211_STA_NONE) {
3931 ret = 0;
3932 } else if (old_state == IEEE80211_STA_NONE &&
3933 new_state == IEEE80211_STA_NOTEXIST) {
3711 return 0;
3712}
3713
3714static int
3715iwl_mvm_sta_state_auth_to_assoc(struct ieee80211_hw *hw,
3716 struct iwl_mvm *mvm,
3717 struct ieee80211_vif *vif,
3718 struct ieee80211_sta *sta,

--- 211 unchanged lines hidden (view full) ---

3930 } else if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls)
3931 iwl_mvm_stop_session_protection(mvm, vif);
3932 ret = 0;
3933 } else if (old_state == IEEE80211_STA_AUTH &&
3934 new_state == IEEE80211_STA_NONE) {
3935 ret = 0;
3936 } else if (old_state == IEEE80211_STA_NONE &&
3937 new_state == IEEE80211_STA_NOTEXIST) {
3934 if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls)
3938 if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) {
3935 iwl_mvm_stop_session_protection(mvm, vif);
3939 iwl_mvm_stop_session_protection(mvm, vif);
3940 mvmvif->ap_sta = NULL;
3941 }
3936 ret = callbacks->rm_sta(mvm, vif, sta);
3937 if (sta->tdls) {
3938 iwl_mvm_recalc_tdls_state(mvm, vif, false);
3939 iwl_mvm_tdls_check_trigger(mvm, vif, sta->addr,
3940 NL80211_TDLS_DISABLE_LINK);
3941 }
3942
3943 if (unlikely(ret &&

--- 2322 unchanged lines hidden ---
3942 ret = callbacks->rm_sta(mvm, vif, sta);
3943 if (sta->tdls) {
3944 iwl_mvm_recalc_tdls_state(mvm, vif, false);
3945 iwl_mvm_tdls_check_trigger(mvm, vif, sta->addr,
3946 NL80211_TDLS_DISABLE_LINK);
3947 }
3948
3949 if (unlikely(ret &&

--- 2322 unchanged lines hidden ---