From: Johannes Berg <johannes@sipsolutions.net>
To: Javier Cardona <javier@cozybit.com>
Cc: linux-wireless@vger.kernel.org,
Steve Derosier <steve@cozybit.com>,
devel@lists.open80211s.org
Subject: Re: [RFC 5/5 v2] cfg80211/mac80211: add mesh join/leave commands
Date: Thu, 02 Dec 2010 21:14:09 +0100 [thread overview]
Message-ID: <1291320849.3481.55.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <AANLkTik_C90v-313Pq_dPY7fE1OFG2X0uv8Ys+uGQFRt@mail.gmail.com>
Javier,
> Looks good from this end, including the new iw commands.
Thanks!
> The only
> issue that we observed is that now that we can leave and join a new
> mesh, we need to do some more state cleanup on stop_mesh. Otherwise
> we could move to a new mesh and still talk to the previous peers. I
> think this would be sufficient:
>
> diff --git a/net/mac80211/main.c b/net/mac80211/main.c
> index 107a0cb..b1242b6 100644
> --- a/net/mac80211/main.c
> +++ b/net/mac80211/main.c
> @@ -246,7 +246,6 @@ void ieee80211_bss_info_change_notify(struct
> ieee80211_sub_if_data *sdata,
> !!sdata->u.ibss.presp;
> break;
> case NL80211_IFTYPE_MESH_POINT:
> - sdata->vif.bss_conf.enable_beacon = true;
> break;
> default:
Oh, indeed. I think this should be
sdata->vif.bss_conf.enable_beacon = !!mesh_id_len;
though.
> diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
> index d814fab..cc458dd 100644
> --- a/net/mac80211/mesh.c
> +++ b/net/mac80211/mesh.c
> @@ -522,6 +522,7 @@ void ieee80211_start_mesh(struct
> ieee80211_sub_if_data *sdata)
> ieee80211_mesh_root_setup(ifmsh);
> ieee80211_queue_work(&local->hw, &sdata->work);
> sdata->vif.bss_conf.beacon_int = MESH_DEFAULT_BEACON_INTERVAL;
> + sdata->vif.bss_conf.enable_beacon = true;
Because otherwise, if you just do this, scanning will stop beaconing
forever...
> ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON |
> BSS_CHANGED_BEACON_ENABLED |
> BSS_CHANGED_BEACON_INT);
> @@ -530,6 +531,13 @@ void ieee80211_start_mesh(struct
> ieee80211_sub_if_data *sdata)
> void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
> {
> struct ieee80211_local *local = sdata->local;
> + struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
> +
> + ifmsh->mesh_id_len = 0;
Yeah good catch.
> + memset(ifmsh->mesh_id, 0, IEEE80211_MAX_MESH_ID_LEN);
That shouldn't really be necessary.
> + sdata->vif.bss_conf.enable_beacon = false;
Nor would that with the change I proposed, I think.
> + ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);
> + sta_info_flush(local, NULL);
Yup, good changes.
Would you mind briefly testing the beacon change I proposed above?
johannes
next prev parent reply other threads:[~2010-12-02 20:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-01 20:59 [RFC 0/5] mesh join/leave API Johannes Berg
2010-12-01 20:59 ` [RFC 1/5] mac80211: use configured mesh TTL Johannes Berg
2010-12-01 20:59 ` [RFC 2/5] mac80211: move mesh filter adjusting Johannes Berg
2010-12-01 20:59 ` [RFC 3/5] cfg80211: require add_virtual_intf to return new dev Johannes Berg
2010-12-01 20:59 ` [RFC 4/5] nl80211: refactor mesh parameter parsing Johannes Berg
2010-12-02 8:34 ` [RFC 4/5 v2] " Johannes Berg
2010-12-01 20:59 ` [RFC 5/5] cfg80211/mac80211: add mesh join/leave commands Johannes Berg
2010-12-01 21:15 ` Johannes Berg
2010-12-02 0:23 ` Javier Cardona
2010-12-02 6:57 ` Johannes Berg
2010-12-02 8:45 ` [RFC 5/5 v2] " Johannes Berg
2010-12-02 20:09 ` Javier Cardona
2010-12-02 20:14 ` Johannes Berg [this message]
2010-12-02 21:24 ` Javier Cardona
2010-12-02 21:38 ` Johannes Berg
2010-12-02 23:08 ` Javier Cardona
2010-12-03 8:13 ` 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=1291320849.3481.55.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=devel@lists.open80211s.org \
--cc=javier@cozybit.com \
--cc=linux-wireless@vger.kernel.org \
--cc=steve@cozybit.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;
as well as URLs for NNTP newsgroup(s).