2012-06-14 16:25:05

by Chun-Yeow Yeoh

[permalink] [raw]
Subject: [PATCH] mac80211: fix the assignment of mesh element TTL

This patch fixes the wrong assignment of mesh element TTL.

Signed-off-by: Chun-Yeow Yeoh <[email protected]>
---
net/mac80211/cfg.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 85ac364..43eb8d9 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1529,7 +1529,7 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy,
if (_chg_mesh_attr(NL80211_MESHCONF_TTL, mask))
conf->dot11MeshTTL = nconf->dot11MeshTTL;
if (_chg_mesh_attr(NL80211_MESHCONF_ELEMENT_TTL, mask))
- conf->dot11MeshTTL = nconf->element_ttl;
+ conf->element_ttl = nconf->element_ttl;
if (_chg_mesh_attr(NL80211_MESHCONF_AUTO_OPEN_PLINKS, mask))
conf->auto_open_plinks = nconf->auto_open_plinks;
if (_chg_mesh_attr(NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR, mask))
--
1.7.0.4



2012-06-15 08:20:20

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: fix the assignment of mesh element TTL

On Fri, 2012-06-15 at 08:32 +0800, Yeoh Chun-Yeow wrote:
> Yes.
>
> On Fri, Jun 15, 2012 at 2:57 AM, Johannes Berg
> <[email protected]> wrote:
> > On Fri, 2012-06-15 at 00:23 +0800, Chun-Yeow Yeoh wrote:
> >> This patch fixes the wrong assignment of mesh element TTL.
> >
> > Since I haven't pushed to John yet, should I rebase and merge this with
> > one of the previous patches?

Umm, I actually shouldn't ... The patch this fixes has been merged by
John way back:

commit 45904f21655cf4f0ae7d0fab5906fe51bf56ecf4
Author: Javier Cardona <[email protected]>
AuthorDate: Fri Dec 3 09:20:40 2010 +0100
Commit: John W. Linville <[email protected]>
CommitDate: Mon Dec 6 16:01:28 2010 -0500

nl80211/mac80211: define and allow configuring mesh element TTL


WAY WAY back. Maybe this patch should go into 3.5 and even stable?

johannes


2012-06-14 18:57:14

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: fix the assignment of mesh element TTL

On Fri, 2012-06-15 at 00:23 +0800, Chun-Yeow Yeoh wrote:
> This patch fixes the wrong assignment of mesh element TTL.

Since I haven't pushed to John yet, should I rebase and merge this with
one of the previous patches?

johannes

> Signed-off-by: Chun-Yeow Yeoh <[email protected]>
> ---
> net/mac80211/cfg.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> index 85ac364..43eb8d9 100644
> --- a/net/mac80211/cfg.c
> +++ b/net/mac80211/cfg.c
> @@ -1529,7 +1529,7 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy,
> if (_chg_mesh_attr(NL80211_MESHCONF_TTL, mask))
> conf->dot11MeshTTL = nconf->dot11MeshTTL;
> if (_chg_mesh_attr(NL80211_MESHCONF_ELEMENT_TTL, mask))
> - conf->dot11MeshTTL = nconf->element_ttl;
> + conf->element_ttl = nconf->element_ttl;
> if (_chg_mesh_attr(NL80211_MESHCONF_AUTO_OPEN_PLINKS, mask))
> conf->auto_open_plinks = nconf->auto_open_plinks;
> if (_chg_mesh_attr(NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR, mask))



2012-06-15 00:32:19

by Chun-Yeow Yeoh

[permalink] [raw]
Subject: Re: [PATCH] mac80211: fix the assignment of mesh element TTL

Yes.

On Fri, Jun 15, 2012 at 2:57 AM, Johannes Berg
<[email protected]> wrote:
> On Fri, 2012-06-15 at 00:23 +0800, Chun-Yeow Yeoh wrote:
>> This patch fixes the wrong assignment of mesh element TTL.
>
> Since I haven't pushed to John yet, should I rebase and merge this with
> one of the previous patches?
>
> johannes
>
>> Signed-off-by: Chun-Yeow Yeoh <[email protected]>
>> ---
>> ?net/mac80211/cfg.c | ? ?2 +-
>> ?1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
>> index 85ac364..43eb8d9 100644
>> --- a/net/mac80211/cfg.c
>> +++ b/net/mac80211/cfg.c
>> @@ -1529,7 +1529,7 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy,
>> ? ? ? if (_chg_mesh_attr(NL80211_MESHCONF_TTL, mask))
>> ? ? ? ? ? ? ? conf->dot11MeshTTL = nconf->dot11MeshTTL;
>> ? ? ? if (_chg_mesh_attr(NL80211_MESHCONF_ELEMENT_TTL, mask))
>> - ? ? ? ? ? ? conf->dot11MeshTTL = nconf->element_ttl;
>> + ? ? ? ? ? ? conf->element_ttl = nconf->element_ttl;
>> ? ? ? if (_chg_mesh_attr(NL80211_MESHCONF_AUTO_OPEN_PLINKS, mask))
>> ? ? ? ? ? ? ? conf->auto_open_plinks = nconf->auto_open_plinks;
>> ? ? ? if (_chg_mesh_attr(NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR, mask))
>
>

