diff options
author | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2024-05-10 17:06:34 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-05-23 10:50:15 +0200 |
commit | 7c789b91f538b3a31b1512b46873174fd3960fc3 (patch) | |
tree | e7e5b4a2fc06c370b35c56d0e5ad4c832970e5c2 /drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | |
parent | 8a29b006dc39484624f841c1e1c30a64a523bbc8 (diff) | |
download | linux-7c789b91f538b3a31b1512b46873174fd3960fc3.tar.gz linux-7c789b91f538b3a31b1512b46873174fd3960fc3.tar.bz2 linux-7c789b91f538b3a31b1512b46873174fd3960fc3.zip |
wifi: iwlwifi: mvm: define link_sta in the relevant scope
The link_sta pointer is now only used inside this if, so define it inside
its scope.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240510170500.e0a1dd285d9a.Id5ff16fb98af0c5f533aed6b5ec3cc856401e488@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index d78af2928152..8bbef4454399 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -2032,7 +2032,6 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, u32 len; u32 pkt_len = iwl_rx_packet_payload_len(pkt); struct ieee80211_sta *sta = NULL; - struct ieee80211_link_sta *link_sta = NULL; struct sk_buff *skb; u8 crypt_len = 0; u8 sta_id = le32_get_bits(desc->status, IWL_RX_MPDU_STATUS_STA_ID); @@ -2185,6 +2184,8 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, if (desc->status & cpu_to_le32(IWL_RX_MPDU_STATUS_SRC_STA_FOUND)) { if (!WARN_ON_ONCE(sta_id >= mvm->fw->ucode_capa.num_stations)) { + struct ieee80211_link_sta *link_sta; + sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); if (IS_ERR(sta)) sta = NULL; |