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/ulp | |
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/ulp')
-rw-r--r-- | sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c | 5 | ||||
-rw-r--r-- | sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c | 10 | ||||
-rw-r--r-- | sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c | 4 |
3 files changed, 19 insertions, 0 deletions
diff --git a/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c index 887d892..6851be9 100644 --- a/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c +++ b/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c @@ -53,7 +53,12 @@ __FBSDID("$FreeBSD$"); #include <sys/taskqueue.h> #include <sys/proc.h> #include <sys/eventhandler.h> + +#if __FreeBSD_version >= 800044 #include <sys/vimage.h> +#else +#define V_ifnet ifnet +#endif #include <net/if.h> #include <net/if_var.h> diff --git a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c index ff7595b..2732c57 100644 --- a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c +++ b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c @@ -47,7 +47,17 @@ __FBSDID("$FreeBSD$"); #include <sys/syslog.h> #include <sys/protosw.h> #include <sys/priv.h> + +#if __FreeBSD_version >= 800044 #include <sys/vimage.h> +#else +#define V_tcp_do_autosndbuf tcp_do_autosndbuf +#define V_tcp_autosndbuf_max tcp_autosndbuf_max +#define V_tcp_do_rfc1323 tcp_do_rfc1323 +#define V_tcp_do_autorcvbuf tcp_do_autorcvbuf +#define V_tcp_autorcvbuf_max tcp_autorcvbuf_max +#define V_tcpstat tcpstat +#endif #include <net/if.h> #include <net/route.h> diff --git a/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c b/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c index 77350db..f68089d 100644 --- a/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c +++ b/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c @@ -368,8 +368,12 @@ cxgb_vm_page_to_miov(struct toepcb *toep, struct uio *uio, struct mbuf **m) m0->m_flags = (M_EXT|M_NOFREE); m0->m_ext.ext_type = EXT_EXTREF; m0->m_ext.ext_free = cxgb_zero_copy_free; +#if __FreeBSD_version >= 800016 m0->m_ext.ext_arg1 = NULL; /* XXX: probably wrong /phk */ m0->m_ext.ext_arg2 = NULL; +#else + m0->m_ext.ext_args = NULL; +#endif mv = mtomv(m0); mv->mv_count = seg_count; |