[openfirmware] [commit] r3702 - cpu/x86/pc/olpc/via dev ofw/wifi

repository service svn at openfirmware.info
Thu Aug 29 08:17:11 CEST 2013


Author: quozl
Date: Thu Aug 29 08:17:10 2013
New Revision: 3702
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3702

Log:
OLPC XO-1.5 XO-1.75 XO-4 - restore four game key reflash over HTTP, by doing a redundant scan for the OLPC-NANDblaster SSID before handing control to NANDblaster, fixes #12740.  Due to r3701, active scan for transmitting laptop became unreliable probably because of the lack of air time, so switch to a passive scan, and increase passive scan to cover two beacons.

Modified:
   cpu/x86/pc/olpc/via/fsupdate.fth
   cpu/x86/pc/olpc/via/nbrx.fth
   dev/libertas.fth
   ofw/wifi/wifi-cfg.fth

Modified: cpu/x86/pc/olpc/via/fsupdate.fth
==============================================================================
--- cpu/x86/pc/olpc/via/fsupdate.fth	Thu Aug 29 05:06:47 2013	(r3701)
+++ cpu/x86/pc/olpc/via/fsupdate.fth	Thu Aug 29 08:17:10 2013	(r3702)
@@ -357,7 +357,8 @@
    ." Searching for a NAND file system update image." cr
    " disk: ext:" fs-update-from-list
    ." Trying NANDblaster" cr
-   ['] nandblaster catch  0=  if  exit  then
+   ['] nandblaster
+   catch  ?dup  if  .error  else  exit  then
    " http:\\172.18.0.1" fs-update-from-list
 ;
 

Modified: cpu/x86/pc/olpc/via/nbrx.fth
==============================================================================
--- cpu/x86/pc/olpc/via/nbrx.fth	Thu Aug 29 05:06:47 2013	(r3701)
+++ cpu/x86/pc/olpc/via/nbrx.fth	Thu Aug 29 08:17:10 2013	(r3702)
@@ -8,6 +8,12 @@
 
 \ This is the wireless version
 : nandblaster  ( -- )
+   " OLPC-NANDblaster" $essid  " /wlan" open-dev dup 0=		( ih nearby? )
+   ['] olpc-ssids to default-ssids  reset-wifi-cfg		( ih nearby? )
+   " NN" find-tag  if  ?-null  $essid  then  \ network name	( ih nearby? )
+   " PP" find-tag  if  ?-null  $wpa    then  \ pass phrase	( ih nearby? )
+   abort" No NANDblaster nearby"				( ih )
+   close-dev							( )
    false to already-go?
    -1 to nb-zd-#sectors
    secure$

Modified: dev/libertas.fth
==============================================================================
--- dev/libertas.fth	Thu Aug 29 05:06:47 2013	(r3701)
+++ dev/libertas.fth	Thu Aug 29 08:17:10 2013	(r3702)
@@ -1167,7 +1167,7 @@
    +xb                          \ Band #
    +xb                          \ Channel #
    scan-type dup +xb            \ Scan type - 0:active  or  1:passive
-   if  d# 110  else  d# 30  then
+   if  d# 220  else  d# 30  then
    dup +xw                      \ Min scan time
    +xw                          \ Max scan time ( r: payload' )
    'x r@ -  r> 2- le-w!                         ( )
@@ -1228,7 +1228,7 @@
    \ It prevents listening stations, of which there can be many,
    \ from transmitting when they come on-line.
    2dup  " olpc-mesh"  $=  if  passive-scan  then
-   \ 2dup  " OLPC-NANDblaster"  $=  if  passive-scan  then
+   2dup  " OLPC-NANDblaster"  $=  if  passive-scan  then
 
    d# 32 min  scan-ssid pack drop
 ;

Modified: ofw/wifi/wifi-cfg.fth
==============================================================================
--- ofw/wifi/wifi-cfg.fth	Thu Aug 29 05:06:47 2013	(r3701)
+++ ofw/wifi/wifi-cfg.fth	Thu Aug 29 08:17:10 2013	(r3702)
@@ -18,6 +18,7 @@
 /wifi-cfg buffer: ram-wifi-cfg
 defer wifi-cfg  ' ram-wifi-cfg to wifi-cfg
 
+: reset-wifi-cfg  wifi-cfg  /wifi-cfg erase  ;
 
 \ =======================================================================
 \ wifi-cfg data
@@ -56,9 +57,9 @@
 
 0 value ssid-reset?
 : $essid  ( essid$ -- )
-   dup 0= abort" Empty ESSID string"
-   wifi-cfg  /wifi-cfg erase    ( adr len )
-   wifi-cfg >wc-ssid pstr!      ( )
+   dup 0= abort" Empty ESSID string"    ( adr len )
+   reset-wifi-cfg                       ( adr len )
+   wifi-cfg >wc-ssid pstr!              ( )
    true to ssid-reset?
    \ When an explicit SSID is given, don't fall back to the default list
    ['] null$ to default-ssids



More information about the openfirmware mailing list