]> Pileus Git - ~andy/linux/commitdiff
net: Define NETDEV_FCOE_WWNN, NETDEV_FCOE_WWPN only when CONFIG_LIBFCOE is enabled
authorBhanu Prakash Gollapudi <bprakash@broadcom.com>
Fri, 26 Aug 2011 09:45:41 +0000 (09:45 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 28 Aug 2011 21:08:28 +0000 (17:08 -0400)
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>
Reviewed-by: Yi Zou <yi.zou@intel.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h

index 125f9fb8ece48eb157543cc6f5cd1284a142acc4..0a7f619f284eaa800b3a82da854472a551bfc4b2 100644 (file)
@@ -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,