Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp6187778rdb; Mon, 18 Sep 2023 06:47:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHCbZgS+/CIelKilSytwAEjZcNi+2ThNflavu9jInfiGv7+FQUbDiLnSuE1sis1u/hWcyUf X-Received: by 2002:a05:6a00:2daa:b0:68b:eb3d:8030 with SMTP id fb42-20020a056a002daa00b0068beb3d8030mr11239604pfb.1.1695044827551; Mon, 18 Sep 2023 06:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695044827; cv=none; d=google.com; s=arc-20160816; b=dNBspv1CbOP9TzwgB+t8yQDAnoKiWwJZkxrxcZQDSSq13t1kumHMgZokLZxfkjw3Ap 1UT2/XvtR7rvSUPYKxYNdyRw8QY69FOVcD8bNE78vgFfLrSIjcghLLqcd3/LU0P4/tqX cwL/JyW81YSp151ptxnR8d4HFfRfPyu5mq/KOR6k76dDeR9lBmhD0SRHCHjgaWYyPnp8 JmDZpbaNLm/olAwwnFAQYwWIH7THQIfnwXkAB5iTfg8E0PI1Bpcf0nWRvx51sZXYQ89T j69RI2ESdfRhjYvHmXuTWex4n95AWoTUUzZfuFvsgvBkLR8uXwGWcrUTBOmf3xKH7pzV wbBw== 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=4sFNsR5zQ8udTv6UZcp0yJ4AGVKGY9uWNJBld49QzTE=; fh=/GEb7gVUqTR6q5QKTfw0XUP5VVlqVBkkw8R/kfrGqdo=; b=Z8bSaLStO2Q6iOLGqNHVBK3UTUz+na7ayLNFL91DY2CI5XpHP8pB2biJsgClb0jvDT t4HECd6n7wsjRuEjkJp8uuknP77CDZzRFYsaXzVpwQea2MqgHTsCO3ebIu3lBp4hhJOy NYztL+OAO3JEmVhqtYCtzuaWnLbAsUv+fFRJfhsCwulUfRVSj/0KsUcOKfYYtp8WwIvD 9kf4EfA5Zh0CjvQlC0VMtOyS5QuN8YnyIFE1YtjXqbfT6YW4T5JIpiBaOvs7mmvwRWA5 Kx95hocdPnz2qOul9CCYgYlG6/rWjU0PacUj2uke4aTzZA3UVhnBYheWmhInRJLF8ieN k/yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JYuH38PY; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id q12-20020a056a00150c00b0068e405d9217si8502608pfu.302.2023.09.18.06.47.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 06:47:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JYuH38PY; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id F27D88032EF8; Mon, 18 Sep 2023 04:12:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237562AbjIRLMe (ORCPT + 57 others); Mon, 18 Sep 2023 07:12:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241496AbjIRLMN (ORCPT ); Mon, 18 Sep 2023 07:12:13 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C77618F for ; Mon, 18 Sep 2023 04:12:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695035527; x=1726571527; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tVi41lCDPkkaIJhz3Xj2pBMfT3Zsq5IDRhJyTVIAQ8o=; b=JYuH38PYfAqOnWNaJj2ScwLI9FmJZS3Eoe6zrJJ/oY6FWCCeqtysrT5v 5EwMtUztIYkGTwA0B9tZWjc1l7qWNx2ir9DBPe16JWs/Cwp+mAgEW/5aA buZT2HekoD3K4OGwOYWcRz+3PEkH+BRf7oqBvbPQX5Eig66yTrZSznQYc IHIK9BzpWofnPqy686QanIFf3Yka4V4uKCeA+KUl5MU6FTtJU1VVRvcAI 65wlIrgNDV5kVe9qjHJMjfhTP1Z+YpEWeGS0h+MxheNFKsRyvtN5qJePe gxkXtEpSk+HRq138qvDIbpYfljp0iJLRGHJ0q+p8ziroKJ/U9xoHHxuSA A==; X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="378535891" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="378535891" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 04:12:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="861025479" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="861025479" Received: from guyarad-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.215.14]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 04:12:05 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer , Gregory Greenman Subject: [PATCH 12/18] wifi: mac80211_hwsim: Handle BSS_CHANGED_VALID_LINKS Date: Mon, 18 Sep 2023 14:10:57 +0300 Message-Id: <20230918140607.5819e367edc2.I249f52b4773423a33c3121e31002abe0a8d98e78@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230918111103.435195-1-gregory.greenman@intel.com> References: <20230918111103.435195-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 18 Sep 2023 04:12:48 -0700 (PDT) From: Ilan Peer In station mode, set the active links to all the usable links. Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman --- drivers/net/wireless/virtual/mac80211_hwsim.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c index 17ecd5fe7258..c7b4414cc6c3 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim.c @@ -2445,6 +2445,14 @@ static void mac80211_hwsim_vif_info_changed(struct ieee80211_hw *hw, vp->assoc = vif->cfg.assoc; vp->aid = vif->cfg.aid; } + + if (vif->type == NL80211_IFTYPE_STATION && + changed & BSS_CHANGED_MLD_VALID_LINKS) { + u16 usable_links = ieee80211_vif_usable_links(vif); + + if (vif->active_links != usable_links) + ieee80211_set_active_links_async(vif, usable_links); + } } static void mac80211_hwsim_link_info_changed(struct ieee80211_hw *hw, -- 2.38.1