diff options
author | kmacy <kmacy@FreeBSD.org> | 2008-09-23 02:22:24 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2008-09-23 02:22:24 +0000 |
commit | ba7bc1f5eab0dc332f7453ae165ebdb0be1e9126 (patch) | |
tree | 92dfdc37922d95903308af5bb4ec1bb495dcbd30 /sys/dev/cxgb/cxgb_main.c | |
parent | 4c77244de081407f9c0ca3df71360f80e6a0edd2 (diff) | |
download | FreeBSD-src-ba7bc1f5eab0dc332f7453ae165ebdb0be1e9126.zip FreeBSD-src-ba7bc1f5eab0dc332f7453ae165ebdb0be1e9126.tar.gz |
Allow cxgb to be unified across versions by making newer features conditional
Submitted by: Chelsio Inc
MFC after: 3 days
Diffstat (limited to 'sys/dev/cxgb/cxgb_main.c')
-rw-r--r-- | sys/dev/cxgb/cxgb_main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c index 39bd6f2..6b4252c 100644 --- a/sys/dev/cxgb/cxgb_main.c +++ b/sys/dev/cxgb/cxgb_main.c @@ -876,6 +876,12 @@ cxgb_makedev(struct port_info *pi) return (0); } +#ifndef LRO_SUPPORTED +#ifdef IFCAP_LRO +#undef IFCAP_LRO +#endif +#define IFCAP_LRO 0x0 +#endif #ifdef TSO_SUPPORTED #define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO) @@ -1899,6 +1905,7 @@ cxgb_set_mtu(struct port_info *p, int mtu) return (error); } +#ifdef LRO_SUPPORTED /* * Mark lro enabled or disabled in all qsets for this port */ @@ -1916,6 +1923,7 @@ cxgb_set_lro(struct port_info *p, int enabled) } return (0); } +#endif static int cxgb_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) @@ -2002,12 +2010,14 @@ cxgb_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) error = EINVAL; } } +#ifdef LRO_SUPPORTED if (mask & IFCAP_LRO) { ifp->if_capenable ^= IFCAP_LRO; /* Safe to do this even if cxgb_up not called yet */ cxgb_set_lro(p, ifp->if_capenable & IFCAP_LRO); } +#endif if (mask & IFCAP_VLAN_HWTAGGING) { ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; reinit = ifp->if_drv_flags & IFF_DRV_RUNNING; |