History

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem

John W. Linville committed 13 years ago

Commit 89c2af32 parents f3dfd20 d1e2586190 files · +8855 −3321Browse files

Showing the changes to include/uapi/linux (1 of 190 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+163−20
@@ -125,6 +125,31 @@ · 124 unmodified lines
125125 * interfaces that a given device supports.
126126 */
127127
128+/**
129+ * DOC: packet coalesce support
130+ *
131+ * In most cases, host that receives IPv4 and IPv6 multicast/broadcast
132+ * packets does not do anything with these packets. Therefore the
133+ * reception of these unwanted packets causes unnecessary processing
134+ * and power consumption.
135+ *
136+ * Packet coalesce feature helps to reduce number of received interrupts
137+ * to host by buffering these packets in firmware/hardware for some
138+ * predefined time. Received interrupt will be generated when one of the
139+ * following events occur.
140+ * a) Expiration of hardware timer whose expiration time is set to maximum
141+ * coalescing delay of matching coalesce rule.
142+ * b) Coalescing buffer in hardware reaches it's limit.
143+ * c) Packet doesn't match any of the configured coalesce rules.
144+ *
145+ * User needs to configure following parameters for creating a coalesce
146+ * rule.
147+ * a) Maximum coalescing delay
148+ * b) List of packet patterns which needs to be matched
149+ * c) Condition for coalescence. pattern 'match' or 'no match'
150+ * Multiple such rules can be created.
151+ */
152+
128153 /**
129154 * enum nl80211_commands - supported nl80211 commands
130155 *
@@ -648,6 +673,19 @@ · 517 unmodified lines
648673 * @NL80211_CMD_CRIT_PROTOCOL_STOP: Indicates the connection reliability can
649674 * return back to normal.
650675 *
676+ * @NL80211_CMD_GET_COALESCE: Get currently supported coalesce rules.
677+ * @NL80211_CMD_SET_COALESCE: Configure coalesce rules or clear existing rules.
678+ *
679+ * @NL80211_CMD_CHANNEL_SWITCH: Perform a channel switch by announcing the
680+ * the new channel information (Channel Switch Announcement - CSA)
681+ * in the beacon for some time (as defined in the
682+ * %NL80211_ATTR_CH_SWITCH_COUNT parameter) and then change to the
683+ * new channel. Userspace provides the new channel information (using
684+ * %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel
685+ * width). %NL80211_ATTR_CH_SWITCH_BLOCK_TX may be supplied to inform
686+ * other station that transmission must be blocked until the channel
687+ * switch is complete.
688+ *
651689 * @NL80211_CMD_MAX: highest used command number
652690 * @__NL80211_CMD_AFTER_LAST: internal use
653691 */
@@ -810,6 +848,11 @@ enum nl80211_commands { · 156 unmodified lines
810848 NL80211_CMD_CRIT_PROTOCOL_START,
811849 NL80211_CMD_CRIT_PROTOCOL_STOP,
812850
851+ NL80211_CMD_GET_COALESCE,
852+ NL80211_CMD_SET_COALESCE,
853+
854+ NL80211_CMD_CHANNEL_SWITCH,
855+
813856 /* add new commands above here */
814857
815858 /* used to define NL80211_CMD_MAX below */
@@ -1436,6 +1479,20 @@ enum nl80211_commands { · 620 unmodified lines
14361479 * allowed to be used with the first @NL80211_CMD_SET_STATION command to
14371480 * update a TDLS peer STA entry.
14381481 *
1482+ * @NL80211_ATTR_COALESCE_RULE: Coalesce rule information.
1483+ *
1484+ * @NL80211_ATTR_CH_SWITCH_COUNT: u32 attribute specifying the number of TBTT's
1485+ * until the channel switch event.
1486+ * @NL80211_ATTR_CH_SWITCH_BLOCK_TX: flag attribute specifying that transmission
1487+ * must be blocked on the current channel (before the channel switch
1488+ * operation).
1489+ * @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information
1490+ * for the time while performing a channel switch.
1491+ * @NL80211_ATTR_CSA_C_OFF_BEACON: Offset of the channel switch counter
1492+ * field in the beacons tail (%NL80211_ATTR_BEACON_TAIL).
1493+ * @NL80211_ATTR_CSA_C_OFF_PRESP: Offset of the channel switch counter
1494+ * field in the probe response (%NL80211_ATTR_PROBE_RESP).
1495+ *
14391496 * @NL80211_ATTR_MAX: highest attribute number currently defined
14401497 * @__NL80211_ATTR_AFTER_LAST: internal use
14411498 */
@@ -1736,6 +1793,14 @@ enum nl80211_attrs { · 294 unmodified lines
17361793
17371794 NL80211_ATTR_PEER_AID,
17381795
1796+ NL80211_ATTR_COALESCE_RULE,
1797+
1798+ NL80211_ATTR_CH_SWITCH_COUNT,
1799+ NL80211_ATTR_CH_SWITCH_BLOCK_TX,
1800+ NL80211_ATTR_CSA_IES,
1801+ NL80211_ATTR_CSA_C_OFF_BEACON,
1802+ NL80211_ATTR_CSA_C_OFF_PRESP,
1803+
17391804 /* add attributes here, update the policy in nl80211.c */
17401805
17411806 __NL80211_ATTR_AFTER_LAST,
@@ -2772,6 +2837,21 @@ enum nl80211_chan_width { · 1030 unmodified lines
27722837 NL80211_CHAN_WIDTH_10,
27732838 };
27742839
2840+/**
2841+ * enum nl80211_bss_scan_width - control channel width for a BSS
2842+ *
2843+ * These values are used with the %NL80211_BSS_CHAN_WIDTH attribute.
2844+ *
2845+ * @NL80211_BSS_CHAN_WIDTH_20: control channel is 20 MHz wide or compatible
2846+ * @NL80211_BSS_CHAN_WIDTH_10: control channel is 10 MHz wide
2847+ * @NL80211_BSS_CHAN_WIDTH_5: control channel is 5 MHz wide
2848+ */
2849+enum nl80211_bss_scan_width {
2850+ NL80211_BSS_CHAN_WIDTH_20,
2851+ NL80211_BSS_CHAN_WIDTH_10,
2852+ NL80211_BSS_CHAN_WIDTH_5,
2853+};
2854+
27752855 /**
27762856 * enum nl80211_bss - netlink attributes for a BSS
27772857 *
@@ -2796,6 +2876,8 @@ enum nl80211_chan_width { · 18 unmodified lines
27962876 * @NL80211_BSS_BEACON_IES: binary attribute containing the raw information
27972877 * elements from a Beacon frame (bin); not present if no Beacon frame has
27982878 * yet been received
2879+ * @NL80211_BSS_CHAN_WIDTH: channel width of the control channel
2880+ * (u32, enum nl80211_bss_scan_width)
27992881 * @__NL80211_BSS_AFTER_LAST: internal
28002882 * @NL80211_BSS_MAX: highest BSS attribute
28012883 */
@@ -2812,6 +2894,7 @@ enum nl80211_bss { · 10 unmodified lines
28122894 NL80211_BSS_STATUS,
28132895 NL80211_BSS_SEEN_MS_AGO,
28142896 NL80211_BSS_BEACON_IES,
2897+ NL80211_BSS_CHAN_WIDTH,
28152898
28162899 /* keep last */
28172900 __NL80211_BSS_AFTER_LAST,
@@ -3060,11 +3143,11 @@ enum nl80211_tx_power_setting { · 242 unmodified lines
30603143 };
30613144
30623145 /**
3063− * enum nl80211_wowlan_packet_pattern_attr - WoWLAN packet pattern attribute
3064− * @__NL80211_WOWLAN_PKTPAT_INVALID: invalid number for nested attribute
3065− * @NL80211_WOWLAN_PKTPAT_PATTERN: the pattern, values where the mask has
3146+ * enum nl80211_packet_pattern_attr - packet pattern attribute
3147+ * @__NL80211_PKTPAT_INVALID: invalid number for nested attribute
3148+ * @NL80211_PKTPAT_PATTERN: the pattern, values where the mask has
30663149 * a zero bit are ignored
3067− * @NL80211_WOWLAN_PKTPAT_MASK: pattern mask, must be long enough to have
3150+ * @NL80211_PKTPAT_MASK: pattern mask, must be long enough to have
30683151 * a bit for each byte in the pattern. The lowest-order bit corresponds
30693152 * to the first byte of the pattern, but the bytes of the pattern are
30703153 * in a little-endian-like format, i.e. the 9th byte of the pattern
@@ -3075,39 +3158,50 @@ enum nl80211_tx_power_setting { · 4 unmodified lines
30753158 * Note that the pattern matching is done as though frames were not
30763159 * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked
30773160 * first (including SNAP header unpacking) and then matched.
3078− * @NL80211_WOWLAN_PKTPAT_OFFSET: packet offset, pattern is matched after
3161+ * @NL80211_PKTPAT_OFFSET: packet offset, pattern is matched after
30793162 * these fixed number of bytes of received packet
3080− * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes
3081− * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number
3163+ * @NUM_NL80211_PKTPAT: number of attributes
3164+ * @MAX_NL80211_PKTPAT: max attribute number
30823165 */
3083−enum nl80211_wowlan_packet_pattern_attr {
3084− __NL80211_WOWLAN_PKTPAT_INVALID,
3085− NL80211_WOWLAN_PKTPAT_MASK,
3086− NL80211_WOWLAN_PKTPAT_PATTERN,
3087− NL80211_WOWLAN_PKTPAT_OFFSET,
3166+enum nl80211_packet_pattern_attr {
3167+ __NL80211_PKTPAT_INVALID,
3168+ NL80211_PKTPAT_MASK,
3169+ NL80211_PKTPAT_PATTERN,
3170+ NL80211_PKTPAT_OFFSET,
30883171
3089− NUM_NL80211_WOWLAN_PKTPAT,
3090− MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1,
3172+ NUM_NL80211_PKTPAT,
3173+ MAX_NL80211_PKTPAT = NUM_NL80211_PKTPAT - 1,
30913174 };
30923175
30933176 /**
3094− * struct nl80211_wowlan_pattern_support - pattern support information
3177+ * struct nl80211_pattern_support - packet pattern support information
30953178 * @max_patterns: maximum number of patterns supported
30963179 * @min_pattern_len: minimum length of each pattern
30973180 * @max_pattern_len: maximum length of each pattern
30983181 * @max_pkt_offset: maximum Rx packet offset
30993182 *
31003183 * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when
3101− * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the
3102− * capability information given by the kernel to userspace.
3184+ * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED or in
3185+ * %NL80211_ATTR_COALESCE_RULE_PKT_PATTERN when that is part of
3186+ * %NL80211_ATTR_COALESCE_RULE in the capability information given
3187+ * by the kernel to userspace.
31033188 */
3104−struct nl80211_wowlan_pattern_support {
3189+struct nl80211_pattern_support {
31053190 __u32 max_patterns;
31063191 __u32 min_pattern_len;
31073192 __u32 max_pattern_len;
31083193 __u32 max_pkt_offset;
31093194 } __attribute__((packed));
31103195
3196+/* only for backward compatibility */
3197+#define __NL80211_WOWLAN_PKTPAT_INVALID __NL80211_PKTPAT_INVALID
3198+#define NL80211_WOWLAN_PKTPAT_MASK NL80211_PKTPAT_MASK
3199+#define NL80211_WOWLAN_PKTPAT_PATTERN NL80211_PKTPAT_PATTERN
3200+#define NL80211_WOWLAN_PKTPAT_OFFSET NL80211_PKTPAT_OFFSET
3201+#define NUM_NL80211_WOWLAN_PKTPAT NUM_NL80211_PKTPAT
3202+#define MAX_NL80211_WOWLAN_PKTPAT MAX_NL80211_PKTPAT
3203+#define nl80211_wowlan_pattern_support nl80211_pattern_support
3204+
31113205 /**
31123206 * enum nl80211_wowlan_triggers - WoWLAN trigger definitions
31133207 * @__NL80211_WOWLAN_TRIG_INVALID: invalid number for nested attributes
@@ -3127,7 +3221,7 @@ struct nl80211_wowlan_pattern_support { · 13 unmodified lines
31273221 * pattern matching is done after the packet is converted to the MSDU.
31283222 *
31293223 * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute
3130− * carrying a &struct nl80211_wowlan_pattern_support.
3224+ * carrying a &struct nl80211_pattern_support.
31313225 *
31323226 * When reporting wakeup. it is a u32 attribute containing the 0-based
31333227 * index of the pattern that caused the wakeup, in the patterns passed
@@ -3284,7 +3378,7 @@ struct nl80211_wowlan_tcp_data_token_feature { · 150 unmodified lines
32843378 * @NL80211_WOWLAN_TCP_WAKE_PAYLOAD: wake packet payload, for advertising a
32853379 * u32 attribute holding the maximum length
32863380 * @NL80211_WOWLAN_TCP_WAKE_MASK: Wake packet payload mask, not used for
3287− * feature advertising. The mask works like @NL80211_WOWLAN_PKTPAT_MASK
3381+ * feature advertising. The mask works like @NL80211_PKTPAT_MASK
32883382 * but on the TCP payload only.
32893383 * @NUM_NL80211_WOWLAN_TCP: number of TCP attributes
32903384 * @MAX_NL80211_WOWLAN_TCP: highest attribute number
@@ -3308,6 +3402,55 @@ enum nl80211_wowlan_tcp_attrs { · 17 unmodified lines
33083402 MAX_NL80211_WOWLAN_TCP = NUM_NL80211_WOWLAN_TCP - 1
33093403 };
33103404
3405+/**
3406+ * struct nl80211_coalesce_rule_support - coalesce rule support information
3407+ * @max_rules: maximum number of rules supported
3408+ * @pat: packet pattern support information
3409+ * @max_delay: maximum supported coalescing delay in msecs
3410+ *
3411+ * This struct is carried in %NL80211_ATTR_COALESCE_RULE in the
3412+ * capability information given by the kernel to userspace.
3413+ */
3414+struct nl80211_coalesce_rule_support {
3415+ __u32 max_rules;
3416+ struct nl80211_pattern_support pat;
3417+ __u32 max_delay;
3418+} __attribute__((packed));
3419+
3420+/**
3421+ * enum nl80211_attr_coalesce_rule - coalesce rule attribute
3422+ * @__NL80211_COALESCE_RULE_INVALID: invalid number for nested attribute
3423+ * @NL80211_ATTR_COALESCE_RULE_DELAY: delay in msecs used for packet coalescing
3424+ * @NL80211_ATTR_COALESCE_RULE_CONDITION: condition for packet coalescence,
3425+ * see &enum nl80211_coalesce_condition.
3426+ * @NL80211_ATTR_COALESCE_RULE_PKT_PATTERN: packet offset, pattern is matched
3427+ * after these fixed number of bytes of received packet
3428+ * @NUM_NL80211_ATTR_COALESCE_RULE: number of attributes
3429+ * @NL80211_ATTR_COALESCE_RULE_MAX: max attribute number
3430+ */
3431+enum nl80211_attr_coalesce_rule {
3432+ __NL80211_COALESCE_RULE_INVALID,
3433+ NL80211_ATTR_COALESCE_RULE_DELAY,
3434+ NL80211_ATTR_COALESCE_RULE_CONDITION,
3435+ NL80211_ATTR_COALESCE_RULE_PKT_PATTERN,
3436+
3437+ /* keep last */
3438+ NUM_NL80211_ATTR_COALESCE_RULE,
3439+ NL80211_ATTR_COALESCE_RULE_MAX = NUM_NL80211_ATTR_COALESCE_RULE - 1
3440+};
3441+
3442+/**
3443+ * enum nl80211_coalesce_condition - coalesce rule conditions
3444+ * @NL80211_COALESCE_CONDITION_MATCH: coalaesce Rx packets when patterns
3445+ * in a rule are matched.
3446+ * @NL80211_COALESCE_CONDITION_NO_MATCH: coalesce Rx packets when patterns
3447+ * in a rule are not matched.
3448+ */
3449+enum nl80211_coalesce_condition {
3450+ NL80211_COALESCE_CONDITION_MATCH,
3451+ NL80211_COALESCE_CONDITION_NO_MATCH
3452+};
3453+
33113454 /**
33123455 * enum nl80211_iface_limit_attrs - limit attributes
33133456 * @NL80211_IFACE_LIMIT_UNSPEC: (reserved)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t