There is a bug in the latest build that resets the name. It will be fixed in the next build.
In the meantime, the workaround is to use a direct endpoint like this: http://hubs.ip.address.here/hub/advanced/setWiFiNetworkInfo?ssid=networkName&psk=networkPassword
The endpoint should produce an empty page. Reboot the hub to apply changes.