[OpenBIOS] r541 - dev/usb2/device/wlan
svn at openbios.org
svn at openbios.org
Wed Aug 15 05:14:55 CEST 2007
Author: wmb
Date: 2007-08-15 05:14:55 +0200 (Wed, 15 Aug 2007)
New Revision: 541
Modified:
dev/usb2/device/wlan/usb8388.fth
dev/usb2/device/wlan/wlan.fth
Log:
OLPC wireless LAN driver - added promiscuous mode.
Modified: dev/usb2/device/wlan/usb8388.fth
===================================================================
--- dev/usb2/device/wlan/usb8388.fth 2007-08-15 03:14:16 UTC (rev 540)
+++ dev/usb2/device/wlan/usb8388.fth 2007-08-15 03:14:55 UTC (rev 541)
@@ -661,6 +661,15 @@
enable-11d
;
+: enable-promiscuous ( -- )
+ mac-ctrl h# 80 or to mac-ctrl
+ set-mac-control
+;
+: disable-promiscuous ( -- )
+ mac-ctrl h# 80 invert and to mac-ctrl
+ set-mac-control
+;
+
: enable-multicast ( -- )
mac-ctrl h# 20 or to mac-ctrl
set-mac-control
Modified: dev/usb2/device/wlan/wlan.fth
===================================================================
--- dev/usb2/device/wlan/wlan.fth 2007-08-15 03:14:16 UTC (rev 540)
+++ dev/usb2/device/wlan/wlan.fth 2007-08-15 03:14:55 UTC (rev 541)
@@ -52,6 +52,8 @@
true
;
+false instance value use-promiscuous?
+
external
\ Set to true to force open the driver without association.
@@ -60,9 +62,11 @@
false instance value force-open?
: parse-args ( $ -- )
+ false to use-promiscuous?
begin ?dup while
ascii , left-parse-string
2dup " debug" $= if debug-on then
+ 2dup " promiscuous" $= if true to use-promiscuous? then
" force" $= if true to force-open? then
repeat drop
;
@@ -87,6 +91,7 @@
then
start-nic
then
+ use-promiscuous? if enable-promiscuous else disable-promiscuous then
opencount @ 1+ opencount !
true
;
More information about the OpenBIOS
mailing list