This adds a BUG_ON when you unregister a device that wasn't registered. Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> --- Applies on top of Michael's tasklet fixes or something. Maybe applies anyway, fuzz should be minimal in any case. --- wireless-dev.orig/net/mac80211/ieee80211.c 2007-03-23 21:07:00.354239808 +0100 +++ wireless-dev/net/mac80211/ieee80211.c 2007-03-23 21:07:33.184239808 +0100 @@ -4729,6 +4729,8 @@ void ieee80211_unregister_hw(struct ieee struct ieee80211_sub_if_data *sdata, *tmp; int i; + BUG_ON(local->reg_state != IEEE80211_DEV_REGISTERED); + tasklet_disable(&local->tasklet); /* TODO: skb_queue should be empty here, no need to do anything? */ - 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