summaryrefslogtreecommitdiffstats
path: root/sys/i4b/layer2/i4b_sframe.c
diff options
context:
space:
mode:
authorhm <hm@FreeBSD.org>2000-10-09 13:18:17 +0000
committerhm <hm@FreeBSD.org>2000-10-09 13:18:17 +0000
commit9fc2bc8a46f4f09ca71eaf59e5c203b5d61533fb (patch)
treeca1e99e8eac9fd3f8c8cecbcbfc102b0bfa6f03f /sys/i4b/layer2/i4b_sframe.c
parent7fc1fa165474e47dca5d7dfb2584d97d169d686d (diff)
downloadFreeBSD-src-9fc2bc8a46f4f09ca71eaf59e5c203b5d61533fb.zip
FreeBSD-src-9fc2bc8a46f4f09ca71eaf59e5c203b5d61533fb.tar.gz
update to i4b version 0.95.04
Diffstat (limited to 'sys/i4b/layer2/i4b_sframe.c')
-rw-r--r--sys/i4b/layer2/i4b_sframe.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/sys/i4b/layer2/i4b_sframe.c b/sys/i4b/layer2/i4b_sframe.c
index 6644082..5e3ef26 100644
--- a/sys/i4b/layer2/i4b_sframe.c
+++ b/sys/i4b/layer2/i4b_sframe.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
+ * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,11 +27,11 @@
* i4b_sframe.c - s frame handling routines
* ----------------------------------------
*
- * $Id: i4b_sframe.c,v 1.12 1999/12/13 21:25:27 hm Exp $
+ * $Id: i4b_sframe.c,v 1.15 2000/08/24 11:48:58 hm Exp $
*
* $FreeBSD$
*
- * last edit-date: [Mon Dec 13 22:04:17 1999]
+ * last edit-date: [Mon May 29 16:55:23 2000]
*
*---------------------------------------------------------------------------*/
@@ -43,17 +43,16 @@
#if NI4BQ921 > 0
#include <sys/param.h>
-
-#if defined(__FreeBSD__)
-#else
-#include <sys/ioctl.h>
-#endif
-
+#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <net/if.h>
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 104230000
+#include <sys/callout.h>
+#endif
+
#ifdef __FreeBSD__
#include <machine/i4b_debug.h>
#include <machine/i4b_ioctl.h>
@@ -96,25 +95,25 @@ i4b_rxd_s_frame(int unit, struct mbuf *m)
{
case RR:
l2sc->stat.rx_rr++; /* update statistics */
- DBGL2(L2_S_MSG, "i4b_rxd_s_frame", ("rx'd RR, N(R) = %d\n", l2sc->rxd_NR));
+ NDBGL2(L2_S_MSG, "rx'd RR, N(R) = %d", l2sc->rxd_NR);
i4b_next_l2state(l2sc, EV_RXRR);
break;
case RNR:
l2sc->stat.rx_rnr++; /* update statistics */
- DBGL2(L2_S_MSG, "i4b_rxd_s_frame", ("rx'd RNR, N(R) = %d\n", l2sc->rxd_NR));
+ NDBGL2(L2_S_MSG, "rx'd RNR, N(R) = %d", l2sc->rxd_NR);
i4b_next_l2state(l2sc, EV_RXRNR);
break;
case REJ:
l2sc->stat.rx_rej++; /* update statistics */
- DBGL2(L2_S_MSG, "i4b_rxd_s_frame", ("rx'd REJ, N(R) = %d\n", l2sc->rxd_NR));
+ NDBGL2(L2_S_MSG, "rx'd REJ, N(R) = %d", l2sc->rxd_NR);
i4b_next_l2state(l2sc, EV_RXREJ);
break;
default:
l2sc->stat.err_rx_bads++; /* update statistics */
- DBGL2(L2_S_ERR, "i4b_rxd_s_frame", ("ERROR, unknown code, frame = \n"));
+ NDBGL2(L2_S_ERR, "ERROR, unknown code, frame = ");
i4b_print_frame(m->m_len, m->m_data);
break;
}
@@ -129,7 +128,7 @@ i4b_tx_rr_command(l2_softc_t *l2sc, pbit_t pbit)
{
struct mbuf *m;
- DBGL2(L2_S_MSG, "i4b_tx_rr_command", ("tx RR, unit = %d\n", l2sc->unit));
+ NDBGL2(L2_S_MSG, "tx RR, unit = %d", l2sc->unit);
m = i4b_build_s_frame(l2sc, CR_CMD_TO_NT, pbit, RR);
@@ -146,7 +145,7 @@ i4b_tx_rr_response(l2_softc_t *l2sc, fbit_t fbit)
{
struct mbuf *m;
- DBGL2(L2_S_MSG, "i4b_tx_rr_response", ("tx RR, unit = %d\n", l2sc->unit));
+ NDBGL2(L2_S_MSG, "tx RR, unit = %d", l2sc->unit);
m = i4b_build_s_frame(l2sc, CR_RSP_TO_NT, fbit, RR);
@@ -163,7 +162,7 @@ i4b_tx_rnr_command(l2_softc_t *l2sc, pbit_t pbit)
{
struct mbuf *m;
- DBGL2(L2_S_MSG, "i4b_tx_rnr_command", ("tx RNR, unit = %d\n", l2sc->unit));
+ NDBGL2(L2_S_MSG, "tx RNR, unit = %d", l2sc->unit);
m = i4b_build_s_frame(l2sc, CR_CMD_TO_NT, pbit, RNR);
@@ -180,7 +179,7 @@ i4b_tx_rnr_response(l2_softc_t *l2sc, fbit_t fbit)
{
struct mbuf *m;
- DBGL2(L2_S_MSG, "i4b_tx_rnr_response", ("tx RNR, unit = %d\n", l2sc->unit));
+ NDBGL2(L2_S_MSG, "tx RNR, unit = %d", l2sc->unit);
m = i4b_build_s_frame(l2sc, CR_RSP_TO_NT, fbit, RNR);
@@ -197,7 +196,7 @@ i4b_tx_rej_response(l2_softc_t *l2sc, fbit_t fbit)
{
struct mbuf *m;
- DBGL2(L2_S_MSG, "i4b_tx_rej_response", ("tx REJ, unit = %d\n", l2sc->unit));
+ NDBGL2(L2_S_MSG, "tx REJ, unit = %d", l2sc->unit);
m = i4b_build_s_frame(l2sc, CR_RSP_TO_NT, fbit, REJ);
OpenPOWER on IntegriCloud