There are a couple of bugs making us unable to restart wifi. This is the most important one. I'll file another bug tomorrow on the remaining stuff.
Created attachment 612610 [details] [diff] [review] Proposed fix This patch does the following: - Sending TERMINATE terminates the supplicant gracefully. - Calling closeSupplicantConnection would have fixed this bug alone, but in general it resets wifi.c's internal socket state and prevents us from reusing the old sockets when we restart. - closeSupplicantConnection returns void, not int, so we shouldn't try to get a return value from it.
Does this fix bug 740719?
As far as I can tell, it doesn't. However it does allow the wifi component to shut down (which is a bug fix that would affect that bug). Note that I've locally removed the error checking on this path. Each function call tries harder to kill the supplicant, so a failure to kill it in one function shouldn't stop us from continuing.