aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/driver.h12
-rw-r--r--src/drivers/driver_ndis.c4
-rw-r--r--src/drivers/driver_nl80211.c11
3 files changed, 26 insertions, 1 deletions
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 51e1898..0412586 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1731,6 +1731,18 @@ struct wpa_driver_ops {
* normal station operations like scanning to be completed.
*/
int (*deinit_ap)(void *priv);
+
+ /**
+ * suspend - Notification on system suspend/hibernate event
+ * @priv: Private driver interface data
+ */
+ void (*suspend)(void *priv);
+
+ /**
+ * resume - Notification on system resume/thaw event
+ * @priv: Private driver interface data
+ */
+ void (*resume)(void *priv);
};
diff --git a/src/drivers/driver_ndis.c b/src/drivers/driver_ndis.c
index 29597a6..6f28452 100644
--- a/src/drivers/driver_ndis.c
+++ b/src/drivers/driver_ndis.c
@@ -3272,5 +3272,7 @@ const struct wpa_driver_ops wpa_driver_ndis_ops = {
NULL /* cancel_remain_on_channel */,
NULL /* probe_req_report */,
NULL /* disable_11b_rates */,
- NULL /* deinit_ap */
+ NULL /* deinit_ap */,
+ NULL /* suspend */,
+ NULL /* resume */
};
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index aff6b81..6c2949d 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4996,6 +4996,16 @@ static int wpa_driver_nl80211_deinit_ap(void *priv)
}
+static void wpa_driver_nl80211_resume(void *priv)
+{
+ struct wpa_driver_nl80211_data *drv = priv;
+ if (linux_set_iface_flags(drv->ioctl_sock, drv->ifname, 1)) {
+ wpa_printf(MSG_DEBUG, "nl80211: Failed to set interface up on "
+ "resume event");
+ }
+}
+
+
const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.name = "nl80211",
.desc = "Linux nl80211/cfg80211",
@@ -5053,4 +5063,5 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.release_interface_addr = wpa_driver_nl80211_release_interface_addr,
.disable_11b_rates = wpa_driver_nl80211_disable_11b_rates,
.deinit_ap = wpa_driver_nl80211_deinit_ap,
+ .resume = wpa_driver_nl80211_resume,
};