From patchwork Fri Apr 14 10:11:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Greenman, Gregory" X-Patchwork-Id: 673350 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87C27C77B6E for ; Fri, 14 Apr 2023 10:12:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229949AbjDNKMx (ORCPT ); Fri, 14 Apr 2023 06:12:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230268AbjDNKMp (ORCPT ); Fri, 14 Apr 2023 06:12:45 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36F2FA24D for ; Fri, 14 Apr 2023 03:12:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681467152; x=1713003152; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZJGtKXfayxqz5VXFbJ88KsReJBYaEfsh+05frtg8Y7s=; b=EMmGDvh9Na5fdqB2i3/UzIaa+SdCFrIn9IqVFPiQoi0x2Lua1S8CS1NF 0lX/oU8DuTGxkabYgbUkHJL9f8zBGnwsEePAaYST0c8wKLPSHPtHaCGGp yes6YMTlHN73U4yWEkHHVy/MX5He1V69xd0hhSkRaWYX9F7ShqSmAd2Fa X9KE+jTbT6s9AS+QjA1DhrO3nST/TKUGOjmYFQ6/xJ+KS75u1bYUoJZC1 PFa3Z4FpSVPrA2sqDR6fb0/GDphI5u7YpXlhFVe7ZDTGzn5Rd1iluJj8c acdm9o3beXKuXu0S5EkB6MxKGmCQl1o5jQrDwH8E3Fj1xE7ExysLOaOxc A==; X-IronPort-AV: E=McAfee;i="6600,9927,10679"; a="346263587" X-IronPort-AV: E=Sophos;i="5.99,195,1677571200"; d="scan'208";a="346263587" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2023 03:12:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10679"; a="692351707" X-IronPort-AV: E=Sophos;i="5.99,195,1677571200"; d="scan'208";a="692351707" Received: from yalankry-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.233.156]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2023 03:12:30 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Tom Rix , Nick Desaulniers , Gregory Greenman Subject: [PATCH 06/15] wifi: iwlwifi: mvm: initialize seq variable Date: Fri, 14 Apr 2023 13:11:57 +0300 Message-Id: <20230414130637.6dd372f84f93.If1f708c90e6424a935b4eba3917dfb7582e0dd0a@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230414101206.1170180-1-gregory.greenman@intel.com> References: <20230414101206.1170180-1-gregory.greenman@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Tom Rix 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 Reviewed-by: Nick Desaulniers Signed-off-by: Gregory Greenman --- 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 bf80b1d093a2..798a7a1299e1 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -564,6 +564,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;