From: Pekka Enberg Date: Mon, 23 Jun 2008 11:35:37 +0000 (+0300) Subject: ipg: remove jumbo frame #ifdef from mtu X-Git-Tag: v2.6.27-rc1~969^2~235^2~14 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83042955210aaee70b881240fe4f5e8409235308;p=linux-2.6 ipg: remove jumbo frame #ifdef from mtu 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 Signed-off-by: Pekka Enberg Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c index af7499445b..40ce90dedb 100644 --- a/drivers/net/ipg.c +++ b/drivers/net/ipg.c @@ -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) & diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h index 446f3663ae..9c520ce264 100644 --- a/drivers/net/ipg.h +++ b/drivers/net/ipg.h @@ -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.