Showing the changes to include/uapi/linux (1 of 190 files). Show all
Unified · Split
| @@ -125,6 +125,31 @@ · 124 unmodified lines | ||
| 125 | 125 | * interfaces that a given device supports. |
| 126 | 126 | */ |
| 127 | 127 | |
| 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 | + | |
| 128 | 153 | /** |
| 129 | 154 | * enum nl80211_commands - supported nl80211 commands |
| 130 | 155 | * |
| @@ -648,6 +673,19 @@ · 517 unmodified lines | ||
| 648 | 673 | * @NL80211_CMD_CRIT_PROTOCOL_STOP: Indicates the connection reliability can |
| 649 | 674 | * return back to normal. |
| 650 | 675 | * |
| 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 | + * | |
| 651 | 689 | * @NL80211_CMD_MAX: highest used command number |
| 652 | 690 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 653 | 691 | */ |
| @@ -810,6 +848,11 @@ enum nl80211_commands { · 156 unmodified lines | ||
| 810 | 848 | NL80211_CMD_CRIT_PROTOCOL_START, |
| 811 | 849 | NL80211_CMD_CRIT_PROTOCOL_STOP, |
| 812 | 850 | |
| 851 | + NL80211_CMD_GET_COALESCE, | |
| 852 | + NL80211_CMD_SET_COALESCE, | |
| 853 | + | |
| 854 | + NL80211_CMD_CHANNEL_SWITCH, | |
| 855 | + | |
| 813 | 856 | /* add new commands above here */ |
| 814 | 857 | |
| 815 | 858 | /* used to define NL80211_CMD_MAX below */ |
| @@ -1436,6 +1479,20 @@ enum nl80211_commands { · 620 unmodified lines | ||
| 1436 | 1479 | * allowed to be used with the first @NL80211_CMD_SET_STATION command to |
| 1437 | 1480 | * update a TDLS peer STA entry. |
| 1438 | 1481 | * |
| 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 | + * | |
| 1439 | 1496 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 1440 | 1497 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 1441 | 1498 | */ |
| @@ -1736,6 +1793,14 @@ enum nl80211_attrs { · 294 unmodified lines | ||
| 1736 | 1793 | |
| 1737 | 1794 | NL80211_ATTR_PEER_AID, |
| 1738 | 1795 | |
| 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 | + | |
| 1739 | 1804 | /* add attributes here, update the policy in nl80211.c */ |
| 1740 | 1805 | |
| 1741 | 1806 | __NL80211_ATTR_AFTER_LAST, |
| @@ -2772,6 +2837,21 @@ enum nl80211_chan_width { · 1030 unmodified lines | ||
| 2772 | 2837 | NL80211_CHAN_WIDTH_10, |
| 2773 | 2838 | }; |
| 2774 | 2839 | |
| 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 | + | |
| 2775 | 2855 | /** |
| 2776 | 2856 | * enum nl80211_bss - netlink attributes for a BSS |
| 2777 | 2857 | * |
| @@ -2796,6 +2876,8 @@ enum nl80211_chan_width { · 18 unmodified lines | ||
| 2796 | 2876 | * @NL80211_BSS_BEACON_IES: binary attribute containing the raw information |
| 2797 | 2877 | * elements from a Beacon frame (bin); not present if no Beacon frame has |
| 2798 | 2878 | * yet been received |
| 2879 | + * @NL80211_BSS_CHAN_WIDTH: channel width of the control channel | |
| 2880 | + * (u32, enum nl80211_bss_scan_width) | |
| 2799 | 2881 | * @__NL80211_BSS_AFTER_LAST: internal |
| 2800 | 2882 | * @NL80211_BSS_MAX: highest BSS attribute |
| 2801 | 2883 | */ |
| @@ -2812,6 +2894,7 @@ enum nl80211_bss { · 10 unmodified lines | ||
| 2812 | 2894 | NL80211_BSS_STATUS, |
| 2813 | 2895 | NL80211_BSS_SEEN_MS_AGO, |
| 2814 | 2896 | NL80211_BSS_BEACON_IES, |
| 2897 | + NL80211_BSS_CHAN_WIDTH, | |
| 2815 | 2898 | |
| 2816 | 2899 | /* keep last */ |
| 2817 | 2900 | __NL80211_BSS_AFTER_LAST, |
| @@ -3060,11 +3143,11 @@ enum nl80211_tx_power_setting { · 242 unmodified lines | ||
| 3060 | 3143 | }; |
| 3061 | 3144 | |
| 3062 | 3145 | /** |
| 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 | |
| 3066 | 3149 | * 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 | |
| 3068 | 3151 | * a bit for each byte in the pattern. The lowest-order bit corresponds |
| 3069 | 3152 | * to the first byte of the pattern, but the bytes of the pattern are |
| 3070 | 3153 | * 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 | ||
| 3075 | 3158 | * Note that the pattern matching is done as though frames were not |
| 3076 | 3159 | * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked |
| 3077 | 3160 | * 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 | |
| 3079 | 3162 | * 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 | |
| 3082 | 3165 | */ |
| 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, | |
| 3088 | 3171 | |
| 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, | |
| 3091 | 3174 | }; |
| 3092 | 3175 | |
| 3093 | 3176 | /** |
| 3094 | − * struct nl80211_wowlan_pattern_support - pattern support information | |
| 3177 | + * struct nl80211_pattern_support - packet pattern support information | |
| 3095 | 3178 | * @max_patterns: maximum number of patterns supported |
| 3096 | 3179 | * @min_pattern_len: minimum length of each pattern |
| 3097 | 3180 | * @max_pattern_len: maximum length of each pattern |
| 3098 | 3181 | * @max_pkt_offset: maximum Rx packet offset |
| 3099 | 3182 | * |
| 3100 | 3183 | * 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. | |
| 3103 | 3188 | */ |
| 3104 | −struct nl80211_wowlan_pattern_support { | |
| 3189 | +struct nl80211_pattern_support { | |
| 3105 | 3190 | __u32 max_patterns; |
| 3106 | 3191 | __u32 min_pattern_len; |
| 3107 | 3192 | __u32 max_pattern_len; |
| 3108 | 3193 | __u32 max_pkt_offset; |
| 3109 | 3194 | } __attribute__((packed)); |
| 3110 | 3195 | |
| 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 | + | |
| 3111 | 3205 | /** |
| 3112 | 3206 | * enum nl80211_wowlan_triggers - WoWLAN trigger definitions |
| 3113 | 3207 | * @__NL80211_WOWLAN_TRIG_INVALID: invalid number for nested attributes |
| @@ -3127,7 +3221,7 @@ struct nl80211_wowlan_pattern_support { · 13 unmodified lines | ||
| 3127 | 3221 | * pattern matching is done after the packet is converted to the MSDU. |
| 3128 | 3222 | * |
| 3129 | 3223 | * 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. | |
| 3131 | 3225 | * |
| 3132 | 3226 | * When reporting wakeup. it is a u32 attribute containing the 0-based |
| 3133 | 3227 | * 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 | ||
| 3284 | 3378 | * @NL80211_WOWLAN_TCP_WAKE_PAYLOAD: wake packet payload, for advertising a |
| 3285 | 3379 | * u32 attribute holding the maximum length |
| 3286 | 3380 | * @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 | |
| 3288 | 3382 | * but on the TCP payload only. |
| 3289 | 3383 | * @NUM_NL80211_WOWLAN_TCP: number of TCP attributes |
| 3290 | 3384 | * @MAX_NL80211_WOWLAN_TCP: highest attribute number |
| @@ -3308,6 +3402,55 @@ enum nl80211_wowlan_tcp_attrs { · 17 unmodified lines | ||
| 3308 | 3402 | MAX_NL80211_WOWLAN_TCP = NUM_NL80211_WOWLAN_TCP - 1 |
| 3309 | 3403 | }; |
| 3310 | 3404 | |
| 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 | + | |
| 3311 | 3454 | /** |
| 3312 | 3455 | * enum nl80211_iface_limit_attrs - limit attributes |
| 3313 | 3456 | * @NL80211_IFACE_LIMIT_UNSPEC: (reserved) |