From: Simon Wunderlich <sw@simonwunderlich.de>
To: Luciano Coelho <luciano.coelho@intel.com>
Cc: linux-wireless@vger.kernel.org, johannes@sipsolutions.net,
yeohchunyeow@gmail.com, yeohchunyeow@cozybit.com
Subject: Re: [PATCH v5 5/5] mac80211: only set CSA beacon when at least one beacon must be transmitted
Date: Thu, 14 Nov 2013 15:53:16 +0100 [thread overview]
Message-ID: <201311141553.16912.sw@simonwunderlich.de> (raw)
In-Reply-To: <1384430976-13708-5-git-send-email-luciano.coelho@intel.com>
> @@ -3122,9 +3158,16 @@ int ieee80211_channel_switch(struct wiphy *wiphy,
> struct net_device *dev, params->chandef.chan->band)
> return -EINVAL;
>
> - err = ieee80211_ibss_csa_beacon(sdata, params);
> - if (err < 0)
> - return err;
> + /* see comments and TODO in the NL80211_IFTYPE_AP block */
Since you are sending an action frame below, this TODO appears to be obsolete?
> + if (params->count > 1) {
> + err = ieee80211_ibss_csa_beacon(sdata, params);
> + if (err < 0)
> + return err;
> + changed |= err;
> + }
> +
> + ieee80211_send_action_csa(sdata, params);
> +
> break;
> #ifdef CONFIG_MAC80211_MESH
> case NL80211_IFTYPE_MESH_POINT:
> @@ -3173,8 +3220,13 @@ int ieee80211_channel_switch(struct wiphy *wiphy,
> struct net_device *dev, sdata->csa_chandef = params->chandef;
> sdata->vif.csa_active = true;
>
> - ieee80211_bss_info_change_notify(sdata, err);
> - drv_channel_switch_beacon(sdata, ¶ms->chandef);
> + if (changed) {
> + ieee80211_bss_info_change_notify(sdata, changed);
> + drv_channel_switch_beacon(sdata, ¶ms->chandef);
> + } else {
> + /* if the beacon didn't change, we can finalize immediately */
> + ieee80211_csa_finalize(sdata);
> + }
I think setting csa_active == true for count 0 or 1 is wrong.
When a beacon is generated/updated in ieee80211_beacon_get_tim(), it wil call
ieee80211_update_csa() which will throw a warning in best case, but also
modifies random data in the beacon/presp at the position where the count offset
points to (we have no CSA IE in this case).
I've also seen warnings in my IBSS tests (WARNING: CPU: 0 PID: 0 at
net/mac80211/tx.c:2408 ieee80211_update_csa), when doing a CSA with count 0
from userspace. Although likely, I'm not sure if this is related to the
problem described above, but this function shouldn't be called at all in the
count=0 case.
Cheers,
Simon
next prev parent reply other threads:[~2013-11-14 14:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 12:09 [PATCH v5 1/5] mac80211: refactor ieee80211_ibss_process_chanswitch() Luciano Coelho
2013-11-14 12:09 ` [PATCH v5 2/5] mac80211: align ieee80211_ibss_csa_beacon() with ieee80211_csa_beacon() Luciano Coelho
2013-11-14 12:09 ` [PATCH v5 3/5] mac80211: refactor ieee80211_mesh_process_chanswitch() Luciano Coelho
2013-11-14 12:09 ` [PATCH v5 4/5] mac80211: align ieee80211_mesh_csa_beacon() with ieee80211_csa_beacon() Luciano Coelho
2013-11-14 12:09 ` [PATCH v5 5/5] mac80211: only set CSA beacon when at least one beacon must be transmitted Luciano Coelho
2013-11-14 14:53 ` Simon Wunderlich [this message]
2013-11-14 15:07 ` Coelho, Luciano
[not found] ` <CAEFj987dHiYcdX0+_FH9W4x9s1M9BGwGWdz-ik5r_KO7gxEY7A@mail.gmail.com>
2013-11-16 19:00 ` Coelho, Luciano
2013-11-14 12:11 ` [PATCH v5 1/5] mac80211: refactor ieee80211_ibss_process_chanswitch() Luca Coelho
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=201311141553.16912.sw@simonwunderlich.de \
--to=sw@simonwunderlich.de \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.com \
--cc=yeohchunyeow@cozybit.com \
--cc=yeohchunyeow@gmail.com \
/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