From patchwork Thu Sep 28 14:35:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Greenman, Gregory" X-Patchwork-Id: 727584 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EBFDE732DF for ; Thu, 28 Sep 2023 14:36:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230377AbjI1OgB (ORCPT ); Thu, 28 Sep 2023 10:36:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbjI1OgA (ORCPT ); Thu, 28 Sep 2023 10:36:00 -0400 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68FBC19E for ; Thu, 28 Sep 2023 07:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695911759; x=1727447759; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=b94g+ONjafCwQ0/vWHGJALy5Kr7HChBWeh4Cpj5gZTI=; b=aZlDMzq3COg5gWJCN+BUNsRoYPqiJyVDXatXe4F746azHO7IHIRUlXc3 RCzA9hIkXtWFy6AY1kMlgUNiQqrx4lsWj1xHt9UmUJ4Q8qVnHjkmFnnZM zAnXMKGCm6L77kd6QvUxq6HeQU7C+Sfpy2N0QtCgNOHR/J1SBrjfZaNUv DXNrMaQ/vMsHY1uLi2OVyPJ50Vk596AFtMdl+wnsdLxzrF4kcaotYZ4y1 UGEUT1bd2PyvFDWuU2SzG9i+XsJX4r+A9rk5/dLHeAMzk5fpTtR6psrDs gSKz132LybsxCv8SC004ONc2boPbkr16DtFIvLC4MAT9tjOHayJFiVQ7Y w==; X-IronPort-AV: E=McAfee;i="6600,9927,10847"; a="688411" X-IronPort-AV: E=Sophos;i="6.03,184,1694761200"; d="scan'208";a="688411" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2023 07:35:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10847"; a="996590394" X-IronPort-AV: E=Sophos;i="6.03,184,1694761200"; d="scan'208";a="996590394" Received: from smoriles-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.249.92.89]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2023 07:35:57 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 03/18] wifi: mac80211: don't recreate driver link debugfs in reconfig Date: Thu, 28 Sep 2023 17:35:24 +0300 Message-Id: <20230928172905.3d0214838421.I512a0ff86f631ff42bf25ea0cb2e8e8616794a94@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230928143539.1037500-1-gregory.greenman@intel.com> References: <20230928143539.1037500-1-gregory.greenman@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg We can delete any that we want to remove, but we can't recreate the links as they already exist. Fixes: 170cd6a66d9a ("wifi: mac80211: add netdev per-link debugfs data and driver hook") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman --- net/mac80211/driver-ops.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/net/mac80211/driver-ops.c b/net/mac80211/driver-ops.c index 169dbbca54b6..9112715a749a 100644 --- a/net/mac80211/driver-ops.c +++ b/net/mac80211/driver-ops.c @@ -526,10 +526,13 @@ int drv_change_vif_links(struct ieee80211_local *local, if (ret) return ret; - for_each_set_bit(link_id, &links_to_add, IEEE80211_MLD_MAX_NUM_LINKS) { - link = rcu_access_pointer(sdata->link[link_id]); + if (!local->in_reconfig) { + for_each_set_bit(link_id, &links_to_add, + IEEE80211_MLD_MAX_NUM_LINKS) { + link = rcu_access_pointer(sdata->link[link_id]); - ieee80211_link_debugfs_drv_add(link); + ieee80211_link_debugfs_drv_add(link); + } } return 0;