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.
Showing the changes to include/uapi/linux (1 of 6 files). Show all
Unified · Split
| @@ -513,6 +513,12 @@ · 512 unmodified lines | ||
| 513 | 513 | * command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For |
| 514 | 514 | * more background information, see |
| 515 | 515 | * http://wireless.kernel.org/en/users/Documentation/WoWLAN. |
| 516 | + * The @NL80211_CMD_SET_WOWLAN command can also be used as a notification | |
| 517 | + * from the driver reporting the wakeup reason. In this case, the | |
| 518 | + * @NL80211_ATTR_WOWLAN_TRIGGERS attribute will contain the reason | |
| 519 | + * for the wakeup, if it was caused by wireless. If it is not present | |
| 520 | + * in the wakeup notification, the wireless device didn't cause the | |
| 521 | + * wakeup but reports that it was woken up. | |
| 516 | 522 | * |
| 517 | 523 | * @NL80211_CMD_SET_REKEY_OFFLOAD: This command is used give the driver |
| 518 | 524 | * the necessary information for supporting GTK rekey offload. This |
| @@ -2947,6 +2953,10 @@ struct nl80211_wowlan_pattern_support { · 2428 unmodified lines | ||
| 2947 | 2953 | * |
| 2948 | 2954 | * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute |
| 2949 | 2955 | * carrying a &struct nl80211_wowlan_pattern_support. |
| 2956 | + * | |
| 2957 | + * When reporting wakeup. it is a u32 attribute containing the 0-based | |
| 2958 | + * index of the pattern that caused the wakeup, in the patterns passed | |
| 2959 | + * to the kernel when configuring. | |
| 2950 | 2960 | * @NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED: Not a real trigger, and cannot be |
| 2951 | 2961 | * used when setting, used only to indicate that GTK rekeying is supported |
| 2952 | 2962 | * by the device (flag) |
| @@ -2957,8 +2967,25 @@ struct nl80211_wowlan_pattern_support { · 4 unmodified lines | ||
| 2957 | 2967 | * @NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE: wake up on 4-way handshake (flag) |
| 2958 | 2968 | * @NL80211_WOWLAN_TRIG_RFKILL_RELEASE: wake up when rfkill is released |
| 2959 | 2969 | * (on devices that have rfkill in the device) (flag) |
| 2970 | + * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211: For wakeup reporting only, contains | |
| 2971 | + * the 802.11 packet that caused the wakeup, e.g. a deauth frame. The frame | |
| 2972 | + * may be truncated, the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN | |
| 2973 | + * attribute contains the original length. | |
| 2974 | + * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN: Original length of the 802.11 | |
| 2975 | + * packet, may be bigger than the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211 | |
| 2976 | + * attribute if the packet was truncated somewhere. | |
| 2977 | + * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023: For wakeup reporting only, contains the | |
| 2978 | + * 802.11 packet that caused the wakeup, e.g. a magic packet. The frame may | |
| 2979 | + * be truncated, the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN attribute | |
| 2980 | + * contains the original length. | |
| 2981 | + * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN: Original length of the 802.3 | |
| 2982 | + * packet, may be bigger than the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023 | |
| 2983 | + * attribute if the packet was truncated somewhere. | |
| 2960 | 2984 | * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers |
| 2961 | 2985 | * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number |
| 2986 | + * | |
| 2987 | + * These nested attributes are used to configure the wakeup triggers and | |
| 2988 | + * to report the wakeup reason(s). | |
| 2962 | 2989 | */ |
| 2963 | 2990 | enum nl80211_wowlan_triggers { |
| 2964 | 2991 | __NL80211_WOWLAN_TRIG_INVALID, |
| @@ -2971,6 +2998,10 @@ enum nl80211_wowlan_triggers { · 6 unmodified lines | ||
| 2971 | 2998 | NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST, |
| 2972 | 2999 | NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE, |
| 2973 | 3000 | NL80211_WOWLAN_TRIG_RFKILL_RELEASE, |
| 3001 | + NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211, | |
| 3002 | + NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN, | |
| 3003 | + NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023, | |
| 3004 | + NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN, | |
| 2974 | 3005 | |
| 2975 | 3006 | /* keep last */ |
| 2976 | 3007 | NUM_NL80211_WOWLAN_TRIG, |