At the moment it is possible to call ieee80211_unregister_hw() for an unregistered hw structure. This will cause a big panic. This patch will add a BUG_ON() line to warn about this situation. Signed-off-by: Ivo van Doorn <IvDoorn@xxxxxxxxx> --- diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 577dbe3..e7a613d 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c @@ -4765,6 +4765,9 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw) /* TODO: skb_queue should be empty here, no need to do anything? */ rtnl_lock(); + + BUG_ON(local->reg_state != IEEE80211_DEV_REGISTERED); + local->reg_state = IEEE80211_DEV_UNREGISTERED; if (local->apdev) ieee80211_if_del_mgmt(local); - 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