diff options
author | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2023-03-20 13:33:15 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-03-22 15:16:36 +0300 |
commit | 6a8dee1391ff1d4942e8f09b5fb8c1087cd6a6c7 (patch) | |
tree | 09dbb6d64fa26ab39b6020963054a7e9257c2d43 /drivers/net/wireless | |
parent | 77b6a2e5f49bb3a4756a4b82f24221e62fa6ea8c (diff) | |
download | linux-6a8dee1391ff1d4942e8f09b5fb8c1087cd6a6c7.tar.xz |
wifi: iwlwifi: mvm: remove not needed initializations
In iwl_mvm_add_sta() we're initializing the new allocated mvm_sta.
We are setting some fields to zero even though it was allocated with
kzalloc, for the case of HW restart. But in such a case we will never
get to this initializations due to the goto statement that we have in
this case. Remove these initializations.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230320122330.c0b4d1e986a5.I6959bf1aca74c865e3c1edbf711f5fe8fb8c0c9f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index a40182e87f55..c22ba1ea42f6 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c @@ -1702,20 +1702,12 @@ int iwl_mvm_add_sta(struct iwl_mvm *mvm, mvm_sta->max_agg_bufsize = LINK_QUAL_AGG_FRAME_LIMIT_DEF; else mvm_sta->max_agg_bufsize = LINK_QUAL_AGG_FRAME_LIMIT_GEN2_DEF; - mvm_sta->tx_protection = 0; mvm_sta->tt_tx_protection = false; mvm_sta->sta_type = sta->tdls ? IWL_STA_TDLS_LINK : IWL_STA_LINK; - /* HW restart, don't assume the memory has been zeroed */ mvm_sta->tid_disable_agg = 0xffff; /* No aggs at first */ - mvm_sta->tfd_queue_msk = 0; - /* for HW restart - reset everything but the sequence number */ for (i = 0; i <= IWL_MAX_TID_COUNT; i++) { - u16 seq = mvm_sta->tid_data[i].seq_number; - memset(&mvm_sta->tid_data[i], 0, sizeof(mvm_sta->tid_data[i])); - mvm_sta->tid_data[i].seq_number = seq; - /* * Mark all queues for this STA as unallocated and defer TX * frames until the queue is allocated @@ -1732,8 +1724,6 @@ int iwl_mvm_add_sta(struct iwl_mvm *mvm, atomic_set(&mvmtxq->tx_request, 0); } - mvm_sta->agg_tids = 0; - if (iwl_mvm_has_new_rx_api(mvm) && !test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) { int q; |