PATCH eth/powerpc fec/quicc RX routine

Harald Küthe Harald.Kuethe@controlware.de
Mon Oct 11 08:09:00 GMT 2004


Hello,

during my bridging tests I found out that the packet which is passed to the upper layer contains the CRC.
This causes packets which use the full ethernet length will not be forwarded.

This patch removes the CRC.

A further patch which adds setting the promiscuous mode to the FEC can be provided.

Regards
Harald


diff -urN packages.orig/devs/eth/powerpc/fec/current/ChangeLog packages/devs/eth/powerpc/fec/current/ChangeLog
--- packages.orig/devs/eth/powerpc/fec/current/ChangeLog	2003-12-21 14:46:52.000000000 +0100
+++ packages/devs/eth/powerpc/fec/current/ChangeLog	2004-10-11 09:59:51.000000000 +0200
@@ -1,3 +1,7 @@
+2004-10-11  Harald Kuethe  <hkuethe@controlware.de>
+
+	* src/if_fec.c (fec_eth_RxEvent): remove crc from packet.
+
 2003-12-21  Gary Thomas  <gary@mlbassoc.com>
 
 	* src/if_fec.c (fec_eth_RxEvent): Clean up some unused variables.
diff -urN packages.orig/devs/eth/powerpc/fec/current/src/if_fec.c packages/devs/eth/powerpc/fec/current/src/if_fec.c
--- packages.orig/devs/eth/powerpc/fec/current/src/if_fec.c	2003-12-21 14:46:54.000000000 +0100
+++ packages/devs/eth/powerpc/fec/current/src/if_fec.c	2004-10-11 09:55:35.000000000 +0200
@@ -678,7 +678,7 @@
         if ((rxbd->ctrl & FEC_BD_Rx_Empty) == 0) {
             qi->rxbd = rxbd;  // Save for callback
             set_led(LED_RxACTIVE);
-            (sc->funs->eth_drv->recv)(sc, rxbd->length);
+            (sc->funs->eth_drv->recv)(sc, rxbd->length - 4); // remove CRC 
         }
         if (rxbd->ctrl & FEC_BD_Rx_Wrap) {
             rxbd = qi->rbase;
diff -urN packages.orig/devs/eth/powerpc/quicc/current/ChangeLog packages/devs/eth/powerpc/quicc/current/ChangeLog
--- packages.orig/devs/eth/powerpc/quicc/current/ChangeLog	2003-08-19 19:29:44.000000000 +0200
+++ packages/devs/eth/powerpc/quicc/current/ChangeLog	2004-10-11 09:59:44.000000000 +0200
@@ -1,3 +1,7 @@
+2004-10-11  Harald Kuethe  <hkuethe@controlware.de>
+
+	* src/if_quicc.c (quicc_eth_RxEvent): remove crc from packet.
+
 2003-08-19  Gary Thomas  <gary@mlbassoc.com>
 
 	* src/if_quicc.c (quicc_eth_init): Use 'quicc_eth_command()'
diff -urN packages.orig/devs/eth/powerpc/quicc/current/src/if_quicc.c packages/devs/eth/powerpc/quicc/current/src/if_quicc.c
--- packages.orig/devs/eth/powerpc/quicc/current/src/if_quicc.c	2003-08-19 19:29:44.000000000 +0200
+++ packages/devs/eth/powerpc/quicc/current/src/if_quicc.c	2004-10-11 09:59:02.000000000 +0200
@@ -646,7 +646,7 @@
             qi->rxbd = rxbd;  // Save for callback
             set_led(LED_RxACTIVE);
 			
-            (sc->funs->eth_drv->recv)(sc, rxbd->length);
+            (sc->funs->eth_drv->recv)(sc, rxbd->length - 4); // remove CRC
 			
             clear_led(LED_RxACTIVE);
         } 



More information about the Ecos-patches mailing list