Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
[firefly-linux-kernel-4.4.55.git] / net / wireless / core.c
index 52b865fb7351ac3c221c120bc0cc236687a12513..06db6eb5258aefc332fb4fb09ed165562ea8cd7d 100644 (file)
@@ -357,8 +357,6 @@ struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv)
        rdev->wiphy.rts_threshold = (u32) -1;
        rdev->wiphy.coverage_class = 0;
 
-       rdev->wiphy.features = NL80211_FEATURE_SCAN_FLUSH;
-
        return &rdev->wiphy;
 }
 EXPORT_SYMBOL(wiphy_new);
@@ -575,6 +573,8 @@ int wiphy_register(struct wiphy *wiphy)
        /* check and set up bitrates */
        ieee80211_set_bitrate_flags(wiphy);
 
+       rdev->wiphy.features |= NL80211_FEATURE_SCAN_FLUSH;
+
        rtnl_lock();
        res = device_add(&rdev->wiphy.dev);
        if (res) {
@@ -595,7 +595,7 @@ int wiphy_register(struct wiphy *wiphy)
        if (IS_ERR(rdev->wiphy.debugfsdir))
                rdev->wiphy.debugfsdir = NULL;
 
-       if (wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY) {
+       if (wiphy->regulatory_flags & REGULATORY_CUSTOM_REG) {
                struct regulatory_request request;
 
                request.wiphy_idx = get_wiphy_idx(wiphy);