Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
[cascardo/linux.git] / net / wireless / core.c
index 220f3bd..ccdfed8 100644 (file)
@@ -492,6 +492,10 @@ int wiphy_register(struct wiphy *wiphy)
                    !(wiphy->wowlan.flags & WIPHY_WOWLAN_SUPPORTS_GTK_REKEY)))
                return -EINVAL;
 
+       if (WARN_ON(wiphy->ap_sme_capa &&
+                   !(wiphy->flags & WIPHY_FLAG_HAVE_AP_SME)))
+               return -EINVAL;
+
        if (WARN_ON(wiphy->addresses && !wiphy->n_addresses))
                return -EINVAL;