]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - net/wireless/core.c
cfg80211/nl80211: introduce key handling
[linux-2.6.git] / net / wireless / core.c
index febc33bc9c09f644e21a37c1eebebf0c07b04e5b..cfc5fc5f9e753a133a90e06fcdfd10c7b95075b8 100644 (file)
@@ -184,6 +184,9 @@ struct wiphy *wiphy_new(struct cfg80211_ops *ops, int sizeof_priv)
        struct cfg80211_registered_device *drv;
        int alloc_size;
 
+       WARN_ON(!ops->add_key && ops->del_key);
+       WARN_ON(ops->add_key && !ops->del_key);
+
        alloc_size = sizeof(*drv) + sizeof_priv;
 
        drv = kzalloc(alloc_size, GFP_KERNEL);