Fix brokenness I introduced while debugging.

- initialize rxlenmask when 8139C+
  - remove meaningless memsets.
This commit is contained in:
toshii 2004-05-30 03:50:52 +00:00
parent b5fa366e57
commit 4b54ec9a22
1 changed files with 2 additions and 4 deletions

View File

@ -848,6 +848,8 @@ re_attach(struct device *parent, struct device *self, void *aux)
/* Set RX length mask */
sc->rtk_rxlenmask = RTK_RDESC_STAT_FRAGLEN;
if (rtk_read_eeprom(sc, RTK_EE_ID, RTK_EEADDR_LEN1) == 0x8129)
addr_len = RTK_EEADDR_LEN1;
else
@ -863,10 +865,6 @@ re_attach(struct device *parent, struct device *self, void *aux)
}
}
memset((char *)&sc->rtk_ldata.rtk_rx_mbuf, 0,
(RTK_RX_DESC_CNT * sizeof(struct mbuf *)));
memset((char *)&sc->rtk_ldata.rtk_tx_mbuf, 0,
(RTK_TX_DESC_CNT * sizeof(struct mbuf *)));
error = re_allocmem(sc);
if (error)