aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/e1000
diff options
context:
space:
mode:
authorSean Bruno <sbruno@FreeBSD.org>2017-03-15 14:44:59 +0000
committerSean Bruno <sbruno@FreeBSD.org>2017-03-15 14:44:59 +0000
commitb207ed2b4a6be121078d95dd32468f24c07cb3ce (patch)
treeb742447e6517c7773299575a44fea77f7ab2f760 /sys/dev/e1000
parent6ed14738679b38f27c789e01791809ffdef6bc02 (diff)
downloadsrc-b207ed2b4a6be121078d95dd32468f24c07cb3ce.tar.gz
src-b207ed2b4a6be121078d95dd32468f24c07cb3ce.zip
Actually set the MTU to the requested value and fixup handling of jumbo
frames. Submitted by: Matt Macy <mmacy@nextbsd.org> Reported by: pho Sponsored by: Limelight Networks
Notes
Notes: svn path=/head/; revision=315306
Diffstat (limited to 'sys/dev/e1000')
-rw-r--r--sys/dev/e1000/if_em.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index 76c551be1407..4bdd91a7fb8d 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -1116,7 +1116,6 @@ em_if_mtu_set(if_ctx_t ctx, uint32_t mtu)
{
int max_frame_size;
struct adapter *adapter = iflib_get_softc(ctx);
- struct ifnet *ifp = iflib_get_ifp(ctx);
if_softc_ctx_t scctx = iflib_get_softc_ctx(ctx);
IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)");
@@ -1154,7 +1153,7 @@ em_if_mtu_set(if_ctx_t ctx, uint32_t mtu)
}
scctx->isc_max_frame_size = adapter->hw.mac.max_frame_size =
- if_getmtu(ifp) + ETHER_HDR_LEN + ETHER_CRC_LEN;
+ mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
return (0);
}