Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1173146rwd; Tue, 13 Jun 2023 06:00:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7xo0Z2fb/d0JPSLEBbD3nzaXW2qMjai410/Hq6hCUPK1ArqLLZhFK+nK9KgrSQzL74Y2+q X-Received: by 2002:a17:906:fe02:b0:965:fb87:4215 with SMTP id wy2-20020a170906fe0200b00965fb874215mr13027103ejb.15.1686661257313; Tue, 13 Jun 2023 06:00:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686661257; cv=none; d=google.com; s=arc-20160816; b=eySr8Er+hrOB0qtHASe40NdcIIqzOSkrAnmZCAY/U9DE1/gKkvak8/vPLeg+5fiWQv HDE0t8Q828rAlg04i/1DUULOibwvjozAk/XSxAyl6+WCmoV0gr78VSAmgUOlw0xSTgF9 GtF3cIkqOSAHagMYpQ2enTiiGM+z262HDvNNCtImhn+x/t/PoZSzkQ+pyK/xBWtGgPv8 dFoGx03fHsBaXpaypVkUlcj69iSX6QMWSk1i2dHJ5VyYGYlfvwPYbJSjYmtfxnHP7UM8 DqY5GAjPE+QB8BUYjiCrIemGpUqewqGTDq/R/STcOKKs+1L07nqdSf7uY8Gg4OyIUrgT IQGQ== 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=PYDbh8t/GxvunJagPHnzYWzVA0Zjyej8vJ4v/sCCsH8=; b=fXyq7Br68TQ2vUT5BAHYhzUJpfnf32ZMLmMSS6vjNHXlxRqgzlakNPK0hmpMWgnix2 rZO1xZKzY99ZkCWdc/YR7ecr84kW6Af037CaarQXckAIlGDOhFbm2eQILvaCkC0vSKwr cRtU17pspGZphnWiyGStqKd56VzuwhYrZrJyruZ2hyr+pZfY3UBwl/iQpUP6ChjTHfYB qZkZ5o5A6ESvdT/gTAxhHWU3BA+RppQN3VE0G8nOnTvSoyyI6oSDgM4AGjjsISfcHJCz a+HarnI2QRixSdCxuTBVjE+vNd78ZQcDURxHfmaf2X2ckca3z5Yh8vK6z2Fe4aWDbYwX h+4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lIkuoMSp; 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 f13-20020a170906560d00b0096a919994desi6661758ejq.731.2023.06.13.06.00.02; Tue, 13 Jun 2023 06:00:57 -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=lIkuoMSp; 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 S242310AbjFMM5v (ORCPT + 61 others); Tue, 13 Jun 2023 08:57:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241164AbjFMM5s (ORCPT ); Tue, 13 Jun 2023 08:57:48 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E16A6198D for ; Tue, 13 Jun 2023 05:57:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686661066; x=1718197066; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sgRwDGsyj9LsTitWBWTUPxY4xsbZ+/HeOIW/vkoMmhM=; b=lIkuoMSp0KpQToum1vIxV+TOfQDVgfZtTZH1x/vG8fIqVS2T2Wg8yBzM NtCrRfn/9KmTRwUfmfGwFMPJ/Xan+KIZsy1HYXs/V/biLProsDZ3Y9gYb 0C5/1YBmCcftZsTtqyskYhrkvnBw14FWnHMHcQyT7brTvcTv+qwqNIEbx czg44lfjIy385fMjJB+EKt+YkFd+snW8qVJRg5OKAJVvEs7LIe2ol2PA0 ADt8/qpVQzv+KkMZNlQXMC8hnEjwYGoDb49G76qrRRN1EGTUrrudksA52 a/mOs2Y0x3xKVoz5JRKZnyZz5SuHUetvpsjQqC2csW6vhsjNHi/CrQB4o Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="347973719" X-IronPort-AV: E=Sophos;i="6.00,239,1681196400"; d="scan'208";a="347973719" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2023 05:57:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="835880782" X-IronPort-AV: E=Sophos;i="6.00,239,1681196400"; d="scan'208";a="835880782" Received: from slerer-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.249.90.17]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2023 05:57:45 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Mukesh Sisodiya , Gregory Greenman Subject: [PATCH 03/14] wifi: iwlwifi: mvm: initialize the rx_vec before using it. Date: Tue, 13 Jun 2023 15:57:16 +0300 Message-Id: <20230613155501.a6bb856f04bc.I9a15075f3dad61dcabdcd1ed0d34cf3e8ec5453f@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230613125727.300445-1-gregory.greenman@intel.com> References: <20230613125727.300445-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,URIBL_BLOCKED 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: Mukesh Sisodiya Initialize the phy_data.rx_vec for both version-3 and above where it is 4-byte data size and below version which has data size of 2-byte. The data will be sent uninitialized in called function if notification version is less than three. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 70db4fef6290..9d8d9def9391 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -2642,6 +2642,8 @@ void iwl_mvm_rx_monitor_no_data(struct iwl_mvm *mvm, struct napi_struct *napi, phy_data.energy_b = u32_get_bits(rssi, RX_NO_DATA_CHAIN_B_MSK); phy_data.channel = u32_get_bits(rssi, RX_NO_DATA_CHANNEL_MSK); phy_data.with_data = false; + phy_data.rx_vec[0] = desc->rx_vec[0]; + phy_data.rx_vec[1] = desc->rx_vec[1]; if (iwl_fw_lookup_notif_ver(mvm->fw, DATA_PATH_GROUP, RX_NO_DATA_NOTIF, 0) < 2) { @@ -2660,7 +2662,8 @@ void iwl_mvm_rx_monitor_no_data(struct iwl_mvm *mvm, struct napi_struct *napi, sizeof(struct iwl_rx_no_data_ver_3))) /* invalid len for ver 3 */ return; - memcpy(phy_data.rx_vec, desc->rx_vec, sizeof(phy_data.rx_vec)); + phy_data.rx_vec[2] = desc->rx_vec[2]; + phy_data.rx_vec[3] = desc->rx_vec[3]; } else { if (format == RATE_MCS_EHT_MSK) /* no support for EHT before version 3 API */ -- 2.38.1