Force MarshMallow to keep a Wi-Fi without Internet access
This shell command works on marshmallow: 
type su to enter superuser mode.
Then type the following command: settings put global captive_portal_detection_enabled 0

^^ it disables the "drop wifi if no internet connection" functionality.