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.
This commit is contained in:
Matt Jacob 2000-01-23 01:41:17 +00:00
parent e2e6935a6f
commit c792f629d8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=56409

View File

@ -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))