summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_ipw.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/if_ipw.c')
-rw-r--r--sys/dev/pci/if_ipw.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c
index d0305e32f48..496545b731f 100644
--- a/sys/dev/pci/if_ipw.c
+++ b/sys/dev/pci/if_ipw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ipw.c,v 1.107 2015/02/10 23:25:46 mpi Exp $ */
+/* $OpenBSD: if_ipw.c,v 1.108 2015/05/27 22:10:52 kettenis Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -1143,7 +1143,6 @@ ipw_tx_start(struct ifnet *ifp, struct mbuf *m, struct ieee80211_node *ni)
struct ieee80211com *ic = &sc->sc_ic;
struct ieee80211_frame *wh;
struct ieee80211_key *k;
- struct mbuf *m1;
struct ipw_soft_bd *sbd;
struct ipw_soft_hdr *shdr;
struct ipw_soft_buf *sbuf;
@@ -1208,24 +1207,10 @@ ipw_tx_start(struct ifnet *ifp, struct mbuf *m, struct ieee80211_node *ni)
}
if (error != 0) {
/* too many fragments, linearize */
- MGETHDR(m1, M_DONTWAIT, MT_DATA);
- if (m1 == NULL) {
+ if (m_defrag(m, M_DONTWAIT)) {
m_freem(m);
return ENOBUFS;
}
- if (m->m_pkthdr.len > MHLEN) {
- MCLGET(m1, M_DONTWAIT);
- if (!(m1->m_flags & M_EXT)) {
- m_freem(m);
- m_freem(m1);
- return ENOBUFS;
- }
- }
- m_copydata(m, 0, m->m_pkthdr.len, mtod(m1, caddr_t));
- m1->m_pkthdr.len = m1->m_len = m->m_pkthdr.len;
- m_freem(m);
- m = m1;
-
error = bus_dmamap_load_mbuf(sc->sc_dmat, sbuf->map, m,
BUS_DMA_NOWAIT);
if (error != 0) {