202 |
{ |
{ |
203 |
n_eth_hdr_t *hdr = (n_eth_hdr_t *)pkt; |
n_eth_hdr_t *hdr = (n_eth_hdr_t *)pkt; |
204 |
|
|
|
/* Ignore traffic sent by us */ |
|
|
if (!memcmp(&d->mac_addr,&hdr->saddr,N_ETH_ALEN)) |
|
|
return(FALSE); |
|
|
|
|
205 |
/* Accept systematically frames if we are running is promiscuous mode */ |
/* Accept systematically frames if we are running is promiscuous mode */ |
206 |
if (d->csr[15] & AM79C971_CSR15_PROM) |
if (d->csr[15] & AM79C971_CSR15_PROM) |
207 |
return(TRUE); |
return(TRUE); |
698 |
rxd0.rmd[1] |= AM79C971_RMD1_STP; |
rxd0.rmd[1] |= AM79C971_RMD1_STP; |
699 |
physmem_copy_u32_to_vm(d->vm,rx_start+4,rxd0.rmd[1]); |
physmem_copy_u32_to_vm(d->vm,rx_start+4,rxd0.rmd[1]); |
700 |
|
|
|
/* Generate RX interrupt */ |
|
701 |
d->csr[0] |= AM79C971_CSR0_RINT; |
d->csr[0] |= AM79C971_CSR0_RINT; |
702 |
am79c971_update_intr_flag(d); |
am79c971_update_intr_flag(d); |
703 |
am79c971_trigger_irq(d); |
am79c971_trigger_irq(d); |
1007 |
|
|
1008 |
/* Bind a NIO to an AMD Am79c971 device */ |
/* Bind a NIO to an AMD Am79c971 device */ |
1009 |
int dev_am79c971_set_nio(struct am79c971_data *d,netio_desc_t *nio) |
int dev_am79c971_set_nio(struct am79c971_data *d,netio_desc_t *nio) |
1010 |
{ |
{ |
1011 |
/* check that a NIO is not already bound */ |
/* check that a NIO is not already bound */ |
1012 |
if (d->nio != NULL) |
if (d->nio != NULL) |
1013 |
return(-1); |
return(-1); |