Skip to content

Commit 3c9c36b

Browse files
Bhanu Prakash Gollapudidavem330
authored andcommitted
net: Define NETDEV_FCOE_WWNN, NETDEV_FCOE_WWPN only when CONFIG_LIBFCOE is enabled
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>
1 parent dcc7e3a commit 3c9c36b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/linux/netdevice.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,11 +922,15 @@ struct net_device_ops {
922922
u16 xid,
923923
struct scatterlist *sgl,
924924
unsigned int sgc);
925+
#endif
926+
927+
#if defined(CONFIG_LIBFCOE) || defined(CONFIG_LIBFCOE_MODULE)
925928
#define NETDEV_FCOE_WWNN 0
926929
#define NETDEV_FCOE_WWPN 1
927930
int (*ndo_fcoe_get_wwn)(struct net_device *dev,
928931
u64 *wwn, int type);
929932
#endif
933+
930934
#ifdef CONFIG_RFS_ACCEL
931935
int (*ndo_rx_flow_steer)(struct net_device *dev,
932936
const struct sk_buff *skb,

0 commit comments

Comments
 (0)