Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1343376lqt; Wed, 20 Mar 2024 00:14:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXGEEUkR3bZ1lxTK5ZbrP8xSyqph6tuuxFi1w98Utjs/f+UAIUjLT0bCXsM8SGDjUOE7KDgdeC4aP33r8Nlqocgcj/PjNi1tveiTLMEAw== X-Google-Smtp-Source: AGHT+IEYQBI46FwG9AjkHv7a/De6zQvoBfJ0rcnLtys423reZEqoKgnLqdcQH/u78pGP+n+XWbVE X-Received: by 2002:a17:906:6a24:b0:a46:97dc:748e with SMTP id qw36-20020a1709066a2400b00a4697dc748emr10947293ejc.8.1710918894988; Wed, 20 Mar 2024 00:14:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710918894; cv=pass; d=google.com; s=arc-20160816; b=uYBqBavX+lAVRD5qxW5hu3cLlcAU7jySZ1h8NIojwQ3QLk1nt//3OsIvVHCVdxi6l2 tVYxy6ov7tdNkEd810DtNQI6qfcsU/51ezh474wLJH2yzP+9npKiANtoypa7b8F64+vm oAHqZKh98ZptFzpDpC4T0cglyvB//PhgrAnZ2OUADtc1riTy5A+J+zPti73ZixcVY9hJ hGg7ce2atCS8t9EQ7a8iHvCfcD19Ap4xzIhDPrYe4ETsh3dUOAEu6fwnJdqMF261tcnZ q0MbYgLnkgKcuDwOE0rbgro43jJ5zy7M5BE0+6L2/5EngbKuw012l77Wo/S/LIquAkur C8Uw== 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=TQxv0SDYVVyrOb1DAUjcRz16ve5k5oSLFCEWLRuhZFA=; fh=UPgW9W1vgyiJJH5q+a8bMiXyvSi0UC29HJOyf5wnziE=; b=kJ/FZBh1iIhqrm65/THB+egFe1Yk9mNV1Xko5j3I8i+4ADYeQ/B+u/rR9RLK8vPeBk w3k+WoQdQEJMrB3hzrFu5EuaabT+kE34iR9E5+5BmSEgbU7GgPIX9/wQwZDN37qizQlZ hb7qBkxvKo2SKvgl+O4HuVsR4Ohv25xwZJJchtlvrnbwe6PsdSHs6dMLO+DhAHrTEgJg ysrqQynMURMkBzF8HLjpW3QsJY8Kb6e1ZT9qLzVe/xqSnDvvJY21wwXXrwEIf8/HZHpl v7WS37zf5IPiC3wS2BiSJDPlY1VudXEZvoYFhJWZd+Q+GzfPY8uw25367JAqdFF1da0L 2mLA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O5SWzW6D; 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-4947-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4947-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k7-20020a17090627c700b00a3ef81bc5d7si6143164ejc.770.2024.03.20.00.14.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 00:14:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4947-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O5SWzW6D; 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-4947-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4947-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B56C51F23AB4 for ; Wed, 20 Mar 2024 07:14:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 39F972E40E; Wed, 20 Mar 2024 07:14:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="O5SWzW6D" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 935322CCD5 for ; Wed, 20 Mar 2024 07:14:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710918867; cv=none; b=b8EQ+2zclWwL5jCYsg45cYZ3J9ZqWg11HnXyHzwaLs/f/6IZ4AwZd2O+n0QVb3qtqtvQTaeBpNLa0Tm9Xi8CLLVbtkG0eUSIAiozZ8/Q+f+jJCRVq7EOCJqO7sV3HbnzrGx2S3I1F24pjMM0dUjxMfHpxVcLkXwa1UaEQcODEZM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710918867; c=relaxed/simple; bh=Oh/FWv3K/mVgkzq25lWsBxzlu55oL0B6MzEZgLlekqc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uP3iLGByLoCuL/DgZr3myMrUw4o950nANLYKDDMIalzzxOsP9L7Mp6aY0AdblFwyD+DG3ZfcAWtXUQs0wZkXF1NPrlXb0lXm6HBdvrefP1Ht2yC3l5RRjyyHAgNNAJCi5P/fDjt2DBjqI3/gJQFoXGnWi3LWMzbZMcxdgB3GrHA= 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=O5SWzW6D; arc=none smtp.client-ip=198.175.65.21 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=1710918866; x=1742454866; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Oh/FWv3K/mVgkzq25lWsBxzlu55oL0B6MzEZgLlekqc=; b=O5SWzW6DcQU6b/IHuPy2mM7r9cqTNzhqi+dQuxoTmjFQrfgR1w3XcZRB byVPLtSS9fN0ODD3z3wd0mv/t3yFd1evfV7TYgs9m/fp7sS2ff83qk+m2 VV1eX0m1EhRG7awQIR7FJn0WSSdxfZ4nZU0T9XC593O5w251hYG2weGWI 6BDKxQwwZnWgbaK4RrAM560nJRvMb/XHNSzDvUpjfe7f3MhQeCXhK5Rxt k2YiJFQTGwKCslJksq/CmrQoUm+OV1aEin8K5G0SJGgDCjv1hj6BDuPFO 9kyMwKFBREAQV34enK+sjHtGFyEBi8hxlZNc3nJUVufZfooVSnZMNbcdm g==; X-IronPort-AV: E=McAfee;i="6600,9927,11018"; a="5763841" X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="5763841" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 00:14:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="14477410" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 00:14:24 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ayala Beker , Johannes Berg Subject: [PATCH 5/8] wifi: mac80211: don't select link ID if not provided in scan request Date: Wed, 20 Mar 2024 09:14:02 +0200 Message-Id: <20240320091155.a6b643a15755.Ic28ed9a611432387b7f85e9ca9a97a4ce34a6e0f@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320071405.815427-1-miriam.rachel.korenblit@intel.com> References: <20240320071405.815427-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: Ayala Beker If scan request doesn't include a link ID to be used for TSF reporting, don't select it as it might become inactive before scan is actually started by the driver. Instead, let the driver select one of the active links. Fixes: cbde0b49f276 ("wifi: mac80211: Extend support for scanning while MLO connected") Signed-off-by: Ayala Beker Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- net/mac80211/scan.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 0429e59ba387..977f8eb0a67b 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -707,19 +707,11 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, return -EBUSY; /* For an MLO connection, if a link ID was specified, validate that it - * is indeed active. If no link ID was specified, select one of the - * active links. + * is indeed active. */ - if (ieee80211_vif_is_mld(&sdata->vif)) { - if (req->tsf_report_link_id >= 0) { - if (!(sdata->vif.active_links & - BIT(req->tsf_report_link_id))) - return -EINVAL; - } else { - req->tsf_report_link_id = - __ffs(sdata->vif.active_links); - } - } + if (ieee80211_vif_is_mld(&sdata->vif) && req->tsf_report_link_id >= 0 && + !(sdata->vif.active_links & BIT(req->tsf_report_link_id))) + return -EINVAL; if (!__ieee80211_can_leave_ch(sdata)) return -EBUSY; -- 2.34.1