All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Cardona <javier@cozybit.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: linux-next: build failure after merge of the final tree (wireless tree related)
Date: Wed, 11 May 2011 21:37:16 -0700	[thread overview]
Message-ID: <BANLkTik+=yh3eq6Snp9SfC0xn--Deccefw@mail.gmail.com> (raw)
In-Reply-To: <20110512141019.72ccb7a7.sfr@canb.auug.org.au>

Hi Stephen,

On Wed, May 11, 2011 at 9:10 PM, Stephen Rothwell <sfr@canb.auug.org.au> 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 <javier@cozybit.com>
Date: Wed, 11 May 2011 21:30:17 -0700
Subject: [PATCH] mac80211: fixup access to conditionally defined struct member

Signed-off-by: Javier Cardona <javier@cozybit.com>
---
 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 <sfr@canb.auug.org.au>
> 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 <sfr@canb.auug.org.au>
> ---
>  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                    sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/
>



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

  reply	other threads:[~2011-05-12  4:37 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-12  4:10 linux-next: build failure after merge of the final tree (wireless tree related) Stephen Rothwell
2011-05-12  4:37 ` Javier Cardona [this message]
2011-05-12  4:56   ` Stephen Rothwell
2011-05-12 17:22     ` Javier Cardona
2011-05-12 23:01       ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2011-12-22  5:58 Stephen Rothwell
2011-12-22  8:38 ` Kalle Valo
2011-12-22  8:38   ` Kalle Valo
2011-12-22 16:57 ` Michal Marek
2011-12-23 20:50   ` Michal Marek
2011-12-24  1:29     ` Kalle Valo
2011-12-24  1:29       ` Kalle Valo
2011-12-24  1:26   ` Kalle Valo
2011-12-24  1:26     ` Kalle Valo
2011-08-10  2:21 Stephen Rothwell
2011-08-10  6:11 ` Kalle Valo
2011-08-10  6:11   ` Kalle Valo
2011-02-25  6:16 Stephen Rothwell
2011-02-25 20:33 ` wwguy
2011-02-24  6:24 Stephen Rothwell
2011-02-22  7:15 Stephen Rothwell
2011-02-22 15:45 ` Larry Finger
2011-01-05  4:10 Stephen Rothwell
2010-12-16  3:29 Stephen Rothwell
2010-12-16  4:49 ` Larry Finger
2010-12-07  3:12 Stephen Rothwell
2010-11-17  2:48 Stephen Rothwell
2010-11-17 16:03 ` Randy Dunlap
2010-11-18  2:27   ` Stephen Rothwell
2010-11-18 21:09     ` Gustavo F. Padovan
2010-10-12  5:35 Stephen Rothwell
2010-03-24  4:59 Stephen Rothwell
2010-03-24  8:13 ` Sujith
2010-03-24  8:13   ` Sujith

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='BANLkTik+=yh3eq6Snp9SfC0xn--Deccefw@mail.gmail.com' \
    --to=javier@cozybit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=sfr@canb.auug.org.au \
    /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.