On Wed, Sep 10, 2008 at 03:02:01PM -0700, Johannes Berg wrote: > --- everything.orig/drivers/net/wireless/mac80211_hwsim.c 2008-09-10 23:58:05.000000000 +0200 > +++ everything/drivers/net/wireless/mac80211_hwsim.c 2008-09-10 23:58:11.000000000 +0200 > @@ -28,6 +28,29 @@ static int radios = 2; > module_param(radios, int, 0444); > MODULE_PARM_DESC(radios, "Number of simulated radios"); > > +struct hwsim_vif_priv { > + u32 magic; > +}; > + > +#define HWSIM_VIF_MAGIC 0x69537748 > + > +static inline void hwsim_check_magic(struct ieee80211_vif *vif) > +{ > + struct hwsim_vif_priv *vp = (void *)vif->drv_priv; > + BUG_ON(vp->magic != HWSIM_VIF_MAGIC); If its a debugging tool then better WARN_ON instead no? Luis -- 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