Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp525186lqo; Fri, 10 May 2024 07:09:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW7wqTasmANOP7srUguoT79ouJiU8qmSmEy3RRFjEuRoKJxTRvDx/cDcEdeAsdGonU5GaCSb3aolauWhvtaoH+qk0ZePpsYpR15F4XAbQ== X-Google-Smtp-Source: AGHT+IExlyI1Y92iJeqJxb6JnTpHL5cQ+bmd5mI3IYrgZ6g0SPoZTsbHBrRgsm/dY+Yy4jHHmxt1 X-Received: by 2002:a05:6a20:da97:b0:1a3:c3a9:53b7 with SMTP id adf61e73a8af0-1afde1d7beamr3409262637.55.1715350145759; Fri, 10 May 2024 07:09:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715350145; cv=pass; d=google.com; s=arc-20160816; b=dFtToNj6g8sFT6WSWgBYB2NaHfHRAevP8GMPLhOI4c/FSuE3C8gKsoA92cuy2bR+zw 7G6MuH2hfwayRoGkt+jK5SEJaFyobD7KYkcIxre9kd9AqUnGWobxL//EBIX+HIsKhVdm /lSqeYeuIBFsBDdDgm9vixEvPcyeTyE2MRz0U5+bTeYHhalZjP/iZ/POorWr8u9UVlye OkD1oTNb5cSdup9/sOeA1nPd/+eysJCEqAGwEUXR8iQv9aJ39EYU4RZTiRBfQN8xLXyq lN3VhbSGukJFtclB5Ahu8UaiSHOzv1Zw8cyjt9wepnvqQFA5HqTmOLGS3a5OpXYkAsDC BewA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=IzynfUnQs7G2GD2cbin3mknTrKjs87cN6DwKMKh+1tA=; fh=XwhrcOa2XvQCrpFgIB6LfmqW6XC6AohXSgvbFj2WExc=; b=WxwrsIeiJZGIUH32G5HqsVHW4p5Lpk0Zl1okkfCV8nAfN4TNw26Lpwygxx4Mfkvv8F 2cn7xAT2qYBn8I3Te9xrh/XGWPZ7bWycAYBvO51pIlLDMj66GI8chXraSD+mGlXfqAaU 5E/QB4ZCbTxZmSFCqmPb6pz85ALoR/Aqhizu8u5nOg3JPf+yR/Wkoj++5erUWkLkgi+o 5AUdnAYVSv2OM8iUwSNM/0X54V+fNh4vP9/+DtqqMiqBEKobj8rLYtuOoYFtJAWaRk6V R8QJqltC2LL2Kwfdn+2arY+FS1R50ASnD6yLEx3Tq48or+b41H9UQ/i308H8ZxviUKuU 1gnA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LAOgZ6mD; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-7467-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7467-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-634103f732fsi3514893a12.355.2024.05.10.07.09.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 07:09:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7467-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LAOgZ6mD; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-7467-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7467-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E055C286442 for ; Fri, 10 May 2024 14:08:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E2D6C17165F; Fri, 10 May 2024 14:07:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LAOgZ6mD" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59AF5171660 for ; Fri, 10 May 2024 14:07:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350026; cv=none; b=bRgX7MXNvMqQk0Zgsie9UcXBPFdHoqCSvY9HVc4yqoqo/yuRzdlF2RBiT6ESJBv8nwwFJh+8tUF9HqzzpONei80NG7SHHVRO+AYLN5cBwzBAceFo6RH734kiA5uoK7tGWzR5L8t6R6IYUiimE9pk9qo07gCk/eHqOgU0As81nck= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350026; c=relaxed/simple; bh=kRd0jDwrY/AVet4fGeuDlJWbZIOPkSzf5UiSS2tYpOg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q2uMMpLy0xFDKItVbSh8UGShkOQiod/RsTyP8Etz6NKzPDQulzRLRu3z/GZe/VugbPsV88Jt/QHfGlcLdId8AuBrXAUuT+7ycJhg21gtQ/ILlarf+WUFeGK5GHM9DStQb5agAtPHFoKDODAg4+v8oRxTftuXPFR+mSv1iQrOLlA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=LAOgZ6mD; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350025; x=1746886025; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kRd0jDwrY/AVet4fGeuDlJWbZIOPkSzf5UiSS2tYpOg=; b=LAOgZ6mDdbt3c9FEv+ghDcgwv3TA4P3xzWnh8EzoqLYeub3RKVkzVYZw Kh2ThXQZ37wkF+ExMJ1+TEIFVqcVVW0KCgk0CKivjCYKpdZL86UVou7C0 w6c5DO80xQNCKH8hBJfZir9q4xOzY/NdKVnWI07EQPPZIJfHmKyCfo2QE +fVS3+SE8KRnpuWHnNh2GWxKa8CRQYH9AGS64vkrxtbBacVRBD1RDH7sZ Stwfx9++TYULxZKvPsgIy2RDWqdWz/+KHV1IcxBIarDtOmpeFWeefAtBv 1YipMwmZDpfxwibLMoN5+Zl3l/nqfgdFrJYOAruqDeMmmBONKR0urRdAo A==; X-CSE-ConnectionGUID: hMUMQRhBRWWqJ8lPLvpQ+Q== X-CSE-MsgGUID: hxwyQjQcTQOltDjbuGLUNg== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125568" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125568" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:05 -0700 X-CSE-ConnectionGUID: gRKoLEyRT7KIatrNyOUSjg== X-CSE-MsgGUID: 2owrbChbTBeB9MrrDgrG5g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101866" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:04 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 07/14] wifi: iwlwifi: mvm: define link_sta in the relevant scope Date: Fri, 10 May 2024 17:06:34 +0300 Message-Id: <20240510170500.e0a1dd285d9a.Id5ff16fb98af0c5f533aed6b5ec3cc856401e488@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited Content-Transfer-Encoding: 8bit the link_sta pointer is now only used inside this if, so define it inside its scope. Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index d78af2928152..8bbef4454399 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -2032,7 +2032,6 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, u32 len; u32 pkt_len = iwl_rx_packet_payload_len(pkt); struct ieee80211_sta *sta = NULL; - struct ieee80211_link_sta *link_sta = NULL; struct sk_buff *skb; u8 crypt_len = 0; u8 sta_id = le32_get_bits(desc->status, IWL_RX_MPDU_STATUS_STA_ID); @@ -2185,6 +2184,8 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, if (desc->status & cpu_to_le32(IWL_RX_MPDU_STATUS_SRC_STA_FOUND)) { if (!WARN_ON_ONCE(sta_id >= mvm->fw->ucode_capa.num_stations)) { + struct ieee80211_link_sta *link_sta; + sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); if (IS_ERR(sta)) sta = NULL; -- 2.34.1