summaryrefslogtreecommitdiffstats
path: root/net/wireless/core.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-05-15 09:30:07 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-05-27 15:10:58 +0200
commit6abb9cb99f33b20c2f32f18a3ae9cc7543e46edb (patch)
treea230daf7c9ff4cab240d048216db1ec3a0cd2ae4 /net/wireless/core.h
parent83739b03de97049181d711c95200b94a14d3f693 (diff)
downloadlinux-stable-6abb9cb99f33b20c2f32f18a3ae9cc7543e46edb.tar.gz
linux-stable-6abb9cb99f33b20c2f32f18a3ae9cc7543e46edb.tar.bz2
linux-stable-6abb9cb99f33b20c2f32f18a3ae9cc7543e46edb.zip
cfg80211: make WoWLAN configuration available to drivers
Make the current WoWLAN configuration available to drivers at runtime. This isn't really useful for the normal WoWLAN behaviour and accessing it can also be racy, but drivers may use it for testing the WoWLAN device behaviour while the host stays up & running to observe the device. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r--net/wireless/core.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h
index b4b4a566626b..a65eaf8a84c1 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -74,8 +74,6 @@ struct cfg80211_registered_device {
struct work_struct conn_work;
struct work_struct event_work;
- struct cfg80211_wowlan *wowlan;
-
struct delayed_work dfs_update_channels_wk;
/* netlink port which started critical protocol (0 means not started) */
@@ -96,17 +94,20 @@ struct cfg80211_registered_device *wiphy_to_dev(struct wiphy *wiphy)
static inline void
cfg80211_rdev_free_wowlan(struct cfg80211_registered_device *rdev)
{
+#ifdef CONFIG_PM
int i;
- if (!rdev->wowlan)
+ if (!rdev->wiphy.wowlan_config)
return;
- for (i = 0; i < rdev->wowlan->n_patterns; i++)
- kfree(rdev->wowlan->patterns[i].mask);
- kfree(rdev->wowlan->patterns);
- if (rdev->wowlan->tcp && rdev->wowlan->tcp->sock)
- sock_release(rdev->wowlan->tcp->sock);
- kfree(rdev->wowlan->tcp);
- kfree(rdev->wowlan);
+ for (i = 0; i < rdev->wiphy.wowlan_config->n_patterns; i++)
+ kfree(rdev->wiphy.wowlan_config->patterns[i].mask);
+ kfree(rdev->wiphy.wowlan_config->patterns);
+ if (rdev->wiphy.wowlan_config->tcp &&
+ rdev->wiphy.wowlan_config->tcp->sock)
+ sock_release(rdev->wiphy.wowlan_config->tcp->sock);
+ kfree(rdev->wiphy.wowlan_config->tcp);
+ kfree(rdev->wiphy.wowlan_config);
+#endif
}
extern struct workqueue_struct *cfg80211_wq;