Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp740594rwd; Thu, 8 Jun 2023 07:11:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5o8GAM63eG2Cs9a1Yo8mBN0H3QGOuWTKpkPIdT74HYSxf70YXxffHE1hKL2bkZWMLRNL4R X-Received: by 2002:a17:903:245:b0:1ac:8062:4f31 with SMTP id j5-20020a170903024500b001ac80624f31mr5539827plh.37.1686233465612; Thu, 08 Jun 2023 07:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686233465; cv=none; d=google.com; s=arc-20160816; b=yC4fz4dbc0uGIILS9Qb+S/bx6vPZiq2ua/SOYkNW9V7nML6A2st8OyQZqu4Ie2poAg ze3H9Acz4RzrXudS97FYh/1lGkGdt83nhqRZ9UiDjPufvbtk6XBsLEGqArtLL/otMKo2 fl70Vnuk1hRMWNBJ/6idchW8WpVGOAZQ5m6sGlIqIT5ImlKX3MDcG8SlU9uXVFJyYROv LpE7bLnzizuxWy6ccad8jubZ0crfteCdEL6KW+yR0KzhnEoynip9jjZRSafMz48FcKYI uSTvmNiRcoVWAJPw59uRuX/hCiLpYVSmnMNJ34m68z0th6pRqVrm7TRHzMfeoGitm0ex oKGA== 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=gfGv/E3ilnj07Lx7ggD0iKAvrueHVwG9zwX+wjZt+FY=; b=WqYlcmOSygItT63niE7W2equvZ+Rwdx2KNWz0AS/0MpVs9MwkcUDL6av/u45g8lzNl fAzi+o6THHPSj2TvTG5NUUPSRAtM5irJNZqILJPdUd8NjV2b75CIiVwhiJO5so5xiQwq SW/kciXnHqvbm9/+kx0QmzNxL7QmmCdU9g9XnlIhQgSPKMZgB8IcOK15ELnPF9pdsn/d 6khB9gnEyUGUX6wL8UFdo8ST9U+S8BFuzh2mfeTiOHNevBnnMQq4nkGOZiYmA8++ubGf 91zTDJskCeC358g9s+cCe+4Oe6yqYQqf2udzki40NGDpQmqDW5reUk9Vxb4RFawAh1zS qWaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P+1PEvH2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u5-20020a170902e5c500b001b046acc841si1164001plf.266.2023.06.08.07.10.57; Thu, 08 Jun 2023 07:11:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P+1PEvH2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236887AbjFHOHb (ORCPT + 62 others); Thu, 8 Jun 2023 10:07:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236723AbjFHOHW (ORCPT ); Thu, 8 Jun 2023 10:07:22 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C72CA2D5F for ; Thu, 8 Jun 2023 07:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686233239; x=1717769239; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iiudbld3Kg3ARQeH0/YlzSWeVSO5WiOwFADWgSY2r1E=; b=P+1PEvH2wW81W+KQOwwjb7H/3lwDOTtQ8dv5dMkwjFai61cJhV2gEZb7 BqWwNUWOOCyXcwHagUZZkh03IerHXwmAiaWSsk36QGIgv5Zzs3fUBhVsP XAscM89z+2JCEWphwSbfgOoqsWesX51JhLzbE8qQzINoKv7xwn4gieazY 5S2JNG2eUj8Up8goayyuWBoW4qZqo7/IO6TCJnq/NPwqXMVcnz2pW+p2n rRkEVa/5ESs6KubKhAZEhHsM2WuyTbrodzkfO5LGBBY2/TRrzuZvLqLJs yKNpTeWNYPgWJiuBPM9c5zsSKOjy9oQGN0h43M+JSWHY3poy/3sBRrDmz w==; X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="423176285" X-IronPort-AV: E=Sophos;i="6.00,226,1681196400"; d="scan'208";a="423176285" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2023 06:36:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="956706366" X-IronPort-AV: E=Sophos;i="6.00,226,1681196400"; d="scan'208";a="956706366" Received: from unknown (HELO ggreenma-mobl2.intel.com) ([10.249.94.100]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2023 06:36:50 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer , Gregory Greenman Subject: [PATCH 13/15] wifi: mac80211_hwsim: Don't access vif valid links directly Date: Thu, 8 Jun 2023 16:36:09 +0300 Message-Id: <20230608163202.8966bd5ce7c8.Ia73e3555aaf4ddf9917bced8d413fad08cc28f1b@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230608133611.1303724-1-gregory.greenman@intel.com> References: <20230608133611.1303724-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ilan Peer And instead use the vif getter functions, as a preparation for supporting disabled/dormant links. Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman --- drivers/net/wireless/virtual/mac80211_hwsim.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c index 37bf392ae9a2..f446fd0e8cd0 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim.c @@ -1860,7 +1860,7 @@ mac80211_hwsim_select_tx_link(struct mac80211_hwsim_data *data, struct hwsim_sta_priv *sp = (void *)sta->drv_priv; int i; - if (!vif->valid_links) + if (!ieee80211_vif_is_mld(vif)) return &vif->bss_conf; WARN_ON(is_multicast_ether_addr(hdr->addr1)); @@ -2636,7 +2636,8 @@ static int mac80211_hwsim_sta_state(struct ieee80211_hw *hw, */ if (vif->type == NL80211_IFTYPE_STATION && new_state == IEEE80211_STA_AUTHORIZED && !sta->tdls) - ieee80211_set_active_links_async(vif, vif->valid_links); + ieee80211_set_active_links_async(vif, + ieee80211_vif_usable_links(vif)); return 0; } -- 2.38.1