[openfirmware] [commit] r1861 - dev

repository service svn at openfirmware.info
Sat Jul 3 23:45:16 CEST 2010


Author: wmb
Date: Sat Jul  3 23:45:15 2010
New Revision: 1861
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1861

Log:
OLPC - NANDblaster - reset the WLAN module after using it in AP mode, so it can be used again in normal mode without rebooting the machine.

Modified:
   dev/libertas.fth

Modified: dev/libertas.fth
==============================================================================
--- dev/libertas.fth	Sat Jul  3 20:09:47 2010	(r1860)
+++ dev/libertas.fth	Sat Jul  3 23:45:15 2010	(r1861)
@@ -1607,6 +1607,12 @@
    make-beacon
    d# 100 1 set-beacon
 ;
+\ This is a bit heavy-handed, but I don't know a more precise recipe
+: stop-ap  ( -- )
+   ds-not-ready  to driver-state  \ Forces firmware reload on next open
+   reset-host-bus                 \ Primes module to accept new firmware
+   false to ap-mode?
+;
 
 : get-log  ( -- )
    0 h# b ( CMD_802_11_GET_LOG ) prepare-cmd
@@ -1865,7 +1871,7 @@
 : close  ( -- )
    opencount @ 1-  0 max  opencount !
    opencount @ 0=  if
-      ap-mode?  if  set-sta-mode  then
+      ap-mode?  if  stop-ap  then
       adhoc-started?  if  adhoc-stop  then
       disable-multicast
       mesh-stop drop



More information about the openfirmware mailing list