aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/core.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-05-04 09:37:28 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-05 14:59:19 -0400
commitff1b6e69ad4f31fb3c9c6da2665655f2e798dd70 (patch)
tree6fc049fd0389ffb382ea401096d7bd665642af5c /net/wireless/core.h
parent8f7f3b2fcc4ccbba0be776049df41a2f96c986ac (diff)
nl80211/cfg80211: WoWLAN support
This is based on (but now quite far from) the original work from Luis and Eliad. Add support for configuring WoWLAN triggers, and getting the configuration out again. Changes from the original patchset are too numerous to list, but one important change needs highlighting: the suspend() callback is passed NULL for the trigger configuration if userspace has not configured WoWLAN at all. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r--net/wireless/core.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 26a0a084e16..7a18c10a7fb 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -70,6 +70,8 @@ struct cfg80211_registered_device {
70 struct work_struct conn_work; 70 struct work_struct conn_work;
71 struct work_struct event_work; 71 struct work_struct event_work;
72 72
73 struct cfg80211_wowlan *wowlan;
74
73 /* must be last because of the way we do wiphy_priv(), 75 /* must be last because of the way we do wiphy_priv(),
74 * and it should at least be aligned to NETDEV_ALIGN */ 76 * and it should at least be aligned to NETDEV_ALIGN */
75 struct wiphy wiphy __attribute__((__aligned__(NETDEV_ALIGN))); 77 struct wiphy wiphy __attribute__((__aligned__(NETDEV_ALIGN)));
@@ -89,6 +91,18 @@ bool wiphy_idx_valid(int wiphy_idx)
89 return wiphy_idx >= 0; 91 return wiphy_idx >= 0;
90} 92}
91 93
94static inline void
95cfg80211_rdev_free_wowlan(struct cfg80211_registered_device *rdev)
96{
97 int i;
98
99 if (!rdev->wowlan)
100 return;
101 for (i = 0; i < rdev->wowlan->n_patterns; i++)
102 kfree(rdev->wowlan->patterns[i].mask);
103 kfree(rdev->wowlan->patterns);
104 kfree(rdev->wowlan);
105}
92 106
93extern struct workqueue_struct *cfg80211_wq; 107extern struct workqueue_struct *cfg80211_wq;
94extern struct mutex cfg80211_mutex; 108extern struct mutex cfg80211_mutex;