netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Chan" <mchan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, "Michael Chan" <mchan@broadcom.com>,
	"Yi Zou" <yi.zou@intel.com>,
	"Bhanu Prakash Gollapudi" <bprakash@broadcom.com>
Subject: [PATCH 3/3 net-next] net: Define NETDEV_FCOE_WWNN, NETDEV_FCOE_WWPN only when CONFIG_LIBFCOE is enabled
Date: Fri, 26 Aug 2011 12:45:41 -0700	[thread overview]
Message-ID: <1314387941-2126-3-git-send-email-mchan@broadcom.com> (raw)
In-Reply-To: <1314387941-2126-2-git-send-email-mchan@broadcom.com>

From: Bhanu Prakash Gollapudi <bprakash@broadcom.com>

bnx2fc driver calls netdev->netdev_ops->ndo_fcoe_get_wwn() and it may not
be defined with the current Kconfig dependencies.  ndo_fcoe_get_wwn is
dependent on CONFIG_FCOE, but bnx2fc does not select CONFIG_FCOE, as it does
not depend on fcoe driver. Since both fcoe and bnx2fc drivers select
CONFIG_LIBFCOE, define NETDEV_FCOE_WWNN and NETDEV_FCOE_WWPN when
CONFIG_LIBFCOE is defined.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Yi Zou <yi.zou@intel.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
 include/linux/netdevice.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 125f9fb..0a7f619 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -922,11 +922,15 @@ struct net_device_ops {
 						       u16 xid,
 						       struct scatterlist *sgl,
 						       unsigned int sgc);
+#endif
+
+#if defined(CONFIG_LIBFCOE) || defined(CONFIG_LIBFCOE_MODULE)
 #define NETDEV_FCOE_WWNN 0
 #define NETDEV_FCOE_WWPN 1
 	int			(*ndo_fcoe_get_wwn)(struct net_device *dev,
 						    u64 *wwn, int type);
 #endif
+
 #ifdef CONFIG_RFS_ACCEL
 	int			(*ndo_rx_flow_steer)(struct net_device *dev,
 						     const struct sk_buff *skb,
-- 
1.7.1

  reply	other threads:[~2011-08-26 20:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26 19:45 [PATCH 1/3 net-next] cnic, bnx2fc: Increase maximum FCoE sessions Michael Chan
2011-08-26 19:45 ` [PATCH 2/3 net-next] cnic: Add timeout for ramrod replies Michael Chan
2011-08-26 19:45   ` Michael Chan [this message]
2011-08-26 22:11     ` [PATCH 3/3 net-next] net: Define NETDEV_FCOE_WWNN, NETDEV_FCOE_WWPN only when CONFIG_LIBFCOE is enabled Zou, Yi
2011-08-26 22:17       ` Randy Dunlap
2011-08-28 21:09     ` David Miller
2011-08-28 21:08   ` [PATCH 2/3 net-next] cnic: Add timeout for ramrod replies David Miller
2011-08-28 21:08 ` [PATCH 1/3 net-next] cnic, bnx2fc: Increase maximum FCoE sessions David Miller

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=1314387941-2126-3-git-send-email-mchan@broadcom.com \
    --to=mchan@broadcom.com \
    --cc=bprakash@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=yi.zou@intel.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).