Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic diff reduction with openbsd; turn debugging on.
details: https://anonhg.NetBSD.org/src/rev/f80f4c6c130f
branches: trunk
changeset: 816230:f80f4c6c130f
user: christos <christos%NetBSD.org@localhost>
date: Fri Jun 24 16:08:54 2016 +0000
description:
diff reduction with openbsd; turn debugging on.
diffstat:
sys/dev/ic/rt2860.c | 31 ++++++++++++++++++++++++++-----
1 files changed, 26 insertions(+), 5 deletions(-)
diffs (80 lines):
diff -r 2fa7df57ca89 -r f80f4c6c130f sys/dev/ic/rt2860.c
--- a/sys/dev/ic/rt2860.c Fri Jun 24 15:25:43 2016 +0000
+++ b/sys/dev/ic/rt2860.c Fri Jun 24 16:08:54 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rt2860.c,v 1.16 2016/06/17 17:03:20 christos Exp $ */
+/* $NetBSD: rt2860.c,v 1.17 2016/06/24 16:08:54 christos Exp $ */
/* $OpenBSD: rt2860.c,v 1.90 2016/04/13 10:49:26 mpi Exp $ */
/*-
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.16 2016/06/17 17:03:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.17 2016/06/24 16:08:54 christos Exp $");
#include <sys/param.h>
#include <sys/sockio.h>
@@ -64,7 +64,7 @@
#ifdef RAL_DEBUG
#define DPRINTF(x) do { if (rt2860_debug > 0) printf x; } while (0)
#define DPRINTFN(n, x) do { if (rt2860_debug >= (n)) printf x; } while (0)
-int rt2860_debug = 0;
+int rt2860_debug = 4;
#else
#define DPRINTF(x)
#define DPRINTFN(n, x)
@@ -1776,6 +1776,8 @@
continue;
}
+ bpf_mtap(ifp, m);
+
eh = mtod(m, struct ether_header *);
ni = ieee80211_find_txnode(ic, eh->ether_dhost);
if (ni == NULL) {
@@ -1784,8 +1786,6 @@
continue;
}
- bpf_mtap(ifp, m);
-
if ((m = ieee80211_encap(ic, m, ni)) == NULL) {
ieee80211_free_node(ni);
ifp->if_oerrors++;
@@ -1863,6 +1863,22 @@
}
break;
+ case SIOCS80211CHANNEL:
+ /*
+ * This allows for fast channel switching in monitor mode
+ * (used by kismet). In IBSS mode, we must explicitly reset
+ * the interface to generate a new beacon frame.
+ */
+ error = ieee80211_ioctl(ic, cmd, data);
+ if (error == ENETRESET &&
+ ic->ic_opmode == IEEE80211_M_MONITOR) {
+ if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) ==
+ (IFF_UP | IFF_RUNNING))
+ rt2860_switch_chan(sc, ic->ic_ibss_chan);
+ error = 0;
+ }
+ break;
+
default:
error = ieee80211_ioctl(ic, cmd, data);
}
@@ -2753,6 +2769,11 @@
uint8_t mode, wcid, iv[8];
struct ieee80211_key *k = __UNCONST(ck); /* XXX */
+ /* defer setting of WEP keys until interface is brought up */
+ if ((ic->ic_if.if_flags & (IFF_UP | IFF_RUNNING)) !=
+ (IFF_UP | IFF_RUNNING))
+ return 0;
+
/* map net80211 cipher to RT2860 security mode */
switch (k->wk_cipher->ic_cipher) {
case IEEE80211_CIPHER_WEP:
Home |
Main Index |
Thread Index |
Old Index