When gecko starts, I assume that the hardware is initialized based on the state of the setting (in dom/wifi/WifiWorker.js or somewhere related?)

It seems like it ought to be safe to assume that the hardware state and the setting state are in sync (or will become synchronized) when we start up.  So this code seems like it might create a race condition or a loop.  If wifi.enabled is true, and gecko is starting up wifi but wifiManager.enabled is not true, yet, this code could cause problems, I think.