On Fri, Jul 26, 2013 at 11:28 AM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: > From: Johannes Berg <johannes.berg@xxxxxxxxx> > > If we get a firmware error during restart, we currently abandon any > hope and simply fail, getting stuck until the driver is reloaded. > Unfortunately, there isn't really much else we can do since restart > will likely continue to fail, and asking mac80211 for disconnection > just causes more error. > > To allow the user to at least set up the device again completely > from scratch, reprobe the device and in doing so completely destroy > any mac80211/driver state. > > Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@xxxxxxxxx> > Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> > --- [...] > + /* > + * get a module reference to avoid doing this while unloading > + * anyway and to avoid scheduling a work with code that's > + * being removed. > + */ > + if (!try_module_get(THIS_MODULE)) { > + IWL_ERR(mvm, "Module is being unloaded - abort\n"); > + return; > + } > + > + reprobe = kzalloc(sizeof(*reprobe), GFP_ATOMIC); > + if (!reprobe) > + return; missing module_put() :) Eliad. -- 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