diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-03-29 09:05:27 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-03-30 12:08:41 +0200 |
commit | 0d504ca1f19b1a150fa17e59c38e1fb42a585b4f (patch) | |
tree | 574692537abb7fe65c5af6a58d9ab0afd5744568 /drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | |
parent | wifi: iwlwifi: mvm: remove chanctx WARN_ON (diff) | |
download | linux-0d504ca1f19b1a150fa17e59c38e1fb42a585b4f.tar.xz linux-0d504ca1f19b1a150fa17e59c38e1fb42a585b4f.zip |
wifi: iwlwifi: mvm: use the new lockdep-checking macros
Use the new macros from mac80211 that do lockdep checking
on the RCU dereferences, instead of hard-coding 1 as the
argument to rcu_dereference_protected().
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230329100039.112df5c8dec2.I1a1008f5566e509953d988f254d15c9e58630418@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index a713b8a10781..34b85a9a27af 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -499,7 +499,7 @@ static int iwl_mvm_mld_alloc_sta_link(struct iwl_mvm *mvm, unsigned int link_id) { struct ieee80211_link_sta *link_sta = - rcu_dereference_protected(sta->link[link_id], 1); + link_sta_dereference_protected(sta, link_id); struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); struct iwl_mvm_link_sta *link; u32 sta_id = iwl_mvm_find_free_sta_id(mvm, @@ -654,7 +654,7 @@ int iwl_mvm_mld_add_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, for_each_sta_active_link(vif, sta, link_sta, link_id) { struct ieee80211_bss_conf *link_conf = - rcu_dereference_protected(vif->link_conf[link_id], 1); + link_conf_dereference_protected(vif, link_id); struct iwl_mvm_link_sta *mvm_link_sta = rcu_dereference_protected(mvm_sta->link[link_id], lockdep_is_held(&mvm->mutex)); @@ -704,7 +704,7 @@ int iwl_mvm_mld_update_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, for_each_sta_active_link(vif, sta, link_sta, link_id) { struct ieee80211_bss_conf *link_conf = - rcu_dereference_protected(vif->link_conf[link_id], 1); + link_conf_dereference_protected(vif, link_id); struct iwl_mvm_link_sta *mvm_link_sta = rcu_dereference_protected(mvm_sta->link[link_id], lockdep_is_held(&mvm->mutex)); @@ -983,9 +983,9 @@ int iwl_mvm_mld_update_sta_links(struct iwl_mvm *mvm, for_each_set_bit(link_id, &links_to_add, IEEE80211_MLD_MAX_NUM_LINKS) { struct ieee80211_bss_conf *link_conf = - rcu_dereference_protected(vif->link_conf[link_id], 1); + link_conf_dereference_protected(vif, link_id); struct ieee80211_link_sta *link_sta = - rcu_dereference_protected(sta->link[link_id], 1); + link_sta_dereference_protected(sta, link_id); mvm_vif_link = mvm_vif->link[link_id]; if (WARN_ON(!mvm_vif_link || !link_conf || !link_sta || |