Patchwork [U-Boot,09/26] net: emaclite: Use PKTSIZE directly

login
register
mail settings
Submitter Michal Simek
Date Sept. 13, 2011, 7:10 a.m.
Message ID <1315897821-23049-10-git-send-email-monstr@monstr.eu>
Download mbox | patch
Permalink /patch/114439/
State Accepted
Commit 80439252040b8384c4c3a2906ae94ab51c04850f
Headers show

Comments

Michal Simek - Sept. 13, 2011, 7:10 a.m.
Do not setup additional ENET_MAX_MTU macro.

Signed-off-by: Michal Simek <monstr@monstr.eu>
---
 drivers/net/xilinx_emaclite.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

Patch

diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index eca6ef9..5ce95f8 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -31,8 +31,6 @@ 
 
 #undef DEBUG
 
-#define ENET_MAX_MTU		PKTSIZE
-#define ENET_MAX_MTU_ALIGNED	PKTSIZE_ALIGN
 #define ENET_ADDR_LENGTH	6
 
 /* EmacLite constants */
@@ -212,8 +210,8 @@  static int emaclite_send (struct eth_device *dev, volatile void *ptr, int len)
 
 	u32 maxtry = 1000;
 
-	if (len > ENET_MAX_MTU)
-		len = ENET_MAX_MTU;
+	if (len > PKTSIZE)
+		len = PKTSIZE;
 
 	while (!xemaclite_txbufferavailable(dev) && maxtry) {
 		udelay (10);
@@ -328,8 +326,8 @@  static int emaclite_recv(struct eth_device *dev)
 			debug ("IP Packet\n");
 			break;
 		default:
-			debug ("Other Packet\n");
-			length = ENET_MAX_MTU;
+			debug("Other Packet\n");
+			length = PKTSIZE;
 			break;
 	}