summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2011-01-11 21:04:47 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2011-01-11 21:04:47 +0000
commit3686a0c20abeadf325afa6b26b3ef86e87eecdde (patch)
treec8f5f6b6f8163004d2deef65d214f7af2f850ab9 /sys/dev/usb
parent1445fa6d33611f6d70b568e38c1f8c54a1bf29b0 (diff)
use ic->ic_ibss_chan instead of ic->ic_bss->ni_chan for Rx radiotap
since the latter is not initialized in monitor mode. should fix a panic reported by Benjamin Nadland with kismet.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_urtw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/if_urtw.c b/sys/dev/usb/if_urtw.c
index d1d5d5d27f8..98675dc3675 100644
--- a/sys/dev/usb/if_urtw.c
+++ b/sys/dev/usb/if_urtw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtw.c,v 1.36 2010/12/30 05:22:51 jakemsr Exp $ */
+/* $OpenBSD: if_urtw.c,v 1.37 2011/01/11 21:04:46 damien Exp $ */
/*-
* Copyright (c) 2009 Martynas Venckus <martynas@openbsd.org>
@@ -3216,8 +3216,8 @@ urtw_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status)
struct urtw_rx_radiotap_header *tap = &sc->sc_rxtap;
/* XXX Are variables correct? */
- tap->wr_chan_freq = htole16(ic->ic_bss->ni_chan->ic_freq);
- tap->wr_chan_flags = htole16(ic->ic_bss->ni_chan->ic_flags);
+ tap->wr_chan_freq = htole16(ic->ic_ibss_chan->ic_freq);
+ tap->wr_chan_flags = htole16(ic->ic_ibss_chan->ic_flags);
tap->wr_dbm_antsignal = (int8_t)rssi;
mb.m_data = (caddr_t)tap;