aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-01-22 06:34:29 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-01-31 08:00:21 -0500
commitcd8f7cb4e6dfa4ea08fc250a814240b883ef7911 (patch)
tree2bcb8f04f01ee9768e5524799b0d429e51fb583d /include/net/cfg80211.h
parent3b144658bc7be5f7fa68d13ba24afb4c24489965 (diff)
cfg80211/mac80211: support reporting wakeup reason
When waking up from WoWLAN, it is useful to know what triggered the wakeup. Support reporting the wakeup reason(s) in cfg80211 (and a pass-through in mac80211) to allow userspace to know. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 36e076e374d2..48add7e3ba1d 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1597,6 +1597,32 @@ struct cfg80211_wowlan {
1597}; 1597};
1598 1598
1599/** 1599/**
1600 * struct cfg80211_wowlan_wakeup - wakeup report
1601 * @disconnect: woke up by getting disconnected
1602 * @magic_pkt: woke up by receiving magic packet
1603 * @gtk_rekey_failure: woke up by GTK rekey failure
1604 * @eap_identity_req: woke up by EAP identity request packet
1605 * @four_way_handshake: woke up by 4-way handshake
1606 * @rfkill_release: woke up by rfkill being released
1607 * @pattern_idx: pattern that caused wakeup, -1 if not due to pattern
1608 * @packet_present_len: copied wakeup packet data
1609 * @packet_len: original wakeup packet length
1610 * @packet: The packet causing the wakeup, if any.
1611 * @packet_80211: For pattern match, magic packet and other data
1612 * frame triggers an 802.3 frame should be reported, for
1613 * disconnect due to deauth 802.11 frame. This indicates which
1614 * it is.
1615 */
1616struct cfg80211_wowlan_wakeup {
1617 bool disconnect, magic_pkt, gtk_rekey_failure,
1618 eap_identity_req, four_way_handshake,
1619 rfkill_release, packet_80211;
1620 s32 pattern_idx;
1621 u32 packet_present_len, packet_len;
1622 const void *packet;
1623};
1624
1625/**
1600 * struct cfg80211_gtk_rekey_data - rekey data 1626 * struct cfg80211_gtk_rekey_data - rekey data
1601 * @kek: key encryption key 1627 * @kek: key encryption key
1602 * @kck: key confirmation key 1628 * @kck: key confirmation key
@@ -3852,6 +3878,21 @@ int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len,
3852 enum ieee80211_p2p_attr_id attr, 3878 enum ieee80211_p2p_attr_id attr,
3853 u8 *buf, unsigned int bufsize); 3879 u8 *buf, unsigned int bufsize);
3854 3880
3881/**
3882 * cfg80211_report_wowlan_wakeup - report wakeup from WoWLAN
3883 * @wdev: the wireless device reporting the wakeup
3884 * @wakeup: the wakeup report
3885 * @gfp: allocation flags
3886 *
3887 * This function reports that the given device woke up. If it
3888 * caused the wakeup, report the reason(s), otherwise you may
3889 * pass %NULL as the @wakeup parameter to advertise that something
3890 * else caused the wakeup.
3891 */
3892void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev,
3893 struct cfg80211_wowlan_wakeup *wakeup,
3894 gfp_t gfp);
3895
3855/* Logging, debugging and troubleshooting/diagnostic helpers. */ 3896/* Logging, debugging and troubleshooting/diagnostic helpers. */
3856 3897
3857/* wiphy_printk helpers, similar to dev_printk */ 3898/* wiphy_printk helpers, similar to dev_printk */