All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ashok Nagarajan <ashok@cozybit.com>
To: linux-wireless@vger.kernel.org
Cc: javier@cozybit.com, thomas@cozybit.com,
	johannes@sipsolutions.net, devel@lists.open80211s.org,
	linville@tuxdriver.com, Ashok Nagarajan <ashok@cozybit.com>
Subject: Re: [[PATCH v2 4/4] mac80211: Check basic rates when peering
Date: Mon, 2 Apr 2012 19:30:36 -0700	[thread overview]
Message-ID: <CACcxo+qmy4UtCK-Zt7K4q8obBQDGFVhQG_D_ZewoViY8q-NO3Q@mail.gmail.com> (raw)
In-Reply-To: <1333225930-320-4-git-send-email-ashok@cozybit.com>

Hello John,

Please do not apply this patch set as they might rise conflicts.
Version 3 is coming.

Thanks,
Ashok

On Sat, Mar 31, 2012 at 1:32 PM, Ashok Nagarajan <ashok@cozybit.com> wrote:
> Section 13.2.3 of IEEE 80211s standard requires BSSBasicRateSet of mesh nodes
> to be identical to establish peer link.
>
> Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
> Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
> ---
>  net/mac80211/mesh.c       |   15 ++++++++++-----
>  net/mac80211/mesh.h       |    2 +-
>  net/mac80211/mesh_plink.c |    2 +-
>  3 files changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
> index 964d8a9..a67b24e 100644
> --- a/net/mac80211/mesh.c
> +++ b/net/mac80211/mesh.c
> @@ -69,11 +69,13 @@ static void ieee80211_mesh_housekeeping_timer(unsigned long data)
>  *
>  * @ie: information elements of a management frame from the mesh peer
>  * @sdata: local mesh subif
> + * @basic_rates: BSSBasicRateSet of the peer candidate
>  *
>  * This function checks if the mesh configuration of a mesh point matches the
>  * local mesh configuration, i.e. if both nodes belong to the same mesh network.
>  */
> -bool mesh_matches_local(struct ieee802_11_elems *ie, struct ieee80211_sub_if_data *sdata)
> +bool mesh_matches_local(struct ieee802_11_elems *ie,
> +                       struct ieee80211_sub_if_data *sdata, u32 basic_rates)
>  {
>        struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
>        struct ieee80211_local *local = sdata->local;
> @@ -97,6 +99,9 @@ bool mesh_matches_local(struct ieee802_11_elems *ie, struct ieee80211_sub_if_dat
>             (ifmsh->mesh_auth_id == ie->mesh_config->meshconf_auth)))
>                goto mismatch;
>
> +       if (sdata->vif.bss_conf.basic_rates != basic_rates)
> +               goto mismatch;
> +
>        /* disallow peering with mismatched channel types for now */
>        /*if (ie->ht_info_elem &&
>            (local->_oper_channel_type !=
> @@ -653,13 +658,13 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
>        if (!channel || channel->flags & IEEE80211_CHAN_DISABLED)
>                return;
>
> +       supp_rates = ieee80211_sta_get_rates(local, &elems,
> +                                            band, &basic_rates);
> +
>        if (elems.mesh_id && elems.mesh_config &&
> -           mesh_matches_local(&elems, sdata)) {
> -               supp_rates = ieee80211_sta_get_rates(local, &elems,
> -                                                    band, &basic_rates);
> +           mesh_matches_local(&elems, sdata, basic_rates))
>                mesh_neighbour_update(mgmt, supp_rates, sdata, &elems,
>                                        rx_status);
> -       }
>  }
>
>  static void ieee80211_mesh_rx_mgmt_action(struct ieee80211_sub_if_data *sdata,
> diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
> index 7d5d34b..0e40c8a 100644
> --- a/net/mac80211/mesh.h
> +++ b/net/mac80211/mesh.h
> @@ -204,7 +204,7 @@ int ieee80211_new_mesh_header(struct ieee80211s_hdr *meshhdr,
>  int mesh_rmc_check(u8 *addr, struct ieee80211s_hdr *mesh_hdr,
>                struct ieee80211_sub_if_data *sdata);
>  bool mesh_matches_local(struct ieee802_11_elems *ie,
> -               struct ieee80211_sub_if_data *sdata);
> +                       struct ieee80211_sub_if_data *sdata, u32 basic_rates);
>  void mesh_ids_set_default(struct ieee80211_if_mesh *mesh);
>  void mesh_mgmt_ies_add(struct sk_buff *skb,
>                struct ieee80211_sub_if_data *sdata);
> diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
> index 133f267..d742355 100644
> --- a/net/mac80211/mesh_plink.c
> +++ b/net/mac80211/mesh_plink.c
> @@ -573,7 +573,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
>                                        rx_status->band, &basic_rates);
>
>        if (ftype != WLAN_SP_MESH_PEERING_CLOSE &&
> -           (!mesh_matches_local(&elems, sdata))) {
> +           (!mesh_matches_local(&elems, sdata, basic_rates))) {
>                matches_local = false;
>                switch (ftype) {
>                case WLAN_SP_MESH_PEERING_OPEN:
> --
> 1.7.5.4
>

      reply	other threads:[~2012-04-03  2:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-31 20:32 [[PATCH v2 1/4] mac80211: Use mandatory rates as basic rates when starting mesh Ashok Nagarajan
2012-03-31 20:32 ` [[PATCH v2 2/4] mac80211: Indicate basic rates when adding rate IEs Ashok Nagarajan
2012-03-31 20:32 ` [[PATCH v2 3/4] mac80211: Modify sta_get_rates to give basic rates Ashok Nagarajan
2012-04-02 10:37   ` Johannes Berg
2012-04-02 10:41     ` Johannes Berg
2012-03-31 20:32 ` [[PATCH v2 4/4] mac80211: Check basic rates when peering Ashok Nagarajan
2012-04-03  2:30   ` Ashok Nagarajan [this message]

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=CACcxo+qmy4UtCK-Zt7K4q8obBQDGFVhQG_D_ZewoViY8q-NO3Q@mail.gmail.com \
    --to=ashok@cozybit.com \
    --cc=devel@lists.open80211s.org \
    --cc=javier@cozybit.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=thomas@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 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.