From 2611eb5bc02fb66ca8bf95d1edb225358a76748c Mon Sep 17 00:00:00 2001 From: mjacob Date: Sun, 23 Jan 2000 01:41:17 +0000 Subject: Add a pointer in the softc that will point to partially received packet. Set up index increments for receive descriptors based on whether the PADDED_CELL define is set. --- sys/pci/if_wxvar.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/pci/if_wxvar.h b/sys/pci/if_wxvar.h index 3454567..dd9179f 100644 --- a/sys/pci/if_wxvar.h +++ b/sys/pci/if_wxvar.h @@ -283,6 +283,7 @@ typedef struct wx_softc { rxpkt_t *rbase; /* base of soft rdesc list */ u_int16_t rnxt; /* next descriptor to check */ u_int16_t _pad; + struct mbuf *rpending; /* pending partial packet */ /* * Transmit Management @@ -313,5 +314,10 @@ typedef struct wx_softc { #define WX_MAX_TDESC 256 /* number of transmit descriptors */ #define T_NXT_IDX(x) ((x + 1) & (WX_MAX_TDESC - 1)) #define WX_MAX_RDESC 64 /* number of receive descriptors */ -#define R_NXT_IDX(x) ((x + 1) & (WX_MAX_RDESC - 1)) -#define R_PREV_IDX(x) ((x - 1) & (WX_MAX_RDESC - 1)) +#ifdef PADDED_CELL +#define RXINCR 2 +#else +#define RXINCR 1 +#endif +#define R_NXT_IDX(x) ((x + RXINCR) & (WX_MAX_RDESC - 1)) +#define R_PREV_IDX(x) ((x - RXINCR) & (WX_MAX_RDESC - 1)) -- cgit v1.1