On the wi-fi settings screen (from where to switch wi-fi on / off), press the menu button to open the context menu at the bottom of the screen.
Click on 'Advanced'
Switch the wi-fi connection from sleep to the policy of "When the screen goes off 'to', Never '(I think connecting any configuration to any other reality works)