Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Improve monitor mode support. From Damien Berga...
details: https://anonhg.NetBSD.org/src/rev/88f93646d1ba
branches: trunk
changeset: 569939:88f93646d1ba
user: lukem <lukem%NetBSD.org@localhost>
date: Tue Sep 14 00:32:55 2004 +0000
description:
Improve monitor mode support. From Damien Bergamini
diffstat:
sys/dev/pci/if_ipw.c | 23 ++++++++++++++---------
1 files changed, 14 insertions(+), 9 deletions(-)
diffs (51 lines):
diff -r c95f4e445e4c -r 88f93646d1ba sys/dev/pci/if_ipw.c
--- a/sys/dev/pci/if_ipw.c Tue Sep 14 00:31:20 2004 +0000
+++ b/sys/dev/pci/if_ipw.c Tue Sep 14 00:32:55 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ipw.c,v 1.4 2004/09/14 00:31:20 lukem Exp $ */
+/* $NetBSD: if_ipw.c,v 1.5 2004/09/14 00:32:55 lukem Exp $ */
/* Id: if_ipw.c,v 1.1.2.7 2004/08/20 11:20:11 damien Exp */
/*-
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.4 2004/09/14 00:31:20 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.5 2004/09/14 00:32:55 lukem Exp $");
/*-
* Intel(R) PRO/Wireless 2100 MiniPCI driver
@@ -1682,13 +1682,6 @@
u_int32_t data;
int error, i;
- DPRINTF(("Setting adapter MAC to %s\n", ether_sprintf(ic->ic_myaddr)));
- IEEE80211_ADDR_COPY(LLADDR(ifp->if_sadl), ic->ic_myaddr);
- error = ipw_cmd(sc, IPW_CMD_SET_MAC_ADDRESS, ic->ic_myaddr,
- IEEE80211_ADDR_LEN);
- if (error != 0)
- return error;
-
switch (ic->ic_opmode) {
case IEEE80211_M_STA:
case IEEE80211_M_HOSTAP:
@@ -1718,6 +1711,18 @@
return error;
}
+ if (ic->ic_opmode == IEEE80211_M_MONITOR) {
+ DPRINTF(("Enabling adapter\n"));
+ return ipw_cmd(sc, IPW_CMD_ENABLE, NULL, 0);
+ }
+
+ DPRINTF(("Setting adapter MAC to %s\n", ether_sprintf(ic->ic_myaddr)));
+ IEEE80211_ADDR_COPY(LLADDR(ifp->if_sadl), ic->ic_myaddr);
+ error = ipw_cmd(sc, IPW_CMD_SET_MAC_ADDRESS, ic->ic_myaddr,
+ IEEE80211_ADDR_LEN);
+ if (error != 0)
+ return error;
+
config.flags = htole32(IPW_CFG_BSS_MASK | IPW_CFG_IBSS_MASK |
IPW_CFG_PREAMBLE_LEN | IPW_CFG_802_1x_ENABLE);
if (ic->ic_opmode == IEEE80211_M_IBSS)
Home |
Main Index |
Thread Index |
Old Index