netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wang Chen <wangchen@cn.fujitsu.com>
To: Jeff Garzik <jgarzik@pobox.com>, NETDEV <netdev@vger.kernel.org>,
	Eugene Konev <ejka@imfi.kspu.ru>
Subject: [PATCH] cpmac: use #ifdef CONFIG_NETDEVICES_MULTIQUEUE to wrap mq feature
Date: Thu, 19 Jun 2008 11:20:45 +0800	[thread overview]
Message-ID: <4859D08D.4030503@cn.fujitsu.com> (raw)

netdev->features |= NETIF_F_MULTI_QUEUE should wrapped by
#ifdef CONFIG_NETDEVICES_MULTIQUEUE.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
---
 drivers/net/cpmac.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index 7f3f62e..9172dec 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -1152,7 +1152,11 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
 		}
 	}
 
+#ifdef CONFIG_NETDEVICES_MULTIQUEUE
 	dev = alloc_etherdev_mq(sizeof(*priv), CPMAC_QUEUES);
+#else
+	dev = alloc_etherdev(sizeof(*priv));
+#endif
 
 	if (!dev) {
 		printk(KERN_ERR "cpmac: Unable to allocate net_device\n");
@@ -1179,7 +1183,9 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
 	dev->set_multicast_list = cpmac_set_multicast_list;
 	dev->tx_timeout         = cpmac_tx_timeout;
 	dev->ethtool_ops        = &cpmac_ethtool_ops;
+#ifdef CONFIG_NETDEVICES_MULTIQUEUE
 	dev->features |= NETIF_F_MULTI_QUEUE;
+#endif
 
 	netif_napi_add(dev, &priv->napi, cpmac_poll, 64);
 
-- 
1.5.3.4


                 reply	other threads:[~2008-06-19  3:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4859D08D.4030503@cn.fujitsu.com \
    --to=wangchen@cn.fujitsu.com \
    --cc=ejka@imfi.kspu.ru \
    --cc=jgarzik@pobox.com \
    --cc=netdev@vger.kernel.org \
    /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).