aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/em
diff options
context:
space:
mode:
authorPyun YongHyeon <yongari@FreeBSD.org>2006-08-14 00:36:53 +0000
committerPyun YongHyeon <yongari@FreeBSD.org>2006-08-14 00:36:53 +0000
commit1ad7bca7e90922efd2dbc57739db96b6ffc96951 (patch)
tree9720a143be6473e662051ef835382f7a4dd3c816 /sys/dev/em
parentb7e2f3ec76fe6c827cd5683a49a31e2ad4754c34 (diff)
Notes
Diffstat (limited to 'sys/dev/em')
-rw-r--r--sys/dev/em/if_em.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c
index a5c7567fcb1e..df48f8b927f3 100644
--- a/sys/dev/em/if_em.c
+++ b/sys/dev/em/if_em.c
@@ -2805,7 +2805,6 @@ em_txeof(struct adapter *adapter)
static int
em_get_buf(int i, struct adapter *adapter, struct mbuf *mp)
{
- struct ifnet *ifp = adapter->ifp;
bus_dma_segment_t segs[1];
struct em_buffer *rx_buffer;
int error, nsegs;
@@ -2823,7 +2822,7 @@ em_get_buf(int i, struct adapter *adapter, struct mbuf *mp)
mp->m_next = NULL;
}
- if (ifp->if_mtu <= ETHERMTU)
+ if (adapter->hw.max_frame_size <= (MCLBYTES - ETHER_ALIGN))
m_adj(mp, ETHER_ALIGN);
rx_buffer = &adapter->rx_buffer_area[i];
@@ -3187,7 +3186,8 @@ em_rxeof(struct adapter *adapter, int count)
em_receive_checksum(adapter, current_desc,
adapter->fmp);
#ifndef __NO_STRICT_ALIGNMENT
- if (ifp->if_mtu > ETHERMTU &&
+ if (adapter->hw.max_frame_size >
+ (MCLBYTES - ETHER_ALIGN) &&
em_fixup_rx(adapter) != 0)
goto skip;
#endif