2012-06-15 09:26:27

by Chun-Yeow Yeoh

[permalink] [raw]
Subject: Re: [PATCH] mac80211: fix the assignment of mesh element TTL

Hi, Johannes

No. I think that I am actually fixing the wrong assignment of the
previous patch.

if (_chg_mesh_attr(NL80211_MESHCONF_ELEMENT_TTL, mask))
conf->dot11MeshTTL = nconf->element_ttl;
to
conf->element_ttl = nconf->element_ttl;

Regards,
Chun-Yeow

On Fri, Jun 15, 2012 at 4:20 PM, Johannes Berg
<[email protected]> wrote:
> On Fri, 2012-06-15 at 08:32 +0800, Yeoh Chun-Yeow wrote:
>> Yes.
>>
>> On Fri, Jun 15, 2012 at 2:57 AM, Johannes Berg
>> <[email protected]> wrote:
>> > On Fri, 2012-06-15 at 00:23 +0800, Chun-Yeow Yeoh wrote:
>> >> This patch fixes the wrong assignment of mesh element TTL.
>> >
>> > Since I haven't pushed to John yet, should I rebase and merge this with
>> > one of the previous patches?
>
> Umm, I actually shouldn't ... The patch this fixes has been merged by
> John way back:
>
> commit 45904f21655cf4f0ae7d0fab5906fe51bf56ecf4
> Author: ? ? Javier Cardona <[email protected]>
> AuthorDate: Fri Dec 3 09:20:40 2010 +0100
> Commit: ? ? John W. Linville <[email protected]>
> CommitDate: Mon Dec 6 16:01:28 2010 -0500
>
> ? ?nl80211/mac80211: define and allow configuring mesh element TTL
>
>
> WAY WAY back. Maybe this patch should go into 3.5 and even stable?
>
> johannes
>

2012-06-15 09:48:26

by Chun-Yeow Yeoh

[permalink] [raw]
Subject: Re: [PATCH] mac80211: fix the assignment of mesh element TTL

> Are you telling me you're not fixing that code?

I think that I need some fresh course on what are rebase and merge.
Because I am not too understand on the meaning. Sorry for that.

Perhaps, you can recommend the good source of reference.

Chun-Yeow

2012-06-15 09:37:54

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: fix the assignment of mesh element TTL

On Fri, 2012-06-15 at 17:26 +0800, Yeoh Chun-Yeow wrote:
> Hi, Johannes
>
> No. I think that I am actually fixing the wrong assignment of the
> previous patch.

Please clarify *which* previous patch.

> > commit 45904f21655cf4f0ae7d0fab5906fe51bf56ecf4
> > Author: Javier Cardona <[email protected]>
> > AuthorDate: Fri Dec 3 09:20:40 2010 +0100
> > Commit: John W. Linville <[email protected]>
> > CommitDate: Mon Dec 6 16:01:28 2010 -0500
> >
> > nl80211/mac80211: define and allow configuring mesh element TTL

This patch looked like this:

--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1024,6 +1024,8 @@ static int ieee80211_set_mesh_params(struct wiphy *wiphy,
conf->dot11MeshMaxRetries = nconf->dot11MeshMaxRetries;
if (_chg_mesh_attr(NL80211_MESHCONF_TTL, mask))
conf->dot11MeshTTL = nconf->dot11MeshTTL;
+ if (_chg_mesh_attr(NL80211_MESHCONF_ELEMENT_TTL, mask))
+ conf->dot11MeshTTL = nconf->element_ttl;
if (_chg_mesh_attr(NL80211_MESHCONF_AUTO_OPEN_PLINKS, mask))
conf->auto_open_plinks = nconf->auto_open_plinks;
if (_chg_mesh_attr(NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES, mask))


Are you telling me you're not fixing that code?

johannes