Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Support promiscuous mode
details: https://anonhg.NetBSD.org/src/rev/0148a4987c9f
branches: trunk
changeset: 828535:0148a4987c9f
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon Dec 18 13:56:14 2017 +0000
description:
Support promiscuous mode
diffstat:
sys/dev/ic/bwfm.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (36 lines):
diff -r bba03aedaade -r 0148a4987c9f sys/dev/ic/bwfm.c
--- a/sys/dev/ic/bwfm.c Mon Dec 18 13:18:23 2017 +0000
+++ b/sys/dev/ic/bwfm.c Mon Dec 18 13:56:14 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bwfm.c,v 1.6 2017/12/18 12:42:21 jmcneill Exp $ */
+/* $NetBSD: bwfm.c,v 1.7 2017/12/18 13:56:14 jmcneill Exp $ */
/* $OpenBSD: bwfm.c,v 1.5 2017/10/16 22:27:16 patrick Exp $ */
/*
* Copyright (c) 2010-2016 Broadcom Corporation
@@ -423,6 +423,13 @@
bwfm_fwvar_var_set_int(sc, "ndoe", 0);
bwfm_fwvar_var_set_int(sc, "toe", 0);
+ /* Accept all multicast frames. */
+ bwfm_fwvar_var_set_int(sc, "allmulti", 1);
+
+ /* Setup promiscuous mode */
+ bwfm_fwvar_cmd_set_int(sc, BWFM_C_SET_PROMISC,
+ (ifp->if_flags & IFF_PROMISC) ? 1 : 0);
+
/*
* Tell the firmware supplicant that we are going to handle the
* WPA handshake ourselves.
@@ -1494,12 +1501,6 @@
}
kmem_free(params, sizeof(*params));
}
-
- /* XXX: added for testing only, remove */
- bwfm_fwvar_var_set_int(sc, "allmulti", 1);
-#if 0
- bwfm_fwvar_cmd_set_int(sc, BWFM_C_SET_PROMISC, 1);
-#endif
}
void
Home |
Main Index |
Thread Index |
Old Index