summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravos <avos@FreeBSD.org>2016-06-24 23:43:19 +0000
committeravos <avos@FreeBSD.org>2016-06-24 23:43:19 +0000
commita81bd10601a23230513279495def77f6243bb232 (patch)
tree5b07b39a94b62100f260d61999876bc63a956079
parent6f3207059151841350e49fed0684b2c830176f74 (diff)
downloadFreeBSD-src-a81bd10601a23230513279495def77f6243bb232.zip
FreeBSD-src-a81bd10601a23230513279495def77f6243bb232.tar.gz
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)
-rw-r--r--sys/dev/urtwn/if_urtwn.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/dev/urtwn/if_urtwn.c b/sys/dev/urtwn/if_urtwn.c
index eacc8bb..f5d3818 100644
--- a/sys/dev/urtwn/if_urtwn.c
+++ b/sys/dev/urtwn/if_urtwn.c
@@ -895,14 +895,7 @@ urtwn_rx_copy_to_mbuf(struct urtwn_softc *sc, struct r92c_rx_stat *stat,
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__);
OpenPOWER on IntegriCloud