Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1343405lqt; Wed, 20 Mar 2024 00:14:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXiTnE5volARfXpaYZF1WmYzc8A+cxWupb0j5JeonVJERV3jMv4R+VpYvxdZCBBHTSnifppZQO6gE8ELuhme4IWHaRkBh2INqfjWkvf/w== X-Google-Smtp-Source: AGHT+IEN6DXekVUZDNe8Lft/dETeEQqBX61cu1rHAGhorNRolbzA8aWg3kvQjJI6D3toEu2kdNZp X-Received: by 2002:a17:906:24d9:b0:a46:fb2d:3980 with SMTP id f25-20020a17090624d900b00a46fb2d3980mr310661ejb.19.1710918898843; Wed, 20 Mar 2024 00:14:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710918898; cv=pass; d=google.com; s=arc-20160816; b=lBnw7YgnlYPz+SVtkSQvOCXfoB+8IyxTR41Df9RWUcD/PgRpK/l/NwqoC2a4AlKsgb aqrYjxUdgt5UIBmMneIBUqUH+MK0CiqWFCDNSfcskvYoOQ+zL0g2ibVxxV7YnbiI9/gU 7luI5oFgcdWTWhZo9gYdArLHgRmevpuZiwsgwdaoD15snNqpQiNYOJEtB+Zbi46Y2wcm D626dm5u9CJ9iwYgIlUEF00JJAac/wTwdpZG4ie3UwCnMkKKuiKLQnwygr/P+XDgSjJm J1v1vaLJZSpNJa1yZpEnEJg6aOJP8pl7bGAGGJFKRbSkzvpQgqQyDh0eY+evSRcTdJ/G +ihQ== 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=igtP4pvxy3bZIrZ6Ic1HiTwj7DpP2CvDifTOap1Q30w=; fh=TquNsOiV+zNY1csTpltVB6A9QFW5SbuNs6JlqcKCQkw=; b=x9l6THq1S3496aAZFheHmyu4dVD0x2eIIVwhE4Hi37kuODNk+oL+7Pd8UE81l7RB/q TXqW2w0xBGS3SaD95orJg4/SDHROni+cTVAVP6KPoBOzaW8w9uAoYyPwCrrcD5rsNr8z 42ue0d+iZ67+n5lwwwgYbdfrDUGzvAAF2CGiW1opA43PlznWyQGh8a6dEsUVccTuguUk RPnU+ziFb8JdfR6FNkxghIa/Dryin9YXZRe8TeB/gyQ/vESKqIAtj00zHyuuY1D9180F r/hVjt6E1PeQlf3YRxv4eA6hIkaKi6pgk+scLHIVOaML1gJ/9ngHpFP+gZGxzkRXUlTU leqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YXDaB43E; 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-4948-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4948-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 lf15-20020a170907174f00b00a46675c8585si5841855ejc.591.2024.03.20.00.14.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 00:14:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4948-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=YXDaB43E; 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-4948-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4948-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 91DEF1F22105 for ; Wed, 20 Mar 2024 07:14:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57A5E1EB23; Wed, 20 Mar 2024 07:14:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YXDaB43E" 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 C272F1EB22 for ; Wed, 20 Mar 2024 07:14:28 +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=1710918870; cv=none; b=ojoeleGCXGyvJKtG1Ce2nvlGASDH8dNFRLRZMuGIJNZIosMrgUnKlmQgK72OZO8P4ZIAXRGsJw6f3B7aNlvCWFv2ZMNKXsLigm00rVwt2tLEaZ7r6InxHl5vtaZu4rzsmOUYzXLaFF0nI25iM/zXikaeInYWfAH+vRENkLsfaVk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710918870; c=relaxed/simple; bh=6eUlFMEubQxbS9/JI+XiecwitNl0neGcOQzXq4fA+0o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=c8hJJB/aL8HeAAdEkntqOTop726cjBj/O9kTXkI/I1ohw++PzxLboHKZEpshOnPV+wbxFDhD+PPG5RIED0Q7p1mbNU+C49dvfS9meGYrU4EBR7WO8xeEa62D/Vi5dhghU+OGEK2GFnBQnOT0XG2B+zmFhc0B08o3mlJKE+nBxHo= 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=YXDaB43E; 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=1710918869; x=1742454869; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6eUlFMEubQxbS9/JI+XiecwitNl0neGcOQzXq4fA+0o=; b=YXDaB43EuTe4wA+w3ubTkzDGfpcBdK/ZZevmWny3JoQsKruQZAiXC/Dl 0Dod8m8KFP1HNbl3Oq5ApYMuJWtuiMz0UxOpUqcXnFySfhG+iTnrVaYTO S+lH2SxVfqrFSP0O+2dmrD5ydlG1OBDC68JyTLb2gdFh9foIWUOI8crwR gBU/g65v3nuXdDl5yGq/Nfz5eqbs7z3FHZVecPN7gHk87jZjbkTyvjB8N HiDBp3GjrqjdG1ic7PdzqJYY5aiHZt5Qw0Gu7K/9CJ6ir29G/SJiVoieq 42rhX2HqYI3fbgkTPbsi0wdBLZX47y1MwW4y/8SuBEapa8snF9kubhsMr w==; X-IronPort-AV: E=McAfee;i="6600,9927,11018"; a="5763845" X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="5763845" 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:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="14477413" 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:26 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 6/8] wifi: mac80211: don't ask driver about no-op link changes Date: Wed, 20 Mar 2024 09:14:03 +0200 Message-Id: <20240320091155.a8190a312a27.If4e6f5ce8228eda7afac0fc8c17dd731c5da9ed9@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: Johannes Berg If the links won't actually change, nothing will happen. This was previously done in the inner function (twice in some cases), but we shouldn't bother the driver with it. Clean that up. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- net/mac80211/link.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/mac80211/link.c b/net/mac80211/link.c index 503ec47bbc2a..84efb6487970 100644 --- a/net/mac80211/link.c +++ b/net/mac80211/link.c @@ -452,10 +452,13 @@ int ieee80211_set_active_links(struct ieee80211_vif *vif, u16 active_links) if (WARN_ON(!active_links)) return -EINVAL; + old_active = sdata->vif.active_links; + if (old_active == active_links) + return 0; + if (!drv_can_activate_links(local, sdata, active_links)) return -EINVAL; - old_active = sdata->vif.active_links; if (old_active & active_links) { /* * if there's at least one link that stays active across -- 2.34.1