Messages in this thread Patch in this message | | | From | jacliburn@bellsout ... | Subject | [PATCH 07/26] atl1: clarify max rx frame size | Date | Mon, 31 Dec 2007 19:59:45 -0600 |
| |
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
| |