Fix building ixgbe with gcc, it doesn't like nested extern declarations.

The fix is to move the extern declaration ix_crcstrip out of
ixgbe_setup_hw_rsc.
This commit is contained in:
Andrew Turner 2015-03-19 13:00:02 +00:00
parent e7affda584
commit 6c85c62d00

View File

@ -50,6 +50,8 @@
#include <net/netmap.h>
#include <sys/selinfo.h>
#include <dev/netmap/netmap_kern.h>
extern int ix_crcstrip;
#endif
/*
@ -1240,7 +1242,6 @@ ixgbe_setup_hw_rsc(struct rx_ring *rxr)
rdrxctl = IXGBE_READ_REG(hw, IXGBE_RDRXCTL);
rdrxctl &= ~IXGBE_RDRXCTL_RSCFRSTSIZE;
#ifdef DEV_NETMAP /* crcstrip is optional in netmap */
extern int ix_crcstrip;
if (adapter->ifp->if_capenable & IFCAP_NETMAP && !ix_crcstrip)
#endif /* DEV_NETMAP */
rdrxctl |= IXGBE_RDRXCTL_CRCSTRIP;