forked from Imagelibrary/rtems
2011-07-14 Till Straumann <strauman@slac.stanford.edu>
PR 1833/bsps * ne2000/ne2000.c: Addition of multicast support disabled broadcast reception. Patch also includes support to work on big endian CPUs.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2011-07-14 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
|
PR 1833/bsps
|
||||||
|
* ne2000/ne2000.c: Addition of multicast support disabled broadcast
|
||||||
|
reception. Patch also includes support to work on big endian CPUs.
|
||||||
|
|
||||||
2011-04-11 Keith Robertson <kjrobert at alumni dot uwaterloo dot ca>
|
2011-04-11 Keith Robertson <kjrobert at alumni dot uwaterloo dot ca>
|
||||||
|
|
||||||
* ne2000/ne2000.c: Add multicast support. Patch submitted to mailing
|
* ne2000/ne2000.c: Add multicast support. Patch submitted to mailing
|
||||||
|
|||||||
@@ -205,7 +205,8 @@ struct ne_ring
|
|||||||
{
|
{
|
||||||
unsigned char rsr; /* receiver status */
|
unsigned char rsr; /* receiver status */
|
||||||
unsigned char next; /* pointer to next packet */
|
unsigned char next; /* pointer to next packet */
|
||||||
unsigned short count; /* bytes in packet (length + 4) */
|
unsigned char cnt_lo; /* bytes in packet (length + 4) */
|
||||||
|
unsigned char cnt_hi; /* 16-bit, little-endian value */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Forward declarations to avoid warnings */
|
/* Forward declarations to avoid warnings */
|
||||||
@@ -502,11 +503,8 @@ ne_init_hardware (struct ne_softc *sc)
|
|||||||
/* Set page 0 registers */
|
/* Set page 0 registers */
|
||||||
outport_byte (port + CMDR, MSK_PG0 | MSK_RD2 | MSK_STP);
|
outport_byte (port + CMDR, MSK_PG0 | MSK_RD2 | MSK_STP);
|
||||||
|
|
||||||
/* accept broadcast */
|
/* accept broadcast + multicast */
|
||||||
outport_byte (port + RCR, (sc->accept_broadcasts ? MSK_AB : 0));
|
outport_byte (port + RCR, (sc->accept_broadcasts ? MSK_AB : 0) | MSK_AM);
|
||||||
|
|
||||||
/* accept multicast */
|
|
||||||
outport_byte (port + RCR, MSK_AM);
|
|
||||||
|
|
||||||
/* Start interface */
|
/* Start interface */
|
||||||
outport_byte (port + CMDR, MSK_PG0 | MSK_RD2 | MSK_STA);
|
outport_byte (port + CMDR, MSK_PG0 | MSK_RD2 | MSK_STA);
|
||||||
@@ -605,7 +603,7 @@ ne_rx_daemon (void *arg)
|
|||||||
next = NE_FIRST_RX_PAGE;
|
next = NE_FIRST_RX_PAGE;
|
||||||
|
|
||||||
/* check packet length */
|
/* check packet length */
|
||||||
len = hdr.count;
|
len = ( hdr.cnt_hi << 8 ) | hdr.cnt_lo;
|
||||||
if (currpage < startpage)
|
if (currpage < startpage)
|
||||||
cnt1 = currpage + (NE_STOP_PAGE - NE_FIRST_RX_PAGE) - startpage;
|
cnt1 = currpage + (NE_STOP_PAGE - NE_FIRST_RX_PAGE) - startpage;
|
||||||
else
|
else
|
||||||
@@ -684,7 +682,7 @@ ne_rx_daemon (void *arg)
|
|||||||
m->m_data += sizeof (struct ether_header);
|
m->m_data += sizeof (struct ether_header);
|
||||||
|
|
||||||
#ifdef DEBUG_NE
|
#ifdef DEBUG_NE
|
||||||
/* printk("[r%d]", hdr.count - sizeof(hdr)); */
|
/* printk("[r%d]", ((hdr.cnt_hi<<8) + hdr.cnt_lo - sizeof(hdr))); */
|
||||||
printk("<");
|
printk("<");
|
||||||
#endif
|
#endif
|
||||||
ether_input (ifp, eh, m);
|
ether_input (ifp, eh, m);
|
||||||
|
|||||||
Reference in New Issue
Block a user