Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 2023 19:34:26 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: c30972f3d0e4 - releng/13.2 - LinuxKPI: device: add device_set_wakeup_enable()
Message-ID:  <202302231934.31NJYQ88020174@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch releng/13.2 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=c30972f3d0e4abd83f1eb8e3087dc7acd588a7d7

commit c30972f3d0e4abd83f1eb8e3087dc7acd588a7d7
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-01-28 15:18:24 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-02-23 19:31:52 +0000

    LinuxKPI: device: add device_set_wakeup_enable()
    
    Add a dummy device_set_wakeup_enable() which is used for WoWLAN which we
    do not (yet) support and device_wakeup_enable() which is a wrapper to the
    former with the enable argument being true.
    
    Sponsored by:   The FreeBSD Foundation
    Approved by:    re (cperciva)
    Differential Revision: https://reviews.freebsd.org/D38238
    
    (cherry picked from commit ffdf10fb9cf13464801f2d78d3e1470201394812)
    (cherry picked from commit b45e9a172d3830bed00018325eaa73c04a0b3a13)
---
 sys/compat/linuxkpi/common/include/linux/device.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h
index 70015fb7d81f..ced13faffcf0 100644
--- a/sys/compat/linuxkpi/common/include/linux/device.h
+++ b/sys/compat/linuxkpi/common/include/linux/device.h
@@ -536,6 +536,24 @@ device_reprobe(struct device *dev)
 	return (-error);
 }
 
+static inline void
+device_set_wakeup_enable(struct device *dev __unused, bool enable __unused)
+{
+
+	/*
+	 * XXX-BZ TODO This is used by wireless drivers supporting WoWLAN which
+	 * we currently do not support.
+	 */
+}
+
+static inline int
+device_wakeup_enable(struct device *dev)
+{
+
+	device_set_wakeup_enable(dev, true);
+	return (0);
+}
+
 #define	dev_pm_set_driver_flags(dev, flags) do { \
 } while (0)
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302231934.31NJYQ88020174>