ipg: remove jumbo frame #ifdef from mtu
authorPekka Enberg <penberg@cs.helsinki.fi>
Mon, 23 Jun 2008 11:35:37 +0000 (14:35 +0300)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 4 Jul 2008 12:46:51 +0000 (08:46 -0400)
Remove JUMBO_FRAME #ifdef from dev->mtu setting in ipg_nic_open() so that we
can make IPG_TXFRAG_SIZE configurable.

Tested-by: Andrew Savchenko <Bircoph@list.ru>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/ipg.c
drivers/net/ipg.h

index af7499445bb1686cb6edc8aa67e269cb53d1a3df..40ce90dedb0285bc13f5f9068bce938f3a531769 100644 (file)
@@ -1807,9 +1807,9 @@ static int ipg_nic_open(struct net_device *dev)
        sp->jumbo.found_start = 0;
        sp->jumbo.current_size = 0;
        sp->jumbo.skb = NULL;
-#ifdef JUMBO_FRAME
-       dev->mtu = IPG_TXFRAG_SIZE;
-#endif
+
+       if (IPG_TXFRAG_SIZE)
+               dev->mtu = IPG_TXFRAG_SIZE;
 
        /* Enable transmit and receive operation of the IPG. */
        ipg_w32((ipg_r32(MAC_CTRL) | IPG_MC_RX_ENABLE | IPG_MC_TX_ENABLE) &
index 446f3663ae6a6eb323e7f3530e1241ec8a8bcd8c..9c520ce264a69f92624c794e0f39e8c0a6dddf9e 100644 (file)
@@ -598,6 +598,8 @@ enum ipg_regs {
 #ifdef JUMBO_FRAME
 /* IPG_TXFRAG_SIZE must <= 0x2b00, or TX will crash */
 #define                IPG_TXFRAG_SIZE         JUMBO_FRAME_SIZE
+#else
+#define                IPG_TXFRAG_SIZE         0 /* use default MTU */
 #endif
 
 /* Size of allocated received buffers. Nominally 0x0600.