Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1864018ybg; Thu, 30 Jul 2020 04:51:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySvkRrfX11t0gWERR/rJdozc1RQf1xVnz3IMeuGcEhBvKs9NJuaerfVko/WOpBOG9DAwUY X-Received: by 2002:aa7:db10:: with SMTP id t16mr2163029eds.196.1596109916504; Thu, 30 Jul 2020 04:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596109916; cv=none; d=google.com; s=arc-20160816; b=YvjhMZAwMG+brfE5Xq7nVjWB67xX8M/jcjq/vMRVqqPrVWDP5LeC3XB3XfEpI37fqb FD3NgbairGuRYAQNwfl6xN5xHApclx3VcL7YRnUIWan6cQt2qfN3vHUOCMA3Zhgzj+bn Hd4ZIVMC9I+mdjXPw1lUjLbHBFP+tUXSOZVvzJxcjzKvu3Vrmo2EXKcdNxcT1YZTzOiy 0eojnSQBnDaJzpxHPexHbvHM+sUDnzU2RFdMUG4EpgwaqwnC6QOBxaj+UX8q//yeCHbC s2JzRu2MyJJxZl2HmEtEgOkXhqGQq3zifkTfbHA3pbWKA2SHbw50xy7DxzHO5ES26tWk Qp1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id; bh=BPO18kMYvwZThw9kSlSIttrZpIQXe/elXj2SVFg4+LM=; b=Osp4k+WDwejYLfdRshLw39GiBWL58H7H6ZsfIlrYQjauLjiJ+alme1vVuJocekFwTM YEuy6s9aDxZaiYA1ysCVupFPWDiHB/+nq4IOIKO5/v3grARzt3lxjcea0mmjEMlnDoZq 4NQL9yORXmPbiBLulpqC9ojrOZ8U5kyhC/I13xRmaIwRGTtuXNf+D6y6ztStOOCMslku ja5wHVmShr6fUEGW2pUD5jLvLcVsFtlzPwVVBm0NuqemO1IKagpTzGN+RYpa1X86Hppt zEhen55OdiJGwZDy6GoiguPbR6/dJgBbvUYKe+Zb+WKYT9sdzzzlysVH1bSQXyktFPxk fxmg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p7si3003383ejy.206.2020.07.30.04.51.32; Thu, 30 Jul 2020 04:51:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728041AbgG3Lsw (ORCPT + 99 others); Thu, 30 Jul 2020 07:48:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726267AbgG3Lsv (ORCPT ); Thu, 30 Jul 2020 07:48:51 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C73B9C061794 for ; Thu, 30 Jul 2020 04:48:51 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1k173I-00DV6g-UU; Thu, 30 Jul 2020 13:48:49 +0200 Message-ID: Subject: Re: [PATCH] mac80211: do not iterate active interfaces when in re-configure From: Johannes Berg To: greearb@candelatech.com, linux-wireless@vger.kernel.org Date: Thu, 30 Jul 2020 13:48:43 +0200 In-Reply-To: <20200525165317.2269-1-greearb@candelatech.com> (sfid-20200525_185328_305694_D3007257) References: <20200525165317.2269-1-greearb@candelatech.com> (sfid-20200525_185328_305694_D3007257) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.4 (3.36.4-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon, 2020-05-25 at 09:53 -0700, greearb@candelatech.com wrote: > From: Ben Greear > > This appears to fix a problem where ath10k firmware would crash, "appears to", heh Really though, in general, you need to start thinking about mac80211 and the drivers as two separate things. You've also submitted another patch where you say "this iwlwifi thing requires mac80211 to change", and here you're submitting a patch saying "this ath10k thing requires mac80211 to change", but I don't see you considering much the fact that mac80211 is actually used for both. It'd be good to have a discussion of such things in the commit log for changes that will affect multiple drivers, rather than focusing on a single bug for a single driver. In general, not just in this patch. > diff --git a/net/mac80211/util.c b/net/mac80211/util.c > index 5db2cd0..186a696 100644 > --- a/net/mac80211/util.c > +++ b/net/mac80211/util.c > @@ -831,7 +831,7 @@ static void __iterate_interfaces(struct ieee80211_local *local, > break; > } > if (!(iter_flags & IEEE80211_IFACE_ITER_RESUME_ALL) && > - active_only && !(sdata->flags & IEEE80211_SDATA_IN_DRIVER)) > + (active_only && (local->in_reconfig || !(sdata->flags & IEEE80211_SDATA_IN_DRIVER)))) > continue; Anyway, this seems wrong to me. If anything, it should skip those interfaces that weren't re-added yet, but not all of them. I'm pretty sure this would cause iwlwifi to misbehave with multiple interfaces, as it sometimes relies on iterating to understand what else is going on before configuring something. It might even be that this can only be done subject to driver choice. johannes