My WiFi Application in RCM6650W works fine while debugging, but fails to bring up the WiFi interface when in production!

This is the part of the code that run diferent for both modes.
In debug mode the program flow skips the “while loop” because the WIFI0 is already up. (SMODE Jumper on)

                    ifup(IF_WIFI0);
           		while(ifpending(IF_WIFI0) != IF_UP){
               			tcp_tick(NULL);
                   }

//green LED on the core is ON

In production mode stays cycled in the “while loop” it looks like the WIFI0 is not getit on. (SMODE Jumper off)

                    ifup(IF_WIFI0);
           		while(ifpending(IF_WIFI0) != IF_UP){
               			tcp_tick(NULL);
                    }

//green LED on the core is never ON

is there an issue in the compiler/debugger/library?