Author: quozl Date: Wed Feb 20 00:10:44 2013 New Revision: 3560 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3560
Log: OLPC - libertas, fix failure during test /wlan on 8686, by returning separate scan response result and length.
Modified: dev/libertas.fth ofw/wifi/data.fth ofw/wifi/eapol.fth
Modified: dev/libertas.fth ============================================================================== --- dev/libertas.fth Tue Feb 19 08:18:45 2013 (r3559) +++ dev/libertas.fth Wed Feb 20 00:10:44 2013 (r3560) @@ -1217,8 +1217,7 @@ d# 32 min scan-ssid pack drop ;
-: scan ( adr len chan -- actual ) - dup channel-is-5ghz? 802.11n? 0= and if 3drop 0 exit then +: scan ( adr len chan -- false | actual true ) >r ( adr len r: chan ) begin r@ (scan) dup 1 = @@ -1226,10 +1225,11 @@ drop d# 1000 ms \ retry while busy repeat ( adr len scan-adr scan-len err? r: chan ) r> drop ( adr len scan-adr scan-len err? ) - if 2drop 0 exit then ( adr len scan-adr scan-len ) + if 4drop false exit then ( adr len scan-adr scan-len ) rot min >r ( adr scan-adr r: actual ) swap r@ move ( r: actual ) r> ( actual ) + true ;
headers @@ -2445,7 +2445,7 @@
: ta-scan ( -- ) ." scan" cr - (scan-all) drop + " scan-all" $call-supplicant drop ;
: ta-n ( n -- )
Modified: ofw/wifi/data.fth ============================================================================== --- ofw/wifi/data.fth Tue Feb 19 08:18:45 2013 (r3559) +++ ofw/wifi/data.fth Wed Feb 20 00:10:44 2013 (r3560) @@ -8,7 +8,7 @@ : wpa-ie$ ( -- adr len ) " wpa-ie$" $call-parent ; : write-force ( adr len -- actual ) " write-force" $call-parent ; : read-force ( adr len -- actual ) " read-force" $call-parent ; -: scan ( adr len chan -- actual ) " scan" $call-parent ; +: scan ( adr len chan -- false | actual true ) " scan" $call-parent ; : enable-rsn ( -- ) " enable-rsn" $call-parent drop ; : disable-rsn ( -- ) " disable-rsn" $call-parent drop ; : disable-wep ( -- ) " disable-wep" $call-parent drop ;
Modified: ofw/wifi/eapol.fth ============================================================================== --- ofw/wifi/eapol.fth Tue Feb 19 08:18:45 2013 (r3559) +++ ofw/wifi/eapol.fth Wed Feb 20 00:10:44 2013 (r3560) @@ -950,12 +950,14 @@ : scan-all ( -- error? ) scan-order /scan-order bounds do ( ) scanbuf /buf i c@ ( adr len chan ) - scan dup if ( actual ) - scanbuf swap ( adr len ) - 2dup .ssids ( adr len ) - test-association - else ( actual ) - drop unloop true exit + scan if ( actual ) + ?dup if ( actual ) + scanbuf swap ( adr actual ) + 2dup .ssids ( adr actual ) + test-association + then + else ( ) + unloop true exit then loop false @@ -969,13 +971,17 @@
scan-order /scan-order bounds do ( ) scanbuf /buf i c@ ( adr len chan ) - scan if ( ) - debug? if scanbuf .scan then ( ) - ssid$ (select-ssid?) ( found? ) - if ." found" cr unloop true exit then + scan if ( actual ) + if ( ) + debug? if scanbuf .scan then ( ) + ssid$ (select-ssid?) ( found? ) + if + ." found" cr unloop true exit + then ( ) + then then loop - ." not found" cr false ( found? ) + ." not found" cr false ( found? ) ;
: try-scan ( -- okay? )
openfirmware@openfirmware.info