LIST_HEAD(cfg80211_rdev_list);
int cfg80211_rdev_list_generation;
+static atomic_t wiphy_counter = ATOMIC_INIT(0);
+
/* for debugfs */
static struct dentry *ieee80211_debugfs_dir;
struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
const char *requested_name)
{
- static atomic_t wiphy_counter = ATOMIC_INIT(0);
-
struct cfg80211_registered_device *rdev;
int alloc_size;
}
list_for_each_entry_safe(scan, tmp, &rdev->bss_list, list)
cfg80211_put_bss(&rdev->wiphy, &scan->pub);
+ atomic_dec(&wiphy_counter);
kfree(rdev);
}