De-duplicate wifi.sta.getip() call
Technically, if the wifi.sta.getip() or wifi.ap.getip() call return invalid ip addresses, you shouldn't assume that it's running. However, the lack of that type of check means that this change will function similarly without incurring another function call in a constrained stack/heap environment.