Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1720684rdb; Wed, 20 Sep 2023 18:46:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE6ECJh1m7Fkj5ztjaoCqTEdSZaZueRIVIkioFLSLDxovkWhMyZ1poJrCulHBwxL42iW3DB X-Received: by 2002:a05:6870:a689:b0:1d5:40df:8fb1 with SMTP id i9-20020a056870a68900b001d540df8fb1mr5466152oam.19.1695260803176; Wed, 20 Sep 2023 18:46:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695260803; cv=none; d=google.com; s=arc-20160816; b=olQZ/7mzo+gWGySvLyWPiA3I2v6fUmleMv+qcWQ2WkQliDDdduKyX910gGMXzr8TvN /bMgrXP0lodTTqtyNbI8T7wurhIqniIwCK30tuLMY7viQou6RR01bgu12mR7yLW6zP1V 5FS9ls4Ju0mOD/QqYkjtgT3pPD+lZa0Lxcka9e7kOFKrsmBXam+WEcaBEOBcaPYsAPGz n12WtJNGMbh1cC3nNpoTEzVcRueclVUOwHR09Of1xDrw6jR0s75l/pPzcMG7gcGmEaBv yrLI1LA0h0P/1dot5PeKrhMxXPUZ0QXxf12MTpMwO/7dFtzEtEmLXwBZv1/pIXsY5kYJ xMPw== 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=F0bav3ZQP+UGEokhq7taNhDulBhXa0XX4TBTAUYR8pLybWNVEV1wp/u/jUG9bkBXAF hKFJNTdWRWl20KPkT95nPgLVVuAaVc1NBXNPGcOj2QPQbQXe+mSaS04O3RN122PpiWNu 9mR4AIMrsISIjpVbZkKq5VOLl6IqsNzBDsulyG8Da4Jo3lv7PHhnCC9zxWhOvrMbdKZj XWEf6+uG2Wgt5Y0p+BYs41qscLE0E76TF6JKuItskvnsvKNkCb/b2U6C99HODdusJGFm FrnAZfVK7BH6kp9EZ+MwvzI+o/gwyNzE/DrUIW0fTu1r8fiFaXNuFkAQHxPDjQ6ENN9B o0mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=crtGWwqI; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id ck3-20020a056a00328300b0068fc9c6eafdsi388040pfb.137.2023.09.20.18.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 18:46:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=crtGWwqI; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 6226A802923B; Wed, 20 Sep 2023 11:27:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229615AbjITS07 (ORCPT + 56 others); Wed, 20 Sep 2023 14:26:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229573AbjITS06 (ORCPT ); Wed, 20 Sep 2023 14:26:58 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B825FEC for ; Wed, 20 Sep 2023 11:26:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695234401; x=1726770401; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tVi41lCDPkkaIJhz3Xj2pBMfT3Zsq5IDRhJyTVIAQ8o=; b=crtGWwqIKzMHUlnAmyATvc8bBQvUwWMLDOKpvqU7L1UJWBYGJDlF5KNg GxWLiOFZhi2UgpfwjfO2q/IXNjdk49qXnCQxPWlRwt9j2PLeEPzp05tl2 EkbDpA5gJZLvkTJLzyWdlkIxZdacis059x01OzU3pZuH+uMBFaVlECf7c BksnDAOq30nz+48cjWTcYTWCyPfhPKMyp3vuQJ+ogPn7NZ7EdSmyXMLeV JRiXs9FhZwPLXVD3UJMQA4VNC9DyqFqsdnCgA4X55PsiWwCiEJCphlk5f /DXJ4WlmxkZtu34Fvoz+jibTSStAJq4DSa4odoCg2F6s1oX7s57NaLoJq Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="360556425" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="360556425" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 11:26:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="723424258" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="723424258" Received: from dmani-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.217.100]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 11:26:38 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer , Gregory Greenman Subject: [PATCH v2 12/18] wifi: mac80211_hwsim: Handle BSS_CHANGED_VALID_LINKS Date: Wed, 20 Sep 2023 21:25:23 +0300 Message-Id: <20230920211508.6218307226d3.I249f52b4773423a33c3121e31002abe0a8d98e78@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230920182529.659973-1-gregory.greenman@intel.com> References: <20230920182529.659973-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=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Wed, 20 Sep 2023 11:27:12 -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