Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp309832rwe; Fri, 14 Apr 2023 03:15:04 -0700 (PDT) X-Google-Smtp-Source: AKy350bkd3miZSnCWKbU3IRvW5m98jKJFltdondyjn55WsjHhMaNTCd5dQfELOVMqqLQZT9ttSQu X-Received: by 2002:a05:6a00:1707:b0:633:5c46:5a69 with SMTP id h7-20020a056a00170700b006335c465a69mr8939770pfc.31.1681467304692; Fri, 14 Apr 2023 03:15:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681467304; cv=none; d=google.com; s=arc-20160816; b=GTRc1gYSOFVqFIrXoWyRa623jni8r7V07xhhwHzhig86+uLM99kouTtXYB9n/HZF8r 82kbZu5prFKRZJRJLOMMzx+RXIZzrKB6xi9H+EHaMOLguMRn3DUEgRK0FOfbruEJbbjZ x/OR2Ut9zAuuDisXFvA/S8Ngu9ERrCb8xWNh5P8/54Y/ElWJ72Lkoie4sLfY+G6cZy2U EpNamR8muyzN3IOusqzGXN+wpvmV2KPpzO6iLjoR/RvRYNPTxbGGIZx/MMgSmxArqnAF 1LvSQEg0368f/wsBdMzQS/U2KZKJ9o71vJT+Nm3DAAJEEI/jCQQc9U97BltrU9hKqNcu GezQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ofGCjJSYh3nH6reBGyu4tkcnoesT3kbfVBwCSUJkwt8=; b=m9vB1+Z6vzhN5yRxov4SSt4YfKXR+fBPujpEKB6VDgPcbBYhIp0SpF3zqX0mxShFYk kV5zrBbS/BBlZfZ8CDz56g9HQGlG+iPOE4t6oyNd29i5lqS+lHsHw1eN7E/GyTZgcbGv OpFzyHXMiNoNCDUWKCgy6IFrVeWfw1KD5shrCouP+VHxPSDyaPW/ctWrv00CiB2vwoWD vQFAHB6fukMoXSn/3z0Fsml1qlPEWqpjFM12GC9za07Q7swLZRPw3NeR9L6YH6R8iV1Z bFOmEt9DUTq5w04h/mjdPEfGanfuCQoVSWif42AN+8AIqTRxZs3yn7ZnDCI512k1Dtkv I5ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EMmGDvh9; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m1-20020a625801000000b0062d7d3c6cadsi4004596pfb.333.2023.04.14.03.14.55; Fri, 14 Apr 2023 03:15:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EMmGDvh9; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229949AbjDNKMx (ORCPT + 62 others); 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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; -- 2.38.1