206 |
n_eth_hdr_t *hdr = (n_eth_hdr_t *)pkt; |
n_eth_hdr_t *hdr = (n_eth_hdr_t *)pkt; |
207 |
int i; |
int i; |
208 |
|
|
|
/* Ignore traffic sent by us */ |
|
|
for(i=0;i<d->mac_addr_count;i++) |
|
|
if (!memcmp(&d->mac_addr[i],&hdr->saddr,N_ETH_ALEN)) |
|
|
return(FALSE); |
|
|
|
|
209 |
/* Accept systematically frames if we are running is promiscuous mode */ |
/* Accept systematically frames if we are running is promiscuous mode */ |
210 |
if (d->csr[6] & DEC21140_CSR6_PROMISC) |
if (d->csr[6] & DEC21140_CSR6_PROMISC) |
211 |
return(TRUE); |
return(TRUE); |
429 |
break; |
break; |
430 |
|
|
431 |
case 8: |
case 8: |
432 |
/* CSR8 is cleared when read */ |
/* CSR8 is cleared when read (missed frame counter) */ |
433 |
d->csr[reg] = 0; |
d->csr[reg] = 0; |
434 |
|
*data = 0; |
435 |
break; |
break; |
436 |
|
|
437 |
default: |
default: |
506 |
return(nrxd_addr); |
return(nrxd_addr); |
507 |
} |
} |
508 |
|
|
509 |
/* Read an RX descriptor */ |
/* Read a RX descriptor */ |
510 |
static void rxdesc_read(struct dec21140_data *d,m_uint32_t rxd_addr, |
static void rxdesc_read(struct dec21140_data *d,m_uint32_t rxd_addr, |
511 |
struct rx_desc *rxd) |
struct rx_desc *rxd) |
512 |
{ |
{ |
725 |
/* Copy the current txring descriptor */ |
/* Copy the current txring descriptor */ |
726 |
tx_start = d->tx_current; |
tx_start = d->tx_current; |
727 |
ptxd = &txd0; |
ptxd = &txd0; |
728 |
txdesc_read(d,d->tx_current,ptxd); |
txdesc_read(d,tx_start,ptxd); |
729 |
|
|
730 |
/* If we don't own the first descriptor, we cannot transmit */ |
/* If we don't own the first descriptor, we cannot transmit */ |
731 |
if (!(txd0.tdes[0] & DEC21140_TXDESC_OWN)) |
if (!(txd0.tdes[0] & DEC21140_TXDESC_OWN)) |