"Bob Copeland" <me@xxxxxxxxxxxxxxx> wrote: > On Thu, 2 Oct 2008 08:52:58 -0400, Bob Copeland wrote >> > Not sure I agree there. Why should calibration take place regularly even > >> > though the interface appears to be shut down from user-space's point of >> > view? It simply doesn't make sense to start the interface if nobody >> > intends to use it. >> >> Hmm, yeah, you're right. So, I guess we can just do your patch except >> with another status bit that says it's active instead of changing >> mac80211 (b43 does something along those lines). > > Something like this? It's kind of ugly, but the state bit needs > to be in the _init/_stop critical section to avoid the race there. > This makes it match other drivers' suspend methods, but is only a > stop-gap until we have mac80211 suspend callbacks. > > Jiri, Nick, any comments? > > Based on a patch by Elias Oltmanns. We call ath5k_init in resume even > if we didn't previously open the device. Besides starting up the > device unnecessarily, this also causes an OOPS on rmmod because > mac80211 will not invoke ath5k_stop and softirqs are left running after > the module has been unloaded. Add a new state bit, ATH5K_STAT_STARTED, > to indicate that we have been started up. Sorry, but I don't think this is safe. Checking and restoring the started flag has to be protected too, otherwise there can be races against ->stop(). Regards, Elias -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html