svn commit: r302186 - head/sys/dev/urtwn
Andriy Voskoboinyk
avos at FreeBSD.org
Fri Jun 24 23:43:20 UTC 2016
Author: avos
Date: Fri Jun 24 23:43:19 2016
New Revision: 302186
URL: https://svnweb.freebsd.org/changeset/base/302186
Log:
urtwn: use m_get2() in Rx path.
Replace m_getcl() with m_get2(); this fixes 'frame too long'
messages for frames, which are longer than MCLBYTES
(can be easily triggered when A-MSDU is used).
Tested with RTL8188CUS (AP) and RTL8188EU (STA).
Approved by: re (marius)
Modified:
head/sys/dev/urtwn/if_urtwn.c
Modified: head/sys/dev/urtwn/if_urtwn.c
==============================================================================
--- head/sys/dev/urtwn/if_urtwn.c Fri Jun 24 23:42:33 2016 (r302185)
+++ head/sys/dev/urtwn/if_urtwn.c Fri Jun 24 23:43:19 2016 (r302186)
@@ -895,14 +895,7 @@ urtwn_rx_copy_to_mbuf(struct urtwn_softc
goto fail;
}
- if (__predict_false(totlen > MCLBYTES)) {
- /* convert to m_getjcl if this happens */
- device_printf(sc->sc_dev, "%s: frame too long: %d (%d)\n",
- __func__, pktlen, totlen);
- goto fail;
- }
-
- m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
+ m = m_get2(totlen, M_NOWAIT, MT_DATA, M_PKTHDR);
if (__predict_false(m == NULL)) {
device_printf(sc->sc_dev, "%s: could not allocate RX mbuf\n",
__func__);
More information about the svn-src-head
mailing list