Comment 2 for bug 1579221

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

It looks like the reason for this is a race condition that was not triggered before. In indicator-network, we enable the FW in HotspotManager::setEnabled() doing:

d->createApDevice();

which loads AP firmware, and if that is successful, immediately after that

d->enable(device);

However, NM returns an error because the device is in state NM_DEVICE_STATE_UNAVAILABLE. Introducing a waiting time between both calls makes it work.

The right solution for this is to track the device state in indicator-network so we do not enable until state > NM_DEVICE_STATE_UNAVAILABLE. Note that this happens in krillin/arale because for them we create a new device when activating hotspot (ap0), while in turbo we are still using wlan0 and changing the fw does not move the state to "unavailable".