]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/wireless/core.c
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-omap-h63xx.git] / net / wireless / core.c
index 72825afe2bf638d100fc1fe63c8968c5717bdba3..b96fc0c3f1c446132cf71e3e0464a6a2ff4edd84 100644 (file)
@@ -19,7 +19,6 @@
 #include "nl80211.h"
 #include "core.h"
 #include "sysfs.h"
-#include "reg.h"
 
 /* name for sysfs, %d is appended */
 #define PHY_NAME "phy"
@@ -236,8 +235,7 @@ struct wiphy *wiphy_new(struct cfg80211_ops *ops, int sizeof_priv)
        mutex_unlock(&cfg80211_drv_mutex);
 
        /* give it a proper name */
-       snprintf(drv->wiphy.dev.bus_id, BUS_ID_SIZE,
-                PHY_NAME "%d", drv->idx);
+       dev_set_name(&drv->wiphy.dev, PHY_NAME "%d", drv->idx);
 
        mutex_init(&drv->mtx);
        mutex_init(&drv->devlist_mtx);
@@ -349,6 +347,10 @@ void wiphy_unregister(struct wiphy *wiphy)
        /* unlock again before freeing */
        mutex_unlock(&drv->mtx);
 
+       /* If this device got a regulatory hint tell core its
+        * free to listen now to a new shiny device regulatory hint */
+       reg_device_remove(wiphy);
+
        list_del(&drv->list);
        device_del(&drv->wiphy.dev);
        debugfs_remove(drv->wiphy.debugfsdir);