All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aloka Dixit <alokad@codeaurora.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, John Crispin <john@phrozen.org>
Subject: Re: [PATCH v9 2/4] mac80211: add multiple bssid support to interface handling
Date: Fri, 16 Apr 2021 14:35:38 -0700	[thread overview]
Message-ID: <494efc64a803693324dee5b7a03cfda0@codeaurora.org> (raw)
In-Reply-To: <7f6f0a8c151746e8bb44ad50daf75259a0fac829.camel@sipsolutions.net>

On 2021-04-08 05:06, Johannes Berg wrote:
> On Wed, 2021-03-10 at 10:26 -0800, Aloka Dixit wrote:
>> From: John Crispin <john@phrozen.org>
>> 
>> 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
> 

Okay

>> +	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

This was added for graceful shutdown of non-transmitting interfaces 
whenever the transmitting one is being brought down. But I see that 
dev_close() is happening twice now.

Inclining towards removing this and just return error to application if 
it tries to remove transmitting before all non-transmitting are deleted.
However, currently the "parent" pointer to indicate the transmitting 
interface is maintained in mac80211, nothing in cfg80211.

Which option would be better,
(1) Add new function to mac80211_config_ops to return yes/no to whether 
cfg80211 can delete a particular interface when MBSSID is in use.
(2) Add a new pointer in struct wireless_dev to track the transmitting 
interface of the set. Then the yes/no decision can be taken in cfg80211 
itself.

Thanks.

  reply	other threads:[~2021-04-16 21:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 18:26 [PATCH v9 0/4] Multiple BSSID support Aloka Dixit
2021-03-10 18:26 ` [PATCH v9 1/4] nl80211: add basic multiple bssid support Aloka Dixit
2021-04-08 12:05   ` Johannes Berg
2021-04-08 17:09     ` Aloka Dixit
2021-03-10 18:26 ` [PATCH v9 2/4] mac80211: add multiple bssid support to interface handling Aloka Dixit
2021-04-08 12:06   ` Johannes Berg
2021-04-16 21:35     ` Aloka Dixit [this message]
2021-04-19 11:28       ` Johannes Berg
2021-04-19 22:35         ` Aloka Dixit
2021-04-19 22:42           ` Aloka Dixit
2021-04-20  8:25           ` Johannes Berg
2021-03-10 18:26 ` [PATCH v9 3/4] mac80211: add multiple bssid/EMA support to beacon handling Aloka Dixit
2021-04-08 12:11   ` Johannes Berg
2021-04-08 17:16     ` Aloka Dixit
2021-03-10 18:26 ` [PATCH v9 4/4] mac80211: CSA on non-transmitting interfaces Aloka Dixit
2021-04-08 11:53 ` [PATCH v9 0/4] Multiple BSSID support Johannes Berg
2021-04-09 18:05   ` Aloka Dixit
2021-04-08 12:17 ` Johannes Berg
2021-04-09 18:31   ` Aloka Dixit
2021-04-09 19:28     ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=494efc64a803693324dee5b7a03cfda0@codeaurora.org \
    --to=alokad@codeaurora.org \
    --cc=johannes@sipsolutions.net \
    --cc=john@phrozen.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.