Partial revert of sgs2 wifi merge, implement wifi reset on error event 40