Deleted Added
full compact
if_cx.c (130585) if_cx.c (130640)
1/*
2 * Cronyx-Sigma adapter driver for FreeBSD.
3 * Supports PPP/HDLC and Cisco/HDLC protocol in synchronous mode,
4 * and asyncronous channels with full modem control.
5 * Keepalive protocol implemented in both Cisco and PPP modes.
6 *
7 * Copyright (C) 1994-2002 Cronyx Engineering.
8 * Author: Serge Vakulenko, <vak@cronyx.ru>

--- 8 unchanged lines hidden (view full) ---

17 * Authors grant any other persons or organisations a permission to use,
18 * modify and redistribute this software in source and binary forms,
19 * as long as this message is kept with the software, all derivative
20 * works or modified versions.
21 *
22 * Cronyx Id: if_cx.c,v 1.1.2.23 2004/02/26 17:56:40 rik Exp $
23 */
24#include <sys/cdefs.h>
1/*
2 * Cronyx-Sigma adapter driver for FreeBSD.
3 * Supports PPP/HDLC and Cisco/HDLC protocol in synchronous mode,
4 * and asyncronous channels with full modem control.
5 * Keepalive protocol implemented in both Cisco and PPP modes.
6 *
7 * Copyright (C) 1994-2002 Cronyx Engineering.
8 * Author: Serge Vakulenko, <vak@cronyx.ru>

--- 8 unchanged lines hidden (view full) ---

17 * Authors grant any other persons or organisations a permission to use,
18 * modify and redistribute this software in source and binary forms,
19 * as long as this message is kept with the software, all derivative
20 * works or modified versions.
21 *
22 * Cronyx Id: if_cx.c,v 1.1.2.23 2004/02/26 17:56:40 rik Exp $
23 */
24#include <sys/cdefs.h>
25__FBSDID("$FreeBSD: head/sys/dev/cx/if_cx.c 130585 2004-06-16 09:47:26Z phk $");
25__FBSDID("$FreeBSD: head/sys/dev/cx/if_cx.c 130640 2004-06-17 17:16:53Z phk $");
26
27#include <sys/param.h>
28
29#if __FreeBSD_version >= 500000
30# define NCX 1
31#else
32# include "cx.h"
33#endif

--- 3138 unchanged lines hidden (view full) ---

3172#else /* __FreeBSD_version >= 400000 */
3173static int cx_modevent (module_t mod, int type, void *unused)
3174{
3175 struct cdev *dev;
3176 static int load_count = 0;
3177 struct cdevsw *cdsw;
3178
3179#if __FreeBSD_version >= 502103
26
27#include <sys/param.h>
28
29#if __FreeBSD_version >= 500000
30# define NCX 1
31#else
32# include "cx.h"
33#endif

--- 3138 unchanged lines hidden (view full) ---

3172#else /* __FreeBSD_version >= 400000 */
3173static int cx_modevent (module_t mod, int type, void *unused)
3174{
3175 struct cdev *dev;
3176 static int load_count = 0;
3177 struct cdevsw *cdsw;
3178
3179#if __FreeBSD_version >= 502103
3180 dev = udev2dev (makeudev(CDEV_MAJOR, 0));
3180 dev = findcdev (makedev(CDEV_MAJOR, 0));
3181#else
3182 dev = makedev (CDEV_MAJOR, 0);
3183#endif
3184 switch (type) {
3185 case MOD_LOAD:
3181#else
3182 dev = makedev (CDEV_MAJOR, 0);
3183#endif
3184 switch (type) {
3185 case MOD_LOAD:
3186 if (dev != NODEV &&
3186 if (dev != NULL &&
3187 (cdsw = devsw (dev)) &&
3188 cdsw->d_maj == CDEV_MAJOR) {
3189 printf ("Sigma driver is already in system\n");
3190 return (EEXIST);
3191 }
3192#if __FreeBSD_version >= 500000 && defined NETGRAPH
3193 if (ng_newtype (&typestruct))
3194 printf ("Failed to register ng_cx\n");

--- 119 unchanged lines hidden ---
3187 (cdsw = devsw (dev)) &&
3188 cdsw->d_maj == CDEV_MAJOR) {
3189 printf ("Sigma driver is already in system\n");
3190 return (EEXIST);
3191 }
3192#if __FreeBSD_version >= 500000 && defined NETGRAPH
3193 if (ng_newtype (&typestruct))
3194 printf ("Failed to register ng_cx\n");

--- 119 unchanged lines hidden ---