Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp375282pxf; Thu, 8 Apr 2021 05:09:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2vLjfH8zKKxSuvfPVXYpMs+mwEoF2ZAw928B+GL8y1BKo1WGnMmM2oDYIhoCqbJ4ZHOoZ X-Received: by 2002:a17:907:20e9:: with SMTP id rh9mr10013769ejb.523.1617883764663; Thu, 08 Apr 2021 05:09:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617883764; cv=none; d=google.com; s=arc-20160816; b=gkeV9cbTCfL+VO/QzO3cPwwbJO7ypsCtfTqjKAmJ+cvqwmUL+OiaqQ/Mevxp0+2PgL /1HQ+FI9BIaIjK+PRIIFNT3dRp4jpQ/fosf2wRrGPhz33KPRQ0tF1QetcMvxvPGJICwx VJ6GoPVvF5q+1uHnbLzcApEvy7ySdPS0EpKPPkjj2iUdJYyA2Ga9AL9gpVSTAZLAxnpp bKsSP1y+xqWxiuUxcgKUEPmWziz/qydcS0AsZv92auDITwsBWbBi+5DJEJIKqZNQ0f3b GXVv/xFJ6u2RNZlLbl5+Rgh9rzj1OlHHc/8NCD9NaxJnLaKZfuCsoDaNDTjbuNObavF5 GHKg== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=kbdylI6hZzaM7qDaX/jJpBuk0ZwdDgoxjsz6qyduH/4=; b=uPA1ZbXKCUoHbdZ3KnsWDyzcxnspRBoSBtOIQ6tUEb1bG7S1fKDALCdwH93O4Qx7Ep bNDHRyumTy0i+Ljb6MjVYioUQ3wVkU01EKQ9hm+mMDPlTOKDpEuxPBCRu37KVZeyeJK/ 1XHYDaN9fKaqKa1U1/pzqdlidDMOazNm8KArSSk7EG8NlWtUuovoaJyq2YCSRntupcnN AkfYFSUSszSSUV6iaYrF2HNWWHTdvmSsXEBPYdj2mdoIjXLw42RBL4HvT49mqEwcj4dy p7d4bk2hL5tF2UVS8V+CYYKo7AZPFMaGdW2NeIPip8EEyAlKyuQP5wI70/qautv58Bbi 55BQ== 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 hc39si21446606ejc.125.2021.04.08.05.09.00; Thu, 08 Apr 2021 05:09:24 -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 S231248AbhDHMGv (ORCPT + 99 others); Thu, 8 Apr 2021 08:06:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230322AbhDHMGu (ORCPT ); Thu, 8 Apr 2021 08:06:50 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA27DC061760 for ; Thu, 8 Apr 2021 05:06:39 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1lUTQk-008zVE-3t; Thu, 08 Apr 2021 14:06:38 +0200 Message-ID: <7f6f0a8c151746e8bb44ad50daf75259a0fac829.camel@sipsolutions.net> Subject: Re: [PATCH v9 2/4] mac80211: add multiple bssid support to interface handling From: Johannes Berg To: Aloka Dixit Cc: linux-wireless@vger.kernel.org, John Crispin Date: Thu, 08 Apr 2021 14:06:37 +0200 In-Reply-To: <20210310182604.8858-3-alokad@codeaurora.org> (sfid-20210310_192729_241525_2DF37B20) References: <20210310182604.8858-1-alokad@codeaurora.org> <20210310182604.8858-3-alokad@codeaurora.org> (sfid-20210310_192729_241525_2DF37B20) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, 2021-03-10 at 10:26 -0800, Aloka Dixit wrote: > From: John Crispin > > Add a new helper ieee80211_set_multiple_bssid_options() takes propagating > the cfg80211 data down the stack. > > The patch also makes sure that all members of the bss set will get closed > when either of them is shutdown. s/either/any/ > >  static int ieee80211_del_iface(struct wiphy *wiphy, struct wireless_dev *wdev) >  { > + struct ieee80211_sub_if_data *sdata; > + > + sdata = IEEE80211_WDEV_TO_SUB_IF(wdev); can be one line > + if (sdata && sdata->vif.type == NL80211_IFTYPE_AP) { > + if (sdata->vif.multiple_bssid.flags & IEEE80211_VIF_MBSS_TRANSMITTING) { > + struct ieee80211_sub_if_data *child; > + > + rcu_read_lock(); > + list_for_each_entry_rcu(child, &sdata->local->interfaces, list) > + if (child->vif.multiple_bssid.parent == &sdata->vif) > + dev_close(child->wdev.netdev); > + rcu_read_unlock(); You never tested this properly, this is wrong. johannes