cfg80211: don't allow WoWLAN support without CONFIG_PM
[firefly-linux-kernel-4.4.55.git] / net / mac80211 / main.c
index 0b040fb73673f9e2de6ad7336879907a840945d0..aded0018f6f3cb0559be25ae7f7d39ac51de6164 100644 (file)
@@ -706,12 +706,11 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
             local->hw.offchannel_tx_hw_queue >= local->hw.queues))
                return -EINVAL;
 
-       if ((hw->wiphy->wowlan.flags || hw->wiphy->wowlan.n_patterns)
 #ifdef CONFIG_PM
-           && (!local->ops->suspend || !local->ops->resume)
-#endif
-           )
+       if ((hw->wiphy->wowlan.flags || hw->wiphy->wowlan.n_patterns) &&
+           (!local->ops->suspend || !local->ops->resume))
                return -EINVAL;
+#endif
 
        if ((hw->flags & IEEE80211_HW_SCAN_WHILE_IDLE) && !local->ops->hw_scan)
                return -EINVAL;