Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp716403lqt; Tue, 19 Mar 2024 01:13:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWHRyr403CzVd9cJxV9jp1puHCiFdlcseROBG4MKpp5SrOTwTcdzCkndRKyZese9YaojurmFDcmgfq8GmYSKtS3RVWpOHalZebxArD+gA== X-Google-Smtp-Source: AGHT+IE8YedKr2oOl2CyQMh68AWmTQwZj3sBKao/hfAHGLurmsGp0ARXOKO/1nNCzARTV5EmGbI5 X-Received: by 2002:a05:6808:3090:b0:3c3:85e4:49b3 with SMTP id bl16-20020a056808309000b003c385e449b3mr2438709oib.23.1710835990709; Tue, 19 Mar 2024 01:13:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710835990; cv=pass; d=google.com; s=arc-20160816; b=iAPerf190oeGM+hQ25mdiUBpVS4NtuynRq/tdcBrPykj3FvBc1BS95FOADbTJD47aP Q6jJLAjn8bdO9AAugsNgsGykBGNU3AQO+XBMFA1hfU4+kObM65+dcwHNnTEKuJr84xP0 pLNq7h6JBDCfOQXENRLs1Wl9apk6g2t8hC/PTjhBwFOYPEV77Rgy+mg/PmN26nWz+i36 75WWJShRMeyYaqtXZ0iH4va7MW2RqHYAg7jnk0qt0dEh5gugmsjSOMatBL8kTrwbVRwu 4ja3/tNy8USF/tQCeyDua5DfnWZa8grMZFE5FZuuuSKugaywC55LsN2osaPNZsZD5cvU /1Nw== 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=5j/h2IOTYsKO3GwEtdbCkDLTr9nVx8O9qnynHmW+ckI=; fh=g+3Y9uv4pDRPkMKV6d1r8xi8IY9qiW75WcU571FAbLY=; b=GSNHXdl7TW3CtBlO3dmt6uFypnc15mpE0DG21wc2wFWNDwSh4r/MJ0qQvv5c+WNfJl ObrCiZyRuRZqsvronZk+GlfBF33ELB6YrbyyMxKJAANc+b1nHVNQIEQbS2msD53igzfk vnpWD/aB+TMsgOy3CKkUz8C32hMYsOOGfCbNTlO28nCYUxh5+BLfgaAy1KVqQ2hpTRwB Qb0wsfM1Dkyj0kGGYLLSCV8n6mhrfxFKhVDJxAJMjsQkrR5m1vSBMEcyYjy9uRUVs2pk Vv4++KFJOaaMg+IEAuWX7sNkE9/QtGveTujtxFVUJO2hmhBC3aLtSggSHTjInwtvspQj +CzA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VU80H4Au; 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-4893-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4893-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. [139.178.88.99]) by mx.google.com with ESMTPS id i32-20020a635860000000b005e4fb2e4c47si9669438pgm.632.2024.03.19.01.13.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 01:13:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4893-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VU80H4Au; 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-4893-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4893-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 5C29E2819DD for ; Tue, 19 Mar 2024 08:13:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F2A87D3E7; Tue, 19 Mar 2024 08:11:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="VU80H4Au" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (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 2D7357D3E8 for ; Tue, 19 Mar 2024 08:11:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710835872; cv=none; b=VlL8VBiC35kGrWb8dmbCrRm9OgYmjkN5/3l8hsrkKpaYD/XeVlwpSiDpbpdexxMCNO5nt5Ol5OilRzcTWwyD9lny+8z4DIIzmdl78I8ITKrCyyNyfVUdQrfJo56j3KdSlD1WmA2GXBecNbtuzzZ5ESp2XuTaMi4NOKja9UzObWw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710835872; c=relaxed/simple; bh=ORTiShJuuaJljKFtBLTlhvIA30c1rhrqn+dVYOyIzaQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EBjY6T5mY/qg06318Xe7gfT0rtaib5ihIpYYEPnYkOvZZHzgllYt5FYWYcf+ZIDXgQDeog61XpMYyS+QC9ZYAbnhdmGFhfrQUc/6DPr1JCsWuo7ExgWw4ZLWc7RTUoqTOBLx8jYSNz06rPnwm7nLFN02Tw86RhHFJ8jRc1FrzrM= 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=VU80H4Au; arc=none smtp.client-ip=198.175.65.17 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=1710835870; x=1742371870; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ORTiShJuuaJljKFtBLTlhvIA30c1rhrqn+dVYOyIzaQ=; b=VU80H4Aus8cYHFgyyDtfp0vRVBgLeSz0NYaYfxmu0V26V7bcYDCM6q9J aDTNgdw/DI/P5UlAkVTrl0phzSpB4zJkfS77FLoGm/Jhgk35JMMlmAdKp hNL5//rQlHOWUdePCaQGxyaKB/nHFZj8Ih7nEMlNxsDxUG8EuQLS/CMIb oSNMIhlehpaSmPxXpLF+RhxC/BEcfkTJfrsrx9P4QYDdYmjMFAaLjLEH/ Kby0UfvIIArur7D+g8sj804bgE0ZgF2cqbzHvpBFl4oNhEzl/owKyq1x9 43RVU0dKuzgyt+sKTSRNvWQ0wdBzM5FDPBtcOf76F03501ZZ3aaPoLuhM g==; X-IronPort-AV: E=McAfee;i="6600,9927,11017"; a="5810582" X-IronPort-AV: E=Sophos;i="6.07,136,1708416000"; d="scan'208";a="5810582" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2024 01:11:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,136,1708416000"; d="scan'208";a="18447663" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2024 01:11:09 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer Subject: [PATCH 13/15] wifi: iwlwifi: mvm: Do not warn on invalid link on scan complete Date: Tue, 19 Mar 2024 10:10:25 +0200 Message-Id: <20240319100755.619d3574a757.I0523e92547f0288c8b0119b1fdc5e967a5a8956e@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240319081027.3853611-1-miriam.rachel.korenblit@intel.com> References: <20240319081027.3853611-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 From: Ilan Peer As it is possible that by the time the scan is completed the link was already removed. Fixes: 3a5a5cb06700 ("wifi: iwlwifi: mvm: Correctly report TSF data in scan complete") Signed-off-by: Ilan Peer Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c index 459adba41ca6..fc6b4f699cb6 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c @@ -3207,8 +3207,13 @@ void iwl_mvm_rx_umac_scan_complete_notif(struct iwl_mvm *mvm, struct iwl_mvm_vif_link_info *link_info = scan_vif->link[mvm->scan_link_id]; - if (!WARN_ON(!link_info)) + /* It is possible that by the time the scan is complete the link + * was already removed and is not valid. + */ + if (link_info) memcpy(info.tsf_bssid, link_info->bssid, ETH_ALEN); + else + IWL_DEBUG_SCAN(mvm, "Scan link is no longer valid\n"); ieee80211_scan_completed(mvm->hw, &info); mvm->scan_vif = NULL; -- 2.34.1