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>
This commit is contained in:

committed by
John W. Linville

parent
8f7f3b2fcc
commit
ff1b6e69ad
@@ -70,6 +70,8 @@ struct cfg80211_registered_device {
|
||||
struct work_struct conn_work;
|
||||
struct work_struct event_work;
|
||||
|
||||
struct cfg80211_wowlan *wowlan;
|
||||
|
||||
/* must be last because of the way we do wiphy_priv(),
|
||||
* and it should at least be aligned to NETDEV_ALIGN */
|
||||
struct wiphy wiphy __attribute__((__aligned__(NETDEV_ALIGN)));
|
||||
@@ -89,6 +91,18 @@ bool wiphy_idx_valid(int wiphy_idx)
|
||||
return wiphy_idx >= 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
cfg80211_rdev_free_wowlan(struct cfg80211_registered_device *rdev)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!rdev->wowlan)
|
||||
return;
|
||||
for (i = 0; i < rdev->wowlan->n_patterns; i++)
|
||||
kfree(rdev->wowlan->patterns[i].mask);
|
||||
kfree(rdev->wowlan->patterns);
|
||||
kfree(rdev->wowlan);
|
||||
}
|
||||
|
||||
extern struct workqueue_struct *cfg80211_wq;
|
||||
extern struct mutex cfg80211_mutex;
|
||||
|
Reference in New Issue
Block a user