2011-05-12 04:42:51

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the final tree (wireless tree related)

Hi John,

After merging the final tree, today's linux-next build (i386 defconfig)
failed like this:

net/mac80211/cfg.c: In function 'sta_apply_parameters':
net/mac80211/cfg.c:746: error: 'struct sta_info' has no member named 'plink_state'

Cause by commit 9c3990aaec0a ("nl80211: Let userspace drive the peer link
management states"). plink_state is only available in sta_info if
CONFIG_MAC80211_MESH is set.

I applied the following patch for today (which my not be correct).

From: Stephen Rothwell <[email protected]>
Date: Thu, 12 May 2011 14:06:31 +1000
Subject: [PATCH] nl80211: fix for reference to sta_info -> plink_state

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

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index a2ff474..e090012 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -743,7 +743,9 @@ static void sta_apply_parameters(struct ieee80211_local *local,
case PLINK_LISTEN:
case PLINK_ESTAB:
case PLINK_BLOCKED:
+#ifdef CONFIG_MAC80211_MESH
sta->plink_state = params->plink_state;
+#endif
break;
default:
/* nothing */
--
1.7.5.1

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


2011-05-12 04:37:40

by Javier Cardona

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (wireless tree related)

Hi Stephen,

On Wed, May 11, 2011 at 9:10 PM, Stephen Rothwell <[email protected]> wrote:
> Hi John,
>
> After merging the final tree, today's linux-next build (i386 defconfig)
> failed like this:
>
> net/mac80211/cfg.c: In function 'sta_apply_parameters':
> net/mac80211/cfg.c:746: error: 'struct sta_info' has no member named 'plink_state'

Sorry, I just saw this. My apologies. The fixup is valid but I'm
trying to understand why it is needed.
ieee80211_vif_is_mesh(&sdata->vif) compiles to 'false' when
CONFIG_MAC80211_MESH is not defined... wouldn't the compiler remove
that dead code? (Obviously it did not...)

Anyway, given that this is necessary, it's probably cleaner to extend
the #ifdef block to the entire body of the outer if as follows:

From: Javier Cardona <[email protected]>
Date: Wed, 11 May 2011 21:30:17 -0700
Subject: [PATCH] mac80211: fixup access to conditionally defined struct member

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

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index a2ff474..d104c1e 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -738,6 +738,7 @@ static void sta_apply_parameters(struct
ieee80211_local *local,
&sta->sta.ht_cap);

if (ieee80211_vif_is_mesh(&sdata->vif)) {
+#ifdef CONFIG_MAC80211_MESH
if (sdata->u.mesh.security & IEEE80211_MESH_SEC_SECURED)
switch (params->plink_state) {
case PLINK_LISTEN:
@@ -759,6 +760,7 @@ static void sta_apply_parameters(struct
ieee80211_local *local,
break;
}
}
+#endif
}

static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
--
1.7.2.1


> Cause by commit 9c3990aaec0a ("nl80211: Let userspace drive the peer link
> management states"). ?plink_state is only available in sta_info if
> CONFIG_MAC80211_MESH is set.
>
> I applied the following patch for today (which my not be correct).
>
> From: Stephen Rothwell <[email protected]>
> Date: Thu, 12 May 2011 14:06:31 +1000
> Subject: [PATCH] nl80211: fix for reference to sta_info -> plink_state
>
> Signed-off-by: Stephen Rothwell <[email protected]>
> ---
> ?net/mac80211/cfg.c | ? ?2 ++
> ?1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> index a2ff474..e090012 100644
> --- a/net/mac80211/cfg.c
> +++ b/net/mac80211/cfg.c
> @@ -743,7 +743,9 @@ static void sta_apply_parameters(struct ieee80211_local *local,
> ? ? ? ? ? ? ? ? ? ? ? ?case PLINK_LISTEN:
> ? ? ? ? ? ? ? ? ? ? ? ?case PLINK_ESTAB:
> ? ? ? ? ? ? ? ? ? ? ? ?case PLINK_BLOCKED:
> +#ifdef CONFIG_MAC80211_MESH
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?sta->plink_state = params->plink_state;
> +#endif
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?break;
> ? ? ? ? ? ? ? ? ? ? ? ?default:
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/* ?nothing ?*/
> --
> 1.7.5.1
>
> --
> Cheers,
> Stephen Rothwell ? ? ? ? ? ? ? ? ? [email protected]
> http://www.canb.auug.org.au/~sfr/
>



--
Javier Cardona
cozybit Inc.
http://www.cozybit.com

2011-05-12 04:56:43

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (wireless tree related)

On Wed, 11 May 2011 21:37:16 -0700 Javier Cardona <[email protected]> wrote:
>
> Hi Stephen,
>
> On Wed, May 11, 2011 at 9:10 PM, Stephen Rothwell <[email protected]> wrote:
> > Hi John,
> >
> > After merging the final tree, today's linux-next build (i386 defconfig)
> > failed like this:
> >
> > net/mac80211/cfg.c: In function 'sta_apply_parameters':
> > net/mac80211/cfg.c:746: error: 'struct sta_info' has no member named 'plink_state'
>
> Sorry, I just saw this. My apologies. The fixup is valid but I'm
> trying to understand why it is needed.
> ieee80211_vif_is_mesh(&sdata->vif) compiles to 'false' when
> CONFIG_MAC80211_MESH is not defined... wouldn't the compiler remove
> that dead code? (Obviously it did not...)

The compiler will elide that code but only after compiling it, so the
code still has to be correct.

> Anyway, given that this is necessary, it's probably cleaner to extend
> the #ifdef block to the entire body of the outer if as follows:

I think you have the #ifdef one line too low.

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (1.10 kB)
(No filename) (490.00 B)
Download all attachments

2011-05-12 17:22:43

by Javier Cardona

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (wireless tree related)

On Wed, May 11, 2011 at 9:56 PM, Stephen Rothwell <[email protected]> wrote:
> On Wed, 11 May 2011 21:37:16 -0700 Javier Cardona <[email protected]> wrote:
>>
>> Hi Stephen,
>>
>> On Wed, May 11, 2011 at 9:10 PM, Stephen Rothwell <[email protected]> wrote:
>> > Hi John,
>> >
>> > After merging the final tree, today's linux-next build (i386 defconfig)
>> > failed like this:
>> >
>> > net/mac80211/cfg.c: In function 'sta_apply_parameters':
>> > net/mac80211/cfg.c:746: error: 'struct sta_info' has no member named 'plink_state'
>>
>> Sorry, I just saw this. ?My apologies. ?The fixup is valid but I'm
>> trying to understand why it is needed.
>> ieee80211_vif_is_mesh(&sdata->vif) compiles to 'false' when
>> CONFIG_MAC80211_MESH is not defined... wouldn't the compiler remove
>> that dead code? (Obviously it did not...)
>
> The compiler will elide that code but only after compiling it, so the
> code still has to be correct.

Thanks for the explanation.

>> Anyway, given that this is necessary, it's probably cleaner to extend
>> the #ifdef block to the entire body of the outer if as follows:
>
> I think you have the #ifdef one line too low.

My intent was to have the #endif one line above, but either way works.
That's the problem of preparing patches on pajamas.
How can I help at this point? Would resubmitting the patch help or
just add noise?

Cheers,

Javier

> --
> Cheers,
> Stephen Rothwell ? ? ? ? ? ? ? ? ? [email protected]
> http://www.canb.auug.org.au/~sfr/
>



--
Javier Cardona
cozybit Inc.
http://www.cozybit.com

2011-05-12 23:02:06

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (wireless tree related)

Hi Javier,

On Thu, 12 May 2011 10:22:20 -0700 Javier Cardona <[email protected]> wrote:
>
> On Wed, May 11, 2011 at 9:56 PM, Stephen Rothwell <[email protected]> wrote:
> > On Wed, 11 May 2011 21:37:16 -0700 Javier Cardona <[email protected]> wrote:
> >>
> >> On Wed, May 11, 2011 at 9:10 PM, Stephen Rothwell <[email protected]> wrote:
> >> >
> >> > After merging the final tree, today's linux-next build (i386 defconfig)
> >> > failed like this:
> >> >
> >> > net/mac80211/cfg.c: In function 'sta_apply_parameters':
> >> > net/mac80211/cfg.c:746: error: 'struct sta_info' has no member named 'plink_state'
> >>
> >> Sorry, I just saw this.  My apologies.  The fixup is valid but I'm
> >> trying to understand why it is needed.
> >> ieee80211_vif_is_mesh(&sdata->vif) compiles to 'false' when
> >> CONFIG_MAC80211_MESH is not defined... wouldn't the compiler remove
> >> that dead code? (Obviously it did not...)
> >
> > The compiler will elide that code but only after compiling it, so the
> > code still has to be correct.
>
> Thanks for the explanation.
>
> >> Anyway, given that this is necessary, it's probably cleaner to extend
> >> the #ifdef block to the entire body of the outer if as follows:
> >
> > I think you have the #ifdef one line too low.
>
> My intent was to have the #endif one line above, but either way works.
> That's the problem of preparing patches on pajamas.
> How can I help at this point? Would resubmitting the patch help or
> just add noise?

Unless John has already fixed this, you need to send him a patch. This
should be a fix patch as John doesn't normally rebase his tree (I think).
--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (1.70 kB)
(No filename) (490.00 B)
Download all attachments