Subject: Lucent monitoring mode
To: None <tech-kern@netbsd.org>
From: Rene Hexel <rh@netbsd.org>
List: tech-kern
Date: 06/18/2003 09:16:46
--=-HwesXsZV5lun3kNGRltr
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
The attached diff enables monitoring mode on Lucent WaveLan cards with
a new enough firmware. This has been tested with my Orinoco Gold and it
works nicely there.
Is it okay to commit this?
Cheers
,
Rene
--=-HwesXsZV5lun3kNGRltr
Content-Disposition: inline; filename=wi.c.diff
Content-Type: text/plain; name=wi.c.diff; charset=646
Content-Transfer-Encoding: 7bit
? wi.c.diff
? wi.c.real
Index: wi.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/wi.c,v
retrieving revision 1.129
diff -u -r1.129 wi.c
--- wi.c 2003/05/31 19:38:08 1.129
+++ wi.c 2003/06/17 22:05:05
@@ -307,8 +307,10 @@
#endif
if (sc->sc_sta_firmware_ver >= 60000)
sc->sc_flags |= WI_FLAGS_HAS_MOR;
- if (sc->sc_sta_firmware_ver >= 60006)
+ if (sc->sc_sta_firmware_ver >= 60006) {
ic->ic_flags |= IEEE80211_F_HASIBSS;
+ ic->ic_flags |= IEEE80211_F_HASMONITOR;
+ }
sc->sc_ibss_port = 1;
break;
@@ -590,6 +592,8 @@
wi_write_val(sc, WI_RID_PORTTYPE, WI_PORTTYPE_HOSTAP);
break;
case IEEE80211_M_MONITOR:
+ if (sc->sc_firmware_type == WI_LUCENT)
+ wi_write_val(sc, WI_RID_PORTTYPE, WI_PORTTYPE_ADHOC);
wi_cmd(sc, WI_CMD_TEST | (WI_TEST_MONITOR << 8), 0, 0, 0);
break;
}
--=-HwesXsZV5lun3kNGRltr--