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)
This commit is contained in:
avos 2016-06-24 23:43:19 +00:00
parent 6f32070591
commit a81bd10601

View File

@ -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__);