M552 S0 = turn off networking, you do not want that in your config.g if you want networking.
config.g that contains this should connect if a ssid and pw is previously set.
; Network
M552 S1 ; enable network
M586 P0 S1 ; enable HTTP
M586 P1 S0 ; disable FTP
M586 P2 S0 ; disable Telnet