/[dynamips]/upstream/dynamips-0.2.7-RC1/dev_am79c971.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /upstream/dynamips-0.2.7-RC1/dev_am79c971.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

upstream/dynamips-0.2.5/dev_am79c971.c revision 1 by dpavlin, Sat Oct 6 16:01:44 2007 UTC upstream/dynamips-0.2.6-RC3/dev_am79c971.c revision 4 by dpavlin, Sat Oct 6 16:06:49 2007 UTC
# Line 202  static inline int am79c971_handle_mac_ad Line 202  static inline int am79c971_handle_mac_ad
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);
# Line 702  static int am79c971_receive_pkt(struct a Line 698  static int am79c971_receive_pkt(struct a
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);
# Line 1012  void dev_am79c971_remove(struct am79c971 Line 1007  void dev_am79c971_remove(struct am79c971
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);

Legend:
Removed from v.1  
changed lines
  Added in v.4

  ViewVC Help
Powered by ViewVC 1.1.26