From: Jouni Malinen <j@w1.fi>
To: Aloka Dixit <alokad@codeaurora.org>
Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v12 2/4] mac80211: MBSSID support in interface handling
Date: Sun, 18 Dec 2022 17:24:20 +0200 [thread overview]
Message-ID: <20221218152420.GA906762@w1.fi> (raw)
In-Reply-To: <20210916025437.29138-3-alokad@codeaurora.org>
On Wed, Sep 15, 2021 at 07:54:35PM -0700, Aloka Dixit wrote:
> Configure multiple BSSID and enhanced multi-BSSID advertisement (EMA)
> parameters in mac80211 for AP mode.
>
> For each interface, 'mbssid_tx_vif' points to the transmitting interface of
> the MBSSID set. The pointer is set to NULL if MBSSID is disabled.
>
> Function ieee80211_stop() is modified to always bring down all the
> non-transmitting interfaces first and the transmitting interface last.
This has already been applied, but this has some apparent issues that
are now showing up with mac80211_hwsim testing being available..
> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> +static int ieee80211_set_ap_mbssid_options(struct ieee80211_sub_if_data *sdata,
> + struct cfg80211_mbssid_config params)
While that does not really break behavior, why is that params argument
passed by value instead of by reference? I see no point in copying
struct cfg80211_mbssid_config members for this call since the function
is only reading the value.
> + sdata->vif.mbssid_tx_vif = NULL;
> + sdata->vif.bss_conf.bssid_index = 0;
> + sdata->vif.bss_conf.nontransmitted = false;
> + sdata->vif.bss_conf.ema_ap = false;
This cleanup is important, but it is done only here in this helper
function..
> @@ -1105,6 +1135,14 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
> + if (sdata->vif.type == NL80211_IFTYPE_AP &&
> + params->mbssid_config.tx_wdev) {
> + err = ieee80211_set_ap_mbssid_options(sdata,
> + params->mbssid_config);
> + if (err)
> + return err;
> + }
And that is the only place where the help function is called and this
happens only under the params->mbssid_config.tx_wdev condition. In other
words, those bssid_index/nontransmitted/ema_ap values are not cleared in
all cases. This results in issue when the bss_conf (link_conf in the
current kernel snapshot) is left in the previous mbssid configuration.
As an example, this will make the following mac80211_hwsim test case
sequence fail:
hostap/tests/hwsim/vm$ ./vm-run.sh he_ap_ema p2p_group_cli_invalid
This happens because ema_ap is set to true in he_ap_ema and then it is
left set true for p2p_group_cli_invalid and that test case does not
actually end up sending Beacon frames.
This can be fixed by clearing something in the
!params->mbssid_config.tx_wdev case in ieee80211_start_ap(). I'm not
completely sure what is the correct way of doing this, but at least
ema_ap needs to be cleared to false and likely some other cleanup needs
to be done as well.
--
Jouni Malinen PGP id EFC895FA
next prev parent reply other threads:[~2022-12-18 15:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 2:54 [PATCH v12 0/4] MBSSID and EMA support in AP mode Aloka Dixit
2021-09-16 2:54 ` [PATCH v12 1/4] nl80211: " Aloka Dixit
2021-09-16 2:54 ` [PATCH v12 2/4] mac80211: MBSSID support in interface handling Aloka Dixit
2022-12-18 15:24 ` Jouni Malinen [this message]
2022-12-19 18:53 ` Aloka Dixit
2022-12-19 19:15 ` Jouni Malinen
2022-12-19 19:22 ` Aloka Dixit
2021-09-16 2:54 ` [PATCH v12 3/4] mac80211: MBSSID and EMA support in beacon handling Aloka Dixit
2021-09-28 9:48 ` Johannes Berg
2021-09-16 2:54 ` [PATCH v12 4/4] mac80211: MBSSID channel switch Aloka Dixit
2021-09-28 9:49 ` 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=20221218152420.GA906762@w1.fi \
--to=j@w1.fi \
--cc=alokad@codeaurora.org \
--cc=johannes@sipsolutions.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox