From b843bace92c93d20a24f8b6fed437b35852f4108 Mon Sep 17 00:00:00 2001 From: Sriram R Date: Wed, 8 Nov 2023 09:33:24 +0530 Subject: [PATCH] hostapd: sync nl80211 sync nl80211 based on latest header in kernel Signed-off-by: Sriram R --- src/drivers/nl80211_copy.h | 287 ++++++++++++++++++++++++++++--------- 1 file changed, 216 insertions(+), 71 deletions(-) --- a/src/drivers/nl80211_copy.h +++ b/src/drivers/nl80211_copy.h @@ -1311,15 +1311,20 @@ * The number of peers that HW timestamping can be enabled for concurrently * is indicated by %NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS. * + * @NL80211_CMD_LINKS_REMOVED: Notify userspace about the removal of STA MLD + * setup links due to AP MLD removing the corresponding affiliated APs with + * Multi-Link reconfiguration. %NL80211_ATTR_MLO_LINKS is used to provide + * information about the removed STA MLD setup links. + * * @NL80211_CMD_UPDATE_HE_MUEDCA_PARAMS: Updated MU-EDCA parameters from driver. - * This event is used to update MU-EDCA parameters in Beacon frame, which - * were indicated by driver and now need to be reflected in - * Beacon frame. + * This event is used to update dynamic MU-EDCA parameters in Beacon frame, + * coming from driver and now need to be reflected in Beacon frame. * * @NL80211_CMD_AWGN_DETECT: Once AWGN interference is detected on the operating * channel, userspace is notified with the interference bitmap using * %NL80211_ATTR_AWGN_INTERFERENCE_BITMAP - * + * @NL80211_ATTR_AWGN_INTERFERENCE_BITMAP: u32 attribute specifying the + * interference bitmap of operating bandwidth for %NL80211_CMD_AWGN_DETECT * @NL80211_CMD_MAX: highest used command number * @__NL80211_CMD_AFTER_LAST: internal use */ @@ -1574,10 +1579,13 @@ enum nl80211_commands { NL80211_CMD_SET_HW_TIMESTAMP, + NL80211_CMD_LINKS_REMOVED, + NL80211_CMD_UPDATE_HE_MUEDCA_PARAMS, NL80211_CMD_AWGN_DETECT, + NL80211_CMD_STOP_BGRADAR_DETECT, /* add new commands above here */ /* used to define NL80211_CMD_MAX below */ @@ -2597,6 +2605,11 @@ enum nl80211_commands { * association request when used with NL80211_CMD_NEW_STATION). Can be set * only if %NL80211_STA_FLAG_WME is set. * + * @NL80211_ATTR_AP_PS: enable/disable AP power save. + * This attribute type is u8 and valid range is 0 to 1. + * 0 for disable AP power save mode. + * 1 for enable AP power save mode. + * * @NL80211_ATTR_FTM_RESPONDER: nested attribute which user-space can include * in %NL80211_CMD_START_AP or %NL80211_CMD_SET_BEACON for fine timing * measurement (FTM) responder functionality and containing parameters as @@ -2798,12 +2811,6 @@ enum nl80211_commands { * the incoming frame RX timestamp. * @NL80211_ATTR_TD_BITMAP: Transition Disable bitmap, for subsequent * (re)associations. - * @NL80211_ATTR_HE_MUEDCA_PARAMS: MU-EDCA AC parameters for the - * NL80211_CMD_UPDATE_HE_MUEDCA_PARAMS command. - * - * @NL80211_ATTR_BEACON_TX_MODE: used to configure the beacon tx mode as - * staggered mode or burst mode in %NL80211_CMD_START_AP from - * user-space. * *src/drivers/nl80211_copy.h @NL80211_ATTR_PUNCT_BITMAP: (u32) Preamble puncturing bitmap, lowest * bit corresponds to the lowest 20 MHz channel. Each bit set to 1 @@ -2830,11 +2837,44 @@ enum nl80211_commands { * * @NL80211_ATTR_AWGN_INTERFERENCE_BITMAP: u32 attribute specifying the * interference bitmap of operating bandwidth for %NL80211_CMD_AWGN_DETECT + * @NL80211_ATTR_MLO_LINK_DISABLED: Flag attribute indicating that the link is + * disabled. * - * @NL80211_ATTR_AP_PS: enable/disable AP power save. - * This attribute type is u8 and valid range is 0 to 1. - * 0 for disable AP power save mode. - * 1 for enable AP power save mode. + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce + * transmit power to stay within regulatory limits. u32, dBi. + * + * @NL80211_ATTR_HE_MUEDCA_PARAMS: MU-EDCA AC parameters for the + * %NL80211_CMD_UPDATE_HE_MUEDCA_PARAMS command. + * @NL80211_ATTR_BEACON_TX_MODE: used to configure the beacon tx mode as + * staggered mode = 1 or burst mode = 2 in %NL80211_CMD_START_AP or + * %NL80211_CMD_JOIN_MESH from user-space. + * + * @NL80211_ATTR_RU_PUNCT_SUPP_BW: (u8) Minimum bandwidth for which + * the driver supports preamble puncturing, value should be of type + * &enum nl80211_ru_punct_supp_bw + * + * @NL80211_ATTR_RU_PUNCT_SUPP_HE: flag attribute, used to indicate that RU + * puncturing bitmap validation should include OFDMA bitmaps. + * + * @NL80211_ATTR_RU_PUNCT_BITMAP: (u16) RU puncturing bitmap where the lowest + * bit corresponds to the lowest 20 MHz channel. Each bit set to 1 + * indicates that the sub-channel is punctured, set 0 indicates that the + * channel is active. + * + * @NL80211_ATTR_MULTI_HW_MACS: nested attribute to send the hardware mac + * specific channel capabilities to user space. Drivers registering + * multiple physical hardware under a wiphy can use this attribute, + * see &enum nl80211_multi_hw_mac_attrs. + * + * @NL80211_ATTR_RADAR_BITMAP: (u16) RADAR bitmap where the lowest bit + * corresponds to the lowest 20MHZ channel. Each bit set to 1 + * indicates that radar is detected in that sub-channel. + * + * @NL80211_ATTR_ADD_MULTI_CHAN: Add channel to the radio, this is used + * for monitor interface (u32). + * + * @NL80211_ATTR_DEL_MULTI_CHAN: Delete channel from the radio, this is used + * for monitor interface (u32). * @NL80211_ATTR_RADAR_BITMAP: (u16) RADAR bitmap where the lowest bit * corresponds to the lowest 20MHZ channel. Each bit set to 1 * indicates that radar is detected in that sub-channel. @@ -3377,12 +3417,16 @@ enum nl80211_attrs { NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS, NL80211_ATTR_HW_TIMESTAMP_ENABLED, - NL80211_ATTR_HE_MUEDCA_PARAMS, + NL80211_ATTR_EMA_RNR_ELEMS, - NL80211_ATTR_BEACON_TX_MODE, + NL80211_ATTR_MLO_LINK_DISABLED, NL80211_ATTR_WIPHY_ANTENNA_GAIN, + NL80211_ATTR_HE_MUEDCA_PARAMS, + + NL80211_ATTR_BEACON_TX_MODE, + NL80211_ATTR_STA_MGMT_RTS_CTS_CONFIG, NL80211_ATTR_AWGN_INTERFERENCE_BITMAP, @@ -3461,8 +3505,9 @@ enum nl80211_attrs { * present in %NL80211_CMD_GET_WIPHY response. */ #define NL80211_MAX_NR_AKM_SUITES 2 -#define NL80211_EHT_MIN_CAPABILITY_LEN 13 +#define NL80211_EHT_MIN_CAPABILITY_LEN 12 #define NL80211_EHT_MAX_CAPABILITY_LEN 51 +#define NL80211_EHT240_MAX_CAPABILITY_LEN 10 #define NL80211_MIN_REMAIN_ON_CHANNEL_TIME 10 @@ -3514,6 +3559,9 @@ enum nl80211_iftype { NL80211_IFTYPE_P2P_DEVICE, NL80211_IFTYPE_OCB, NL80211_IFTYPE_NAN, +#ifdef CPTCFG_MAC80211_BONDED_SUPPORT + NL80211_IFTYPE_DUMMY, +#endif /* keep last */ NUM_NL80211_IFTYPES, @@ -3644,6 +3692,18 @@ enum nl80211_eht_gi { }; /** + * enum nl80211_eht_ltf - EHT long training field + * @NL80211_RATE_INFO_EHT_1xLTF: 3.2 usec + * @NL80211_RATE_INFO_EHT_2xLTF: 6.4 usec + * @NL80211_RATE_INFO_EHT_4xLTF: 12.8 usec + */ +enum nl80211_eht_ltf { + NL80211_RATE_INFO_EHT_1XLTF, + NL80211_RATE_INFO_EHT_2XLTF, + NL80211_RATE_INFO_EHT_4XLTF, +}; + +/** * enum nl80211_eht_ru_alloc - EHT RU allocation values * @NL80211_RATE_INFO_EHT_RU_ALLOC_26: 26-tone RU allocation * @NL80211_RATE_INFO_EHT_RU_ALLOC_52: 52-tone RU allocation @@ -3727,6 +3787,13 @@ enum nl80211_eht_ru_alloc { * (u8, see &enum nl80211_eht_gi) * @NL80211_RATE_INFO_EHT_RU_ALLOC: EHT RU allocation, if not present then * non-OFDMA was used (u8, see &enum nl80211_eht_ru_alloc) + * @NL80211_RATE_INFO_S1G_MCS: S1G MCS index (u8, 0-10) + * @NL80211_RATE_INFO_S1G_NSS: S1G NSS value (u8, 1-4) + * @NL80211_RATE_INFO_1_MHZ_WIDTH: 1 MHz S1G rate + * @NL80211_RATE_INFO_2_MHZ_WIDTH: 2 MHz S1G rate + * @NL80211_RATE_INFO_4_MHZ_WIDTH: 4 MHz S1G rate + * @NL80211_RATE_INFO_8_MHZ_WIDTH: 8 MHz S1G rate + * @NL80211_RATE_INFO_16_MHZ_WIDTH: 16 MHz S1G rate * @__NL80211_RATE_INFO_AFTER_LAST: internal use */ enum nl80211_rate_info { @@ -3753,6 +3820,13 @@ enum nl80211_rate_info { NL80211_RATE_INFO_EHT_NSS, NL80211_RATE_INFO_EHT_GI, NL80211_RATE_INFO_EHT_RU_ALLOC, + NL80211_RATE_INFO_S1G_MCS, + NL80211_RATE_INFO_S1G_NSS, + NL80211_RATE_INFO_1_MHZ_WIDTH, + NL80211_RATE_INFO_2_MHZ_WIDTH, + NL80211_RATE_INFO_4_MHZ_WIDTH, + NL80211_RATE_INFO_8_MHZ_WIDTH, + NL80211_RATE_INFO_16_MHZ_WIDTH, /* keep last */ __NL80211_RATE_INFO_AFTER_LAST, @@ -4157,6 +4231,10 @@ enum nl80211_band_attr { #define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA +#define NL80211_NUM_POWER_MODES_PER_IFTYPE 3 +#define GET_POWER_MODE_FOR_NON_AP_STA(pwr_mode_usr, pwr_mode_bcn) \ + (NL80211_NUM_POWER_MODES_PER_IFTYPE * (1 + pwr_mode_usr) + pwr_mode_bcn) + enum nl80211_regulatory_power_modes { NL80211_REG_AP_LPI, NL80211_REG_AP_SP, @@ -4263,6 +4341,8 @@ enum nl80211_wmm_rule { * as the primary or any of the secondary channels isn't possible * @NL80211_FREQUENCY_ATTR_NO_EHT: EHT operation is not allowed on this channel * in current regulatory domain. + * @NL80211_FREQUENCY_ATTR_PSD: power spectral density (in dBm) + * is allowed on this channel in current regulatory domain. * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number * currently defined * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use @@ -4403,7 +4483,7 @@ enum nl80211_reg_type { * @NL80211_ATTR_DFS_CAC_TIME: DFS CAC time in milliseconds. * If not present or 0 default CAC time will be used. * @NL80211_ATTR_POWER_RULE_PSD: power spectral density (in dBm). - * This could be negative. + * This could be negative. * @NL80211_ATTR_REG_POWER_MODE: the regulatory power mode for 6G rules * @NL80211_REG_RULE_ATTR_MAX: highest regulatory rule attribute number * currently defined @@ -4508,6 +4588,8 @@ enum nl80211_sched_scan_match_attr { * @NL80211_RRF_NO_160MHZ: 160MHz operation not allowed * @NL80211_RRF_NO_HE: HE operation not allowed * @NL80211_RRF_NO_320MHZ: 320MHz operation not allowed + * @NL80211_RRF_NO_EHT: EHT operation not allowed + * @NL80211_RRF_PSD: channels has power spectral density value */ enum nl80211_reg_rule_flags { NL80211_RRF_NO_OFDM = 1<<0, @@ -4527,6 +4609,8 @@ enum nl80211_reg_rule_flags { NL80211_RRF_NO_160MHZ = 1<<16, NL80211_RRF_NO_HE = 1<<17, NL80211_RRF_NO_320MHZ = 1<<18, + NL80211_RRF_NO_EHT = 1<<19, + NL80211_RRF_PSD = 1<<20, }; #define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR @@ -4695,6 +4779,11 @@ enum nl80211_mesh_power_mode { NL80211_MESH_POWER_MAX = __NL80211_MESH_POWER_AFTER_LAST - 1 }; +enum nl80211_mgmt_rts_cts_conf { + NL80211_MGMT_RTS_CTS_ENABLE, + NL80211_MGMT_RTS_CTS_DISABLE, +}; + /** * enum nl80211_meshconf_params - mesh configuration parameters * @@ -5309,9 +5398,11 @@ enum nl80211_key_attributes { * see &struct nl80211_txrate_he * @NL80211_TXRATE_HE_GI: configure HE GI, 0.8us, 1.6us and 3.2us. * @NL80211_TXRATE_HE_LTF: configure HE LTF, 1XLTF, 2XLTF and 4XLTF. + * @NL80211_TXRATE_HE_UL: HE MCS rates of connected HE STA for uplink traffic. * @NL80211_TXRATE_EHT: EHT rates allowed for TX rate selection, - * see &struct nl80211_txrate_eht - * + * see &struct nl80211_txrate_eht + * @NL80211_TXRATE_EHT_GI: configure EHT GI, 0.8us, 1.6us and 3.2us. + * @NL80211_TXRATE_EHT_LTF: configure EHT LTF, 1XLTF, 2XLTF and 4XLTF. * @__NL80211_TXRATE_AFTER_LAST: internal * @NL80211_TXRATE_MAX: highest TX rate attribute */ @@ -5324,7 +5415,10 @@ enum nl80211_tx_rate_attributes { NL80211_TXRATE_HE, NL80211_TXRATE_HE_GI, NL80211_TXRATE_HE_LTF, + NL80211_TXRATE_HE_UL, NL80211_TXRATE_EHT, + NL80211_TXRATE_EHT_GI, + NL80211_TXRATE_EHT_LTF, /* keep last */ __NL80211_TXRATE_AFTER_LAST, @@ -5343,6 +5437,7 @@ struct nl80211_txrate_vht { }; #define NL80211_HE_NSS_MAX 8 +#define NL80211_EHT_NSS_MAX 16 /** * struct nl80211_txrate_he - HE MCS/NSS txrate bitmap * @mcs: MCS bitmap table for each NSS (array index 0 for 1 stream, etc.) @@ -5397,6 +5492,11 @@ enum nl80211_ps_state { NL80211_PS_ENABLED, }; +enum nl80211_mpath_change_notify { + NL80211_MPATH_METRIC_CHANGE, + NL80211_MPATH_BROKEN_NOTIFY, +}; + /** * enum nl80211_attr_cqm - connection quality monitor attributes * @__NL80211_ATTR_CQM_INVALID: invalid @@ -5441,6 +5541,7 @@ enum nl80211_attr_cqm { NL80211_ATTR_CQM_TXE_INTVL, NL80211_ATTR_CQM_BEACON_LOSS_EVENT, NL80211_ATTR_CQM_RSSI_LEVEL, + NL80211_ATTR_CQM_MPATH_CHANGE_EVENT, /* keep last */ __NL80211_ATTR_CQM_AFTER_LAST, @@ -5554,6 +5655,8 @@ enum nl80211_tid_config_attr { NL80211_TID_CONFIG_ATTR_AMSDU_CTRL, NL80211_TID_CONFIG_ATTR_TX_RATE_TYPE, NL80211_TID_CONFIG_ATTR_TX_RATE, + NL80211_TID_CONFIG_ATTR_AMPDU_COUNT, + NL80211_TID_CONFIG_ATTR_AMSDU_COUNT, /* keep last */ __NL80211_TID_CONFIG_ATTR_AFTER_LAST, @@ -5938,6 +6041,10 @@ enum nl80211_iface_limit_attrs { * @NL80211_IFACE_COMB_BI_MIN_GCD: u32 attribute specifying the minimum GCD of * different beacon intervals supported by all the interface combinations * in this group (if not present, all beacon intervals be identical). + * @NL80211_IFACE_COMB_PER_HW_COMB: nested attribute specifying the interface + * combination for each underlying hardware when multiple hardware are + * registered under a single wiphy, + * see &enum nl80211_if_combination_per_hw_comb_attrs. * @NUM_NL80211_IFACE_COMB: number of attributes * @MAX_NL80211_IFACE_COMB: highest attribute number * @@ -5954,7 +6061,18 @@ enum nl80211_iface_limit_attrs { * numbers = [ #{STA} <= 1, #{P2P-client,P2P-GO} <= 3 ], max = 4 * => allows a STA plus three P2P interfaces * - * The list of these four possibilities could completely be contained + * When describing per-hw combinations, the first possibility can + * further include the finer capabilities like below + * hw_chan_idx = 0, numbers = [ #{STA} <= 1, #{AP} <= 1 ], + * channels = 1, max = 2 + * => allows a STA plus an AP interface on the underlying hw mac + * advertised at index 0 in wiphy @hw_chans array. + * hw_chan_idx = 1, numbers = [ #{STA} <= 1, #{AP} <= 2 ], + * channels = 1, max = 3 + * => allows a STA plus two AP interfaces on the underlying hw mac + * advertised at index 1 in wiphy @hw_chans array. + * + * The list of these five possibilities could completely be contained * within the %NL80211_ATTR_INTERFACE_COMBINATIONS attribute to indicate * that any of these groups must match. * @@ -5980,7 +6098,6 @@ enum nl80211_if_combination_attrs { MAX_NL80211_IFACE_COMB = NUM_NL80211_IFACE_COMB - 1 }; - /** * enum nl80211_if_combination_per_hw_comb_attrs - per-hw iface combination * attributes with multi-hw radios @@ -6575,12 +6692,12 @@ enum nl80211_ext_feature_index { NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD, NL80211_EXT_FEATURE_WIDE_BAND_SCAN, NL80211_EXT_FEATURE_RADAR_BACKGROUND, - NL80211_EXT_FEATURE_STA_MGMT_RTS_CTS, - NL80211_EXT_FEATURE_BEACON_RATE_EHT, NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE, NL80211_EXT_FEATURE_PUNCT, NL80211_EXT_FEATURE_SECURE_NAN, NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA, + NL80211_EXT_FEATURE_STA_MGMT_RTS_CTS, + NL80211_EXT_FEATURE_BEACON_RATE_EHT, /* add new features before the definition below */ NUM_NL80211_EXT_FEATURES, @@ -6705,6 +6822,8 @@ enum nl80211_timeout_reason { * these channels would passively be scanned. Also note that when the flag * is set, in addition to the colocated APs, PSC channels would also be * scanned if the user space has asked for it. + * @NL80211_SCAN_FLAG_WIDE_BAND_SCAN: This flag intends the driver to perform + * wide band scan only if the driver supports it. */ enum nl80211_scan_flags { NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0, @@ -6722,6 +6841,7 @@ enum nl80211_scan_flags { NL80211_SCAN_FLAG_MIN_PREQ_CONTENT = 1<<12, NL80211_SCAN_FLAG_FREQ_KHZ = 1<<13, NL80211_SCAN_FLAG_COLOCATED_6GHZ = 1<<14, + NL80211_SCAN_FLAG_WIDE_BAND_SCAN = 1<<15, }; /** @@ -7920,6 +8040,11 @@ enum nl80211_sar_specs_attrs { * Setting this flag is permitted only if the driver advertises EMA support * by setting wiphy->ema_max_profile_periodicity to non-zero. * + * @NL80211_MBSSID_CONFIG_ATTR_TX_LINK_ID: Mandatory parameter for a non-transmitted profile + * which provides the interface index (u32) of the transmitted profile which + * is an MLD. The link id must be valid in the wdev of given Transmitting interface + * index. + * * @__NL80211_MBSSID_CONFIG_ATTR_LAST: Internal * @NL80211_MBSSID_CONFIG_ATTR_MAX: highest attribute */ @@ -7991,8 +8116,8 @@ enum nl80211_multi_hw_mac_attrs { /* keep last */ __NL80211_MULTI_HW_MAC_ATTR_LAST, NL80211_MULTI_HW_MAC_ATTR_MAX = __NL80211_MULTI_HW_MAC_ATTR_LAST - 1 - }; - +}; + /** * nl80211_multi_hw_mac_chan_list_attrs - channel attributes for multi-hw *