@@ -162,6 +162,7 @@ static int sdio_reset(struct wilc *wilc)
return 0;
}
+#ifdef CONFIG_PM
static int wilc_sdio_suspend(struct device *dev)
{
struct sdio_func *func = dev_to_sdio_func(dev);
@@ -210,15 +211,18 @@ static const struct dev_pm_ops wilc_sdio_pm_ops = {
.suspend = wilc_sdio_suspend,
.resume = wilc_sdio_resume,
};
+#endif
static struct sdio_driver wilc1000_sdio_driver = {
.name = SDIO_MODALIAS,
.id_table = wilc_sdio_ids,
.probe = linux_sdio_probe,
.remove = linux_sdio_remove,
+#ifdef CONFIG_PM
.drv = {
.pm = &wilc_sdio_pm_ops,
}
+#endif
};
module_driver(wilc1000_sdio_driver,
sdio_register_driver,
@@ -74,9 +74,11 @@ static const struct ieee80211_txrx_stypes
}
};
+#ifdef CONFIG_PM
static const struct wiphy_wowlan_support wowlan_support = {
.flags = WIPHY_WOWLAN_ANY
};
+#endif
#define WILC_WFI_DWELL_PASSIVE 100
#define WILC_WFI_DWELL_ACTIVE 40
@@ -2407,6 +2409,7 @@ static int del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev)
return 0;
}
+#ifdef CONFIG_PM
static int wilc_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow)
{
struct wilc_priv *priv = wiphy_priv(wiphy);
@@ -2436,6 +2439,7 @@ static void wilc_set_wakeup(struct wiphy *wiphy, bool enabled)
netdev_info(vif->ndev, "cfg set wake up = %d\n", enabled);
}
+#endif
static int set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
enum nl80211_tx_power_setting type, int mbm)
@@ -2504,10 +2508,11 @@ static struct cfg80211_ops wilc_cfg80211_ops = {
.mgmt_frame_register = wilc_mgmt_frame_register,
.set_power_mgmt = set_power_mgmt,
.set_cqm_rssi_config = set_cqm_rssi_config,
-
+#ifdef CONFIG_PM
.suspend = wilc_suspend,
.resume = wilc_resume,
.set_wakeup = wilc_set_wakeup,
+#endif
.set_tx_power = set_tx_power,
.get_tx_power = get_tx_power,
@@ -2591,7 +2596,9 @@ struct wireless_dev *wilc_create_wiphy(struct net_device *net, struct device *de
sema_init(&(priv->SemHandleUpdateStats), 1);
priv->wdev = wdev;
wdev->wiphy->max_scan_ssids = MAX_NUM_PROBED_SSID;
+#ifdef CONFIG_PM
wdev->wiphy->wowlan = &wowlan_support;
+#endif
wdev->wiphy->max_num_pmkids = WILC_MAX_NUM_PMKIDS;
PRINT_INFO(CFG80211_DBG, "Max number of PMKIDs = %d\n", wdev->wiphy->max_num_pmkids);
@@ -215,7 +215,9 @@ struct wilc {
const struct firmware *firmware;
struct device *dev;
+#ifdef CONFIG_PM
bool suspend_event;
+#endif
struct rf_info dummy_statistics;
};