aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2013-06-25 22:03:56 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-07-16 02:57:55 -0400
commit50ac6607845755e594c8a39b9c6a00d1c9b48ea4 (patch)
treea7308bf0f9e69408acc2acac6ceda98fa45906cc /include
parentad81f0545ef01ea651886dddac4bef6cec930092 (diff)
cfg80211/nl80211: rename packet pattern related structures and enums
Currently packet patterns and it's enum/structures are used only for WoWLAN feature. As we intend to reuse them for new feature packet coalesce, they are renamed in this patch. Older names are kept for backward compatibility purpose. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/cfg80211.h6
-rw-r--r--include/uapi/linux/nl80211.h45
2 files changed, 30 insertions, 21 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 7b0730aeb892..207b079a8fa5 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1698,7 +1698,7 @@ struct cfg80211_pmksa {
1698}; 1698};
1699 1699
1700/** 1700/**
1701 * struct cfg80211_wowlan_trig_pkt_pattern - packet pattern 1701 * struct cfg80211_pkt_pattern - packet pattern
1702 * @mask: bitmask where to match pattern and where to ignore bytes, 1702 * @mask: bitmask where to match pattern and where to ignore bytes,
1703 * one bit per byte, in same format as nl80211 1703 * one bit per byte, in same format as nl80211
1704 * @pattern: bytes to match where bitmask is 1 1704 * @pattern: bytes to match where bitmask is 1
@@ -1708,7 +1708,7 @@ struct cfg80211_pmksa {
1708 * Internal note: @mask and @pattern are allocated in one chunk of 1708 * Internal note: @mask and @pattern are allocated in one chunk of
1709 * memory, free @mask only! 1709 * memory, free @mask only!
1710 */ 1710 */
1711struct cfg80211_wowlan_trig_pkt_pattern { 1711struct cfg80211_pkt_pattern {
1712 u8 *mask, *pattern; 1712 u8 *mask, *pattern;
1713 int pattern_len; 1713 int pattern_len;
1714 int pkt_offset; 1714 int pkt_offset;
@@ -1770,7 +1770,7 @@ struct cfg80211_wowlan {
1770 bool any, disconnect, magic_pkt, gtk_rekey_failure, 1770 bool any, disconnect, magic_pkt, gtk_rekey_failure,
1771 eap_identity_req, four_way_handshake, 1771 eap_identity_req, four_way_handshake,
1772 rfkill_release; 1772 rfkill_release;
1773 struct cfg80211_wowlan_trig_pkt_pattern *patterns; 1773 struct cfg80211_pkt_pattern *patterns;
1774 struct cfg80211_wowlan_tcp *tcp; 1774 struct cfg80211_wowlan_tcp *tcp;
1775 int n_patterns; 1775 int n_patterns;
1776}; 1776};
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 861e5eba3953..de0ce809068a 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -3060,11 +3060,11 @@ enum nl80211_tx_power_setting {
3060}; 3060};
3061 3061
3062/** 3062/**
3063 * enum nl80211_wowlan_packet_pattern_attr - WoWLAN packet pattern attribute 3063 * enum nl80211_packet_pattern_attr - packet pattern attribute
3064 * @__NL80211_WOWLAN_PKTPAT_INVALID: invalid number for nested attribute 3064 * @__NL80211_PKTPAT_INVALID: invalid number for nested attribute
3065 * @NL80211_WOWLAN_PKTPAT_PATTERN: the pattern, values where the mask has 3065 * @NL80211_PKTPAT_PATTERN: the pattern, values where the mask has
3066 * a zero bit are ignored 3066 * a zero bit are ignored
3067 * @NL80211_WOWLAN_PKTPAT_MASK: pattern mask, must be long enough to have 3067 * @NL80211_PKTPAT_MASK: pattern mask, must be long enough to have
3068 * a bit for each byte in the pattern. The lowest-order bit corresponds 3068 * a bit for each byte in the pattern. The lowest-order bit corresponds
3069 * to the first byte of the pattern, but the bytes of the pattern are 3069 * to the first byte of the pattern, but the bytes of the pattern are
3070 * in a little-endian-like format, i.e. the 9th byte of the pattern 3070 * in a little-endian-like format, i.e. the 9th byte of the pattern
@@ -3075,23 +3075,23 @@ enum nl80211_tx_power_setting {
3075 * Note that the pattern matching is done as though frames were not 3075 * Note that the pattern matching is done as though frames were not
3076 * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked 3076 * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked
3077 * first (including SNAP header unpacking) and then matched. 3077 * first (including SNAP header unpacking) and then matched.
3078 * @NL80211_WOWLAN_PKTPAT_OFFSET: packet offset, pattern is matched after 3078 * @NL80211_PKTPAT_OFFSET: packet offset, pattern is matched after
3079 * these fixed number of bytes of received packet 3079 * these fixed number of bytes of received packet
3080 * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes 3080 * @NUM_NL80211_PKTPAT: number of attributes
3081 * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number 3081 * @MAX_NL80211_PKTPAT: max attribute number
3082 */ 3082 */
3083enum nl80211_wowlan_packet_pattern_attr { 3083enum nl80211_packet_pattern_attr {
3084 __NL80211_WOWLAN_PKTPAT_INVALID, 3084 __NL80211_PKTPAT_INVALID,
3085 NL80211_WOWLAN_PKTPAT_MASK, 3085 NL80211_PKTPAT_MASK,
3086 NL80211_WOWLAN_PKTPAT_PATTERN, 3086 NL80211_PKTPAT_PATTERN,
3087 NL80211_WOWLAN_PKTPAT_OFFSET, 3087 NL80211_PKTPAT_OFFSET,
3088 3088
3089 NUM_NL80211_WOWLAN_PKTPAT, 3089 NUM_NL80211_PKTPAT,
3090 MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1, 3090 MAX_NL80211_PKTPAT = NUM_NL80211_PKTPAT - 1,
3091}; 3091};
3092 3092
3093/** 3093/**
3094 * struct nl80211_wowlan_pattern_support - pattern support information 3094 * struct nl80211_pattern_support - packet pattern support information
3095 * @max_patterns: maximum number of patterns supported 3095 * @max_patterns: maximum number of patterns supported
3096 * @min_pattern_len: minimum length of each pattern 3096 * @min_pattern_len: minimum length of each pattern
3097 * @max_pattern_len: maximum length of each pattern 3097 * @max_pattern_len: maximum length of each pattern
@@ -3101,13 +3101,22 @@ enum nl80211_wowlan_packet_pattern_attr {
3101 * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the 3101 * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the
3102 * capability information given by the kernel to userspace. 3102 * capability information given by the kernel to userspace.
3103 */ 3103 */
3104struct nl80211_wowlan_pattern_support { 3104struct nl80211_pattern_support {
3105 __u32 max_patterns; 3105 __u32 max_patterns;
3106 __u32 min_pattern_len; 3106 __u32 min_pattern_len;
3107 __u32 max_pattern_len; 3107 __u32 max_pattern_len;
3108 __u32 max_pkt_offset; 3108 __u32 max_pkt_offset;
3109} __attribute__((packed)); 3109} __attribute__((packed));
3110 3110
3111/* only for backward compatibility */
3112#define __NL80211_WOWLAN_PKTPAT_INVALID __NL80211_PKTPAT_INVALID
3113#define NL80211_WOWLAN_PKTPAT_MASK NL80211_PKTPAT_MASK
3114#define NL80211_WOWLAN_PKTPAT_PATTERN NL80211_PKTPAT_PATTERN
3115#define NL80211_WOWLAN_PKTPAT_OFFSET NL80211_PKTPAT_OFFSET
3116#define NUM_NL80211_WOWLAN_PKTPAT NUM_NL80211_PKTPAT
3117#define MAX_NL80211_WOWLAN_PKTPAT MAX_NL80211_PKTPAT
3118#define nl80211_wowlan_pattern_support nl80211_pattern_support
3119
3111/** 3120/**
3112 * enum nl80211_wowlan_triggers - WoWLAN trigger definitions 3121 * enum nl80211_wowlan_triggers - WoWLAN trigger definitions
3113 * @__NL80211_WOWLAN_TRIG_INVALID: invalid number for nested attributes 3122 * @__NL80211_WOWLAN_TRIG_INVALID: invalid number for nested attributes
@@ -3127,7 +3136,7 @@ struct nl80211_wowlan_pattern_support {
3127 * pattern matching is done after the packet is converted to the MSDU. 3136 * pattern matching is done after the packet is converted to the MSDU.
3128 * 3137 *
3129 * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute 3138 * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute
3130 * carrying a &struct nl80211_wowlan_pattern_support. 3139 * carrying a &struct nl80211_pattern_support.
3131 * 3140 *
3132 * When reporting wakeup. it is a u32 attribute containing the 0-based 3141 * When reporting wakeup. it is a u32 attribute containing the 0-based
3133 * index of the pattern that caused the wakeup, in the patterns passed 3142 * index of the pattern that caused the wakeup, in the patterns passed
@@ -3284,7 +3293,7 @@ struct nl80211_wowlan_tcp_data_token_feature {
3284 * @NL80211_WOWLAN_TCP_WAKE_PAYLOAD: wake packet payload, for advertising a 3293 * @NL80211_WOWLAN_TCP_WAKE_PAYLOAD: wake packet payload, for advertising a
3285 * u32 attribute holding the maximum length 3294 * u32 attribute holding the maximum length
3286 * @NL80211_WOWLAN_TCP_WAKE_MASK: Wake packet payload mask, not used for 3295 * @NL80211_WOWLAN_TCP_WAKE_MASK: Wake packet payload mask, not used for
3287 * feature advertising. The mask works like @NL80211_WOWLAN_PKTPAT_MASK 3296 * feature advertising. The mask works like @NL80211_PKTPAT_MASK
3288 * but on the TCP payload only. 3297 * but on the TCP payload only.
3289 * @NUM_NL80211_WOWLAN_TCP: number of TCP attributes 3298 * @NUM_NL80211_WOWLAN_TCP: number of TCP attributes
3290 * @MAX_NL80211_WOWLAN_TCP: highest attribute number 3299 * @MAX_NL80211_WOWLAN_TCP: highest attribute number