You guys are so boring.
So finally today I had this problem not of my own doing. Was using my phone and it rebooted on it's own. After that, wifi stuck turning on.
So I run my commands that I told you chuckle****s, and nothing. Weird. Should have worked.
I clear cache and dalvik to be on the safe side, reboot, not fixed. Weird.
I have the liveboot log enabled, I notice a few things:
E/wpa_supplicant( 2086): Could not set interface wlan0 flags (UP): Operation not permitted
E/wpa_supplicant( 2086): nl80211: Could not set interface 'wlan0' UP
E/wpa_supplicant( 2086): wlan0: Failed to initialize driver interface
wifistatemachine failed to start driver
<4>[ 1.802222] wifi_get_mac_addr
<3>[ 1.802285] bcm_wifi_get_mac_addr: Failed to get information from file /persist/wifi/.macaddr (-2)
OH LOOK, FAILED TO GET MAC ADDRESS FROM FILE.
So I go in with root explorer, delete .macaddr file, and run these commands (the first line is my mac address being set, because I know what it is already; obviously you'll need SU to do this):
echo -ne '\x8c\x3a\xe3\x41\x8d\x79' > /persist/wifi/.macaddr
chown root:root /persist/wifi
chmod 755 /persist/wifi
chown wifi:wifi /persist/wifi/.macaddr
chmod 660 /persist/wifi/.macaddr
**Reboot, wifi works again.**
My guess is something got corrupted with the area where that file existed. Deleting it entirely and recreating it means it was created in a new area on the chip. **** if I know for certain though. What I do know is what I've been telling you guys for a while works and none of you are bothering with doing the easiest fix. But keep flashing custom roms and sending your phones in.
Most of you don't know what your wifi mac address is, have no motivation or way to find out, and will end up using mine, so I've modified mine in the first line to not be mine. Because I don't want you all out there cloning my ****ing mac addy since you can't be bothered to change it in the script.
Edit: I have not checked if a broken btaddr file affects wifi, possible but not likely, but that may need to be repaired too in a similar manner.