From f2eb4e23632c4181c9806abfc2055640cb8fa8ca Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 9 May 2013 22:11:55 +0000 Subject: [PATCH] iw: sync with latest nl80211 header Signed-off-by: Felix Fietkau SVN-Revision: 36599 --- package/iw/patches/001-nl80211_h_sync.patch | 891 +++++++++++++++++++- 1 file changed, 880 insertions(+), 11 deletions(-) diff --git a/package/iw/patches/001-nl80211_h_sync.patch b/package/iw/patches/001-nl80211_h_sync.patch index 8e776643b7..4c2055736f 100644 --- a/package/iw/patches/001-nl80211_h_sync.patch +++ b/package/iw/patches/001-nl80211_h_sync.patch @@ -1,9 +1,115 @@ --- a/nl80211.h +++ b/nl80211.h -@@ -565,6 +565,14 @@ - * %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ with - * %NL80211_ATTR_WIPHY_CHANNEL_TYPE. +@@ -118,8 +118,9 @@ + * to get a list of all present wiphys. + * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or + * %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME, +- * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ, +- * %NL80211_ATTR_WIPHY_CHANNEL_TYPE, %NL80211_ATTR_WIPHY_RETRY_SHORT, ++ * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ (and the ++ * attributes determining the channel width; this is used for setting ++ * monitor mode channel), %NL80211_ATTR_WIPHY_RETRY_SHORT, + * %NL80211_ATTR_WIPHY_RETRY_LONG, %NL80211_ATTR_WIPHY_FRAG_THRESHOLD, + * and/or %NL80211_ATTR_WIPHY_RTS_THRESHOLD. + * However, for setting the channel, see %NL80211_CMD_SET_CHANNEL +@@ -169,9 +170,10 @@ + * %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE, + * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS, + * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY, +- * %NL80211_ATTR_AUTH_TYPE and %NL80211_ATTR_INACTIVITY_TIMEOUT. ++ * %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_INACTIVITY_TIMEOUT, ++ * %NL80211_ATTR_ACL_POLICY and %NL80211_ATTR_MAC_ADDRS. + * The channel to use can be set on the interface or be given using the +- * %NL80211_ATTR_WIPHY_FREQ and %NL80211_ATTR_WIPHY_CHANNEL_TYPE attrs. ++ * %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel width. + * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP + * @NL80211_CMD_STOP_AP: Stop AP operation on the given interface + * @NL80211_CMD_DEL_BEACON: old alias for %NL80211_CMD_STOP_AP +@@ -373,8 +375,8 @@ + * requests to connect to a specified network but without separating + * auth and assoc steps. For this, you need to specify the SSID in a + * %NL80211_ATTR_SSID attribute, and can optionally specify the association +- * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC, +- * %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT, ++ * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP, ++ * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT, + * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and + * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT. + * Background scan period can optionally be +@@ -401,8 +403,7 @@ + * a response while being associated to an AP on another channel. + * %NL80211_ATTR_IFINDEX is used to specify which interface (and thus + * radio) is used. %NL80211_ATTR_WIPHY_FREQ is used to specify the +- * frequency for the operation and %NL80211_ATTR_WIPHY_CHANNEL_TYPE may be +- * optionally used to specify additional channel parameters. ++ * frequency for the operation. + * %NL80211_ATTR_DURATION is used to specify the duration in milliseconds + * to remain on the channel. This command is also used as an event to + * notify when the requested duration starts (it may take a while for the +@@ -440,12 +441,11 @@ + * as an event indicating reception of a frame that was not processed in + * kernel code, but is for us (i.e., which may need to be processed in a + * user space application). %NL80211_ATTR_FRAME is used to specify the +- * frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and +- * optionally %NL80211_ATTR_WIPHY_CHANNEL_TYPE) is used to indicate on +- * which channel the frame is to be transmitted or was received. If this +- * channel is not the current channel (remain-on-channel or the +- * operational channel) the device will switch to the given channel and +- * transmit the frame, optionally waiting for a response for the time ++ * frame contents (including header). %NL80211_ATTR_WIPHY_FREQ is used ++ * to indicate on which channel the frame is to be transmitted or was ++ * received. If this channel is not the current channel (remain-on-channel ++ * or the operational channel) the device will switch to the given channel ++ * and transmit the frame, optionally waiting for a response for the time + * specified using %NL80211_ATTR_DURATION. When called, this operation + * returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the + * TX status event pertaining to the TX request. +@@ -473,8 +473,8 @@ + * command is used as an event to indicate the that a trigger level was + * reached. + * @NL80211_CMD_SET_CHANNEL: Set the channel (using %NL80211_ATTR_WIPHY_FREQ +- * and %NL80211_ATTR_WIPHY_CHANNEL_TYPE) the given interface (identifed +- * by %NL80211_ATTR_IFINDEX) shall operate on. ++ * and the attributes determining channel width) the given interface ++ * (identifed by %NL80211_ATTR_IFINDEX) shall operate on. + * In case multiple channels are supported by the device, the mechanism + * with which it switches channels is implementation-defined. + * When a monitor interface is given, it can only switch channel while +@@ -513,6 +513,12 @@ + * command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For + * more background information, see + * http://wireless.kernel.org/en/users/Documentation/WoWLAN. ++ * The @NL80211_CMD_SET_WOWLAN command can also be used as a notification ++ * from the driver reporting the wakeup reason. In this case, the ++ * @NL80211_ATTR_WOWLAN_TRIGGERS attribute will contain the reason ++ * for the wakeup, if it was caused by wireless. If it is not present ++ * in the wakeup notification, the wireless device didn't cause the ++ * wakeup but reports that it was woken up. * + * @NL80211_CMD_SET_REKEY_OFFLOAD: This command is used give the driver + * the necessary information for supporting GTK rekey offload. This +@@ -526,6 +532,12 @@ + * of PMKSA caching dandidates. + * + * @NL80211_CMD_TDLS_OPER: Perform a high-level TDLS command (e.g. link setup). ++ * In addition, this can be used as an event to request userspace to take ++ * actions on TDLS links (set up a new link or tear down an existing one). ++ * In such events, %NL80211_ATTR_TDLS_OPERATION indicates the requested ++ * operation, %NL80211_ATTR_MAC contains the peer MAC address, and ++ * %NL80211_ATTR_REASON_CODE the reason code to be used (only with ++ * %NL80211_TDLS_TEARDOWN). + * @NL80211_CMD_TDLS_MGMT: Send a TDLS management frame. + * + * @NL80211_CMD_UNEXPECTED_FRAME: Used by an application controlling an AP +@@ -562,8 +574,42 @@ + * + * @NL80211_CMD_CH_SWITCH_NOTIFY: An AP or GO may decide to switch channels + * independently of the userspace SME, send this event indicating +- * %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ with +- * %NL80211_ATTR_WIPHY_CHANNEL_TYPE. ++ * %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ and the ++ * attributes determining channel width. ++ * + * @NL80211_CMD_START_P2P_DEVICE: Start the given P2P Device, identified by + * its %NL80211_ATTR_WDEV identifier. It must have been created with + * %NL80211_CMD_NEW_INTERFACE previously. After it has been started, the @@ -12,29 +118,194 @@ + * @NL80211_CMD_STOP_P2P_DEVICE: Stop the given P2P Device, identified by + * its %NL80211_ATTR_WDEV identifier. + * ++ * @NL80211_CMD_CONN_FAILED: connection request to an AP failed; used to ++ * notify userspace that AP has rejected the connection request from a ++ * station, due to particular reason. %NL80211_ATTR_CONN_FAILED_REASON ++ * is used for this. ++ * ++ * @NL80211_CMD_SET_MCAST_RATE: Change the rate used to send multicast frames ++ * for IBSS or MESH vif. ++ * ++ * @NL80211_CMD_SET_MAC_ACL: sets ACL for MAC address based access control. ++ * This is to be used with the drivers advertising the support of MAC ++ * address based access control. List of MAC addresses is passed in ++ * %NL80211_ATTR_MAC_ADDRS and ACL policy is passed in ++ * %NL80211_ATTR_ACL_POLICY. Driver will enable ACL with this list, if it ++ * is not already done. The new list will replace any existing list. Driver ++ * will clear its ACL when the list of MAC addresses passed is empty. This ++ * command is used in AP/P2P GO mode. Driver has to make sure to clear its ++ * ACL list during %NL80211_CMD_STOP_AP. ++ * ++ * @NL80211_CMD_RADAR_DETECT: Start a Channel availability check (CAC). Once ++ * a radar is detected or the channel availability scan (CAC) has finished ++ * or was aborted, or a radar was detected, usermode will be notified with ++ * this event. This command is also used to notify userspace about radars ++ * while operating on this channel. ++ * %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the ++ * event. + * * @NL80211_CMD_MAX: highest used command number * @__NL80211_CMD_AFTER_LAST: internal use - */ -@@ -708,6 +716,9 @@ enum nl80211_commands { +@@ -708,6 +754,17 @@ enum nl80211_commands { NL80211_CMD_CH_SWITCH_NOTIFY, + NL80211_CMD_START_P2P_DEVICE, + NL80211_CMD_STOP_P2P_DEVICE, ++ ++ NL80211_CMD_CONN_FAILED, ++ ++ NL80211_CMD_SET_MCAST_RATE, ++ ++ NL80211_CMD_SET_MAC_ACL, ++ ++ NL80211_CMD_RADAR_DETECT, + /* add new commands above here */ /* used to define NL80211_CMD_MAX below */ -@@ -1506,6 +1517,8 @@ enum nl80211_attrs { +@@ -744,14 +801,26 @@ enum nl80211_commands { + * /sys/class/ieee80211//index + * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming) + * @NL80211_ATTR_WIPHY_TXQ_PARAMS: a nested array of TX queue parameters +- * @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz ++ * @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz, ++ * defines the channel together with the (deprecated) ++ * %NL80211_ATTR_WIPHY_CHANNEL_TYPE attribute or the attributes ++ * %NL80211_ATTR_CHANNEL_WIDTH and if needed %NL80211_ATTR_CENTER_FREQ1 ++ * and %NL80211_ATTR_CENTER_FREQ2 ++ * @NL80211_ATTR_CHANNEL_WIDTH: u32 attribute containing one of the values ++ * of &enum nl80211_chan_width, describing the channel width. See the ++ * documentation of the enum for more information. ++ * @NL80211_ATTR_CENTER_FREQ1: Center frequency of the first part of the ++ * channel, used for anything but 20 MHz bandwidth ++ * @NL80211_ATTR_CENTER_FREQ2: Center frequency of the second part of the ++ * channel, used only for 80+80 MHz bandwidth + * @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ +- * if HT20 or HT40 are allowed (i.e., 802.11n disabled if not included): ++ * if HT20 or HT40 are to be used (i.e., HT disabled if not included): + * NL80211_CHAN_NO_HT = HT not allowed (i.e., same as not including + * this attribute) + * NL80211_CHAN_HT20 = HT20 only + * NL80211_CHAN_HT40MINUS = secondary channel is below the primary channel + * NL80211_CHAN_HT40PLUS = secondary channel is above the primary channel ++ * This attribute is now deprecated. + * @NL80211_ATTR_WIPHY_RETRY_SHORT: TX retry limit for frames whose length is + * less than or equal to the RTS threshold; allowed range: 1..255; + * dot11ShortRetryLimit; u8 +@@ -918,7 +987,7 @@ enum nl80211_commands { + * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is + * used for the association (&enum nl80211_mfp, represented as a u32); + * this attribute can be used +- * with %NL80211_CMD_ASSOCIATE request ++ * with %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests + * + * @NL80211_ATTR_STA_FLAGS2: Attribute containing a + * &struct nl80211_sta_flag_update. +@@ -1251,6 +1320,54 @@ enum nl80211_commands { + * was used to provide the hint. For the different types of + * allowed user regulatory hints see nl80211_user_reg_hint_type. + * ++ * @NL80211_ATTR_CONN_FAILED_REASON: The reason for which AP has rejected ++ * the connection request from a station. nl80211_connect_failed_reason ++ * enum has different reasons of connection failure. ++ * ++ * @NL80211_ATTR_SAE_DATA: SAE elements in Authentication frames. This starts ++ * with the Authentication transaction sequence number field. ++ * ++ * @NL80211_ATTR_VHT_CAPABILITY: VHT Capability information element (from ++ * association request when used with NL80211_CMD_NEW_STATION) ++ * ++ * @NL80211_ATTR_SCAN_FLAGS: scan request control flags (u32) ++ * ++ * @NL80211_ATTR_P2P_CTWINDOW: P2P GO Client Traffic Window (u8), used with ++ * the START_AP and SET_BSS commands ++ * @NL80211_ATTR_P2P_OPPPS: P2P GO opportunistic PS (u8), used with the ++ * START_AP and SET_BSS commands. This can have the values 0 or 1; ++ * if not given in START_AP 0 is assumed, if not given in SET_BSS ++ * no change is made. ++ * ++ * @NL80211_ATTR_LOCAL_MESH_POWER_MODE: local mesh STA link-specific power mode ++ * defined in &enum nl80211_mesh_power_mode. ++ * ++ * @NL80211_ATTR_ACL_POLICY: ACL policy, see &enum nl80211_acl_policy, ++ * carried in a u32 attribute ++ * ++ * @NL80211_ATTR_MAC_ADDRS: Array of nested MAC addresses, used for ++ * MAC ACL. ++ * ++ * @NL80211_ATTR_MAC_ACL_MAX: u32 attribute to advertise the maximum ++ * number of MAC addresses that a device can support for MAC ++ * ACL. ++ * ++ * @NL80211_ATTR_RADAR_EVENT: Type of radar event for notification to userspace, ++ * contains a value of enum nl80211_radar_event (u32). ++ * ++ * @NL80211_ATTR_EXT_CAPA: 802.11 extended capabilities that the kernel driver ++ * has and handles. The format is the same as the IE contents. See ++ * 802.11-2012 8.4.2.29 for more information. ++ * @NL80211_ATTR_EXT_CAPA_MASK: Extended capabilities that the kernel driver ++ * has set in the %NL80211_ATTR_EXT_CAPA value, for multibit fields. ++ * ++ * @NL80211_ATTR_STA_CAPABILITY: Station capabilities (u16) are advertised to ++ * the driver, e.g., to enable TDLS power save (PU-APSD). ++ * ++ * @NL80211_ATTR_STA_EXT_CAPABILITY: Station extended capabilities are ++ * advertised to the driver, e.g., to enable TDLS off channel operations ++ * and PU-APSD. ++ * + * @NL80211_ATTR_MAX: highest attribute number currently defined + * @__NL80211_ATTR_AFTER_LAST: internal use + */ +@@ -1506,6 +1623,39 @@ enum nl80211_attrs { NL80211_ATTR_USER_REG_HINT_TYPE, ++ NL80211_ATTR_CONN_FAILED_REASON, ++ ++ NL80211_ATTR_SAE_DATA, ++ ++ NL80211_ATTR_VHT_CAPABILITY, ++ ++ NL80211_ATTR_SCAN_FLAGS, ++ ++ NL80211_ATTR_CHANNEL_WIDTH, ++ NL80211_ATTR_CENTER_FREQ1, ++ NL80211_ATTR_CENTER_FREQ2, ++ ++ NL80211_ATTR_P2P_CTWINDOW, ++ NL80211_ATTR_P2P_OPPPS, ++ ++ NL80211_ATTR_LOCAL_MESH_POWER_MODE, ++ ++ NL80211_ATTR_ACL_POLICY, ++ ++ NL80211_ATTR_MAC_ADDRS, ++ ++ NL80211_ATTR_MAC_ACL_MAX, ++ ++ NL80211_ATTR_RADAR_EVENT, ++ ++ NL80211_ATTR_EXT_CAPA, ++ NL80211_ATTR_EXT_CAPA_MASK, ++ ++ NL80211_ATTR_STA_CAPABILITY, ++ NL80211_ATTR_STA_EXT_CAPABILITY, ++ + NL80211_ATTR_WIPHY_ANTENNA_GAIN, + /* add attributes here, update the policy in nl80211.c */ __NL80211_ATTR_AFTER_LAST, -@@ -1575,6 +1588,10 @@ enum nl80211_attrs { +@@ -1549,6 +1699,7 @@ enum nl80211_attrs { + #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16 + #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 + #define NL80211_HT_CAPABILITY_LEN 26 ++#define NL80211_VHT_CAPABILITY_LEN 12 + + #define NL80211_MAX_NR_CIPHER_SUITES 5 + #define NL80211_MAX_NR_AKM_SUITES 2 +@@ -1575,6 +1726,10 @@ enum nl80211_attrs { * @NL80211_IFTYPE_MESH_POINT: mesh point * @NL80211_IFTYPE_P2P_CLIENT: P2P client * @NL80211_IFTYPE_P2P_GO: P2P group owner @@ -45,7 +316,7 @@ * @NL80211_IFTYPE_MAX: highest interface type number currently defined * @NUM_NL80211_IFTYPES: number of defined interface types * -@@ -1593,6 +1610,7 @@ enum nl80211_iftype { +@@ -1593,6 +1748,7 @@ enum nl80211_iftype { NL80211_IFTYPE_MESH_POINT, NL80211_IFTYPE_P2P_CLIENT, NL80211_IFTYPE_P2P_GO, @@ -53,25 +324,490 @@ /* keep last */ NUM_NL80211_IFTYPES, -@@ -1744,6 +1762,8 @@ enum nl80211_sta_bss_param { +@@ -1617,6 +1773,9 @@ enum nl80211_iftype { + * flag can't be changed, it is only valid while adding a station, and + * attempts to change it will silently be ignored (rather than rejected + * as errors.) ++ * @NL80211_STA_FLAG_ASSOCIATED: station is associated; used with drivers ++ * that support %NL80211_FEATURE_FULL_AP_CLIENT_STATE to transition a ++ * previously added station into associated state + * @NL80211_STA_FLAG_MAX: highest station flag number currently defined + * @__NL80211_STA_FLAG_AFTER_LAST: internal use + */ +@@ -1628,6 +1787,7 @@ enum nl80211_sta_flags { + NL80211_STA_FLAG_MFP, + NL80211_STA_FLAG_AUTHENTICATED, + NL80211_STA_FLAG_TDLS_PEER, ++ NL80211_STA_FLAG_ASSOCIATED, + + /* keep last */ + __NL80211_STA_FLAG_AFTER_LAST, +@@ -1664,10 +1824,15 @@ struct nl80211_sta_flag_update { + * @__NL80211_RATE_INFO_INVALID: attribute number 0 is reserved + * @NL80211_RATE_INFO_BITRATE: total bitrate (u16, 100kbit/s) + * @NL80211_RATE_INFO_MCS: mcs index for 802.11n (u8) +- * @NL80211_RATE_INFO_40_MHZ_WIDTH: 40 Mhz dualchannel bitrate ++ * @NL80211_RATE_INFO_40_MHZ_WIDTH: 40 MHz dualchannel bitrate + * @NL80211_RATE_INFO_SHORT_GI: 400ns guard interval + * @NL80211_RATE_INFO_BITRATE32: total bitrate (u32, 100kbit/s) + * @NL80211_RATE_INFO_MAX: highest rate_info number currently defined ++ * @NL80211_RATE_INFO_VHT_MCS: MCS index for VHT (u8) ++ * @NL80211_RATE_INFO_VHT_NSS: number of streams in VHT (u8) ++ * @NL80211_RATE_INFO_80_MHZ_WIDTH: 80 MHz VHT rate ++ * @NL80211_RATE_INFO_80P80_MHZ_WIDTH: 80+80 MHz VHT rate ++ * @NL80211_RATE_INFO_160_MHZ_WIDTH: 160 MHz VHT rate + * @__NL80211_RATE_INFO_AFTER_LAST: internal use + */ + enum nl80211_rate_info { +@@ -1677,6 +1842,11 @@ enum nl80211_rate_info { + NL80211_RATE_INFO_40_MHZ_WIDTH, + NL80211_RATE_INFO_SHORT_GI, + NL80211_RATE_INFO_BITRATE32, ++ NL80211_RATE_INFO_VHT_MCS, ++ NL80211_RATE_INFO_VHT_NSS, ++ NL80211_RATE_INFO_80_MHZ_WIDTH, ++ NL80211_RATE_INFO_80P80_MHZ_WIDTH, ++ NL80211_RATE_INFO_160_MHZ_WIDTH, + + /* keep last */ + __NL80211_RATE_INFO_AFTER_LAST, +@@ -1723,6 +1893,8 @@ enum nl80211_sta_bss_param { + * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs) + * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station) + * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) ++ * @NL80211_STA_INFO_RX_BYTES64: total received bytes (u64, from this station) ++ * @NL80211_STA_INFO_TX_BYTES64: total transmitted bytes (u64, to this station) + * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) + * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute + * containing info as possible, see &enum nl80211_rate_info +@@ -1744,6 +1916,12 @@ enum nl80211_sta_bss_param { * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update. * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32) * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64) ++ * @NL80211_STA_INFO_LOCAL_PM: local mesh STA link-specific power mode ++ * @NL80211_STA_INFO_PEER_PM: peer mesh STA link-specific power mode ++ * @NL80211_STA_INFO_NONPEER_PM: neighbor mesh STA power save mode towards ++ * non-peer STA + * @NL80211_STA_INFO_CHAIN_SIGNAL: per-chain signal strength of last PPDU + * @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average * @__NL80211_STA_INFO_AFTER_LAST: internal * @NL80211_STA_INFO_MAX: highest possible station info attribute */ -@@ -1768,6 +1788,8 @@ enum nl80211_sta_info { +@@ -1768,6 +1946,13 @@ enum nl80211_sta_info { NL80211_STA_INFO_STA_FLAGS, NL80211_STA_INFO_BEACON_LOSS, NL80211_STA_INFO_T_OFFSET, ++ NL80211_STA_INFO_LOCAL_PM, ++ NL80211_STA_INFO_PEER_PM, ++ NL80211_STA_INFO_NONPEER_PM, ++ NL80211_STA_INFO_RX_BYTES64, ++ NL80211_STA_INFO_TX_BYTES64, + NL80211_STA_INFO_CHAIN_SIGNAL, + NL80211_STA_INFO_CHAIN_SIGNAL_AVG, /* keep last */ __NL80211_STA_INFO_AFTER_LAST, -@@ -2994,12 +3016,18 @@ enum nl80211_ap_sme_features { +@@ -1877,6 +2062,20 @@ enum nl80211_band_attr { + * on this channel in current regulatory domain. + * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm + * (100 * dBm). ++ * @NL80211_FREQUENCY_ATTR_DFS_STATE: current state for DFS ++ * (enum nl80211_dfs_state) ++ * @NL80211_FREQUENCY_ATTR_DFS_TIME: time in miliseconds for how long ++ * this channel is in this DFS state. ++ * @NL80211_FREQUENCY_ATTR_NO_HT40_MINUS: HT40- isn't possible with this ++ * channel as the control channel ++ * @NL80211_FREQUENCY_ATTR_NO_HT40_PLUS: HT40+ isn't possible with this ++ * channel as the control channel ++ * @NL80211_FREQUENCY_ATTR_NO_80MHZ: any 80 MHz channel using this channel ++ * as the primary or any of the secondary channels isn't possible, ++ * this includes 80+80 channels ++ * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel ++ * using this channel as the primary or any of the secondary channels ++ * isn't possible + * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number + * currently defined + * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use +@@ -1889,6 +2088,12 @@ enum nl80211_frequency_attr { + NL80211_FREQUENCY_ATTR_NO_IBSS, + NL80211_FREQUENCY_ATTR_RADAR, + NL80211_FREQUENCY_ATTR_MAX_TX_POWER, ++ NL80211_FREQUENCY_ATTR_DFS_STATE, ++ NL80211_FREQUENCY_ATTR_DFS_TIME, ++ NL80211_FREQUENCY_ATTR_NO_HT40_MINUS, ++ NL80211_FREQUENCY_ATTR_NO_HT40_PLUS, ++ NL80211_FREQUENCY_ATTR_NO_80MHZ, ++ NL80211_FREQUENCY_ATTR_NO_160MHZ, + + /* keep last */ + __NL80211_FREQUENCY_ATTR_AFTER_LAST, +@@ -2159,6 +2364,34 @@ enum nl80211_mntr_flags { + }; + + /** ++ * enum nl80211_mesh_power_mode - mesh power save modes ++ * ++ * @NL80211_MESH_POWER_UNKNOWN: The mesh power mode of the mesh STA is ++ * not known or has not been set yet. ++ * @NL80211_MESH_POWER_ACTIVE: Active mesh power mode. The mesh STA is ++ * in Awake state all the time. ++ * @NL80211_MESH_POWER_LIGHT_SLEEP: Light sleep mode. The mesh STA will ++ * alternate between Active and Doze states, but will wake up for ++ * neighbor's beacons. ++ * @NL80211_MESH_POWER_DEEP_SLEEP: Deep sleep mode. The mesh STA will ++ * alternate between Active and Doze states, but may not wake up ++ * for neighbor's beacons. ++ * ++ * @__NL80211_MESH_POWER_AFTER_LAST - internal use ++ * @NL80211_MESH_POWER_MAX - highest possible power save level ++ */ ++ ++enum nl80211_mesh_power_mode { ++ NL80211_MESH_POWER_UNKNOWN, ++ NL80211_MESH_POWER_ACTIVE, ++ NL80211_MESH_POWER_LIGHT_SLEEP, ++ NL80211_MESH_POWER_DEEP_SLEEP, ++ ++ __NL80211_MESH_POWER_AFTER_LAST, ++ NL80211_MESH_POWER_MAX = __NL80211_MESH_POWER_AFTER_LAST - 1 ++}; ++ ++/** + * enum nl80211_meshconf_params - mesh configuration parameters + * + * Mesh configuration parameters. These can be changed while the mesh is +@@ -2252,6 +2485,11 @@ enum nl80211_mntr_flags { + * (in TUs) during which a mesh STA can send only one Action frame + * containing a PREQ element for root path confirmation. + * ++ * @NL80211_MESHCONF_POWER_MODE: Default mesh power mode for new peer links. ++ * type &enum nl80211_mesh_power_mode (u32) ++ * ++ * @NL80211_MESHCONF_AWAKE_WINDOW: awake window duration (in TUs) ++ * + * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use + */ + enum nl80211_meshconf_params { +@@ -2281,6 +2519,8 @@ enum nl80211_meshconf_params { + NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, + NL80211_MESHCONF_HWMP_ROOT_INTERVAL, + NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL, ++ NL80211_MESHCONF_POWER_MODE, ++ NL80211_MESHCONF_AWAKE_WINDOW, + + /* keep last */ + __NL80211_MESHCONF_ATTR_AFTER_LAST, +@@ -2385,6 +2625,15 @@ enum nl80211_ac { + #define NL80211_TXQ_Q_BE NL80211_AC_BE + #define NL80211_TXQ_Q_BK NL80211_AC_BK + ++/** ++ * enum nl80211_channel_type - channel type ++ * @NL80211_CHAN_NO_HT: 20 MHz, non-HT channel ++ * @NL80211_CHAN_HT20: 20 MHz HT channel ++ * @NL80211_CHAN_HT40MINUS: HT40 channel, secondary channel ++ * below the control channel ++ * @NL80211_CHAN_HT40PLUS: HT40 channel, secondary channel ++ * above the control channel ++ */ + enum nl80211_channel_type { + NL80211_CHAN_NO_HT, + NL80211_CHAN_HT20, +@@ -2393,6 +2642,32 @@ enum nl80211_channel_type { + }; + + /** ++ * enum nl80211_chan_width - channel width definitions ++ * ++ * These values are used with the %NL80211_ATTR_CHANNEL_WIDTH ++ * attribute. ++ * ++ * @NL80211_CHAN_WIDTH_20_NOHT: 20 MHz, non-HT channel ++ * @NL80211_CHAN_WIDTH_20: 20 MHz HT channel ++ * @NL80211_CHAN_WIDTH_40: 40 MHz channel, the %NL80211_ATTR_CENTER_FREQ1 ++ * attribute must be provided as well ++ * @NL80211_CHAN_WIDTH_80: 80 MHz channel, the %NL80211_ATTR_CENTER_FREQ1 ++ * attribute must be provided as well ++ * @NL80211_CHAN_WIDTH_80P80: 80+80 MHz channel, the %NL80211_ATTR_CENTER_FREQ1 ++ * and %NL80211_ATTR_CENTER_FREQ2 attributes must be provided as well ++ * @NL80211_CHAN_WIDTH_160: 160 MHz channel, the %NL80211_ATTR_CENTER_FREQ1 ++ * attribute must be provided as well ++ */ ++enum nl80211_chan_width { ++ NL80211_CHAN_WIDTH_20_NOHT, ++ NL80211_CHAN_WIDTH_20, ++ NL80211_CHAN_WIDTH_40, ++ NL80211_CHAN_WIDTH_80, ++ NL80211_CHAN_WIDTH_80P80, ++ NL80211_CHAN_WIDTH_160, ++}; ++ ++/** + * enum nl80211_bss - netlink attributes for a BSS + * + * @__NL80211_BSS_INVALID: invalid +@@ -2460,6 +2735,7 @@ enum nl80211_bss_status { + * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only) + * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r) + * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP) ++ * @NL80211_AUTHTYPE_SAE: Simultaneous authentication of equals + * @__NL80211_AUTHTYPE_NUM: internal + * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm + * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by +@@ -2471,6 +2747,7 @@ enum nl80211_auth_type { + NL80211_AUTHTYPE_SHARED_KEY, + NL80211_AUTHTYPE_FT, + NL80211_AUTHTYPE_NETWORK_EAP, ++ NL80211_AUTHTYPE_SAE, + + /* keep last */ + __NL80211_AUTHTYPE_NUM, +@@ -2689,10 +2966,12 @@ enum nl80211_tx_power_setting { + * corresponds to the lowest-order bit in the second byte of the mask. + * For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where + * xx indicates "don't care") would be represented by a pattern of +- * twelve zero bytes, and a mask of "0xed,0x07". ++ * twelve zero bytes, and a mask of "0xed,0x01". + * Note that the pattern matching is done as though frames were not + * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked + * first (including SNAP header unpacking) and then matched. ++ * @NL80211_WOWLAN_PKTPAT_OFFSET: packet offset, pattern is matched after ++ * these fixed number of bytes of received packet + * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes + * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number + */ +@@ -2700,6 +2979,7 @@ enum nl80211_wowlan_packet_pattern_attr + __NL80211_WOWLAN_PKTPAT_INVALID, + NL80211_WOWLAN_PKTPAT_MASK, + NL80211_WOWLAN_PKTPAT_PATTERN, ++ NL80211_WOWLAN_PKTPAT_OFFSET, + + NUM_NL80211_WOWLAN_PKTPAT, + MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1, +@@ -2710,6 +2990,7 @@ enum nl80211_wowlan_packet_pattern_attr + * @max_patterns: maximum number of patterns supported + * @min_pattern_len: minimum length of each pattern + * @max_pattern_len: maximum length of each pattern ++ * @max_pkt_offset: maximum Rx packet offset + * + * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when + * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the +@@ -2719,6 +3000,7 @@ struct nl80211_wowlan_pattern_support { + __u32 max_patterns; + __u32 min_pattern_len; + __u32 max_pattern_len; ++ __u32 max_pkt_offset; + } __attribute__((packed)); + + /** +@@ -2734,12 +3016,17 @@ struct nl80211_wowlan_pattern_support { + * @NL80211_WOWLAN_TRIG_PKT_PATTERN: wake up on the specified packet patterns + * which are passed in an array of nested attributes, each nested attribute + * defining a with attributes from &struct nl80211_wowlan_trig_pkt_pattern. +- * Each pattern defines a wakeup packet. The matching is done on the MSDU, +- * i.e. as though the packet was an 802.3 packet, so the pattern matching +- * is done after the packet is converted to the MSDU. ++ * Each pattern defines a wakeup packet. Packet offset is associated with ++ * each pattern which is used while matching the pattern. The matching is ++ * done on the MSDU, i.e. as though the packet was an 802.3 packet, so the ++ * pattern matching is done after the packet is converted to the MSDU. + * + * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute + * carrying a &struct nl80211_wowlan_pattern_support. ++ * ++ * When reporting wakeup. it is a u32 attribute containing the 0-based ++ * index of the pattern that caused the wakeup, in the patterns passed ++ * to the kernel when configuring. + * @NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED: Not a real trigger, and cannot be + * used when setting, used only to indicate that GTK rekeying is supported + * by the device (flag) +@@ -2750,8 +3037,36 @@ struct nl80211_wowlan_pattern_support { + * @NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE: wake up on 4-way handshake (flag) + * @NL80211_WOWLAN_TRIG_RFKILL_RELEASE: wake up when rfkill is released + * (on devices that have rfkill in the device) (flag) ++ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211: For wakeup reporting only, contains ++ * the 802.11 packet that caused the wakeup, e.g. a deauth frame. The frame ++ * may be truncated, the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN ++ * attribute contains the original length. ++ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN: Original length of the 802.11 ++ * packet, may be bigger than the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211 ++ * attribute if the packet was truncated somewhere. ++ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023: For wakeup reporting only, contains the ++ * 802.11 packet that caused the wakeup, e.g. a magic packet. The frame may ++ * be truncated, the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN attribute ++ * contains the original length. ++ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN: Original length of the 802.3 ++ * packet, may be bigger than the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023 ++ * attribute if the packet was truncated somewhere. ++ * @NL80211_WOWLAN_TRIG_TCP_CONNECTION: TCP connection wake, see DOC section ++ * "TCP connection wakeup" for more details. This is a nested attribute ++ * containing the exact information for establishing and keeping alive ++ * the TCP connection. ++ * @NL80211_WOWLAN_TRIG_TCP_WAKEUP_MATCH: For wakeup reporting only, the ++ * wakeup packet was received on the TCP connection ++ * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST: For wakeup reporting only, the ++ * TCP connection was lost or failed to be established ++ * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS: For wakeup reporting only, ++ * the TCP connection ran out of tokens to use for data to send to the ++ * service + * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers + * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number ++ * ++ * These nested attributes are used to configure the wakeup triggers and ++ * to report the wakeup reason(s). + */ + enum nl80211_wowlan_triggers { + __NL80211_WOWLAN_TRIG_INVALID, +@@ -2764,6 +3079,14 @@ enum nl80211_wowlan_triggers { + NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST, + NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE, + NL80211_WOWLAN_TRIG_RFKILL_RELEASE, ++ NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211, ++ NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN, ++ NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023, ++ NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN, ++ NL80211_WOWLAN_TRIG_TCP_CONNECTION, ++ NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH, ++ NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST, ++ NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS, + + /* keep last */ + NUM_NL80211_WOWLAN_TRIG, +@@ -2771,6 +3094,116 @@ enum nl80211_wowlan_triggers { + }; + + /** ++ * DOC: TCP connection wakeup ++ * ++ * Some devices can establish a TCP connection in order to be woken up by a ++ * packet coming in from outside their network segment, or behind NAT. If ++ * configured, the device will establish a TCP connection to the given ++ * service, and periodically send data to that service. The first data ++ * packet is usually transmitted after SYN/ACK, also ACKing the SYN/ACK. ++ * The data packets can optionally include a (little endian) sequence ++ * number (in the TCP payload!) that is generated by the device, and, also ++ * optionally, a token from a list of tokens. This serves as a keep-alive ++ * with the service, and for NATed connections, etc. ++ * ++ * During this keep-alive period, the server doesn't send any data to the ++ * client. When receiving data, it is compared against the wakeup pattern ++ * (and mask) and if it matches, the host is woken up. Similarly, if the ++ * connection breaks or cannot be established to start with, the host is ++ * also woken up. ++ * ++ * Developer's note: ARP offload is required for this, otherwise TCP ++ * response packets might not go through correctly. ++ */ ++ ++/** ++ * struct nl80211_wowlan_tcp_data_seq - WoWLAN TCP data sequence ++ * @start: starting value ++ * @offset: offset of sequence number in packet ++ * @len: length of the sequence value to write, 1 through 4 ++ * ++ * Note: don't confuse with the TCP sequence number(s), this is for the ++ * keepalive packet payload. The actual value is written into the packet ++ * in little endian. ++ */ ++struct nl80211_wowlan_tcp_data_seq { ++ __u32 start, offset, len; ++}; ++ ++/** ++ * struct nl80211_wowlan_tcp_data_token - WoWLAN TCP data token config ++ * @offset: offset of token in packet ++ * @len: length of each token ++ * @token_stream: stream of data to be used for the tokens, the length must ++ * be a multiple of @len for this to make sense ++ */ ++struct nl80211_wowlan_tcp_data_token { ++ __u32 offset, len; ++ __u8 token_stream[]; ++}; ++ ++/** ++ * struct nl80211_wowlan_tcp_data_token_feature - data token features ++ * @min_len: minimum token length ++ * @max_len: maximum token length ++ * @bufsize: total available token buffer size (max size of @token_stream) ++ */ ++struct nl80211_wowlan_tcp_data_token_feature { ++ __u32 min_len, max_len, bufsize; ++}; ++ ++/** ++ * enum nl80211_wowlan_tcp_attrs - WoWLAN TCP connection parameters ++ * @__NL80211_WOWLAN_TCP_INVALID: invalid number for nested attributes ++ * @NL80211_WOWLAN_TCP_SRC_IPV4: source IPv4 address (in network byte order) ++ * @NL80211_WOWLAN_TCP_DST_IPV4: destination IPv4 address ++ * (in network byte order) ++ * @NL80211_WOWLAN_TCP_DST_MAC: destination MAC address, this is given because ++ * route lookup when configured might be invalid by the time we suspend, ++ * and doing a route lookup when suspending is no longer possible as it ++ * might require ARP querying. ++ * @NL80211_WOWLAN_TCP_SRC_PORT: source port (u16); optional, if not given a ++ * socket and port will be allocated ++ * @NL80211_WOWLAN_TCP_DST_PORT: destination port (u16) ++ * @NL80211_WOWLAN_TCP_DATA_PAYLOAD: data packet payload, at least one byte. ++ * For feature advertising, a u32 attribute holding the maximum length ++ * of the data payload. ++ * @NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ: data packet sequence configuration ++ * (if desired), a &struct nl80211_wowlan_tcp_data_seq. For feature ++ * advertising it is just a flag ++ * @NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN: data packet token configuration, ++ * see &struct nl80211_wowlan_tcp_data_token and for advertising see ++ * &struct nl80211_wowlan_tcp_data_token_feature. ++ * @NL80211_WOWLAN_TCP_DATA_INTERVAL: data interval in seconds, maximum ++ * interval in feature advertising (u32) ++ * @NL80211_WOWLAN_TCP_WAKE_PAYLOAD: wake packet payload, for advertising a ++ * u32 attribute holding the maximum length ++ * @NL80211_WOWLAN_TCP_WAKE_MASK: Wake packet payload mask, not used for ++ * feature advertising. The mask works like @NL80211_WOWLAN_PKTPAT_MASK ++ * but on the TCP payload only. ++ * @NUM_NL80211_WOWLAN_TCP: number of TCP attributes ++ * @MAX_NL80211_WOWLAN_TCP: highest attribute number ++ */ ++enum nl80211_wowlan_tcp_attrs { ++ __NL80211_WOWLAN_TCP_INVALID, ++ NL80211_WOWLAN_TCP_SRC_IPV4, ++ NL80211_WOWLAN_TCP_DST_IPV4, ++ NL80211_WOWLAN_TCP_DST_MAC, ++ NL80211_WOWLAN_TCP_SRC_PORT, ++ NL80211_WOWLAN_TCP_DST_PORT, ++ NL80211_WOWLAN_TCP_DATA_PAYLOAD, ++ NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ, ++ NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN, ++ NL80211_WOWLAN_TCP_DATA_INTERVAL, ++ NL80211_WOWLAN_TCP_WAKE_PAYLOAD, ++ NL80211_WOWLAN_TCP_WAKE_MASK, ++ ++ /* keep last */ ++ NUM_NL80211_WOWLAN_TCP, ++ MAX_NL80211_WOWLAN_TCP = NUM_NL80211_WOWLAN_TCP - 1 ++}; ++ ++/** + * enum nl80211_iface_limit_attrs - limit attributes + * @NL80211_IFACE_LIMIT_UNSPEC: (reserved) + * @NL80211_IFACE_LIMIT_MAX: maximum number of interfaces that +@@ -2806,6 +3239,8 @@ enum nl80211_iface_limit_attrs { + * the infrastructure network's beacon interval. + * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many + * different channels may be used within this group. ++ * @NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS: u32 attribute containing the bitmap ++ * of supported channel widths for radar detection. + * @NUM_NL80211_IFACE_COMB: number of attributes + * @MAX_NL80211_IFACE_COMB: highest attribute number + * +@@ -2838,6 +3273,7 @@ enum nl80211_if_combination_attrs { + NL80211_IFACE_COMB_MAXNUM, + NL80211_IFACE_COMB_STA_AP_BI_MATCH, + NL80211_IFACE_COMB_NUM_CHANNELS, ++ NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS, + + /* keep last */ + NUM_NL80211_IFACE_COMB, +@@ -2994,12 +3430,56 @@ enum nl80211_ap_sme_features { * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested * to work properly to suppport receiving regulatory hints from * cellular base stations. @@ -80,6 +816,33 @@ + * in the interface combinations, even when it's only used for scan + * and remain-on-channel. This could be due to, for example, the + * remain-on-channel implementation requiring a channel context. ++ * @NL80211_FEATURE_SAE: This driver supports simultaneous authentication of ++ * equals (SAE) with user space SME (NL80211_CMD_AUTHENTICATE) in station ++ * mode ++ * @NL80211_FEATURE_LOW_PRIORITY_SCAN: This driver supports low priority scan ++ * @NL80211_FEATURE_SCAN_FLUSH: Scan flush is supported ++ * @NL80211_FEATURE_AP_SCAN: Support scanning using an AP vif ++ * @NL80211_FEATURE_VIF_TXPOWER: The driver supports per-vif TX power setting ++ * @NL80211_FEATURE_NEED_OBSS_SCAN: The driver expects userspace to perform ++ * OBSS scans and generate 20/40 BSS coex reports. This flag is used only ++ * for drivers implementing the CONNECT API, for AUTH/ASSOC it is implied. ++ * @NL80211_FEATURE_P2P_GO_CTWIN: P2P GO implementation supports CT Window ++ * setting ++ * @NL80211_FEATURE_P2P_GO_OPPPS: P2P GO implementation supports opportunistic ++ * powersave ++ * @NL80211_FEATURE_FULL_AP_CLIENT_STATE: The driver supports full state ++ * transitions for AP clients. Without this flag (and if the driver ++ * doesn't have the AP SME in the device) the driver supports adding ++ * stations only when they're associated and adds them in associated ++ * state (to later be transitioned into authorized), with this flag ++ * they should be added before even sending the authentication reply ++ * and then transitioned into authenticated, associated and authorized ++ * states using station flags. ++ * Note that even for drivers that support this, the default is to add ++ * stations in authenticated/associated state, so to add unauthenticated ++ * stations the authenticated/associated bits have to be set in the mask. ++ * @NL80211_FEATURE_ADVERTISE_CHAN_LIMITS: cfg80211 advertises channel limits ++ * (HT40, VHT 80/160 MHz) if this flag is set */ enum nl80211_feature_flags { - NL80211_FEATURE_SK_TX_STATUS = 1 << 0, @@ -91,6 +854,112 @@ + NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2, + NL80211_FEATURE_CELL_BASE_REG_HINTS = 1 << 3, + NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL = 1 << 4, ++ NL80211_FEATURE_SAE = 1 << 5, ++ NL80211_FEATURE_LOW_PRIORITY_SCAN = 1 << 6, ++ NL80211_FEATURE_SCAN_FLUSH = 1 << 7, ++ NL80211_FEATURE_AP_SCAN = 1 << 8, ++ NL80211_FEATURE_VIF_TXPOWER = 1 << 9, ++ NL80211_FEATURE_NEED_OBSS_SCAN = 1 << 10, ++ NL80211_FEATURE_P2P_GO_CTWIN = 1 << 11, ++ NL80211_FEATURE_P2P_GO_OPPPS = 1 << 12, ++ /* bit 13 is reserved */ ++ NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14, ++ NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15, }; /** +@@ -3023,4 +3503,94 @@ enum nl80211_probe_resp_offload_support_ + NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U = 1<<3, + }; + ++/** ++ * enum nl80211_connect_failed_reason - connection request failed reasons ++ * @NL80211_CONN_FAIL_MAX_CLIENTS: Maximum number of clients that can be ++ * handled by the AP is reached. ++ * @NL80211_CONN_FAIL_BLOCKED_CLIENT: Connection request is rejected due to ACL. ++ */ ++enum nl80211_connect_failed_reason { ++ NL80211_CONN_FAIL_MAX_CLIENTS, ++ NL80211_CONN_FAIL_BLOCKED_CLIENT, ++}; ++ ++/** ++ * enum nl80211_scan_flags - scan request control flags ++ * ++ * Scan request control flags are used to control the handling ++ * of NL80211_CMD_TRIGGER_SCAN and NL80211_CMD_START_SCHED_SCAN ++ * requests. ++ * ++ * @NL80211_SCAN_FLAG_LOW_PRIORITY: scan request has low priority ++ * @NL80211_SCAN_FLAG_FLUSH: flush cache before scanning ++ * @NL80211_SCAN_FLAG_AP: force a scan even if the interface is configured ++ * as AP and the beaconing has already been configured. This attribute is ++ * dangerous because will destroy stations performance as a lot of frames ++ * will be lost while scanning off-channel, therefore it must be used only ++ * when really needed ++ */ ++enum nl80211_scan_flags { ++ NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0, ++ NL80211_SCAN_FLAG_FLUSH = 1<<1, ++ NL80211_SCAN_FLAG_AP = 1<<2, ++}; ++ ++/** ++ * enum nl80211_acl_policy - access control policy ++ * ++ * Access control policy is applied on a MAC list set by ++ * %NL80211_CMD_START_AP and %NL80211_CMD_SET_MAC_ACL, to ++ * be used with %NL80211_ATTR_ACL_POLICY. ++ * ++ * @NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED: Deny stations which are ++ * listed in ACL, i.e. allow all the stations which are not listed ++ * in ACL to authenticate. ++ * @NL80211_ACL_POLICY_DENY_UNLESS_LISTED: Allow the stations which are listed ++ * in ACL, i.e. deny all the stations which are not listed in ACL. ++ */ ++enum nl80211_acl_policy { ++ NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED, ++ NL80211_ACL_POLICY_DENY_UNLESS_LISTED, ++}; ++ ++/** ++ * enum nl80211_radar_event - type of radar event for DFS operation ++ * ++ * Type of event to be used with NL80211_ATTR_RADAR_EVENT to inform userspace ++ * about detected radars or success of the channel available check (CAC) ++ * ++ * @NL80211_RADAR_DETECTED: A radar pattern has been detected. The channel is ++ * now unusable. ++ * @NL80211_RADAR_CAC_FINISHED: Channel Availability Check has been finished, ++ * the channel is now available. ++ * @NL80211_RADAR_CAC_ABORTED: Channel Availability Check has been aborted, no ++ * change to the channel status. ++ * @NL80211_RADAR_NOP_FINISHED: The Non-Occupancy Period for this channel is ++ * over, channel becomes usable. ++ */ ++enum nl80211_radar_event { ++ NL80211_RADAR_DETECTED, ++ NL80211_RADAR_CAC_FINISHED, ++ NL80211_RADAR_CAC_ABORTED, ++ NL80211_RADAR_NOP_FINISHED, ++}; ++ ++/** ++ * enum nl80211_dfs_state - DFS states for channels ++ * ++ * Channel states used by the DFS code. ++ * ++ * @IEEE80211_DFS_USABLE: The channel can be used, but channel availability ++ * check (CAC) must be performed before using it for AP or IBSS. ++ * @IEEE80211_DFS_UNAVAILABLE: A radar has been detected on this channel, it ++ * is therefore marked as not available. ++ * @IEEE80211_DFS_AVAILABLE: The channel has been CAC checked and is available. ++ */ ++ ++enum nl80211_dfs_state { ++ NL80211_DFS_USABLE, ++ NL80211_DFS_UNAVAILABLE, ++ NL80211_DFS_AVAILABLE, ++}; ++ + #endif /* __LINUX_NL80211_H */ -- 2.30.2