Author: wmb Date: Fri Oct 12 00:55:19 2012 New Revision: 3363 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3363
Log: WLAN - fix test-antenna 'a' command
Modified: dev/libertas.fth
Modified: dev/libertas.fth ============================================================================== --- dev/libertas.fth Fri Oct 12 00:53:24 2012 (r3362) +++ dev/libertas.fth Fri Oct 12 00:55:19 2012 (r3363) @@ -2282,11 +2282,16 @@
: reset ( -- flag ) reset-nic ;
+: do-disassociate ( -- ) + " target-mac$" $call-supplicant disassociate +; + +\ adr len is the result of (scan) - a list of APs and their characteristics : test-association ( adr len -- error? ) - " OLPCOFW" " select-ssid?" $call-supplicant if - " (do-associate)" $call-supplicant if + " OLPCOFW" " select-ssid?" $call-supplicant if ( ) + " (do-associate)" $call-supplicant if ( ) \ Success - " target-mac$" $call-supplicant disassociate + do-disassociate " true to ssid-reset?" ['] evaluate catch if 2drop then false else @@ -2332,6 +2337,11 @@
: scan-wifi ( -- ) (scan-wifi) drop ;
+: reassociate ( -- ) + do-disassociate + do-associate if ." succeeded" else ." failed" then cr +; + : .rssi ( snr nf -- ) 2dup swap + ." rssi" 4 .r ( snr nf ) ." snr" 3 .r ." nf" 4 .r ( ) @@ -2422,7 +2432,7 @@ then ;
-: ta-a ." associate " close open drop ; +: ta-a ." associate " reassociate ;
: test-antenna ( -- ) ta-init