[PATCH 07/26] atl1: clarify max rx frame size

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: jacliburn
Date: Monday, December 31, 2007 - 6:59 pm

From: Jay Cliburn <jacliburn@bellsouth.net>

When we initially set max rx frame size, we don't explicitly allow room for
the VLAN header; it's done later in a somewhat obscure fashion.  Let's make
it clear from the top that we've allowed enough room for the VLAN header.

Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
---
 drivers/net/atlx/atl1.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 695dcbc..c93cf19 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -113,7 +113,7 @@ static int __devinit atl1_sw_init(struct atl1_adapter *adapter)
 	struct atl1_hw *hw = &adapter->hw;
 	struct net_device *netdev = adapter->netdev;
 
-	hw->max_frame_size = netdev->mtu + ETH_HLEN + ETH_FCS_LEN;
+	hw->max_frame_size = netdev->mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN;
 	hw->min_frame_size = ETH_ZLEN + ETH_FCS_LEN;
 
 	adapter->wol = 0;
@@ -744,8 +744,8 @@ static u32 atl1_configure(struct atl1_adapter *adapter)
 	/* set Interrupt Clear Timer */
 	iowrite16(adapter->ict, hw->hw_addr + REG_CMBDISDMA_TIMER);
 
-	/* set MTU, 4 : VLAN */
-	iowrite32(hw->max_frame_size + 4, hw->hw_addr + REG_MTU);
+	/* set MTU size */
+	iowrite32(hw->max_frame_size, hw->hw_addr + REG_MTU);
 
 	/* jumbo size & rrd retirement timer */
 	value = (((u32) hw->rx_jumbo_th & RXQ_JMBOSZ_TH_MASK)
-- 
1.5.3.3

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/26] atl1: divide and modernize, jacliburn, (Mon Dec 31, 6:59 pm)
[PATCH 03/26] atl1: fix broken TSO, jacliburn, (Mon Dec 31, 6:59 pm)
[PATCH 04/26] atl1: add ethtool register dump, jacliburn, (Mon Dec 31, 6:59 pm)
[PATCH 05/26] atl1: print debug info if rrd error, jacliburn, (Mon Dec 31, 6:59 pm)
[PATCH 07/26] atl1: clarify max rx frame size, jacliburn, (Mon Dec 31, 6:59 pm)
[PATCH 09/26] atl1: refactor tx processing, jacliburn, (Mon Dec 31, 6:59 pm)
[PATCH 12/26] atl1: refactor atl1_probe, jacliburn, (Mon Dec 31, 6:59 pm)
[PATCH 13/26] atl1: refactor interrupt handling, jacliburn, (Mon Dec 31, 6:59 pm)
[PATCH 15/26] atl1: tidy up ring management, jacliburn, (Mon Dec 31, 6:59 pm)
[PATCH 16/26] atl1: modernize check link function, jacliburn, (Mon Dec 31, 6:59 pm)
[PATCH 17/26] atl1: update phy config function, jacliburn, (Mon Dec 31, 6:59 pm)
[PATCH 18/26] atl1: make function static, jacliburn, (Mon Dec 31, 6:59 pm)
[PATCH 19/26] atl1: modernize down/up functions, jacliburn, (Mon Dec 31, 6:59 pm)
[PATCH 20/26] atl1: update change mtu, jacliburn, (Mon Dec 31, 6:59 pm)
[PATCH 21/26] atl1: update atl1_close, jacliburn, (Mon Dec 31, 6:59 pm)
[PATCH 22/26] atl1: update netpoll, jacliburn, (Mon Dec 31, 7:00 pm)
[PATCH 24/26] atl1: update wake-on-lan, jacliburn, (Mon Dec 31, 7:00 pm)
[PATCH 25/26] atl1: add NAPI support, jacliburn, (Mon Dec 31, 7:00 pm)
Re: [PATCH 25/26] atl1: add NAPI support, Joonwoo Park, (Mon Dec 31, 11:09 pm)
Re: [PATCH 25/26] [REVISED] atl1: add NAPI support, Jay Cliburn, (Tue Jan 1, 11:15 am)
RE: [PATCH 25/26] [REVISED] atl1: add NAPI support, Joonwoo Park, (Tue Jan 1, 7:56 pm)
Re: [PATCH 25/26] [REVISED] atl1: add NAPI support, David Miller, (Tue Jan 1, 8:07 pm)
Re: [PATCH 04/26] atl1: add ethtool register dump, Jeff Garzik, (Tue Jan 22, 2:54 am)
Re: [PATCH 05/26] atl1: print debug info if rrd error, Jeff Garzik, (Tue Jan 22, 2:55 am)
Re: [PATCH 09/26] atl1: refactor tx processing, Jeff Garzik, (Tue Jan 22, 2:58 am)
Re: [PATCH 13/26] atl1: refactor interrupt handling, Jeff Garzik, (Tue Jan 22, 2:59 am)
Re: [PATCH 19/26] atl1: modernize down/up functions, Jeff Garzik, (Tue Jan 22, 3:01 am)
Re: [PATCH 09/26] atl1: refactor tx processing, Jay Cliburn, (Tue Jan 22, 5:31 pm)
Re: [PATCH 09/26] atl1: refactor tx processing, Jay Cliburn, (Thu Jan 24, 6:00 pm)
Re: [PATCH 09/26] atl1: refactor tx processing, Chris Snook, (Thu Jan 24, 6:08 pm)
Re: [PATCH 09/26] atl1: refactor tx processing, Jeff Garzik, (Thu Jan 24, 8:01 pm)