From: Johannes Berg <johannes@sipsolutions.net>
To: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com,
devel@lists.open80211s.org, distro11s@cozybit.com
Subject: Re: [PATCH 4/5] {nl,cfg,mac}80211: finalizing mesh channel switching
Date: Tue, 01 Oct 2013 13:27:44 +0200 [thread overview]
Message-ID: <1380626864.14430.32.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1379115372-28426-5-git-send-email-yeohchunyeow@cozybit.com> (sfid-20130914_013634_171516_9BF59D4C)
On Fri, 2013-09-13 at 16:36 -0700, Chun-Yeow Yeoh wrote:
> Finalizing the requried procedures for channel switching completion and
typo: required
> also adding the function for updating the beacon and probe response frames
> with CSA and MCSP elements. Once the channel switching is completed, the
> CSA and MCSP elements are removed from the beacon or probe response frames
> as defined in the IEEE Std 802.11-2012 section 10.9.8.4.3.
I'd prefer you rewrote this to be more active ... this seems rather
observer style :)
> +int ieee80211_mesh_finish_csa(struct ieee80211_sub_if_data *sdata)
> +{
> + struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
> + int ret = 0;
> +
> + /* Remove the CSA and MCSP elements from the beacon */
> + kfree(ifmsh->csa_settings);
> + ifmsh->csa_settings = NULL;
> + ret = ieee80211_mesh_rebuild_beacon(sdata);
> + if (ret)
> + return -EINVAL;
This seems totally racy with what I pointed out in the other patch ...
> + /* Reset the TTL value and Initiator flag */
> + ifmsh->chsw_init = false;
> + ifmsh->chsw_ttl = 0;
> +
> + ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON);
> +
> + mcsa_dbg(sdata, "complete switching to center freq %d MHz",
> + sdata->vif.bss_conf.chandef.chan->center_freq);
> + return ret;
return 0
> + tmp_csa_settings = kmalloc(sizeof(struct cfg80211_csa_settings),
> + GFP_ATOMIC);
> + if (!tmp_csa_settings) {
> + mcsa_dbg(sdata, "could not allocate memory for csa beaconing");
You should never print a message for memory allocation failures, they
already give very verbose output.
> + ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON);
> + return ret;
return 0
johannes
next prev parent reply other threads:[~2013-10-01 11:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 23:36 [PATCH 0/5] Add Mesh Channel Switch Support Chun-Yeow Yeoh
2013-09-13 23:36 ` [PATCH 1/5] mac80211: process the CSA frame for mesh accordingly Chun-Yeow Yeoh
2013-10-01 11:21 ` Johannes Berg
2013-10-01 22:38 ` Chun-Yeow Yeoh
2013-09-13 23:36 ` [PATCH 2/5] {nl,cfg,mac}80211: enable the triggering of CSA frame in mesh Chun-Yeow Yeoh
2013-10-01 11:24 ` Johannes Berg
2013-09-13 23:36 ` [PATCH 3/5] mac80211: adding the CSA and MCSP elements in mesh beaconing Chun-Yeow Yeoh
2013-10-01 11:25 ` Johannes Berg
2013-10-01 22:39 ` Chun-Yeow Yeoh
2013-09-13 23:36 ` [PATCH 4/5] {nl,cfg,mac}80211: finalizing mesh channel switching Chun-Yeow Yeoh
2013-10-01 11:27 ` Johannes Berg [this message]
2013-10-01 22:39 ` Chun-Yeow Yeoh
2013-09-13 23:36 ` [PATCH 5/5] mac80211: process mesh channel switching using beacon Chun-Yeow Yeoh
2013-10-01 11:30 ` Johannes Berg
2013-10-01 22:39 ` Chun-Yeow Yeoh
2013-10-01 11:31 ` [PATCH 0/5] Add Mesh Channel Switch Support Johannes Berg
2013-10-01 22:39 ` Chun-Yeow Yeoh
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=1380626864.14430.32.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=devel@lists.open80211s.org \
--cc=distro11s@cozybit.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=yeohchunyeow@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