linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: lrodriguez@atheros.com
Cc: linux-wireless@vger.kernel.org, mcgrof@infradead.org,
	Hauke Mehrtens <hauke@hauke-m.de>,
	philipp_subx@redfish-solutions.com
Subject: [PATCH] compat: fix build error in init_dummy_netdev
Date: Sat, 25 Sep 2010 13:22:17 +0200	[thread overview]
Message-ID: <1285413737-782-1-git-send-email-hauke@hauke-m.de> (raw)

In kernel <= 2.6.28 the member napi_list in struct net_device is only
availabe if CONFIG_NETPOLL is set. We should initialize it only if it
is available.

This should fix the problem reported by Philip.

This should also go into stable.

CC: philipp_subx@redfish-solutions.com
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 compat/compat-2.6.29.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/compat/compat-2.6.29.c b/compat/compat-2.6.29.c
index bc4288f..cded3cc 100644
--- a/compat/compat-2.6.29.c
+++ b/compat/compat-2.6.29.c
@@ -153,8 +153,10 @@ int init_dummy_netdev(struct net_device *dev)
 	/* initialize the ref count */
 	atomic_set(&dev->refcnt, 1);
 
+#ifdef CONFIG_NETPOLL
 	/* NAPI wants this */
 	INIT_LIST_HEAD(&dev->napi_list);
+#endif
 
 	/* a dummy interface is started by default */
 	set_bit(__LINK_STATE_PRESENT, &dev->state);
-- 
1.7.0.4


             reply	other threads:[~2010-09-25 11:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-25 11:22 Hauke Mehrtens [this message]
2010-09-25 21:55 ` [PATCH] compat: fix build error in init_dummy_netdev Luis R. Rodriguez
2010-09-26  0:43 ` Philip Prindeville

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=1285413737-782-1-git-send-email-hauke@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lrodriguez@atheros.com \
    --cc=mcgrof@infradead.org \
    --cc=philipp_subx@redfish-solutions.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;
as well as URLs for NNTP newsgroup(s).