[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220401230640.3196196-1-trix@redhat.com>
Date: Fri, 1 Apr 2022 19:06:40 -0400
From: Tom Rix <trix@...hat.com>
To: luciano.coelho@...el.com, kvalo@...nel.org, davem@...emloft.net,
kuba@...nel.org, pabeni@...hat.com, nathan@...nel.org,
ndesaulniers@...gle.com, johannes.berg@...el.com,
emmanuel.grumbach@...el.com, dan.carpenter@...cle.com
Cc: linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
Tom Rix <trix@...hat.com>
Subject: [PATCH] iwlwifi: mvm: initialize seq variable
Clang static analysis reports this issue
d3.c:567:22: warning: The left operand of '>' is
a garbage value
if (seq.tkip.iv32 > cur_rx_iv32)
~~~~~~~~~~~~~ ^
seq is never initialized. Call ieee80211_get_key_rx_seq() to
initialize seq.
Fixes: 0419e5e672d6 ("iwlwifi: mvm: d3: separate TKIP data from key iteration")
Signed-off-by: Tom Rix <trix@...hat.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
index a995bba0ba81..9b190b3ce6c1 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
@@ -563,6 +563,7 @@ static void iwl_mvm_wowlan_get_tkip_data(struct ieee80211_hw *hw,
}
for (i = 0; i < IWL_NUM_RSC; i++) {
+ ieee80211_get_key_rx_seq(key, i, &seq);
/* wrapping isn't allowed, AP must rekey */
if (seq.tkip.iv32 > cur_rx_iv32)
cur_rx_iv32 = seq.tkip.iv32;
--
2.27.0
Powered by blists - more mailing lists