Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Also free assocated mbufs.
details: https://anonhg.NetBSD.org/src/rev/718275305c55
branches: trunk
changeset: 959808:718275305c55
user: nat <nat%NetBSD.org@localhost>
date: Fri Feb 26 01:38:44 2021 +0000
description:
Also free assocated mbufs.
diffstat:
sys/dev/usb/if_urtwn.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (72 lines):
diff -r f1142c268bdb -r 718275305c55 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c Fri Feb 26 00:41:56 2021 +0000
+++ b/sys/dev/usb/if_urtwn.c Fri Feb 26 01:38:44 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_urtwn.c,v 1.94 2021/02/21 23:06:13 mrg Exp $ */
+/* $NetBSD: if_urtwn.c,v 1.95 2021/02/26 01:38:44 nat Exp $ */
/* $OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $ */
/*-
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.94 2021/02/21 23:06:13 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.95 2021/02/26 01:38:44 nat Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1470,6 +1470,10 @@
sc->pa_setting, sc->board_type, sc->regulatory, 0);
IEEE80211_ADDR_COPY(ic->ic_myaddr, rom->macaddr);
+#if 0
+ uint8_t new_myaddr[6] = {0x90,0x0a,0x1a,0xe7,0x1e,0xf0}; //Camera
+ IEEE80211_ADDR_COPY(ic->ic_myaddr, new_myaddr);
+#endif
sc->sc_rf_write = urtwn_r92c_rf_write;
sc->sc_power_on = urtwn_r92c_power_on;
@@ -2660,6 +2664,7 @@
k = ieee80211_crypto_encap(ic, ni, m);
if (k == NULL) {
urtwn_put_tx_data(sc, data);
+ m_free(m);
return ENOBUFS;
}
@@ -2908,6 +2913,7 @@
data = urtwn_get_tx_data(sc, sc->ac2idx[qid]);
if (data == NULL) {
+ m_freem(m);
ifp->if_flags |= IFF_OACTIVE;
DPRINTFN(DBG_TX, "empty tx_free_list", 0, 0, 0, 0);
return;
@@ -2919,16 +2925,17 @@
device_printf(sc->sc_dev, "m_pullup failed\n");
if_statinc(ifp, if_oerrors);
urtwn_put_tx_data(sc, data);
+ m_freem(m);
continue;
}
eh = mtod(m, struct ether_header *);
ni = ieee80211_find_txnode(ic, eh->ether_dhost);
if (ni == NULL) {
- m_freem(m);
device_printf(sc->sc_dev,
"unable to find transmit node\n");
if_statinc(ifp, if_oerrors);
urtwn_put_tx_data(sc, data);
+ m_freem(m);
continue;
}
@@ -2940,6 +2947,7 @@
"unable to encapsulate packet\n");
if_statinc(ifp, if_oerrors);
urtwn_put_tx_data(sc, data);
+ m_freem(m);
continue;
}
sendit:
Home |
Main Index |
Thread Index |
Old Index