| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | --- a/include/uapi/linux/nl80211.h |
| 2 | +++ b/include/uapi/linux/nl80211.h |
| 3 | @@ -655,6 +655,9 @@ |
| 4 | * When a security association was established on an 802.1X network using |
| 5 | * fast transition, this event should be followed by an |
| 6 | * %NL80211_CMD_PORT_AUTHORIZED event. |
| 7 | + * Following a %NL80211_CMD_ROAM event userspace can issue |
| 8 | + * %NL80211_CMD_GET_SCAN in order to obtain the scan information for the |
| 9 | + * new BSS the card/driver roamed to. |
| 10 | * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify |
| 11 | * userspace that a connection was dropped by the AP or due to other |
| 12 | * reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and |
| 13 | @@ -757,7 +760,8 @@ |
| 14 | * of any other interfaces, and other interfaces will again take |
| 15 | * precedence when they are used. |
| 16 | * |
| 17 | - * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface. |
| 18 | + * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface |
| 19 | + * (no longer supported). |
| 20 | * |
| 21 | * @NL80211_CMD_SET_MULTICAST_TO_UNICAST: Configure if this AP should perform |
| 22 | * multicast to unicast conversion. When enabled, all multicast packets |
| 23 | @@ -1177,6 +1181,10 @@ |
| 24 | * includes the contents of the frame. %NL80211_ATTR_ACK flag is included |
| 25 | * if the recipient acknowledged the frame. |
| 26 | * |
| 27 | + * @NL80211_CMD_SET_SAR_SPECS: SAR power limitation configuration is |
| 28 | + * passed using %NL80211_ATTR_SAR_SPEC. %NL80211_ATTR_WIPHY is used to |
| 29 | + * specify the wiphy index to be applied to. |
| 30 | + * |
| 31 | * @NL80211_CMD_MAX: highest used command number |
| 32 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 33 | */ |
| 34 | @@ -1407,6 +1415,8 @@ enum nl80211_commands { |
| 35 | |
| 36 | NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS, |
| 37 | |
| 38 | + NL80211_CMD_SET_SAR_SPECS, |
| 39 | + |
| 40 | /* add new commands above here */ |
| 41 | |
| 42 | /* used to define NL80211_CMD_MAX below */ |
| 43 | @@ -1750,8 +1760,9 @@ enum nl80211_commands { |
| 44 | * specify just a single bitrate, which is to be used for the beacon. |
| 45 | * The driver must also specify support for this with the extended |
| 46 | * features NL80211_EXT_FEATURE_BEACON_RATE_LEGACY, |
| 47 | - * NL80211_EXT_FEATURE_BEACON_RATE_HT and |
| 48 | - * NL80211_EXT_FEATURE_BEACON_RATE_VHT. |
| 49 | + * NL80211_EXT_FEATURE_BEACON_RATE_HT, |
| 50 | + * NL80211_EXT_FEATURE_BEACON_RATE_VHT and |
| 51 | + * NL80211_EXT_FEATURE_BEACON_RATE_HE. |
| 52 | * |
| 53 | * @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain |
| 54 | * at least one byte, currently used with @NL80211_CMD_REGISTER_FRAME. |
| 55 | @@ -1955,8 +1966,15 @@ enum nl80211_commands { |
| 56 | * @NL80211_ATTR_PROBE_RESP: Probe Response template data. Contains the entire |
| 57 | * probe-response frame. The DA field in the 802.11 header is zero-ed out, |
| 58 | * to be filled by the FW. |
| 59 | - * @NL80211_ATTR_DISABLE_HT: Force HT capable interfaces to disable |
| 60 | - * this feature. Currently, only supported in mac80211 drivers. |
| 61 | + * @NL80211_ATTR_DISABLE_HT: Force HT capable interfaces to disable |
| 62 | + * this feature during association. This is a flag attribute. |
| 63 | + * Currently only supported in mac80211 drivers. |
| 64 | + * @NL80211_ATTR_DISABLE_VHT: Force VHT capable interfaces to disable |
| 65 | + * this feature during association. This is a flag attribute. |
| 66 | + * Currently only supported in mac80211 drivers. |
| 67 | + * @NL80211_ATTR_DISABLE_HE: Force HE capable interfaces to disable |
| 68 | + * this feature during association. This is a flag attribute. |
| 69 | + * Currently only supported in mac80211 drivers. |
| 70 | * @NL80211_ATTR_HT_CAPABILITY_MASK: Specify which bits of the |
| 71 | * ATTR_HT_CAPABILITY to which attention should be paid. |
| 72 | * Currently, only mac80211 NICs support this feature. |
| 73 | @@ -2077,7 +2095,8 @@ enum nl80211_commands { |
| 74 | * until the channel switch event. |
| 75 | * @NL80211_ATTR_CH_SWITCH_BLOCK_TX: flag attribute specifying that transmission |
| 76 | * must be blocked on the current channel (before the channel switch |
| 77 | - * operation). |
| 78 | + * operation). Also included in the channel switch started event if quiet |
| 79 | + * was requested by the AP. |
| 80 | * @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information |
| 81 | * for the time while performing a channel switch. |
| 82 | * @NL80211_ATTR_CNTDWN_OFFS_BEACON: An array of offsets (u16) to the channel |
| 83 | @@ -2527,6 +2546,20 @@ enum nl80211_commands { |
| 84 | * override mask. Used with NL80211_ATTR_S1G_CAPABILITY in |
| 85 | * NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT. |
| 86 | * |
| 87 | + * @NL80211_ATTR_SAE_PWE: Indicates the mechanism(s) allowed for SAE PWE |
| 88 | + * derivation in WPA3-Personal networks which are using SAE authentication. |
| 89 | + * This is a u8 attribute that encapsulates one of the values from |
| 90 | + * &enum nl80211_sae_pwe_mechanism. |
| 91 | + * |
| 92 | + * @NL80211_ATTR_SAR_SPEC: SAR power limitation specification when |
| 93 | + * used with %NL80211_CMD_SET_SAR_SPECS. The message contains fields |
| 94 | + * of %nl80211_sar_attrs which specifies the sar type and related |
| 95 | + * sar specs. Sar specs contains array of %nl80211_sar_specs_attrs. |
| 96 | + * |
| 97 | + * @NL80211_ATTR_RECONNECT_REQUESTED: flag attribute, used with deauth and |
| 98 | + * disassoc events to indicate that an immediate reconnect to the AP |
| 99 | + * is desired. |
| 100 | + * |
| 101 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 102 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 103 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 104 | @@ -3016,6 +3049,14 @@ enum nl80211_attrs { |
| 105 | NL80211_ATTR_S1G_CAPABILITY, |
| 106 | NL80211_ATTR_S1G_CAPABILITY_MASK, |
| 107 | |
| 108 | + NL80211_ATTR_SAE_PWE, |
| 109 | + |
| 110 | + NL80211_ATTR_RECONNECT_REQUESTED, |
| 111 | + |
| 112 | + NL80211_ATTR_SAR_SPEC, |
| 113 | + |
| 114 | + NL80211_ATTR_DISABLE_HE, |
| 115 | + |
| 116 | /* add attributes here, update the policy in nl80211.c */ |
| 117 | |
| 118 | __NL80211_ATTR_AFTER_LAST, |
| 119 | @@ -5896,6 +5937,19 @@ enum nl80211_feature_flags { |
| 120 | * @NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP: Driver/device supports |
| 121 | * unsolicited broadcast probe response transmission |
| 122 | * |
| 123 | + * @NL80211_EXT_FEATURE_BEACON_RATE_HE: Driver supports beacon rate |
| 124 | + * configuration (AP/mesh) with HE rates. |
| 125 | + * |
| 126 | + * @NL80211_EXT_FEATURE_SECURE_LTF: Device supports secure LTF measurement |
| 127 | + * exchange protocol. |
| 128 | + * |
| 129 | + * @NL80211_EXT_FEATURE_SECURE_RTT: Device supports secure RTT measurement |
| 130 | + * exchange protocol. |
| 131 | + * |
| 132 | + * @NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE: Device supports management |
| 133 | + * frame protection for all management frames exchanged during the |
| 134 | + * negotiation and range measurement procedure. |
| 135 | + * |
| 136 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
| 137 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
| 138 | */ |
| 139 | @@ -5956,6 +6010,10 @@ enum nl80211_ext_feature_index { |
| 140 | NL80211_EXT_FEATURE_SAE_OFFLOAD_AP, |
| 141 | NL80211_EXT_FEATURE_FILS_DISCOVERY, |
| 142 | NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP, |
| 143 | + NL80211_EXT_FEATURE_BEACON_RATE_HE, |
| 144 | + NL80211_EXT_FEATURE_SECURE_LTF, |
| 145 | + NL80211_EXT_FEATURE_SECURE_RTT, |
| 146 | + NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE, |
| 147 | |
| 148 | /* add new features before the definition below */ |
| 149 | NUM_NL80211_EXT_FEATURES, |
| 150 | @@ -6253,11 +6311,13 @@ struct nl80211_vendor_cmd_info { |
| 151 | * @NL80211_TDLS_PEER_HT: TDLS peer is HT capable. |
| 152 | * @NL80211_TDLS_PEER_VHT: TDLS peer is VHT capable. |
| 153 | * @NL80211_TDLS_PEER_WMM: TDLS peer is WMM capable. |
| 154 | + * @NL80211_TDLS_PEER_HE: TDLS peer is HE capable. |
| 155 | */ |
| 156 | enum nl80211_tdls_peer_capability { |
| 157 | NL80211_TDLS_PEER_HT = 1<<0, |
| 158 | NL80211_TDLS_PEER_VHT = 1<<1, |
| 159 | NL80211_TDLS_PEER_WMM = 1<<2, |
| 160 | + NL80211_TDLS_PEER_HE = 1<<3, |
| 161 | }; |
| 162 | |
| 163 | /** |
| 164 | @@ -6849,6 +6909,9 @@ enum nl80211_peer_measurement_ftm_capa { |
| 165 | * if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor |
| 166 | * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based |
| 167 | * ranging will be used. |
| 168 | + * @NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK: negotiate for LMR feedback. Only |
| 169 | + * valid if either %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED or |
| 170 | + * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set. |
| 171 | * |
| 172 | * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal |
| 173 | * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number |
| 174 | @@ -6867,6 +6930,7 @@ enum nl80211_peer_measurement_ftm_req { |
| 175 | NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC, |
| 176 | NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED, |
| 177 | NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED, |
| 178 | + NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK, |
| 179 | |
| 180 | /* keep last */ |
| 181 | NUM_NL80211_PMSR_FTM_REQ_ATTR, |
| 182 | @@ -7124,4 +7188,115 @@ enum nl80211_unsol_bcast_probe_resp_attr |
| 183 | NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX = |
| 184 | __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST - 1 |
| 185 | }; |
| 186 | + |
| 187 | +/** |
| 188 | + * enum nl80211_sae_pwe_mechanism - The mechanism(s) allowed for SAE PWE |
| 189 | + * derivation. Applicable only when WPA3-Personal SAE authentication is |
| 190 | + * used. |
| 191 | + * |
| 192 | + * @NL80211_SAE_PWE_UNSPECIFIED: not specified, used internally to indicate that |
| 193 | + * attribute is not present from userspace. |
| 194 | + * @NL80211_SAE_PWE_HUNT_AND_PECK: hunting-and-pecking loop only |
| 195 | + * @NL80211_SAE_PWE_HASH_TO_ELEMENT: hash-to-element only |
| 196 | + * @NL80211_SAE_PWE_BOTH: both hunting-and-pecking loop and hash-to-element |
| 197 | + * can be used. |
| 198 | + */ |
| 199 | +enum nl80211_sae_pwe_mechanism { |
| 200 | + NL80211_SAE_PWE_UNSPECIFIED, |
| 201 | + NL80211_SAE_PWE_HUNT_AND_PECK, |
| 202 | + NL80211_SAE_PWE_HASH_TO_ELEMENT, |
| 203 | + NL80211_SAE_PWE_BOTH, |
| 204 | +}; |
| 205 | + |
| 206 | +/** |
| 207 | + * enum nl80211_sar_type - type of SAR specs |
| 208 | + * |
| 209 | + * @NL80211_SAR_TYPE_POWER: power limitation specified in 0.25dBm unit |
| 210 | + * |
| 211 | + */ |
| 212 | +enum nl80211_sar_type { |
| 213 | + NL80211_SAR_TYPE_POWER, |
| 214 | + |
| 215 | + /* add new type here */ |
| 216 | + |
| 217 | + /* Keep last */ |
| 218 | + NUM_NL80211_SAR_TYPE, |
| 219 | +}; |
| 220 | + |
| 221 | +/** |
| 222 | + * enum nl80211_sar_attrs - Attributes for SAR spec |
| 223 | + * |
| 224 | + * @NL80211_SAR_ATTR_TYPE: the SAR type as defined in &enum nl80211_sar_type. |
| 225 | + * |
| 226 | + * @NL80211_SAR_ATTR_SPECS: Nested array of SAR power |
| 227 | + * limit specifications. Each specification contains a set |
| 228 | + * of %nl80211_sar_specs_attrs. |
| 229 | + * |
| 230 | + * For SET operation, it contains array of %NL80211_SAR_ATTR_SPECS_POWER |
| 231 | + * and %NL80211_SAR_ATTR_SPECS_RANGE_INDEX. |
| 232 | + * |
| 233 | + * For sar_capa dump, it contains array of |
| 234 | + * %NL80211_SAR_ATTR_SPECS_START_FREQ |
| 235 | + * and %NL80211_SAR_ATTR_SPECS_END_FREQ. |
| 236 | + * |
| 237 | + * @__NL80211_SAR_ATTR_LAST: Internal |
| 238 | + * @NL80211_SAR_ATTR_MAX: highest sar attribute |
| 239 | + * |
| 240 | + * These attributes are used with %NL80211_CMD_SET_SAR_SPEC |
| 241 | + */ |
| 242 | +enum nl80211_sar_attrs { |
| 243 | + __NL80211_SAR_ATTR_INVALID, |
| 244 | + |
| 245 | + NL80211_SAR_ATTR_TYPE, |
| 246 | + NL80211_SAR_ATTR_SPECS, |
| 247 | + |
| 248 | + __NL80211_SAR_ATTR_LAST, |
| 249 | + NL80211_SAR_ATTR_MAX = __NL80211_SAR_ATTR_LAST - 1, |
| 250 | +}; |
| 251 | + |
| 252 | +/** |
| 253 | + * enum nl80211_sar_specs_attrs - Attributes for SAR power limit specs |
| 254 | + * |
| 255 | + * @NL80211_SAR_ATTR_SPECS_POWER: Required (s32)value to specify the actual |
| 256 | + * power limit value in units of 0.25 dBm if type is |
| 257 | + * NL80211_SAR_TYPE_POWER. (i.e., a value of 44 represents 11 dBm). |
| 258 | + * 0 means userspace doesn't have SAR limitation on this associated range. |
| 259 | + * |
| 260 | + * @NL80211_SAR_ATTR_SPECS_RANGE_INDEX: Required (u32) value to specify the |
| 261 | + * index of exported freq range table and the associated power limitation |
| 262 | + * is applied to this range. |
| 263 | + * |
| 264 | + * Userspace isn't required to set all the ranges advertised by WLAN driver, |
| 265 | + * and userspace can skip some certain ranges. These skipped ranges don't |
| 266 | + * have SAR limitations, and they are same as setting the |
| 267 | + * %NL80211_SAR_ATTR_SPECS_POWER to any unreasonable high value because any |
| 268 | + * value higher than regulatory allowed value just means SAR power |
| 269 | + * limitation is removed, but it's required to set at least one range. |
| 270 | + * It's not allowed to set duplicated range in one SET operation. |
| 271 | + * |
| 272 | + * Every SET operation overwrites previous SET operation. |
| 273 | + * |
| 274 | + * @NL80211_SAR_ATTR_SPECS_START_FREQ: Required (u32) value to specify the start |
| 275 | + * frequency of this range edge when registering SAR capability to wiphy. |
| 276 | + * It's not a channel center frequency. The unit is kHz. |
| 277 | + * |
| 278 | + * @NL80211_SAR_ATTR_SPECS_END_FREQ: Required (u32) value to specify the end |
| 279 | + * frequency of this range edge when registering SAR capability to wiphy. |
| 280 | + * It's not a channel center frequency. The unit is kHz. |
| 281 | + * |
| 282 | + * @__NL80211_SAR_ATTR_SPECS_LAST: Internal |
| 283 | + * @NL80211_SAR_ATTR_SPECS_MAX: highest sar specs attribute |
| 284 | + */ |
| 285 | +enum nl80211_sar_specs_attrs { |
| 286 | + __NL80211_SAR_ATTR_SPECS_INVALID, |
| 287 | + |
| 288 | + NL80211_SAR_ATTR_SPECS_POWER, |
| 289 | + NL80211_SAR_ATTR_SPECS_RANGE_INDEX, |
| 290 | + NL80211_SAR_ATTR_SPECS_START_FREQ, |
| 291 | + NL80211_SAR_ATTR_SPECS_END_FREQ, |
| 292 | + |
| 293 | + __NL80211_SAR_ATTR_SPECS_LAST, |
| 294 | + NL80211_SAR_ATTR_SPECS_MAX = __NL80211_SAR_ATTR_SPECS_LAST - 1, |
| 295 | +}; |
| 296 | + |
| 297 | #endif /* __LINUX_NL80211_H */ |