1 /* 2 * 3 *Copyright (c) 2024 Nordic Semiconductor ASA 4 * 5 *SPDX-License-Identifier: BSD-3-Clause 6 */ 7 8 /** 9 * @file 10 * @addtogroup nrf_wifi_fw_if Wi-Fi driver and firmware interface 11 * @{ 12 * @brief Control interface between host and RPU 13 */ 14 15 #ifndef __HOST_RPU_UMAC_IF_H 16 #define __HOST_RPU_UMAC_IF_H 17 18 #include "host_rpu_data_if.h" 19 #include "host_rpu_sys_if.h" 20 21 #include "common/pack_def.h" 22 23 #define MAX_NRF_WIFI_UMAC_CMD_SIZE 400 24 25 #define IEEE80211_STYPE_DISASSOC 0x00A0 26 #define IEEE80211_STYPE_DEAUTH 0x00C0 27 28 /** 29 * @brief The host can send the following commands to the RPU. 30 * 31 */ 32 enum nrf_wifi_umac_commands { 33 /** Trigger a new scan nrf_wifi_umac_cmd_scan */ 34 NRF_WIFI_UMAC_CMD_TRIGGER_SCAN, 35 /** Request for scan results nrf_wifi_umac_cmd_get_scan_results */ 36 NRF_WIFI_UMAC_CMD_GET_SCAN_RESULTS, 37 /** Send authentication request to AP nrf_wifi_umac_cmd_auth */ 38 NRF_WIFI_UMAC_CMD_AUTHENTICATE, 39 /** Send associate request to AP nrf_wifi_umac_cmd_assoc */ 40 NRF_WIFI_UMAC_CMD_ASSOCIATE, 41 /** Send deauthentication request to AP nrf_wifi_umac_cmd_disconn */ 42 NRF_WIFI_UMAC_CMD_DEAUTHENTICATE, 43 /** Set wiphy parameters nrf_wifi_umac_cmd_set_wiphy */ 44 NRF_WIFI_UMAC_CMD_SET_WIPHY, 45 /** Add new key nrf_wifi_umac_cmd_key */ 46 NRF_WIFI_UMAC_CMD_NEW_KEY, 47 /** Delete key nrf_wifi_umac_cmd_key */ 48 NRF_WIFI_UMAC_CMD_DEL_KEY, 49 /** Set default key to use nrf_wifi_umac_cmd_set_key */ 50 NRF_WIFI_UMAC_CMD_SET_KEY, 51 /** Unused */ 52 NRF_WIFI_UMAC_CMD_GET_KEY, 53 /** Unused */ 54 NRF_WIFI_UMAC_CMD_NEW_BEACON, 55 /** Change the beacon on an AP interface nrf_wifi_umac_cmd_set_beacon */ 56 NRF_WIFI_UMAC_CMD_SET_BEACON, 57 /** Set the BSS nrf_wifi_umac_cmd_set_bss */ 58 NRF_WIFI_UMAC_CMD_SET_BSS, 59 /** Start soft AP operation on an AP interface nrf_wifi_umac_cmd_start_ap */ 60 NRF_WIFI_UMAC_CMD_START_AP, 61 /** Stop soft AP operation nrf_wifi_umac_cmd_stop_ap */ 62 NRF_WIFI_UMAC_CMD_STOP_AP, 63 /** Create new interface nrf_wifi_umac_cmd_add_vif */ 64 NRF_WIFI_UMAC_CMD_NEW_INTERFACE, 65 /** Change interface configuration nrf_wifi_umac_cmd_chg_vif_attr*/ 66 NRF_WIFI_UMAC_CMD_SET_INTERFACE, 67 /** Delete interface nrf_wifi_umac_cmd_del_vif */ 68 NRF_WIFI_UMAC_CMD_DEL_INTERFACE, 69 /** Change interface flags nrf_wifi_umac_cmd_chg_vif_state */ 70 NRF_WIFI_UMAC_CMD_SET_IFFLAGS, 71 /** Add a new station nrf_wifi_umac_cmd_add_sta */ 72 NRF_WIFI_UMAC_CMD_NEW_STATION, 73 /** Delete station nrf_wifi_umac_cmd_del_sta */ 74 NRF_WIFI_UMAC_CMD_DEL_STATION, 75 /** Change station info nrf_wifi_umac_cmd_chg_sta */ 76 NRF_WIFI_UMAC_CMD_SET_STATION, 77 /** Get station info nrf_wifi_umac_cmd_get_sta */ 78 NRF_WIFI_UMAC_CMD_GET_STATION, 79 /** Start the P2P device nrf_wifi_cmd_start_p2p */ 80 NRF_WIFI_UMAC_CMD_START_P2P_DEVICE, 81 /** Stop the P2P device nrf_wifi_umac_cmd_stop_p2p_dev */ 82 NRF_WIFI_UMAC_CMD_STOP_P2P_DEVICE, 83 /** Remain awake on the specified channel nrf_wifi_umac_cmd_remain_on_channel */ 84 NRF_WIFI_UMAC_CMD_REMAIN_ON_CHANNEL, 85 /** Cancel a pending ROC duration nrf_wifi_umac_cmd_cancel_remain_on_channel */ 86 NRF_WIFI_UMAC_CMD_CANCEL_REMAIN_ON_CHANNEL, 87 /** Unused */ 88 NRF_WIFI_UMAC_CMD_SET_CHANNEL, 89 /** Unused */ 90 NRF_WIFI_UMAC_CMD_RADAR_DETECT, 91 /** Whitelist filter based on frame types nrf_wifi_umac_cmd_mgmt_frame_reg */ 92 NRF_WIFI_UMAC_CMD_REGISTER_FRAME, 93 /** Send a management frame nrf_wifi_umac_cmd_mgmt_tx */ 94 NRF_WIFI_UMAC_CMD_FRAME, 95 /** Unused */ 96 NRF_WIFI_UMAC_CMD_JOIN_IBSS, 97 /** Unused */ 98 NRF_WIFI_UMAC_CMD_WIN_STA_CONNECT, 99 /** Power save Enable/Disable nrf_wifi_umac_cmd_set_power_save */ 100 NRF_WIFI_UMAC_CMD_SET_POWER_SAVE, 101 /** Unused */ 102 NRF_WIFI_UMAC_CMD_SET_WOWLAN, 103 /** Unused */ 104 NRF_WIFI_UMAC_CMD_SUSPEND, 105 /** Unused */ 106 NRF_WIFI_UMAC_CMD_RESUME, 107 /** QOS map nrf_wifi_umac_cmd_set_qos_map */ 108 NRF_WIFI_UMAC_CMD_SET_QOS_MAP, 109 /** Get Channel info nrf_wifi_umac_cmd_get_channel */ 110 NRF_WIFI_UMAC_CMD_GET_CHANNEL, 111 /** Get Tx power level nrf_wifi_umac_cmd_get_tx_power */ 112 NRF_WIFI_UMAC_CMD_GET_TX_POWER, 113 /** Get interface nrf_wifi_cmd_get_interface */ 114 NRF_WIFI_UMAC_CMD_GET_INTERFACE, 115 /** Get Wiphy info nrf_wifi_cmd_get_wiphy */ 116 NRF_WIFI_UMAC_CMD_GET_WIPHY, 117 /** Get hardware address nrf_wifi_cmd_get_ifhwaddr */ 118 NRF_WIFI_UMAC_CMD_GET_IFHWADDR, 119 /** Set hardware address nrf_wifi_cmd_set_ifhwaddr */ 120 NRF_WIFI_UMAC_CMD_SET_IFHWADDR, 121 /** Get regulatory domain nrf_wifi_umac_cmd_get_reg */ 122 NRF_WIFI_UMAC_CMD_GET_REG, 123 /** Unused */ 124 NRF_WIFI_UMAC_CMD_SET_REG, 125 /** Set regulatory domain nrf_wifi_cmd_req_set_reg */ 126 NRF_WIFI_UMAC_CMD_REQ_SET_REG, 127 /** Config UAPSD nrf_wifi_umac_cmd_config_uapsd */ 128 NRF_WIFI_UMAC_CMD_CONFIG_UAPSD, 129 /** Config TWT nrf_wifi_umac_cmd_config_twt */ 130 NRF_WIFI_UMAC_CMD_CONFIG_TWT, 131 /** Teardown TWT nrf_wifi_umac_cmd_teardown_twt */ 132 NRF_WIFI_UMAC_CMD_TEARDOWN_TWT, 133 /** Abort scan nrf_wifi_umac_cmd_abort_scan */ 134 NRF_WIFI_UMAC_CMD_ABORT_SCAN, 135 /** Multicast filter nrf_wifi_umac_cmd_mcast_filter */ 136 NRF_WIFI_UMAC_CMD_MCAST_FILTER, 137 /** Change macaddress nrf_wifi_umac_cmd_change_macaddr */ 138 NRF_WIFI_UMAC_CMD_CHANGE_MACADDR, 139 /** Set powersave timeout nrf_wifi_umac_cmd_set_power_save_timeout */ 140 NRF_WIFI_UMAC_CMD_SET_POWER_SAVE_TIMEOUT, 141 /** Get connection information nrf_wifi_umac_cmd_conn_info */ 142 NRF_WIFI_UMAC_CMD_GET_CONNECTION_INFO, 143 /** Get power save information nrf_wifi_umac_cmd_get_power_save_info */ 144 NRF_WIFI_UMAC_CMD_GET_POWER_SAVE_INFO, 145 /** Set listen interval nrf_wifi_umac_cmd_set_listen_interval */ 146 NRF_WIFI_UMAC_CMD_SET_LISTEN_INTERVAL, 147 /** Configure extended power save nrf_wifi_umac_cmd_config_extended_ps */ 148 NRF_WIFI_UMAC_CMD_CONFIG_EXTENDED_PS, 149 /** Configure quiet period nrf_wifi_umac_cmd_config_quiet_period */ 150 NRF_WIFI_UMAC_CMD_CONFIG_QUIET_PERIOD, 151 /** Command to specify power save exit strategy */ 152 NRF_WIFI_UMAC_CMD_PS_EXIT_STRATEGY, 153 }; 154 155 /** 156 * @brief The host can receive the following events from the RPU. 157 * 158 */ 159 160 enum nrf_wifi_umac_events { 161 NRF_WIFI_UMAC_EVENT_UNSPECIFIED = 256, 162 /** Indicate scan started nrf_wifi_umac_event_trigger_scan */ 163 NRF_WIFI_UMAC_EVENT_TRIGGER_SCAN_START, 164 /** Unused */ 165 NRF_WIFI_UMAC_EVENT_SCAN_ABORTED, 166 /** Indicate scan done nrf_wifi_umac_event_scan_done */ 167 NRF_WIFI_UMAC_EVENT_SCAN_DONE, 168 /** Scan result event nrf_wifi_umac_event_new_scan_results */ 169 NRF_WIFI_UMAC_EVENT_SCAN_RESULT, 170 /** Authentication status nrf_wifi_umac_event_mlme */ 171 NRF_WIFI_UMAC_EVENT_AUTHENTICATE, 172 /** Association status nrf_wifi_umac_event_mlme*/ 173 NRF_WIFI_UMAC_EVENT_ASSOCIATE, 174 /** Unused */ 175 NRF_WIFI_UMAC_EVENT_CONNECT, 176 /** Station deauth event nrf_wifi_umac_event_mlme */ 177 NRF_WIFI_UMAC_EVENT_DEAUTHENTICATE, 178 /** Station disassoc event nrf_wifi_umac_event_mlme */ 179 NRF_WIFI_UMAC_EVENT_DISASSOCIATE, 180 /** Station added indication nrf_wifi_umac_event_new_station */ 181 NRF_WIFI_UMAC_EVENT_NEW_STATION, 182 /** Station added indication nrf_wifi_umac_event_new_station */ 183 NRF_WIFI_UMAC_EVENT_DEL_STATION, 184 /** Station info indication nrf_wifi_umac_event_new_station */ 185 NRF_WIFI_UMAC_EVENT_GET_STATION, 186 /** remain on channel event nrf_wifi_event_remain_on_channel */ 187 NRF_WIFI_UMAC_EVENT_REMAIN_ON_CHANNEL, 188 /** Unused */ 189 NRF_WIFI_UMAC_EVENT_CANCEL_REMAIN_ON_CHANNEL, 190 /** Unused */ 191 NRF_WIFI_UMAC_EVENT_DISCONNECT, 192 /** RX management frame nrf_wifi_umac_event_mlme */ 193 NRF_WIFI_UMAC_EVENT_FRAME, 194 /** Cookie mapping for NRF_WIFI_UMAC_CMD_FRAME nrf_wifi_umac_event_cookie_rsp */ 195 NRF_WIFI_UMAC_EVENT_COOKIE_RESP, 196 /** TX management frame transmitted nrf_wifi_umac_event_mlme */ 197 NRF_WIFI_UMAC_EVENT_FRAME_TX_STATUS, 198 /** nrf_wifi_umac_event_vif_state */ 199 NRF_WIFI_UMAC_EVENT_IFFLAGS_STATUS, 200 /** Send Tx power nrf_wifi_umac_event_get_tx_power */ 201 NRF_WIFI_UMAC_EVENT_GET_TX_POWER, 202 /** Send Channel info nrf_wifi_umac_event_get_channel */ 203 NRF_WIFI_UMAC_EVENT_GET_CHANNEL, 204 /** nrf_wifi_umac_event_set_interface */ 205 NRF_WIFI_UMAC_EVENT_SET_INTERFACE, 206 /** nrf_wifi_umac_event_mlme */ 207 NRF_WIFI_UMAC_EVENT_UNPROT_DEAUTHENTICATE, 208 /** nrf_wifi_umac_event_mlme */ 209 NRF_WIFI_UMAC_EVENT_UNPROT_DISASSOCIATE, 210 /** nrf_wifi_interface_info */ 211 NRF_WIFI_UMAC_EVENT_NEW_INTERFACE, 212 /** nrf_wifi_event_get_wiphy */ 213 NRF_WIFI_UMAC_EVENT_NEW_WIPHY, 214 /** Unused */ 215 NRF_WIFI_UMAC_EVENT_GET_IFHWADDR, 216 /** Get regulatory nrf_wifi_reg */ 217 NRF_WIFI_UMAC_EVENT_GET_REG, 218 /** Unused */ 219 NRF_WIFI_UMAC_EVENT_SET_REG, 220 /** Unused */ 221 NRF_WIFI_UMAC_EVENT_REQ_SET_REG, 222 /** Unused */ 223 NRF_WIFI_UMAC_EVENT_GET_KEY, 224 /** Unused */ 225 NRF_WIFI_UMAC_EVENT_BEACON_HINT, 226 /** Unused */ 227 NRF_WIFI_UMAC_EVENT_REG_CHANGE, 228 /** Unused */ 229 NRF_WIFI_UMAC_EVENT_WIPHY_REG_CHANGE, 230 /** Display scan result nrf_wifi_umac_event_new_scan_display_results */ 231 NRF_WIFI_UMAC_EVENT_SCAN_DISPLAY_RESULT, 232 /** nrf_wifi_umac_event_cmd_status */ 233 NRF_WIFI_UMAC_EVENT_CMD_STATUS, 234 /** nrf_wifi_umac_event_new_scan_results */ 235 NRF_WIFI_UMAC_EVENT_BSS_INFO, 236 /** Send TWT response information nrf_wifi_umac_cmd_config_twt */ 237 NRF_WIFI_UMAC_EVENT_CONFIG_TWT, 238 /** Send TWT teardown information nrf_wifi_umac_cmd_teardown_twt */ 239 NRF_WIFI_UMAC_EVENT_TEARDOWN_TWT, 240 /** Send block or unblock state nrf_wifi_umac_event_twt_sleep */ 241 NRF_WIFI_UMAC_EVENT_TWT_SLEEP, 242 /** Unused */ 243 NRF_WIFI_UMAC_EVENT_COALESCING, 244 /** Unused */ 245 NRF_WIFI_UMAC_EVENT_MCAST_FILTER, 246 /** send connection information nrf_wifi_umac_event_conn_info. */ 247 NRF_WIFI_UMAC_EVENT_GET_CONNECTION_INFO, 248 /** nrf_wifi_umac_event_power_save_info */ 249 NRF_WIFI_UMAC_EVENT_GET_POWER_SAVE_INFO 250 }; 251 252 /** 253 * @brief Represents the values that can be used to specify the frequency band. 254 * 255 */ 256 257 enum nrf_wifi_band { 258 /** 2.4 GHz ISM band */ 259 NRF_WIFI_BAND_2GHZ, 260 /** Around 5 GHz band (4.9 - 5.7 GHz) */ 261 NRF_WIFI_BAND_5GHZ, 262 /** Unused */ 263 NRF_WIFI_BAND_60GHZ, 264 /** Invalid */ 265 NRF_WIFI_BAND_INVALID 266 }; 267 268 /** 269 * @brief Enable or Disable Management Frame Protection. 270 * 271 */ 272 enum nrf_wifi_mfp { 273 /** Management frame protection not used */ 274 NRF_WIFI_MFP_NO, 275 /** Management frame protection required */ 276 NRF_WIFI_MFP_REQUIRED, 277 }; 278 279 /** 280 * @brief Enumerates the various categories of security keys. 281 * 282 */ 283 enum nrf_wifi_key_type { 284 /** Group (broadcast/multicast) key */ 285 NRF_WIFI_KEYTYPE_GROUP, 286 /** Pairwise (unicast/individual) key */ 287 NRF_WIFI_KEYTYPE_PAIRWISE, 288 /** Peer key (DLS) */ 289 NRF_WIFI_KEYTYPE_PEERKEY, 290 /** Number of defined key types */ 291 NUM_NRF_WIFI_KEYTYPES 292 }; 293 294 /** 295 * @brief Enumerates the various types of authentication mechanisms. 296 * 297 */ 298 enum nrf_wifi_auth_type { 299 /** Open System authentication */ 300 NRF_WIFI_AUTHTYPE_OPEN_SYSTEM, 301 /** Shared Key authentication (WEP only) */ 302 NRF_WIFI_AUTHTYPE_SHARED_KEY, 303 /** Fast BSS Transition (IEEE 802.11r) */ 304 NRF_WIFI_AUTHTYPE_FT, 305 /** Network EAP (some Cisco APs and mainly LEAP) */ 306 NRF_WIFI_AUTHTYPE_NETWORK_EAP, 307 /** Simultaneous authentication of equals */ 308 NRF_WIFI_AUTHTYPE_SAE, 309 /** Internal */ 310 __NRF_WIFI_AUTHTYPE_NUM, 311 /** Maximum valid auth algorithm */ 312 NRF_WIFI_AUTHTYPE_MAX = __NRF_WIFI_AUTHTYPE_NUM, 313 /** Determine automatically (if necessary by trying multiple times) */ 314 NRF_WIFI_AUTHTYPE_AUTOMATIC 315 }; 316 317 /** 318 * @brief Represents the interface's status concerning this BSS (Basic Service Set). 319 * 320 */ 321 enum nrf_wifi_bss_status { 322 /** 323 * Authenticated with this BSS 324 * Note that this is no longer used since cfg80211 no longer 325 * keeps track of whether or not authentication was done with 326 * a given BSS. 327 */ 328 NRF_WIFI_BSS_STATUS_AUTHENTICATED, 329 /** Associated with this BSS */ 330 NRF_WIFI_BSS_STATUS_ASSOCIATED, 331 /** Joined to this IBSS */ 332 NRF_WIFI_BSS_STATUS_IBSS_JOINED, 333 }; 334 335 /** 336 * @brief Enumerates the various categories of channels. 337 * 338 */ 339 enum nrf_wifi_channel_type { 340 /** 20 MHz, non-HT channel */ 341 NRF_WIFI_CHAN_NO_HT, 342 /** 20 MHz HT channel */ 343 NRF_WIFI_CHAN_HT20, 344 /** HT40 channel, secondary channel below the control channel */ 345 NRF_WIFI_CHAN_HT40MINUS, 346 /** HT40 channel, secondary channel above the control channel */ 347 NRF_WIFI_CHAN_HT40PLUS 348 }; 349 350 /** 351 * @brief Enumerates the various channel widths available. 352 * 353 */ 354 enum nrf_wifi_chan_width { 355 /** 20 MHz, non-HT channel */ 356 NRF_WIFI_CHAN_WIDTH_20_NOHT, 357 /** 20 MHz HT channel */ 358 NRF_WIFI_CHAN_WIDTH_20, 359 /** 40 MHz channel, the NRF_WIFI_ATTR_CENTER_FREQ1 must be provided as well */ 360 NRF_WIFI_CHAN_WIDTH_40, 361 /** 80 MHz channel, the NRF_WIFI_ATTR_CENTER_FREQ1 must be provided as well */ 362 NRF_WIFI_CHAN_WIDTH_80, 363 /** 80+80 MHz channel, the NRF_WIFI_ATTR_CENTER_FREQ1 and 364 * NRF_WIFI_ATTR_CENTER_FREQ2 must be provided as well 365 */ 366 NRF_WIFI_CHAN_WIDTH_80P80, 367 /** 160 MHz channel, the NRF_WIFI_ATTR_CENTER_FREQ1 must be provided as well */ 368 NRF_WIFI_CHAN_WIDTH_160, 369 /** 5 MHz OFDM channel */ 370 NRF_WIFI_CHAN_WIDTH_5, 371 /** 10 MHz OFDM channel */ 372 NRF_WIFI_CHAN_WIDTH_10, 373 }; 374 375 /** 376 * @brief Interface types based on functionality. 377 * 378 */ 379 enum nrf_wifi_iftype { 380 /** Unspecified type, driver decides */ 381 NRF_WIFI_IFTYPE_UNSPECIFIED, 382 /** Not Supported */ 383 NRF_WIFI_IFTYPE_ADHOC, 384 /** Managed BSS member */ 385 NRF_WIFI_IFTYPE_STATION, 386 /** Access point */ 387 NRF_WIFI_IFTYPE_AP, 388 /** Not Supported */ 389 NRF_WIFI_IFTYPE_AP_VLAN, 390 /** Not Supported */ 391 NRF_WIFI_IFTYPE_WDS, 392 /** Not Supported */ 393 NRF_WIFI_IFTYPE_MONITOR, 394 /** Not Supported */ 395 NRF_WIFI_IFTYPE_MESH_POINT, 396 /** P2P client */ 397 NRF_WIFI_IFTYPE_P2P_CLIENT, 398 /** P2P group owner */ 399 NRF_WIFI_IFTYPE_P2P_GO, 400 /** P2P device use the NRF_WIFI_UMAC_CMD_START_P2P_DEVICE & 401 * NRF_WIFI_UMAC_CMD_STOP_P2P_DEVICE commands to create and destroy one 402 */ 403 NRF_WIFI_IFTYPE_P2P_DEVICE, 404 /** Not Supported */ 405 NRF_WIFI_IFTYPE_OCB, 406 /** Tx Packet injector mode. */ 407 NRF_WIFI_TX_INJECTOR, 408 /** Station + Tx Packet injector mode. */ 409 NRF_WIFI_STA_TX_INJECTOR, 410 /** Monitor + Tx Packet injector mode. */ 411 NRF_WIFI_MONITOR_TX_INJECTOR, 412 /** Station + Promiscuous mode. */ 413 NRF_WIFI_STA_PROMISC, 414 /** Station + Promiscuous mode + TX Packet injector. */ 415 NRF_WIFI_STA_PROMISC_TX_INJECTOR, 416 /** Highest interface type number currently defined */ 417 NUM_NRF_WIFI_IFTYPES, 418 /** Number of defined interface types */ 419 NRF_WIFI_IFTYPE_MAX = NUM_NRF_WIFI_IFTYPES - 1 420 }; 421 422 /** 423 * @brief Powersave state. 424 * 425 */ 426 enum nrf_wifi_ps_state { 427 /** powersave is disabled */ 428 NRF_WIFI_PS_DISABLED, 429 /** powersave is enabled */ 430 NRF_WIFI_PS_ENABLED, 431 }; 432 433 /** 434 * @brief WLAN security types. 435 * 436 */ 437 enum nrf_wifi_security_type { 438 /** OPEN */ 439 NRF_WIFI_OPEN, 440 /** WEP */ 441 NRF_WIFI_WEP, 442 /** WPA */ 443 NRF_WIFI_WPA, 444 /** WPA2 */ 445 NRF_WIFI_WPA2, 446 /** WAPI */ 447 NRF_WIFI_WAPI, 448 /** Enterprise mode */ 449 NRF_WIFI_EAP, 450 /** FT 8021X */ 451 NRF_WIFI_FT_EAP, 452 /** Enterprise tls SHA256 */ 453 NRF_WIFI_EAP_TLS_SHA256, 454 /** WPA2 SHA256 */ 455 NRF_WIFI_WPA2_256, 456 /** WPA3 */ 457 NRF_WIFI_WPA3, 458 /** 8021X SUITE-B SHA256 */ 459 NRF_WIFI_EAP_SUITEB_SHA256, 460 /** 8021X SUITE-B SHA384 */ 461 NRF_WIFI_EAP_SUITEB_SHA384, 462 /** FT 8021X SHA384 */ 463 NRF_WIFI_FT_EAP_SHA384, 464 /** FT PSK SHA384 */ 465 NRF_WIFI_FT_PSK_SHA384, 466 /** PSK SHA384 */ 467 NRF_WIFI_PSK_SHA384, 468 }; 469 470 /** 471 * @brief Denotes the originator of a regulatory domain request. 472 * 473 */ 474 enum nrf_wifi_reg_initiator { 475 /** Core queried CRDA for a dynamic world regulatory domain */ 476 NRF_WIFI_REGDOM_SET_BY_CORE, 477 /** User asked the wireless core to set the regulatory domain */ 478 NRF_WIFI_REGDOM_SET_BY_USER, 479 /** 480 * A wireless drivers has hinted to the wireless core it thinks 481 * its knows the regulatory domain we should be in 482 */ 483 NRF_WIFI_REGDOM_SET_BY_DRIVER, 484 /** 485 * the wireless core has received an 486 * 802.11 country information element with regulatory information it 487 * thinks we should consider. cfg80211 only processes the country 488 * code from the IE, and relies on the regulatory domain information 489 * structure passed by userspace (CRDA) from our wireless-regdb 490 * If a channel is enabled but the country code indicates it should 491 * be disabled we disable the channel and re-enable it upon disassociation 492 */ 493 NRF_WIFI_REGDOM_SET_BY_COUNTRY_IE, 494 }; 495 496 /** 497 * @brief Specifies the type of regulatory domain. 498 * 499 */ 500 enum nrf_wifi_reg_type { 501 /** 502 * the regulatory domain set is one that pertains 503 * to a specific country. When this is set you can count on the 504 * ISO / IEC 3166 alpha2 country code being valid. 505 * 506 */ 507 NRF_WIFI_REGDOM_TYPE_COUNTRY, 508 /** the regulatory set domain is the world regulatory domain */ 509 NRF_WIFI_REGDOM_TYPE_WORLD, 510 /** 511 * the regulatory domain set is a custom 512 * driver specific world regulatory domain. These do not apply system-wide 513 * and are only applicable to the individual devices which have requested 514 * them to be applied. 515 */ 516 NRF_WIFI_REGDOM_TYPE_CUSTOM_WORLD, 517 /** 518 * the regulatory domain set is the product 519 * of an intersection between two regulatory domains -- the previously 520 * set regulatory domain on the system and the last accepted regulatory 521 * domain request to be processed. 522 */ 523 NRF_WIFI_REGDOM_TYPE_INTERSECTION, 524 }; 525 526 #define NRF_WIFI_MAX_SSID_LEN 32 527 528 /** 529 * @brief This structure provides details about the SSID. 530 * 531 */ 532 533 struct nrf_wifi_ssid { 534 /** length of SSID */ 535 unsigned char nrf_wifi_ssid_len; 536 /** SSID string */ 537 unsigned char nrf_wifi_ssid[NRF_WIFI_MAX_SSID_LEN]; 538 } __NRF_WIFI_PKD; 539 540 #define NRF_WIFI_MAX_IE_LEN 400 541 542 /** 543 * @brief This structure contains data related to the Information Elements (IEs). 544 * 545 */ 546 547 struct nrf_wifi_ie { 548 /** length of IE */ 549 unsigned short ie_len; 550 /** Information element data */ 551 signed char ie[NRF_WIFI_MAX_IE_LEN]; 552 } __NRF_WIFI_PKD; 553 554 #define NRF_WIFI_MAX_SEQ_LENGTH 256 555 556 /** 557 * @brief Transmit key sequence number. 558 * 559 */ 560 561 struct nrf_wifi_seq { 562 /** Length of the seq parameter */ 563 signed int nrf_wifi_seq_len; 564 /** Key sequence number data */ 565 unsigned char nrf_wifi_seq[NRF_WIFI_MAX_SEQ_LENGTH]; 566 } __NRF_WIFI_PKD; 567 568 #define NRF_WIFI_MAX_KEY_LENGTH 256 569 570 /** 571 * @brief This structure holds information related to a security key. 572 * 573 */ 574 575 struct nrf_wifi_key { 576 /** Length of the key data */ 577 unsigned int nrf_wifi_key_len; 578 /** Key data */ 579 unsigned char nrf_wifi_key[NRF_WIFI_MAX_KEY_LENGTH]; 580 } __NRF_WIFI_PKD; 581 582 #define NRF_WIFI_MAX_SAE_DATA_LENGTH 256 583 584 /** 585 * @brief This structure represents SAE elements in Authentication frame. 586 * 587 */ 588 589 struct nrf_wifi_sae { 590 /** Length of SAE element data */ 591 signed int sae_data_len; 592 /** SAE element data */ 593 unsigned char sae_data[NRF_WIFI_MAX_SAE_DATA_LENGTH]; 594 } __NRF_WIFI_PKD; 595 596 #define NRF_WIFI_MAX_FRAME_LEN 400 597 598 /** 599 * @brief This structure defines the frame that is intended for transmission. 600 * 601 */ 602 603 struct nrf_wifi_frame { 604 /** Length of the frame */ 605 signed int frame_len; 606 /** frame data */ 607 signed char frame[NRF_WIFI_MAX_FRAME_LEN]; 608 } __NRF_WIFI_PKD; 609 610 #define NRF_WIFI_INDEX_IDS_WDEV_ID_VALID (1 << 0) 611 #define NRF_WIFI_INDEX_IDS_IFINDEX_VALID (1 << 1) 612 #define NRF_WIFI_INDEX_IDS_WIPHY_IDX_VALID (1 << 2) 613 614 /** 615 * @brief This structure contains details about the interface information. 616 * 617 */ 618 619 struct nrf_wifi_index_ids { 620 /** Indicate which properties below are set */ 621 unsigned int valid_fields; 622 /** wdev id */ 623 signed int ifaceindex; 624 /** Unused */ 625 signed int nrf_wifi_wiphy_idx; 626 /** Unused */ 627 unsigned long long wdev_id; 628 } __NRF_WIFI_PKD; 629 630 #define NRF_WIFI_SUPP_RATES_BAND_VALID (1 << 0) 631 #define NRF_WIFI_MAX_SUPP_RATES 60 632 633 /** 634 * @brief This structure provides information about the rate parameters. 635 * 636 */ 637 638 struct nrf_wifi_supp_rates { 639 /** Indicate which of the following parameters are valid */ 640 unsigned int valid_fields; 641 /** Frequency band, see &enum nrf_wifi_band */ 642 signed int band; 643 /** Number of values in rates parameter */ 644 signed int nrf_wifi_num_rates; 645 /** List of supported rates as defined by IEEE 802.11 7.3.2.2 */ 646 unsigned char rates[NRF_WIFI_MAX_SUPP_RATES]; 647 } __NRF_WIFI_PKD; 648 649 /** 650 * @brief This structure contains details about a channel's information. 651 * 652 */ 653 struct nrf_wifi_channel { 654 /** band this channel belongs to */ 655 signed int band; 656 /** center frequency in MHz */ 657 unsigned int center_frequency; 658 /** channel flags from see &enum nrf_wifi_channel_flags */ 659 unsigned int nrf_wifi_flags; 660 /** maximum antenna gain in dBi */ 661 signed int nrf_wifi_max_antenna_gain; 662 /** maximum transmission power (in dBm) */ 663 signed int nrf_wifi_max_power; 664 /** maximum regulatory transmission power (in dBm) */ 665 signed int nrf_wifi_max_reg_power; 666 /** channel flags at registration time, used by regulatory 667 * code to support devices with additional restrictions 668 */ 669 unsigned int nrf_wifi_orig_flags; 670 /** internal use */ 671 signed int nrf_wifi_orig_mag; 672 /** internal use */ 673 signed int nrf_wifi_orig_mpwr; 674 /** hardware-specific value for the channel */ 675 unsigned short hw_value; 676 /** helper to regulatory code to indicate when a beacon 677 * has been found on this channel. Use regulatory_hint_found_beacon() 678 * to enable this, this is useful only on 5 GHz band. 679 */ 680 signed char nrf_wifi_beacon_found; 681 } __NRF_WIFI_PKD; 682 683 684 685 #define NRF_WIFI_SCAN_MAX_NUM_SSIDS 2 686 #define NRF_WIFI_SCAN_MAX_NUM_FREQUENCIES 64 687 688 #define NRF_WIFI_SCAN_BAND_2GHZ (1 << 0) 689 #define NRF_WIFI_SCAN_BAND_5GHZ (1 << 1) 690 #define NRF_WIFI_SCAN_BAND_6GHZ (1 << 2) 691 692 /** 693 * @brief This structure provides details about the parameters required for a scan request. 694 * 695 */ 696 struct nrf_wifi_scan_params { 697 /** If 0x1, RPU force passive scan on all channels */ 698 unsigned short passive_scan; 699 /** Number of ssid's in scan_ssids parameter */ 700 unsigned char num_scan_ssids; 701 /** Specific SSID's to scan for */ 702 struct nrf_wifi_ssid scan_ssids[NRF_WIFI_SCAN_MAX_NUM_SSIDS]; 703 /** used to send probe requests at non CCK rate in 2GHz band */ 704 unsigned char no_cck; 705 /** Bitmap of bands to be scanned. Value Zero will scan both 2.4 and 5 GHZ */ 706 unsigned char bands; 707 /** Information element(s) data nrf_wifi_ie*/ 708 struct nrf_wifi_ie ie; 709 /** MAC address */ 710 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 711 /** Max scan duration in active scan. If zero rpu programs 50msec */ 712 unsigned short dwell_time_active; 713 /** Max scan duration in passive scan. If zero rpu programs 150msec */ 714 unsigned short dwell_time_passive; 715 /** Number of channels to be scanned */ 716 unsigned short num_scan_channels; 717 /** If true, skip local and IANA Unicast reserved MACs **/ 718 unsigned char skip_local_admin_macs; 719 /** specific channels to be scanned */ 720 unsigned int center_frequency[0]; 721 } __NRF_WIFI_PKD; 722 723 #define NRF_WIFI_HT_CAPABILITY_VALID (1 << 0) 724 #define NRF_WIFI_HT_CAPABILITY_MASK_VALID (1 << 1) 725 #define NRF_WIFI_VHT_CAPABILITY_VALID (1 << 2) 726 #define NRF_WIFI_VHT_CAPABILITY_MASK_VALID (1 << 3) 727 728 #define NRF_WIFI_CMD_HT_VHT_CAPABILITY_DISABLE_HT (1 << 0) 729 #define NRF_WIFI_HT_VHT_CAPABILITY_MAX_SIZE 256 730 731 /** 732 * @brief This structure contains specific information about the VHT (Very High Throughput) 733 * and HT ((High Throughput)) capabilities. 734 * 735 */ 736 737 struct nrf_wifi_ht_vht_capabilities { 738 /** Indicate which of the following parameters are valid */ 739 unsigned int valid_fields; 740 /** Indicate which capabilities have been specified */ 741 unsigned short nrf_wifi_flags; 742 /** HT Capability information element (from association request when 743 * used with NRF_WIFI_UMAC_CMD_NEW_STATION). 744 */ 745 unsigned char ht_capability[NRF_WIFI_HT_VHT_CAPABILITY_MAX_SIZE]; 746 /** Specify which bits of the ht_capability are masked */ 747 unsigned char ht_capability_mask[NRF_WIFI_HT_VHT_CAPABILITY_MAX_SIZE]; 748 /** VHT Capability information element */ 749 unsigned char vht_capability[NRF_WIFI_HT_VHT_CAPABILITY_MAX_SIZE]; 750 /** Specify which bits in vht_capability to which attention should be paid */ 751 unsigned char vht_capability_mask[NRF_WIFI_HT_VHT_CAPABILITY_MAX_SIZE]; 752 } __NRF_WIFI_PKD; 753 754 #define NRF_WIFI_SIGNAL_TYPE_NONE 1 755 #define NRF_WIFI_SIGNAL_TYPE_MBM 2 756 #define NRF_WIFI_SIGNAL_TYPE_UNSPEC 3 757 758 /** 759 * @brief This structure represents information related to the signal strength. 760 * 761 */ 762 763 struct nrf_wifi_signal { 764 /** MBM or unspecified */ 765 unsigned int signal_type; 766 767 /** signal */ 768 union { 769 /** If MBM signal strength of probe response/beacon 770 * in mBm (100 * dBm) (s32) 771 */ 772 unsigned int mbm_signal; 773 /** If unspecified signal strength of the probe response/beacon 774 * in unspecified units, scaled to 0..100 (u8). 775 */ 776 unsigned char unspec_signal; 777 } __NRF_WIFI_PKD signal; 778 } __NRF_WIFI_PKD; 779 780 #define NRF_WIFI_WPA_VERSION_1 (1 << 0) 781 #define NRF_WIFI_WPA_VERSION_2 (1 << 1) 782 783 #define NRF_WIFI_CONNECT_COMMON_INFO_MAC_ADDR_VALID (1 << 0) 784 #define NRF_WIFI_CONNECT_COMMON_INFO_MAC_ADDR_HINT_VALID (1 << 1) 785 #define NRF_WIFI_CONNECT_COMMON_INFO_FREQ_VALID (1 << 2) 786 #define NRF_WIFI_CONNECT_COMMON_INFO_FREQ_HINT_VALID (1 << 3) 787 #define NRF_WIFI_CONNECT_COMMON_INFO_BG_SCAN_PERIOD_VALID (1 << 4) 788 #define NRF_WIFI_CONNECT_COMMON_INFO_SSID_VALID (1 << 5) 789 #define NRF_WIFI_CONNECT_COMMON_INFO_WPA_IE_VALID (1 << 6) 790 #define NRF_WIFI_CONNECT_COMMON_INFO_WPA_VERSIONS_VALID (1 << 7) 791 #define NRF_WIFI_CONNECT_COMMON_INFO_CIPHER_SUITES_PAIRWISE_VALID (1 << 8) 792 #define NRF_WIFI_CONNECT_COMMON_INFO_CIPHER_SUITE_GROUP_VALID (1 << 9) 793 #define NRF_WIFI_CONNECT_COMMON_INFO_AKM_SUITES_VALID (1 << 10) 794 #define NRF_WIFI_CONNECT_COMMON_INFO_USE_MFP_VALID (1 << 11) 795 #define NRF_WIFI_CONNECT_COMMON_INFO_CONTROL_PORT_ETHER_TYPE (1 << 12) 796 #define NRF_WIFI_CONNECT_COMMON_INFO_CONTROL_PORT_NO_ENCRYPT (1 << 13) 797 798 #define NRF_WIFI_MAX_NR_AKM_SUITES 2 799 800 #define NRF_WIFI_CMD_CONNECT_COMMON_INFO_USE_RRM (1 << 14) 801 #define NRF_WIFI_CONNECT_COMMON_INFO_PREV_BSSID (1 << 15) 802 #define NRF_WIFI_CONNECT_COMMON_INFO_SECURITY (1 << 16) 803 /** 804 * @brief This structure contains parameters related to the connection. 805 * 806 */ 807 808 struct nrf_wifi_connect_common_info { 809 /** Indicate which of the following parameters are valid */ 810 unsigned int valid_fields; 811 /** Frequency of the selected channel in MHz */ 812 unsigned int frequency; 813 /** Frequency of the recommended initial BSS */ 814 unsigned int freq_hint; 815 /** Indicates which WPA version(s) */ 816 unsigned int wpa_versions; 817 /** Number of pairwise cipher suites */ 818 signed int num_cipher_suites_pairwise; 819 /** For crypto settings, indicates which pairwise cipher suites are used */ 820 unsigned int cipher_suites_pairwise[7]; 821 /** For crypto settings, indicates which group cipher suite is used */ 822 unsigned int cipher_suite_group; 823 /** Number of groupwise cipher suites */ 824 unsigned int num_akm_suites; 825 /** Indicate which key management algorithm(s) to use */ 826 unsigned int akm_suites[NRF_WIFI_MAX_NR_AKM_SUITES]; 827 /** Whether management frame protection (IEEE 802.11w) is used for the association */ 828 signed int use_mfp; 829 /** Flag for indicating whether the current connection 830 * shall support Radio Resource Measurements (11k) 831 */ 832 unsigned int nrf_wifi_flags; 833 /** Background scan period in seconds or 0 to disable background scan */ 834 unsigned short bg_scan_period; 835 /** MAC address */ 836 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 837 /** MAC address recommendation as initial BSS */ 838 unsigned char mac_addr_hint[NRF_WIFI_ETH_ADDR_LEN]; 839 /** SSID (binary attribute, 0..32 octets) */ 840 struct nrf_wifi_ssid ssid; 841 /** IE's nrf_wifi_ie */ 842 struct nrf_wifi_ie wpa_ie; 843 /** VHT Capability information element nrf_wifi_ht_vht_capabilities */ 844 struct nrf_wifi_ht_vht_capabilities ht_vht_capabilities; 845 /** A 16-bit value indicating the ethertype that will be used for key negotiation. 846 * If it is not specified, the value defaults to 0x888E. 847 */ 848 unsigned short control_port_ether_type; 849 /** When included along with control_port_ether_type, indicates that the custom 850 * ethertype frames used for key negotiation must not be encrypted. 851 */ 852 unsigned char control_port_no_encrypt; 853 /** Indicating whether user space controls IEEE 802.1X port, If set, the RPU will 854 * assume that the port is unauthorized until authorized by user space. 855 * Otherwise, port is marked authorized by default in station mode. 856 */ 857 signed char control_port; 858 /** previous BSSID, used to specify a request to reassociate 859 * within an ESS that is, to use Reassociate Request frame (with the value of 860 * this attribute in the Current AP address field) instead of Association 861 * Request frame which is used for the initial association to an ESS. 862 */ 863 unsigned char prev_bssid[NRF_WIFI_ETH_ADDR_LEN]; 864 /** Bss max idle timeout value in sec which will be encapsulated into 865 * BSS MAX IDLE IE in assoc request frame. 866 */ 867 unsigned short maxidle_insec; 868 869 } __NRF_WIFI_PKD; 870 871 #define NRF_WIFI_BEACON_DATA_MAX_HEAD_LEN 256 872 #define NRF_WIFI_BEACON_DATA_MAX_TAIL_LEN 512 873 #define NRF_WIFI_BEACON_DATA_MAX_PROBE_RESP_LEN 400 874 875 /** 876 * @brief This structure provides information about beacon and probe data. 877 * 878 */ 879 880 struct nrf_wifi_beacon_data { 881 /** length of head */ 882 unsigned int head_len; 883 /** length of tail */ 884 unsigned int tail_len; 885 /** length of probe response template (probe_resp) */ 886 unsigned int probe_resp_len; 887 /** head portion of beacon (before TIM IE) or %NULL if not changed */ 888 unsigned char head[NRF_WIFI_BEACON_DATA_MAX_HEAD_LEN]; 889 /** tail portion of beacon (after TIM IE) or %NULL if not changed */ 890 unsigned char tail[NRF_WIFI_BEACON_DATA_MAX_TAIL_LEN]; 891 /** probe response template */ 892 unsigned char probe_resp[NRF_WIFI_BEACON_DATA_MAX_PROBE_RESP_LEN]; 893 } __NRF_WIFI_PKD; 894 895 #define NRF_WIFI_STA_FLAG_INVALID (1 << 0) 896 #define NRF_WIFI_STA_FLAG_AUTHORIZED (1 << 1) 897 #define NRF_WIFI_STA_FLAG_SHORT_PREAMBLE (1 << 2) 898 #define NRF_WIFI_STA_FLAG_WME (1 << 3) 899 #define NRF_WIFI_STA_FLAG_MFP (1 << 4) 900 #define NRF_WIFI_STA_FLAG_AUTHENTICATED (1 << 5) 901 #define NRF_WIFI_STA_FLAG_TDLS_PEER (1 << 6) 902 #define NRF_WIFI_STA_FLAG_ASSOCIATED (1 << 7) 903 904 /** 905 * @brief This structure provides information regarding station flags. 906 * 907 */ 908 909 struct nrf_wifi_sta_flag_update { 910 /** Mask of station flags to set */ 911 unsigned int nrf_wifi_mask; 912 /** Values to set them to. NRF_WIFI_STA_FLAG_AUTHORIZED */ 913 unsigned int nrf_wifi_set; 914 } __NRF_WIFI_PKD; 915 916 #define NRF_WIFI_RATE_INFO_BITRATE_VALID (1 << 0) 917 #define NRF_WIFI_RATE_INFO_BITRATE_COMPAT_VALID (1 << 1) 918 #define NRF_WIFI_RATE_INFO_BITRATE_MCS_VALID (1 << 2) 919 #define NRF_WIFI_RATE_INFO_BITRATE_VHT_MCS_VALID (1 << 3) 920 #define NRF_WIFI_RATE_INFO_BITRATE_VHT_NSS_VALID (1 << 4) 921 922 #define NRF_WIFI_RATE_INFO_0_MHZ_WIDTH (1 << 0) 923 #define NRF_WIFI_RATE_INFO_5_MHZ_WIDTH (1 << 1) 924 #define NRF_WIFI_RATE_INFO_10_MHZ_WIDTH (1 << 2) 925 #define NRF_WIFI_RATE_INFO_40_MHZ_WIDTH (1 << 3) 926 #define NRF_WIFI_RATE_INFO_80_MHZ_WIDTH (1 << 4) 927 #define NRF_WIFI_RATE_INFO_160_MHZ_WIDTH (1 << 5) 928 #define NRF_WIFI_RATE_INFO_SHORT_GI (1 << 6) 929 #define NRF_WIFI_RATE_INFO_80P80_MHZ_WIDTH (1 << 7) 930 931 /** 932 * @brief This structure contains information about rate parameters. 933 * 934 */ 935 936 struct nrf_wifi_rate_info { 937 /** Valid fields with in this structure */ 938 unsigned int valid_fields; 939 /** bitrate */ 940 unsigned int bitrate; 941 /** Bitrate compatible */ 942 unsigned short bitrate_compat; 943 /** Modulation and Coding Scheme(MCS) */ 944 unsigned char nrf_wifi_mcs; 945 /** MCS related to VHT */ 946 unsigned char vht_mcs; 947 /** NSS related to VHT */ 948 unsigned char vht_nss; 949 /** Rate flags NRF_WIFI_RATE_INFO_0_MHZ_WIDTH */ 950 unsigned int nrf_wifi_flags; 951 952 } __NRF_WIFI_PKD; 953 954 #define NRF_WIFI_BSS_PARAM_FLAGS_CTS_PROT (1<<0) 955 #define NRF_WIFI_BSS_PARAM_FLAGS_SHORT_PREAMBLE (1<<1) 956 #define NRF_WIFI_BSS_PARAM_FLAGS_SHORT_SLOT_TIME (1<<2) 957 958 /** 959 * @brief This structure provides information about the Basic Service Set (BSS) 960 * parameters for the attached station. 961 * 962 */ 963 struct nrf_wifi_sta_bss_parameters { 964 /** bitfields of flags NRF_WIFI_BSS_PARAM_FLAGS_CTS_PROT */ 965 unsigned char nrf_wifi_flags; 966 /** DTIM period for the BSS */ 967 unsigned char dtim_period; 968 /** beacon interval */ 969 unsigned short beacon_interval; 970 } __NRF_WIFI_PKD; 971 972 #define NRF_WIFI_STA_INFO_CONNECTED_TIME_VALID (1 << 0) 973 #define NRF_WIFI_STA_INFO_INACTIVE_TIME_VALID (1 << 1) 974 #define NRF_WIFI_STA_INFO_RX_BYTES_VALID (1 << 2) 975 #define NRF_WIFI_STA_INFO_TX_BYTES_VALID (1 << 3) 976 #define NRF_WIFI_STA_INFO_CHAIN_SIGNAL_VALID (1 << 4) 977 #define NRF_WIFI_STA_INFO_CHAIN_SIGNAL_AVG_VALID (1 << 5) 978 #define NRF_WIFI_STA_INFO_TX_BITRATE_VALID (1 << 6) 979 #define NRF_WIFI_STA_INFO_RX_BITRATE_VALID (1 << 7) 980 #define NRF_WIFI_STA_INFO_STA_FLAGS_VALID (1 << 8) 981 982 #define NRF_WIFI_STA_INFO_LLID_VALID (1 << 9) 983 #define NRF_WIFI_STA_INFO_PLID_VALID (1 << 10) 984 #define NRF_WIFI_STA_INFO_PLINK_STATE_VALID (1 << 11) 985 #define NRF_WIFI_STA_INFO_SIGNAL_VALID (1 << 12) 986 #define NRF_WIFI_STA_INFO_SIGNAL_AVG_VALID (1 << 13) 987 #define NRF_WIFI_STA_INFO_RX_PACKETS_VALID (1 << 14) 988 #define NRF_WIFI_STA_INFO_TX_PACKETS_VALID (1 << 15) 989 #define NRF_WIFI_STA_INFO_TX_RETRIES_VALID (1 << 16) 990 #define NRF_WIFI_STA_INFO_TX_FAILED_VALID (1 << 17) 991 #define NRF_WIFI_STA_INFO_EXPECTED_THROUGHPUT_VALID (1 << 18) 992 #define NRF_WIFI_STA_INFO_BEACON_LOSS_COUNT_VALID (1 << 19) 993 #define NRF_WIFI_STA_INFO_LOCAL_PM_VALID (1 << 20) 994 #define NRF_WIFI_STA_INFO_PEER_PM_VALID (1 << 21) 995 #define NRF_WIFI_STA_INFO_NONPEER_PM_VALID (1 << 22) 996 #define NRF_WIFI_STA_INFO_T_OFFSET_VALID (1 << 23) 997 #define NRF_WIFI_STA_INFO_RX_DROPPED_MISC_VALID (1 << 24) 998 #define NRF_WIFI_STA_INFO_RX_BEACON_VALID (1 << 25) 999 #define NRF_WIFI_STA_INFO_RX_BEACON_SIGNAL_AVG_VALID (1 << 26) 1000 #define NRF_WIFI_STA_INFO_STA_BSS_PARAMS_VALID (1 << 27) 1001 #define NRF_WIFI_IEEE80211_MAX_CHAINS 4 1002 1003 /** 1004 * @brief This structure contains information about a Station (STA). 1005 * 1006 */ 1007 1008 struct nrf_wifi_sta_info { 1009 /** Valid fields with in this structure */ 1010 unsigned int valid_fields; 1011 /** time since the station is last connected */ 1012 unsigned int connected_time; 1013 /** time since last activity, in msec */ 1014 unsigned int inactive_time; 1015 /** total received bytes from this station */ 1016 unsigned int rx_bytes; 1017 /** total transmitted bytes to this station */ 1018 unsigned int tx_bytes; 1019 /** per-chain signal mask value */ 1020 unsigned int chain_signal_mask; 1021 /** per-chain signal strength of last PPDU */ 1022 unsigned char chain_signal[NRF_WIFI_IEEE80211_MAX_CHAINS]; 1023 /** per-chain signal strength average mask value */ 1024 unsigned int chain_signal_avg_mask; 1025 /** per-chain signal strength average */ 1026 unsigned char chain_signal_avg[NRF_WIFI_IEEE80211_MAX_CHAINS]; 1027 /**nrf_wifi_rate_info */ 1028 struct nrf_wifi_rate_info tx_bitrate; 1029 /**nrf_wifi_rate_info */ 1030 struct nrf_wifi_rate_info rx_bitrate; 1031 /** Not used */ 1032 unsigned short llid; 1033 /** Not used */ 1034 unsigned short plid; 1035 /** Not used */ 1036 unsigned char plink_state; 1037 /** signal strength of last received PPDU, in dbm */ 1038 signed int signal; 1039 /** signal strength average, in dbm */ 1040 signed int signal_avg; 1041 /** total received packet from this station */ 1042 unsigned int rx_packets; 1043 /** total transmitted packets to this station */ 1044 unsigned int tx_packets; 1045 /** total retries to this station */ 1046 unsigned int tx_retries; 1047 /** total failed packets to this station */ 1048 unsigned int tx_failed; 1049 /** expected throughput in kbps */ 1050 unsigned int expected_throughput; 1051 /** count of times beacon loss was detected */ 1052 unsigned int beacon_loss_count; 1053 /** Not used */ 1054 unsigned int local_pm; 1055 /** Not used */ 1056 unsigned int peer_pm; 1057 /** Not used */ 1058 unsigned int nonpeer_pm; 1059 /** station flags nrf_wifi_sta_flag_update */ 1060 struct nrf_wifi_sta_flag_update sta_flags; 1061 /** timing offset with respect to this STA */ 1062 unsigned long long t_offset; 1063 /** count of times other(non beacon) loss was detected */ 1064 unsigned long long rx_dropped_misc; 1065 /** count of times beacon */ 1066 unsigned long long rx_beacon; 1067 /** average of beacon signal */ 1068 long long rx_beacon_signal_avg; 1069 /** Station connected BSS params. nrf_wifi_sta_bss_parameters */ 1070 struct nrf_wifi_sta_bss_parameters bss_param; 1071 } __NRF_WIFI_PKD; 1072 1073 /** 1074 * @brief The command header expected by UMAC to handle requests from the control interface. 1075 * 1076 */ 1077 1078 struct nrf_wifi_umac_hdr { 1079 /** unused */ 1080 unsigned int portid; 1081 /** unused */ 1082 unsigned int seq; 1083 /** UMAC command/event value see &enum nrf_wifi_umac_commands 1084 * see &enum nrf_wifi_umac_events 1085 */ 1086 unsigned int cmd_evnt; 1087 /** unused */ 1088 signed int rpu_ret_val; 1089 /** Interface information nrf_wifi_index_ids */ 1090 struct nrf_wifi_index_ids ids; 1091 } __NRF_WIFI_PKD; 1092 1093 #define NRF_WIFI_KEY_VALID (1 << 0) 1094 #define NRF_WIFI_KEY_TYPE_VALID (1 << 1) 1095 #define NRF_WIFI_KEY_IDX_VALID (1 << 2) 1096 #define NRF_WIFI_SEQ_VALID (1 << 3) 1097 #define NRF_WIFI_CIPHER_SUITE_VALID (1 << 4) 1098 #define NRF_WIFI_KEY_INFO_VALID (1 << 5) 1099 1100 #define NRF_WIFI_KEY_DEFAULT (1 << 0) 1101 #define NRF_WIFI_KEY_DEFAULT_TYPES (1 << 1) 1102 #define NRF_WIFI_KEY_DEFAULT_MGMT (1 << 2) 1103 #define NRF_WIFI_KEY_DEFAULT_TYPE_UNICAST (1 << 3) 1104 #define NRF_WIFI_KEY_DEFAULT_TYPE_MULTICAST (1 << 4) 1105 1106 /** 1107 * @brief This structure contains information about a security key. 1108 * 1109 */ 1110 1111 struct nrf_wifi_umac_key_info { 1112 /** Indicate which of the following parameters are valid */ 1113 unsigned int valid_fields; 1114 /** Key cipher suite (as defined by IEEE 802.11 section 7.3.2.25.1) */ 1115 unsigned int cipher_suite; 1116 /** Specify what a key should be set as default as example NRF_WIFI_KEY_DEFAULT_MGMT */ 1117 unsigned short nrf_wifi_flags; 1118 /** Key Type, see &enum nrf_wifi_key_type */ 1119 signed int key_type; 1120 /** Key data nrf_wifi_key */ 1121 struct nrf_wifi_key key; 1122 /** Transmit key sequence number (IV/PN) for TKIP and CCMP keys, 1123 * each six bytes in little endian nrf_wifi_seq 1124 */ 1125 struct nrf_wifi_seq seq; 1126 /** Key ID (0-3) */ 1127 unsigned char key_idx; 1128 } __NRF_WIFI_PKD; 1129 1130 1131 1132 /** 1133 * @brief This enum describes the different types of scan. 1134 * 1135 */ 1136 enum scan_reason { 1137 /** scan for display purpose in user space */ 1138 SCAN_DISPLAY = 0, 1139 /** scan for connection purpose */ 1140 SCAN_CONNECT 1141 }; 1142 1143 /** 1144 * @brief This structure contains details about scan request information. 1145 * 1146 */ 1147 struct nrf_wifi_umac_scan_info { 1148 /** scan type see &enum scan_reason */ 1149 signed int scan_reason; 1150 /** scan parameters nrf_wifi_scan_params */ 1151 struct nrf_wifi_scan_params scan_params; 1152 } __NRF_WIFI_PKD; 1153 1154 /** 1155 * @brief This structure defines a command scan request. 1156 * 1157 */ 1158 1159 struct nrf_wifi_umac_cmd_scan { 1160 /** Header nrf_wifi_umac_hdr */ 1161 struct nrf_wifi_umac_hdr umac_hdr; 1162 /** nrf_wifi_umac_scan_info */ 1163 struct nrf_wifi_umac_scan_info info; 1164 } __NRF_WIFI_PKD; 1165 1166 /** 1167 * @brief This structure defines a command to abort a scan request. 1168 * 1169 */ 1170 1171 struct nrf_wifi_umac_cmd_abort_scan { 1172 /** Header nrf_wifi_umac_hdr */ 1173 struct nrf_wifi_umac_hdr umac_hdr; 1174 } __NRF_WIFI_PKD; 1175 1176 /** 1177 * @brief TThis structure defines a command to request scan results. 1178 * This command should be executed only if we have received a 1179 * NRF_WIFI_UMAC_EVENT_SCAN_DONE event for a previous scan. 1180 * 1181 */ 1182 1183 struct nrf_wifi_umac_cmd_get_scan_results { 1184 /** Header nrf_wifi_umac_hdr */ 1185 struct nrf_wifi_umac_hdr umac_hdr; 1186 /** scan type see &enum scan_reason */ 1187 signed int scan_reason; 1188 } __NRF_WIFI_PKD; 1189 1190 /** 1191 * @brief This structure provides details about the "Scan Done" event. 1192 * 1193 */ 1194 struct nrf_wifi_umac_event_scan_done { 1195 /** Header nrf_wifi_umac_hdr */ 1196 struct nrf_wifi_umac_hdr umac_hdr; 1197 /** status, 0=Scan successful & 1=Scan aborted */ 1198 signed int status; 1199 /** scan type see &enum scan_reason */ 1200 unsigned int scan_type; 1201 } __NRF_WIFI_PKD; 1202 1203 1204 #define MCAST_ADDR_ADD 0 1205 #define MCAST_ADDR_DEL 1 1206 1207 /** 1208 * @brief This structure represents the parameters used to configure the multicast address filter. 1209 * 1210 */ 1211 struct nrf_wifi_umac_mcast_cfg { 1212 /** Add (0) or Delete (1) */ 1213 unsigned int type; 1214 /** multicast address to be added/deleted */ 1215 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 1216 } __NRF_WIFI_PKD; 1217 1218 /** 1219 * @brief This structure defines a command used to set multicast (mcast) addresses. 1220 * 1221 */ 1222 struct nrf_wifi_umac_cmd_mcast_filter { 1223 /** Header nrf_wifi_umac_hdr */ 1224 struct nrf_wifi_umac_hdr umac_hdr; 1225 /** nrf_wifi_umac_mcast_cfg */ 1226 struct nrf_wifi_umac_mcast_cfg info; 1227 } __NRF_WIFI_PKD; 1228 1229 1230 /** 1231 * @brief This structure represents the parameters used to change the MAC address. 1232 * 1233 */ 1234 1235 struct nrf_wifi_umac_change_macaddr_info { 1236 /** MAC address to be set */ 1237 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 1238 } __NRF_WIFI_PKD; 1239 /** 1240 * @brief This structure describes command to change MAC address. 1241 * This has to be used only when the interface is down. 1242 * 1243 */ 1244 struct nrf_wifi_umac_cmd_change_macaddr { 1245 /** Header nrf_wifi_umac_hdr */ 1246 struct nrf_wifi_umac_hdr umac_hdr; 1247 /** nrf_wifi_umac_change_macaddr_info */ 1248 struct nrf_wifi_umac_change_macaddr_info macaddr_info; 1249 } __NRF_WIFI_PKD; 1250 1251 1252 1253 #define NRF_WIFI_CMD_AUTHENTICATE_KEY_INFO_VALID (1 << 0) 1254 #define NRF_WIFI_CMD_AUTHENTICATE_BSSID_VALID (1 << 1) 1255 #define NRF_WIFI_CMD_AUTHENTICATE_FREQ_VALID (1 << 2) 1256 #define NRF_WIFI_CMD_AUTHENTICATE_SSID_VALID (1 << 3) 1257 #define NRF_WIFI_CMD_AUTHENTICATE_IE_VALID (1 << 4) 1258 #define NRF_WIFI_CMD_AUTHENTICATE_SAE_VALID (1 << 5) 1259 1260 #define NRF_WIFI_CMD_AUTHENTICATE_LOCAL_STATE_CHANGE (1 << 0) 1261 1262 /** 1263 * @brief This structure specifies the parameters to be used when sending an authentication request. 1264 * 1265 */ 1266 1267 struct nrf_wifi_umac_auth_info { 1268 /** Frequency of the selected channel in MHz */ 1269 unsigned int frequency; 1270 /** Flag attribute to indicate that a command is requesting a local 1271 * authentication/association state change without invoking actual management 1272 * frame exchange. This can be used with NRF_WIFI_UMAC_CMD_AUTHENTICATE 1273 * NRF_WIFI_UMAC_CMD_DEAUTHENTICATE. 1274 */ 1275 unsigned short nrf_wifi_flags; 1276 /** Authentication type. see &enum nrf_wifi_auth_type */ 1277 signed int auth_type; 1278 /** Key information */ 1279 struct nrf_wifi_umac_key_info key_info; 1280 /** SSID (binary attribute, 0..32 octets) */ 1281 struct nrf_wifi_ssid ssid; 1282 /** Information element(s) data */ 1283 struct nrf_wifi_ie ie; 1284 /** SAE elements in Authentication frames. This starts 1285 * with the Authentication transaction sequence number field. 1286 */ 1287 struct nrf_wifi_sae sae; 1288 /** MAC address (various uses) */ 1289 unsigned char nrf_wifi_bssid[NRF_WIFI_ETH_ADDR_LEN]; 1290 /** The following parameters will be used to construct bss database in case of 1291 * cfg80211 offload to host case. 1292 */ 1293 /** scanning width */ 1294 signed int scan_width; 1295 /** Signal strength */ 1296 signed int nrf_wifi_signal; 1297 /** Received elements from beacon or probe response */ 1298 signed int from_beacon; 1299 /** BSS information element data */ 1300 struct nrf_wifi_ie bss_ie; 1301 /** BSS capability */ 1302 unsigned short capability; 1303 /** Beacon interval(ms) */ 1304 unsigned short beacon_interval; 1305 /** Beacon tsf */ 1306 unsigned long long tsf; 1307 } __NRF_WIFI_PKD; 1308 1309 /** 1310 * @brief This structure defines a command used to send an authentication request. 1311 * 1312 */ 1313 1314 struct nrf_wifi_umac_cmd_auth { 1315 /** Header nrf_wifi_umac_hdr */ 1316 struct nrf_wifi_umac_hdr umac_hdr; 1317 /** Indicate which of the following parameters are valid */ 1318 unsigned int valid_fields; 1319 /** Information to be passed in the authentication command nrf_wifi_umac_auth_info */ 1320 struct nrf_wifi_umac_auth_info info; 1321 } __NRF_WIFI_PKD; 1322 1323 #define NRF_WIFI_CMD_ASSOCIATE_MAC_ADDR_VALID (1 << 0) 1324 1325 /** 1326 * @brief This structure specifies the parameters to be used when sending an association request. 1327 * 1328 */ 1329 1330 struct nrf_wifi_umac_assoc_info { 1331 /** Frequency of the selected channel in MHz */ 1332 unsigned int center_frequency; 1333 /** ssid nrf_wifi_ssid */ 1334 struct nrf_wifi_ssid ssid; 1335 /** MAC address (various uses) */ 1336 unsigned char nrf_wifi_bssid[NRF_WIFI_ETH_ADDR_LEN]; 1337 /** WPA information element data. nrf_wifi_ie */ 1338 struct nrf_wifi_ie wpa_ie; 1339 /** Whether management frame protection (IEEE 802.11w) is used for the association */ 1340 unsigned char use_mfp; 1341 /** Indicating whether user space controls IEEE 802.1X port. If set, the RPU will 1342 * assume that the port is unauthorized until authorized by user space. 1343 * Otherwise, port is marked authorized by default in station mode. 1344 */ 1345 signed char control_port; 1346 /** Previous BSSID used in flag */ 1347 unsigned int prev_bssid_flag; 1348 /** Previous BSSID used in Re-assoc. */ 1349 unsigned char prev_bssid[NRF_WIFI_ETH_ADDR_LEN]; 1350 /** Bss max idle timeout value in sec wich will be encapsulated into 1351 * BSS MAX IDLE IE in assoc request frame. 1352 */ 1353 unsigned short bss_max_idle_time; 1354 } __NRF_WIFI_PKD; 1355 1356 /** 1357 * @brief This structure specifies the parameters to be used when sending an association request. 1358 * 1359 */ 1360 1361 struct nrf_wifi_umac_cmd_assoc { 1362 /** Header nrf_wifi_umac_hdr */ 1363 struct nrf_wifi_umac_hdr umac_hdr; 1364 /** Indicate which of the following parameters are valid */ 1365 unsigned int valid_fields; 1366 /** nrf_wifi_connect_common_info */ 1367 struct nrf_wifi_connect_common_info connect_common_info; 1368 /** 1369 * Previous BSSID, to be used by in ASSOCIATE commands to specify 1370 * using a reassociate frame. 1371 */ 1372 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 1373 } __NRF_WIFI_PKD; 1374 1375 #define NRF_WIFI_CMD_MLME_MAC_ADDR_VALID (1 << 0) 1376 #define NRF_WIFI_CMD_MLME_LOCAL_STATE_CHANGE (1 << 0) 1377 1378 /** 1379 * @brief This structure specifies the parameters to be passed while sending a 1380 * deauthentication request (NRF_WIFI_UMAC_CMD_DEAUTHENTICATE). 1381 * 1382 */ 1383 1384 struct nrf_wifi_umac_disconn_info { 1385 /** Indicates that a command is requesting a local deauthentication/disassociation 1386 * state change without invoking actual management frame exchange. 1387 */ 1388 unsigned short nrf_wifi_flags; 1389 /** Reason code for disassociation or deauthentication */ 1390 unsigned short reason_code; 1391 /** MAC address (various uses) */ 1392 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 1393 } __NRF_WIFI_PKD; 1394 1395 /** 1396 * @brief This structure specifies the parameters to be used when sending a disconnect request. 1397 * 1398 */ 1399 1400 struct nrf_wifi_umac_cmd_disconn { 1401 /** Header nrf_wifi_umac_hdr */ 1402 struct nrf_wifi_umac_hdr umac_hdr; 1403 /** Indicate which of the following parameters are valid */ 1404 unsigned int valid_fields; 1405 /** nrf_wifi_umac_disconn_info */ 1406 struct nrf_wifi_umac_disconn_info info; 1407 } __NRF_WIFI_PKD; 1408 1409 #define NRF_WIFI_CMD_NEW_INTERFACE_USE_4ADDR_VALID (1 << 0) 1410 #define NRF_WIFI_CMD_NEW_INTERFACE_MAC_ADDR_VALID (1 << 1) 1411 #define NRF_WIFI_CMD_NEW_INTERFACE_IFTYPE_VALID (1 << 2) 1412 #define NRF_WIFI_CMD_NEW_INTERFACE_IFNAME_VALID (1 << 3) 1413 1414 /** 1415 * @brief This structure contains the information to be passed to the RPU 1416 * to create a new virtual interface using the NRF_WIFI_UMAC_CMD_NEW_INTERFACE command. 1417 * 1418 */ 1419 struct nrf_wifi_umac_add_vif_info { 1420 /** Interface type, see enum nrf_wifi_sys_iftype */ 1421 signed int iftype; 1422 /** Use 4-address frames on a virtual interface */ 1423 signed int nrf_wifi_use_4addr; 1424 /** Unused */ 1425 unsigned int mon_flags; 1426 /** MAC Address */ 1427 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 1428 /** Interface name */ 1429 signed char ifacename[16]; 1430 } __NRF_WIFI_PKD; 1431 1432 /** 1433 * @brief This structure defines a command used to create a new virtual interface 1434 * using the NRF_WIFI_UMAC_CMD_NEW_INTERFACE command. 1435 * 1436 */ 1437 1438 struct nrf_wifi_umac_cmd_add_vif { 1439 /** Header nrf_wifi_umac_hdr */ 1440 struct nrf_wifi_umac_hdr umac_hdr; 1441 /** Indicate which of the following parameters are valid */ 1442 unsigned int valid_fields; 1443 /** VIF specific information to be passed to the RPU nrf_wifi_umac_add_vif_info */ 1444 struct nrf_wifi_umac_add_vif_info info; 1445 } __NRF_WIFI_PKD; 1446 1447 /** 1448 * @brief This structure defines a command used to delete a virtual interface. 1449 * However, this command is not allowed on the default interface. 1450 * 1451 */ 1452 1453 struct nrf_wifi_umac_cmd_del_vif { 1454 /** Header nrf_wifi_umac_hdr */ 1455 struct nrf_wifi_umac_hdr umac_hdr; 1456 } __NRF_WIFI_PKD; 1457 1458 #define NRF_WIFI_FRAME_MATCH_MAX_LEN 8 1459 1460 /** 1461 * @brief This structure represents the data of management frame that must be matched for 1462 * processing in userspace. 1463 * 1464 */ 1465 1466 struct nrf_wifi_umac_frame_match { 1467 /** Length of data */ 1468 unsigned int frame_match_len; 1469 /** Data to match */ 1470 unsigned char frame_match[NRF_WIFI_FRAME_MATCH_MAX_LEN]; 1471 } __NRF_WIFI_PKD; 1472 1473 /** 1474 * @brief This structure contains information about the type of management frame 1475 * that should be passed to the driver for processing in userspace. 1476 * 1477 */ 1478 1479 struct nrf_wifi_umac_mgmt_frame_info { 1480 /** Frame type/subtype */ 1481 unsigned short frame_type; 1482 /** Match information Refer &struct nrf_wifi_umac_frame_match */ 1483 struct nrf_wifi_umac_frame_match frame_match; 1484 } __NRF_WIFI_PKD; 1485 1486 /** 1487 * @brief This structure defines a command to inform the RPU to register a management frame, 1488 * which must not be filtered by the RPU and should instead be passed to the host for 1489 * userspace processing. 1490 * 1491 */ 1492 1493 struct nrf_wifi_umac_cmd_mgmt_frame_reg { 1494 /** Header nrf_wifi_umac_hdr */ 1495 struct nrf_wifi_umac_hdr umac_hdr; 1496 /** 1497 * Management frame specific information to be passed to the RPU. 1498 * nrf_wifi_umac_mgmt_frame_info 1499 */ 1500 struct nrf_wifi_umac_mgmt_frame_info info; 1501 } __NRF_WIFI_PKD; 1502 1503 #define NRF_WIFI_CMD_KEY_MAC_ADDR_VALID (1 << 0) 1504 1505 /** 1506 * @brief This structure represents command to add a new key. 1507 * 1508 */ 1509 1510 struct nrf_wifi_umac_cmd_key { 1511 /** Header nrf_wifi_umac_hdr */ 1512 struct nrf_wifi_umac_hdr umac_hdr; 1513 /** Indicate which of the following parameters are valid */ 1514 unsigned int valid_fields; 1515 /** Key information. nrf_wifi_umac_key_info */ 1516 struct nrf_wifi_umac_key_info key_info; 1517 /** MAC address associated with the key */ 1518 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 1519 } __NRF_WIFI_PKD; 1520 1521 /** 1522 * @brief This structure defines a command that is used to add a new key. 1523 * 1524 */ 1525 1526 struct nrf_wifi_umac_cmd_set_key { 1527 /** Header nrf_wifi_umac_hdr */ 1528 struct nrf_wifi_umac_hdr umac_hdr; 1529 /** Key information , nrf_wifi_umac_key_info */ 1530 struct nrf_wifi_umac_key_info key_info; 1531 } __NRF_WIFI_PKD; 1532 1533 #define NRF_WIFI_CMD_SET_BSS_CTS_VALID (1 << 0) 1534 #define NRF_WIFI_CMD_SET_BSS_PREAMBLE_VALID (1 << 1) 1535 #define NRF_WIFI_CMD_SET_BSS_SLOT_VALID (1 << 2) 1536 #define NRF_WIFI_CMD_SET_BSS_HT_OPMODE_VALID (1 << 3) 1537 #define NRF_WIFI_CMD_SET_BSS_AP_ISOLATE_VALID (1 << 4) 1538 #define NRF_WIFI_CMD_SET_BSS_P2P_CTWINDOW_VALID (1 << 5) 1539 #define NRF_WIFI_CMD_SET_BSS_P2P_OPPPS_VALID (1 << 6) 1540 1541 #define NRF_WIFI_BASIC_MAX_SUPP_RATES 32 1542 1543 /** 1544 * @brief This structure contains parameters that describe the BSS (Basic Service Set) information. 1545 * 1546 */ 1547 1548 struct nrf_wifi_umac_bss_info { 1549 /** P2P GO Client Traffic Window, used with 1550 * the START_AP and SET_BSS commands. 1551 */ 1552 unsigned int p2p_go_ctwindow; 1553 /** P2P GO opportunistic PS, used with the 1554 * START_AP and SET_BSS commands. This can have the values 0 or 1; 1555 * if not given in START_AP 0 is assumed, if not given in SET_BSS 1556 * no change is made. 1557 */ 1558 unsigned int p2p_opp_ps; 1559 /** Number of basic rate elements */ 1560 unsigned int num_basic_rates; 1561 /** HT operation mode */ 1562 unsigned short ht_opmode; 1563 /** Whether CTS protection is enabled (0 or 1) */ 1564 unsigned char nrf_wifi_cts; 1565 /** Whether short preamble is enabled (0 or 1) */ 1566 unsigned char preamble; 1567 /** Whether short slot time enabled (0 or 1) */ 1568 unsigned char nrf_wifi_slot; 1569 /** (AP mode) Do not forward traffic between stations connected to this BSS */ 1570 unsigned char ap_isolate; 1571 /** Basic rates, array of basic rates in format defined by IEEE 802.11 7.3.2.2 */ 1572 unsigned char basic_rates[NRF_WIFI_BASIC_MAX_SUPP_RATES]; 1573 } __NRF_WIFI_PKD; 1574 1575 /** 1576 * @brief This structure represents a command used to set BSS (Basic Service Set) parameters. 1577 * 1578 */ 1579 1580 struct nrf_wifi_umac_cmd_set_bss { 1581 /** Header nrf_wifi_umac_hdr */ 1582 struct nrf_wifi_umac_hdr umac_hdr; 1583 /** Indicate which of the following parameters are valid */ 1584 unsigned int valid_fields; 1585 /** BSS specific information to be passed to the RPU nrf_wifi_umac_bss_info */ 1586 struct nrf_wifi_umac_bss_info bss_info; 1587 } __NRF_WIFI_PKD; 1588 1589 #define NRF_WIFI_SET_FREQ_PARAMS_FREQ_VALID (1 << 0) 1590 #define NRF_WIFI_SET_FREQ_PARAMS_CHANNEL_WIDTH_VALID (1 << 1) 1591 #define NRF_WIFI_SET_FREQ_PARAMS_CENTER_FREQ1_VALID (1 << 2) 1592 #define NRF_WIFI_SET_FREQ_PARAMS_CENTER_FREQ2_VALID (1 << 3) 1593 #define NRF_WIFI_SET_FREQ_PARAMS_CHANNEL_TYPE_VALID (1 << 4) 1594 1595 /** 1596 * @brief This structure contains information about frequency parameters. 1597 * 1598 */ 1599 1600 struct freq_params { 1601 /** Indicate which of the following parameters are valid */ 1602 unsigned int valid_fields; 1603 /** Value in MHz */ 1604 signed int frequency; 1605 /** Width of the channel @see &enu nrf_wifi_chan_width */ 1606 signed int channel_width; 1607 /** Unused */ 1608 signed int center_frequency1; 1609 /** Unused */ 1610 signed int center_frequency2; 1611 /** Type of channel see &enum nrf_wifi_channel_type */ 1612 signed int channel_type; 1613 } __NRF_WIFI_PKD; 1614 1615 /** 1616 * @brief This structure contains information about transmit queue parameters. 1617 * 1618 */ 1619 1620 struct nrf_wifi_txq_params { 1621 /** Transmit oppurtunity */ 1622 unsigned short txop; 1623 /** Minimum contention window */ 1624 unsigned short cwmin; 1625 /** Maximum contention window */ 1626 unsigned short cwmax; 1627 /** Arbitration interframe spacing */ 1628 unsigned char aifs; 1629 /** Access category */ 1630 unsigned char ac; 1631 1632 } __NRF_WIFI_PKD; 1633 1634 /** 1635 * @brief Types of transmit power settings. 1636 * 1637 */ 1638 1639 enum nrf_wifi_tx_power_type { 1640 /** Automatically determine transmit power */ 1641 NRF_WIFI_TX_POWER_AUTOMATIC, 1642 /** Limit TX power by the mBm parameter */ 1643 NRF_WIFI_TX_POWER_LIMITED, 1644 /** Fix TX power to the mBm parameter */ 1645 NRF_WIFI_TX_POWER_FIXED, 1646 }; 1647 1648 #define NRF_WIFI_TX_POWER_SETTING_TYPE_VALID (1 << 0) 1649 #define NRF_WIFI_TX_POWER_SETTING_TX_POWER_LEVEL_VALID (1 << 1) 1650 1651 /** 1652 * @brief This structure contains the parameters related to the transmit power setting. 1653 * 1654 */ 1655 1656 struct nrf_wifi_tx_power_setting { 1657 /** Indicate which of the following parameters are valid */ 1658 unsigned int valid_fields; 1659 /** Power value type, see nrf_wifi_tx_power_type */ 1660 signed int type; 1661 /** Transmit power level in signed mBm units */ 1662 signed int tx_power_level; 1663 1664 } __NRF_WIFI_PKD; 1665 1666 #define NRF_WIFI_CMD_SET_WIPHY_FREQ_PARAMS_VALID (1 << 0) 1667 #define NRF_WIFI_CMD_SET_WIPHY_TXQ_PARAMS_VALID (1 << 1) 1668 #define NRF_WIFI_CMD_SET_WIPHY_RTS_THRESHOLD_VALID (1 << 2) 1669 #define NRF_WIFI_CMD_SET_WIPHY_FRAG_THRESHOLD_VALID (1 << 3) 1670 #define NRF_WIFI_CMD_SET_WIPHY_TX_POWER_SETTING_VALID (1 << 4) 1671 #define NRF_WIFI_CMD_SET_WIPHY_ANTENNA_TX_VALID (1 << 5) 1672 #define NRF_WIFI_CMD_SET_WIPHY_ANTENNA_RX_VALID (1 << 6) 1673 #define NRF_WIFI_CMD_SET_WIPHY_RETRY_SHORT_VALID (1 << 7) 1674 #define NRF_WIFI_CMD_SET_WIPHY_RETRY_LONG_VALID (1 << 8) 1675 #define NRF_WIFI_CMD_SET_WIPHY_COVERAGE_CLASS_VALID (1 << 9) 1676 #define NRF_WIFI_CMD_SET_WIPHY_WIPHY_NAME_VALID (1 << 10) 1677 1678 /** 1679 * @brief This structure contains information about the configuration parameters 1680 * needed to set up and configure the wireless Physical Layer. 1681 * 1682 */ 1683 1684 struct nrf_wifi_umac_set_wiphy_info { 1685 /** RTS threshold, TX frames with length larger than or equal to this use RTS/CTS handshake 1686 * allowed range: 0..65536, disable with -1. 1687 */ 1688 int rts_threshold; 1689 /** Fragmentation threshold, maximum length in octets for frames. 1690 * allowed range: 256..8000, disable fragmentation with (u32)-1. 1691 */ 1692 unsigned int frag_threshold; 1693 /** Bitmap of allowed antennas for transmitting. This can be used to mask out 1694 * antennas which are not attached or should not be used for transmitting. 1695 * If an antenna is not selected in this bitmap the hardware is not allowed 1696 * to transmit on this antenna. 1697 */ 1698 unsigned int antenna_tx; 1699 /** Bitmap of allowed antennas for receiving. This can be used to mask out antennas 1700 * which are not attached or should not be used for receiving. If an antenna is 1701 * not selected in this bitmap the hardware should not be configured to receive 1702 * on this antenna. 1703 */ 1704 unsigned int antenna_rx; 1705 /** Frequency information of the a channel see &struct freq_params */ 1706 struct freq_params freq_params; 1707 /** TX queue parameters nrf_wifi_txq_params */ 1708 struct nrf_wifi_txq_params txq_params; 1709 /** Tx power settings nrf_wifi_tx_power_setting nrf_wifi_tx_power_setting */ 1710 struct nrf_wifi_tx_power_setting tx_power_setting; 1711 /** TX retry limit for frames whose length is less than or equal to the RTS threshold 1712 * allowed range: 1..255. 1713 */ 1714 unsigned char retry_short; 1715 /** TX retry limit for frames whose length is greater than the RTS threshold 1716 * allowed range: 1..255. 1717 */ 1718 unsigned char retry_long; 1719 /** Unused */ 1720 unsigned char coverage_class; 1721 /** WIPHY name (used for renaming) */ 1722 signed char wiphy_name[32]; 1723 } __NRF_WIFI_PKD; 1724 1725 /** 1726 * @brief This structure defines the command to set the wireless PHY configuration. 1727 * 1728 */ 1729 1730 struct nrf_wifi_umac_cmd_set_wiphy { 1731 /** Header nrf_wifi_umac_hdr */ 1732 struct nrf_wifi_umac_hdr umac_hdr; 1733 /** Indicates which of the following parameters are valid */ 1734 unsigned int valid_fields; 1735 /** nrf_wifi_umac_set_wiphy_info */ 1736 struct nrf_wifi_umac_set_wiphy_info info; 1737 } __NRF_WIFI_PKD; 1738 1739 #define NRF_WIFI_CMD_DEL_STATION_MAC_ADDR_VALID (1 << 0) 1740 #define NRF_WIFI_CMD_DEL_STATION_MGMT_SUBTYPE_VALID (1 << 1) 1741 #define NRF_WIFI_CMD_DEL_STATION_REASON_CODE_VALID (1 << 2) 1742 1743 /** 1744 * @brief This structure contains the parameters to delete a station. 1745 * 1746 */ 1747 1748 struct nrf_wifi_umac_del_sta_info { 1749 /** MAC address of the station */ 1750 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 1751 /** Management frame subtype */ 1752 unsigned char mgmt_subtype; 1753 /** Reason code for DEAUTHENTICATION and DISASSOCIATION */ 1754 unsigned short reason_code; 1755 } __NRF_WIFI_PKD; 1756 1757 /** 1758 * @brief This structure defines the command to delete a station. 1759 * 1760 */ 1761 1762 struct nrf_wifi_umac_cmd_del_sta { 1763 /** Header nrf_wifi_umac_hdr */ 1764 struct nrf_wifi_umac_hdr umac_hdr; 1765 /** Indicate which of the following parameters are valid */ 1766 unsigned int valid_fields; 1767 /** Information regarding the station to be deleted nrf_wifi_umac_del_sta_info */ 1768 struct nrf_wifi_umac_del_sta_info info; 1769 } __NRF_WIFI_PKD; 1770 1771 /** 1772 * @brief This structure contains the information required for obtaining station details. 1773 * 1774 */ 1775 1776 struct nrf_wifi_umac_get_sta_info { 1777 /** MAC address of the station */ 1778 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 1779 } __NRF_WIFI_PKD; 1780 1781 /** 1782 * @brief This structure defines the command to get station information. 1783 * 1784 */ 1785 1786 struct nrf_wifi_umac_cmd_get_sta { 1787 /** Header nrf_wifi_umac_hdr */ 1788 struct nrf_wifi_umac_hdr umac_hdr; 1789 /** Information regarding the station to get nrf_wifi_umac_get_sta_info */ 1790 struct nrf_wifi_umac_get_sta_info info; 1791 } __NRF_WIFI_PKD; 1792 1793 #define NRF_WIFI_EXT_CAPABILITY_MAX_LEN 32 1794 1795 /** 1796 * @brief Extended capability information. 1797 */ 1798 1799 struct nrf_wifi_ext_capability { 1800 /** length */ 1801 unsigned int ext_capability_len; 1802 /** Extended capability info*/ 1803 unsigned char ext_capability[NRF_WIFI_EXT_CAPABILITY_MAX_LEN]; 1804 1805 } __NRF_WIFI_PKD; 1806 1807 #define NRF_WIFI_SUPPORTED_CHANNELS_MAX_LEN 64 1808 1809 /** 1810 * @brief Supported channels. 1811 */ 1812 1813 struct nrf_wifi_supported_channels { 1814 /** number of channels */ 1815 unsigned int supported_channels_len; 1816 /** channels info */ 1817 unsigned char supported_channels[NRF_WIFI_SUPPORTED_CHANNELS_MAX_LEN]; 1818 1819 } __NRF_WIFI_PKD; 1820 1821 #define NRF_WIFI_OPER_CLASSES_MAX_LEN 64 1822 1823 /** 1824 * @brief Operating classes information. 1825 */ 1826 struct nrf_wifi_supported_oper_classes { 1827 /** length */ 1828 unsigned int supported_oper_classes_len; 1829 /** oper_class info*/ 1830 unsigned char supported_oper_classes[NRF_WIFI_OPER_CLASSES_MAX_LEN]; 1831 1832 } __NRF_WIFI_PKD; 1833 1834 #define NRF_WIFI_STA_FLAGS2_MAX_LEN 64 1835 1836 /** 1837 * @brief Station flags. 1838 */ 1839 1840 struct nrf_wifi_sta_flags2 { 1841 /** length */ 1842 unsigned int sta_flags2_len; 1843 /** flags */ 1844 unsigned char sta_flags2[NRF_WIFI_STA_FLAGS2_MAX_LEN]; 1845 1846 } __NRF_WIFI_PKD; 1847 1848 #define NRF_WIFI_CMD_SET_STATION_SUPP_RATES_VALID (1 << 0) 1849 #define NRF_WIFI_CMD_SET_STATION_AID_VALID (1 << 1) 1850 #define NRF_WIFI_CMD_SET_STATION_PEER_AID_VALID (1 << 2) 1851 #define NRF_WIFI_CMD_SET_STATION_STA_CAPABILITY_VALID (1 << 3) 1852 #define NRF_WIFI_CMD_SET_STATION_EXT_CAPABILITY_VALID (1 << 4) 1853 #define NRF_WIFI_CMD_SET_STATION_STA_VLAN_VALID (1 << 5) 1854 #define NRF_WIFI_CMD_SET_STATION_HT_CAPABILITY_VALID (1 << 6) 1855 #define NRF_WIFI_CMD_SET_STATION_VHT_CAPABILITY_VALID (1 << 7) 1856 #define NRF_WIFI_CMD_SET_STATION_OPMODE_NOTIF_VALID (1 << 9) 1857 #define NRF_WIFI_CMD_SET_STATION_SUPPORTED_CHANNELS_VALID (1 << 10) 1858 #define NRF_WIFI_CMD_SET_STATION_SUPPORTED_OPER_CLASSES_VALID (1 << 11) 1859 #define NRF_WIFI_CMD_SET_STATION_STA_FLAGS2_VALID (1 << 12) 1860 #define NRF_WIFI_CMD_SET_STATION_STA_WME_UAPSD_QUEUES_VALID (1 << 13) 1861 #define NRF_WIFI_CMD_SET_STATION_STA_WME_MAX_SP_VALID (1 << 14) 1862 #define NRF_WIFI_CMD_SET_STATION_LISTEN_INTERVAL_VALID (1 << 15) 1863 1864 /** 1865 * @brief This structure represents the information needed to update a station entry 1866 * in the RPU. 1867 * 1868 */ 1869 1870 struct nrf_wifi_umac_chg_sta_info { 1871 /** Listen interval as defined by IEEE 802.11 7.3.1.6 */ 1872 signed int nrf_wifi_listen_interval; 1873 /** Unused */ 1874 unsigned int sta_vlan; 1875 /** AID or zero for no change */ 1876 unsigned short aid; 1877 /** Unused */ 1878 unsigned short nrf_wifi_peer_aid; 1879 /** Station capability */ 1880 unsigned short sta_capability; 1881 /** Unused */ 1882 unsigned short spare; 1883 /** Supported rates in IEEE 802.11 format nrf_wifi_supp_rates */ 1884 struct nrf_wifi_supp_rates supp_rates; 1885 /** Extended capabilities of the station nrf_wifi_ext_capability */ 1886 struct nrf_wifi_ext_capability ext_capability; 1887 /** Supported channels in IEEE 802.11 format nrf_wifi_supported_channels */ 1888 struct nrf_wifi_supported_channels supported_channels; 1889 /** Supported oper classes in IEEE 802.11 format nrf_wifi_supported_oper_classes */ 1890 struct nrf_wifi_supported_oper_classes supported_oper_classes; 1891 /** station flags mask/set nrf_wifi_sta_flag_update nrf_wifi_sta_flag_update */ 1892 struct nrf_wifi_sta_flag_update sta_flags2; 1893 /** HT capabilities of station */ 1894 unsigned char ht_capability[NRF_WIFI_HT_VHT_CAPABILITY_MAX_SIZE]; 1895 /** VHT capabilities of station */ 1896 unsigned char vht_capability[NRF_WIFI_HT_VHT_CAPABILITY_MAX_SIZE]; 1897 /** Station mac address */ 1898 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 1899 /** Information if operating mode field is used */ 1900 unsigned char opmode_notif; 1901 /** Bitmap of queues configured for uapsd. Same format 1902 * as the AC bitmap in the QoS info field. 1903 */ 1904 unsigned char wme_uapsd_queues; 1905 /** Max Service Period. same format as the MAX_SP in the 1906 * QoS info field (but already shifted down). 1907 */ 1908 unsigned char wme_max_sp; 1909 } __NRF_WIFI_PKD; 1910 1911 /** 1912 * @brief This structure defines the command for updating the parameters of a station entry. 1913 * 1914 */ 1915 1916 struct nrf_wifi_umac_cmd_chg_sta { 1917 /** Header nrf_wifi_umac_hdr */ 1918 struct nrf_wifi_umac_hdr umac_hdr; 1919 /** Indicate which of the following parameters are valid */ 1920 unsigned int valid_fields; 1921 /** nrf_wifi_umac_chg_sta_info */ 1922 struct nrf_wifi_umac_chg_sta_info info; 1923 } __NRF_WIFI_PKD; 1924 1925 #define NRF_WIFI_CMD_NEW_STATION_SUPP_RATES_VALID (1 << 0) 1926 #define NRF_WIFI_CMD_NEW_STATION_AID_VALID (1 << 1) 1927 #define NRF_WIFI_CMD_NEW_STATION_PEER_AID_VALID (1 << 2) 1928 #define NRF_WIFI_CMD_NEW_STATION_STA_CAPABILITY_VALID (1 << 3) 1929 #define NRF_WIFI_CMD_NEW_STATION_EXT_CAPABILITY_VALID (1 << 4) 1930 #define NRF_WIFI_CMD_NEW_STATION_STA_VLAN_VALID (1 << 5) 1931 #define NRF_WIFI_CMD_NEW_STATION_HT_CAPABILITY_VALID (1 << 6) 1932 #define NRF_WIFI_CMD_NEW_STATION_VHT_CAPABILITY_VALID (1 << 7) 1933 #define NRF_WIFI_CMD_NEW_STATION_OPMODE_NOTIF_VALID (1 << 9) 1934 #define NRF_WIFI_CMD_NEW_STATION_SUPPORTED_CHANNELS_VALID (1 << 10) 1935 #define NRF_WIFI_CMD_NEW_STATION_SUPPORTED_OPER_CLASSES_VALID (1 << 11) 1936 #define NRF_WIFI_CMD_NEW_STATION_STA_FLAGS2_VALID (1 << 12) 1937 #define NRF_WIFI_CMD_NEW_STATION_STA_WME_UAPSD_QUEUES_VALID (1 << 13) 1938 #define NRF_WIFI_CMD_NEW_STATION_STA_WME_MAX_SP_VALID (1 << 14) 1939 #define NRF_WIFI_CMD_NEW_STATION_LISTEN_INTERVAL_VALID (1 << 15) 1940 1941 /** 1942 * @brief This structure describes the parameters for adding a new station entry to the RPU. 1943 * 1944 */ 1945 1946 struct nrf_wifi_umac_add_sta_info { 1947 /** Listen interval as defined by IEEE 802.11 7.3.1.6 */ 1948 signed int nrf_wifi_listen_interval; 1949 /** Unused */ 1950 unsigned int sta_vlan; 1951 /** AID or zero for no change */ 1952 unsigned short aid; 1953 /** Unused */ 1954 unsigned short nrf_wifi_peer_aid; 1955 /** Station capability */ 1956 unsigned short sta_capability; 1957 /** Unused */ 1958 unsigned short spare; 1959 /** Supported rates in IEEE 802.11 format nrf_wifi_supp_rates */ 1960 struct nrf_wifi_supp_rates supp_rates; 1961 /** Extended capabilities of the station nrf_wifi_ext_capability */ 1962 struct nrf_wifi_ext_capability ext_capability; 1963 /** Supported channels in IEEE 802.11 format nrf_wifi_supported_channels */ 1964 struct nrf_wifi_supported_channels supported_channels; 1965 /** Supported oper classes in IEEE 802.11 format nrf_wifi_supported_oper_classes */ 1966 struct nrf_wifi_supported_oper_classes supported_oper_classes; 1967 /** station flags mask/set nrf_wifi_sta_flag_update */ 1968 struct nrf_wifi_sta_flag_update sta_flags2; 1969 /** HT capabilities of station */ 1970 unsigned char ht_capability[NRF_WIFI_HT_VHT_CAPABILITY_MAX_SIZE]; 1971 /** VHT capabilities of station */ 1972 unsigned char vht_capability[NRF_WIFI_HT_VHT_CAPABILITY_MAX_SIZE]; 1973 /** Station mac address */ 1974 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 1975 /** Information if operating mode field is used */ 1976 unsigned char opmode_notif; 1977 /** Bitmap of queues configured for uapsd. same format 1978 * as the AC bitmap in the QoS info field. 1979 */ 1980 unsigned char wme_uapsd_queues; 1981 /** Max Service Period. same format as the MAX_SP in the 1982 * QoS info field (but already shifted down). 1983 */ 1984 unsigned char wme_max_sp; 1985 } __NRF_WIFI_PKD; 1986 1987 /** 1988 * @brief This structure defines the command for adding a new station entry. 1989 * 1990 */ 1991 1992 struct nrf_wifi_umac_cmd_add_sta { 1993 /** Header nrf_wifi_umac_hdr */ 1994 struct nrf_wifi_umac_hdr umac_hdr; 1995 /** Indicate which of the following parameters are valid */ 1996 unsigned int valid_fields; 1997 /** nrf_wifi_umac_add_sta_info */ 1998 struct nrf_wifi_umac_add_sta_info info; 1999 } __NRF_WIFI_PKD; 2000 2001 #define NRF_WIFI_CMD_BEACON_INFO_BEACON_INTERVAL_VALID (1 << 0) 2002 #define NRF_WIFI_CMD_BEACON_INFO_AUTH_TYPE_VALID (1 << 1) 2003 #define NRF_WIFI_CMD_BEACON_INFO_VERSIONS_VALID (1 << 2) 2004 #define NRF_WIFI_CMD_BEACON_INFO_CIPHER_SUITE_GROUP_VALID (1 << 3) 2005 #define NRF_WIFI_CMD_BEACON_INFO_INACTIVITY_TIMEOUT_VALID (1 << 4) 2006 #define NRF_WIFI_CMD_BEACON_INFO_FREQ_PARAMS_VALID (1 << 5) 2007 2008 #define NRF_WIFI_CMD_BEACON_INFO_PRIVACY (1 << 0) 2009 #define NRF_WIFI_CMD_BEACON_INFO_CONTROL_PORT_NO_ENCRYPT (1 << 1) 2010 #define NRF_WIFI_CMD_BEACON_INFO_P2P_CTWINDOW_VALID (1 << 6) 2011 #define NRF_WIFI_CMD_BEACON_INFO_P2P_OPPPS_VALID (1 << 7) 2012 2013 /** 2014 * @brief This structure describes the parameters required to be passed to the RPU when 2015 * initiating a SoftAP (Soft Access Point). 2016 * 2017 */ 2018 2019 struct nrf_wifi_umac_start_ap_info { 2020 /** Beacon frame interval */ 2021 unsigned short beacon_interval; 2022 /** DTIM count */ 2023 unsigned char dtim_period; 2024 /** Send beacons with wildcard sssid */ 2025 signed int hidden_ssid; 2026 /** Authentication type, see &enum nrf_wifi_auth_type */ 2027 signed int auth_type; 2028 /** Unused */ 2029 signed int smps_mode; 2030 /** Beacon info flags */ 2031 unsigned int nrf_wifi_flags; 2032 /** Beacon frame, nrf_wifi_beacon_data */ 2033 struct nrf_wifi_beacon_data beacon_data; 2034 /** SSID string, nrf_wifi_ssid */ 2035 struct nrf_wifi_ssid ssid; 2036 /** Connect params, nrf_wifi_connect_common_info */ 2037 struct nrf_wifi_connect_common_info connect_common_info; 2038 /** Channel info, see &struct freq_params */ 2039 struct freq_params freq_params; 2040 /** Time to stop ap after inactivity period */ 2041 unsigned short inactivity_timeout; 2042 /** P2P GO Client Traffic Window */ 2043 unsigned char p2p_go_ctwindow; 2044 /** Opportunistic power save allows P2P Group Owner to save power 2045 * when all its associated clients are sleeping. 2046 */ 2047 unsigned char p2p_opp_ps; 2048 } __NRF_WIFI_PKD; 2049 2050 /** 2051 * @brief This structure defines the command for starting the SoftAP using 2052 * NRF_WIFI_UMAC_CMD_NEW_BEACON and NRF_WIFI_UMAC_CMD_START_AP. 2053 * 2054 */ 2055 2056 struct nrf_wifi_umac_cmd_start_ap { 2057 /** Header nrf_wifi_umac_hdr */ 2058 struct nrf_wifi_umac_hdr umac_hdr; 2059 /** Indicate which of the following parameters are valid */ 2060 unsigned int valid_fields; 2061 /** Parameters that need to be passed to the RPU when starting a SoftAP. 2062 * nrf_wifi_umac_start_ap_info 2063 */ 2064 struct nrf_wifi_umac_start_ap_info info; 2065 } __NRF_WIFI_PKD; 2066 2067 /** 2068 * @brief This structure defines the command used to stop Soft AP operation. 2069 * 2070 */ 2071 2072 struct nrf_wifi_umac_cmd_stop_ap { 2073 /** Header nrf_wifi_umac_hdr */ 2074 struct nrf_wifi_umac_hdr umac_hdr; 2075 } __NRF_WIFI_PKD; 2076 2077 /** 2078 * @brief This structure represents the parameters that must be passed to the RPU when 2079 * configuring Beacon and Probe response data. 2080 * 2081 */ 2082 2083 struct nrf_wifi_umac_set_beacon_info { 2084 /** Beacon frame, nrf_wifi_beacon_data */ 2085 struct nrf_wifi_beacon_data beacon_data; 2086 } __NRF_WIFI_PKD; 2087 2088 /** 2089 * @brief This structure defines the command for setting the beacon data using 2090 * NRF_WIFI_UMAC_CMD_SET_BEACON. 2091 * 2092 */ 2093 2094 struct nrf_wifi_umac_cmd_set_beacon { 2095 /** Header nrf_wifi_umac_hdr */ 2096 struct nrf_wifi_umac_hdr umac_hdr; 2097 /** nrf_wifi_umac_set_beacon_info */ 2098 struct nrf_wifi_umac_set_beacon_info info; 2099 } __NRF_WIFI_PKD; 2100 2101 #define NRF_WIFI_SET_INTERFACE_IFTYPE_VALID (1 << 0) 2102 #define NRF_WIFI_SET_INTERFACE_USE_4ADDR_VALID (1 << 1) 2103 2104 /** 2105 * @brief This structure contains the information that needs to be provided to the RPU 2106 * when modifying the attributes of a virtual interface. 2107 * 2108 */ 2109 2110 struct nrf_wifi_umac_chg_vif_attr_info { 2111 /** Interface type, see &enum nrf_wifi_iftype */ 2112 signed int iftype; 2113 /** Unused */ 2114 signed int nrf_wifi_use_4addr; 2115 } __NRF_WIFI_PKD; 2116 2117 /** 2118 * @brief This structure defines the command used to change the interface. 2119 * 2120 */ 2121 2122 struct nrf_wifi_umac_cmd_chg_vif_attr { 2123 /** Header nrf_wifi_umac_hdr */ 2124 struct nrf_wifi_umac_hdr umac_hdr; 2125 /** Indicate which of the following parameters are valid */ 2126 unsigned int valid_fields; 2127 /** Interface attributes to be changed nrf_wifi_umac_chg_vif_attr_info */ 2128 struct nrf_wifi_umac_chg_vif_attr_info info; 2129 } __NRF_WIFI_PKD; 2130 2131 #define IFACENAMSIZ 16 2132 2133 /** 2134 * @brief This structure contains the information that needs to be passed to the RPU 2135 * when changing the interface state, specifically when bringing it up or down 2136 * 2137 */ 2138 2139 struct nrf_wifi_umac_chg_vif_state_info { 2140 /** Interface state (1 = UP / 0 = DOWN) */ 2141 signed int state; 2142 /** Interface index */ 2143 signed char if_index; 2144 } __NRF_WIFI_PKD; 2145 2146 /** 2147 * @brief This structure defines the command used to change the interface state. 2148 * 2149 */ 2150 2151 struct nrf_wifi_umac_cmd_chg_vif_state { 2152 /** Header nrf_wifi_umac_hdr */ 2153 struct nrf_wifi_umac_hdr umac_hdr; 2154 /** nrf_wifi_umac_chg_vif_state_info */ 2155 struct nrf_wifi_umac_chg_vif_state_info info; 2156 } __NRF_WIFI_PKD; 2157 /** 2158 * @brief This structure defines an event-to-command mapping for NRF_WIFI_UMAC_CMD_SET_IFFLAGS. 2159 * 2160 */ 2161 2162 struct nrf_wifi_umac_event_vif_state { 2163 /** Header nrf_wifi_umac_hdr */ 2164 struct nrf_wifi_umac_hdr umac_hdr; 2165 /** Status to command NRF_WIFI_UMAC_CMD_SET_IFFLAGS */ 2166 signed int status; 2167 } __NRF_WIFI_PKD; 2168 2169 /** 2170 * @brief This structure defines the command used to start P2P (Peer-to-Peer) mode on an interface. 2171 */ 2172 2173 struct nrf_wifi_cmd_start_p2p { 2174 /** Header nrf_wifi_umac_hdr */ 2175 struct nrf_wifi_umac_hdr umac_hdr; 2176 } __NRF_WIFI_PKD; 2177 2178 /** 2179 * @brief This structure represents the command for stopping P2P mode on an interface. 2180 * 2181 */ 2182 2183 struct nrf_wifi_umac_cmd_stop_p2p_dev { 2184 /** Header nrf_wifi_umac_hdr */ 2185 struct nrf_wifi_umac_hdr umac_hdr; 2186 } __NRF_WIFI_PKD; 2187 2188 #define NRF_WIFI_CMD_FRAME_FREQ_VALID (1 << 0) 2189 #define NRF_WIFI_CMD_FRAME_DURATION_VALID (1 << 1) 2190 #define NRF_WIFI_CMD_SET_FRAME_FREQ_PARAMS_VALID (1 << 2) 2191 2192 #define NRF_WIFI_CMD_FRAME_OFFCHANNEL_TX_OK (1 << 0) 2193 #define NRF_WIFI_CMD_FRAME_TX_NO_CCK_RATE (1 << 1) 2194 #define NRF_WIFI_CMD_FRAME_DONT_WAIT_FOR_ACK (1 << 2) 2195 2196 /** 2197 * @brief This structure describes the parameters required to transmit a 2198 * management frame from the host. 2199 * 2200 */ 2201 2202 struct nrf_wifi_umac_mgmt_tx_info { 2203 /** OFFCHANNEL_TX_OK, NO_CCK_RATE, DONT_WAIT_FOR_ACK */ 2204 unsigned int nrf_wifi_flags; 2205 /** Channel frequency */ 2206 unsigned int frequency; 2207 /** Duration field value */ 2208 unsigned int dur; 2209 /** Management frame to transmit, nrf_wifi_frame */ 2210 struct nrf_wifi_frame frame; 2211 /** Frequency configuration, see &struct freq_params */ 2212 struct freq_params freq_params; 2213 /** Identifier to be used for processing event, 2214 * NRF_WIFI_UMAC_EVENT_FRAME_TX_STATUS. 2215 */ 2216 unsigned long long host_cookie; 2217 } __NRF_WIFI_PKD; 2218 2219 /** 2220 * @brief This structure defines the command used to transmit a management frame. 2221 * 2222 */ 2223 2224 struct nrf_wifi_umac_cmd_mgmt_tx { 2225 /** Header nrf_wifi_umac_hdr */ 2226 struct nrf_wifi_umac_hdr umac_hdr; 2227 /** Indicate which of the following parameters are valid */ 2228 unsigned int valid_fields; 2229 /** Information about the management frame to be transmitted. 2230 * nrf_wifi_umac_mgmt_tx_info 2231 */ 2232 struct nrf_wifi_umac_mgmt_tx_info info; 2233 } __NRF_WIFI_PKD; 2234 2235 /** 2236 * @brief This structure represents the information regarding the power save state. 2237 * 2238 */ 2239 2240 struct nrf_wifi_umac_set_power_save_info { 2241 /** power save is disabled or enabled, see enum nrf_wifi_ps_state */ 2242 signed int ps_state; 2243 } __NRF_WIFI_PKD; 2244 2245 /** 2246 * @brief This structure represents the command used to enable or disable the power save 2247 * functionality. 2248 * 2249 */ 2250 2251 struct nrf_wifi_umac_cmd_set_power_save { 2252 /** Header nrf_wifi_umac_hdr */ 2253 struct nrf_wifi_umac_hdr umac_hdr; 2254 /** Power save setting parameters. 2255 * nrf_wifi_umac_set_power_save_info 2256 */ 2257 struct nrf_wifi_umac_set_power_save_info info; 2258 } __NRF_WIFI_PKD; 2259 2260 /** 2261 * @brief This structure represents the command to configure power save timeout value. 2262 * 2263 */ 2264 2265 struct nrf_wifi_umac_cmd_set_power_save_timeout { 2266 /** Header nrf_wifi_umac_hdr */ 2267 struct nrf_wifi_umac_hdr umac_hdr; 2268 /** Timeout value in milli seconds 2269 * if timeout < 0 RPU will set timeout to 100ms 2270 */ 2271 signed int timeout; 2272 } __NRF_WIFI_PKD; 2273 2274 /** 2275 * @brief This structure represents the information of qos_map. 2276 * 2277 */ 2278 2279 struct nrf_wifi_umac_qos_map_info { 2280 /** length of qos_map info field */ 2281 unsigned int qos_map_info_len; 2282 /** contains qos_map info as received from stack */ 2283 unsigned char qos_map_info[256]; 2284 } __NRF_WIFI_PKD; 2285 2286 /** 2287 * @brief This structure represents the information related to the Quality of Service (QoS) map. 2288 * 2289 */ 2290 2291 struct nrf_wifi_umac_cmd_set_qos_map { 2292 /** Header nrf_wifi_umac_hdr */ 2293 struct nrf_wifi_umac_hdr umac_hdr; 2294 /** qos map info. nrf_wifi_umac_qos_map_info */ 2295 struct nrf_wifi_umac_qos_map_info info; 2296 } __NRF_WIFI_PKD; 2297 2298 /** 2299 * @brief This structure defines the command used to retrieve the transmit power information. 2300 * 2301 */ 2302 2303 struct nrf_wifi_umac_cmd_get_tx_power { 2304 /** Header nrf_wifi_umac_hdr */ 2305 struct nrf_wifi_umac_hdr umac_hdr; 2306 } __NRF_WIFI_PKD; 2307 2308 /** 2309 * @brief This structure defines the command used to obtain the regulatory domain information. 2310 * 2311 */ 2312 2313 struct nrf_wifi_umac_cmd_get_reg { 2314 /** Header nrf_wifi_umac_hdr */ 2315 struct nrf_wifi_umac_hdr umac_hdr; 2316 } __NRF_WIFI_PKD; 2317 2318 /** 2319 * @brief This structure defines the command used to retrieve channel information. 2320 * 2321 */ 2322 2323 struct nrf_wifi_umac_cmd_get_channel { 2324 /** Header nrf_wifi_umac_hdr */ 2325 struct nrf_wifi_umac_hdr umac_hdr; 2326 } __NRF_WIFI_PKD; 2327 2328 #define NRF_WIFI_TWT_NEGOTIATION_TYPE_INDIVIDUAL 0 2329 #define NRF_WIFI_TWT_NEGOTIATION_TYPE_BROADCAST 2 2330 2331 /** 2332 * @brief TWT setup commands and events. 2333 * 2334 */ 2335 2336 enum nrf_wifi_twt_setup_cmd_type { 2337 /** STA requests to join a TWT without specifying a target wake time */ 2338 NRF_WIFI_REQUEST_TWT, 2339 /** STA requests to join a TWT with specifying a target wake time and 2340 * other params, these values can change during negotiation. 2341 */ 2342 NRF_WIFI_SUGGEST_TWT, 2343 /** requests to join a TWT with demanded a target wake time 2344 * and other params. STA rejects if AP not scheduling those params. 2345 */ 2346 NRF_WIFI_DEMAND_TWT, 2347 /** Response to the STA request(suggest/demand), these may be different params */ 2348 NRF_WIFI_GROUPING_TWT, 2349 /** AP accept the STA requested params */ 2350 NRF_WIFI_ACCEPT_TWT, 2351 /** AP may suggest the params, these may be different from STA requested */ 2352 NRF_WIFI_ALTERNATE_TWT, 2353 /** AP may suggest the params, these may be different from STA requested */ 2354 NRF_WIFI_DICTATE_TWT, 2355 /** AP may reject the STA requested params */ 2356 NRF_WIFI_REJECT_TWT, 2357 }; 2358 2359 #define NRF_WIFI_TWT_FLOW_TYPE_ANNOUNCED 0 2360 #define NRF_WIFI_TWT_FLOW_TYPE_UNANNOUNCED 1 2361 2362 #define NRF_WIFI_TWT_RESP_RECEIVED 0 2363 #define NRF_WIFI_TWT_RESP_NOT_RECEIVED 1 2364 #define NRF_WIFI_INVALID_TWT_WAKE_INTERVAL 3 2365 2366 /** 2367 * @brief This structure describes the TWT information. 2368 * 2369 */ 2370 2371 struct nrf_wifi_umac_config_twt_info { 2372 /** TWT flow Id */ 2373 unsigned char twt_flow_id; 2374 /** Negotiation type 2375 * NRF_WIFI_TWT_NEGOTIATION_TYPE_INDIVIDUAL or 2376 * NRF_WIFI_TWT_NEGOTIATION_TYPE_BROADAST 2377 */ 2378 unsigned char neg_type; 2379 /** see &enum nrf_wifi_twt_setup_cmd_type */ 2380 signed int setup_cmd; 2381 /** indicating AP to initiate a trigger frame (ps_poll/Null) before data transfer */ 2382 unsigned char ap_trigger_frame; 2383 /** 1->implicit(same negotiated values to be used), 2384 * 0->AP sends new calculated TWT values for every service period. 2385 */ 2386 unsigned char is_implicit; 2387 /** Whether STA has to send the PS-Poll/Null frame 2388 * indicating that it's in wake period(NRF_WIFI_TWT_FLOW_TYPE_ANNOUNCED) 2389 */ 2390 unsigned char twt_flow_type; 2391 /** wake interval exponent value */ 2392 unsigned char twt_target_wake_interval_exponent; 2393 /** wake interval mantissa value */ 2394 unsigned short twt_target_wake_interval_mantissa; 2395 /** start of the waketime value after successful TWT negotiation */ 2396 unsigned long long target_wake_time; 2397 /** min TWT wake duration */ 2398 unsigned int nominal_min_twt_wake_duration; 2399 /** dialog_token of twt frame */ 2400 unsigned char dialog_token; 2401 /** 0->not received 1->received */ 2402 unsigned char twt_resp_status; 2403 /** TWT early wake duration */ 2404 unsigned int twt_wake_ahead_duration; 2405 } __NRF_WIFI_PKD; 2406 2407 /** 2408 * @brief This structure defines the parameters required for setting up TWT session. 2409 * 2410 */ 2411 2412 struct nrf_wifi_umac_cmd_config_twt { 2413 /** Header nrf_wifi_umac_hdr */ 2414 struct nrf_wifi_umac_hdr umac_hdr; 2415 /** TWT configuration info nrf_wifi_umac_config_twt_info */ 2416 struct nrf_wifi_umac_config_twt_info info; 2417 } __NRF_WIFI_PKD; 2418 2419 #define INVALID_TIME 1 2420 #define TRIGGER_NOT_RECEIVED 2 2421 2422 /** 2423 * @brief This structure represents the TWT delete information. 2424 * 2425 */ 2426 2427 struct nrf_wifi_umac_teardown_twt_info { 2428 /** TWT flow Id */ 2429 unsigned char twt_flow_id; 2430 /** reason for teardown */ 2431 unsigned char reason_code; 2432 } __NRF_WIFI_PKD; 2433 2434 /** 2435 * @brief This structure defines the command used to delete or remove a TWT session 2436 * 2437 */ 2438 2439 struct nrf_wifi_umac_cmd_teardown_twt { 2440 /** Header nrf_wifi_umac_hdr */ 2441 struct nrf_wifi_umac_hdr umac_hdr; 2442 /** nrf_wifi_umac_teardown_twt_info */ 2443 struct nrf_wifi_umac_teardown_twt_info info; 2444 } __NRF_WIFI_PKD; 2445 2446 #define TWT_BLOCK_TX 0 2447 #define TWT_UNBLOCK_TX 1 2448 /** 2449 * @brief This structure represents the information related to Tx (transmit) block/unblock. 2450 * 2451 */ 2452 struct twt_sleep_info { 2453 /** value for blocking/unblocking TX 2454 * (TWT_BLOCK_TX or TWT_UNBLOCK_TX) 2455 */ 2456 unsigned int type; 2457 } __NRF_WIFI_PKD; 2458 2459 /** 2460 * @brief This structure defines an event used to indicate to the host whether to block or 2461 * unblock Tx (transmit) packets in TWT communication. 2462 * 2463 */ 2464 2465 struct nrf_wifi_umac_event_twt_sleep { 2466 /** Header nrf_wifi_umac_hdr */ 2467 struct nrf_wifi_umac_hdr umac_hdr; 2468 /** twt_sleep_info */ 2469 struct twt_sleep_info info; 2470 } __NRF_WIFI_PKD; 2471 2472 #define UAPSD_Q_MIN 0 2473 #define UAPSD_Q_MAX 15 2474 /** 2475 * @brief This structure represents the information about UAPSD queues. 2476 * 2477 */ 2478 2479 struct nrf_wifi_umac_uapsd_info { 2480 /** UAPSD-Q value */ 2481 unsigned int uapsd_queue; 2482 } __NRF_WIFI_PKD; 2483 2484 /** 2485 * @brief This structure defines the command used to configure the UAPSD-Q value. 2486 * 2487 */ 2488 2489 struct nrf_wifi_umac_cmd_config_uapsd { 2490 /** Header nrf_wifi_umac_hdr */ 2491 struct nrf_wifi_umac_hdr umac_hdr; 2492 /** nrf_wifi_umac_uapsd_info */ 2493 struct nrf_wifi_umac_uapsd_info info; 2494 } __NRF_WIFI_PKD; 2495 2496 /** 2497 * @brief This structure represents the event used to indicate that a scan has started. 2498 * 2499 */ 2500 2501 struct nrf_wifi_umac_event_trigger_scan { 2502 /** Header nrf_wifi_umac_hdr */ 2503 struct nrf_wifi_umac_hdr umac_hdr; 2504 /** Indicate which of the following parameters are valid */ 2505 unsigned int valid_fields; 2506 /** Scan request control flags (u32). Bit values 2507 * (NRF_WIFI_SCAN_FLAG_LOW_PRIORITY/NRF_WIFI_SCAN_FLAG_RANDOM_ADDR...) 2508 */ 2509 unsigned int nrf_wifi_scan_flags; 2510 /** No.of ssids in scan request */ 2511 unsigned char num_scan_ssid; 2512 /** No.of frequencies in scan request */ 2513 unsigned char num_scan_frequencies; 2514 /** center frequencies */ 2515 unsigned short scan_frequencies[NRF_WIFI_SCAN_MAX_NUM_FREQUENCIES]; 2516 /** nrf_wifi_ssid */ 2517 struct nrf_wifi_ssid scan_ssid[NRF_WIFI_SCAN_MAX_NUM_SSIDS]; 2518 /** nrf_wifi_ie */ 2519 struct nrf_wifi_ie ie; 2520 } __NRF_WIFI_PKD; 2521 2522 #define NRF_WIFI_EVENT_NEW_SCAN_RESULTS_MAC_ADDR_VALID (1 << 0) 2523 #define NRF_WIFI_EVENT_NEW_SCAN_RESULTS_IES_TSF_VALID (1 << 1) 2524 #define NRF_WIFI_EVENT_NEW_SCAN_RESULTS_IES_VALID (1 << 2) 2525 #define NRF_WIFI_EVENT_NEW_SCAN_RESULTS_BEACON_IES_TSF_VALID (1 << 3) 2526 #define NRF_WIFI_EVENT_NEW_SCAN_RESULTS_BEACON_IES_VALID (1 << 4) 2527 #define NRF_WIFI_EVENT_NEW_SCAN_RESULTS_BEACON_INTERVAL_VALID (1 << 5) 2528 #define NRF_WIFI_EVENT_NEW_SCAN_RESULTS_SIGNAL_VALID (1 << 6) 2529 #define NRF_WIFI_EVENT_NEW_SCAN_RESULTS_STATUS_VALID (1 << 7) 2530 #define NRF_WIFI_EVENT_NEW_SCAN_RESULTS_BSS_PRESP_DATA (1 << 8) 2531 2532 #define NRF_WIFI_NEW_SCAN_RESULTS_BSS_PRESP_DATA (1 << 0) 2533 2534 /** 2535 * @brief This structure serves as a response to the command NRF_WIFI_UMAC_CMD_GET_SCAN_RESULTS. 2536 * It contains scan results for each entry. RPU sends multiple events of this type for every 2537 * scan entry, and when umac_hdr->seq == 0, it indicates the last scan entry. 2538 * 2539 */ 2540 2541 struct nrf_wifi_umac_event_new_scan_results { 2542 /** Header nrf_wifi_umac_hdr */ 2543 struct nrf_wifi_umac_hdr umac_hdr; 2544 /** Indicate which of the following parameters are valid */ 2545 unsigned int valid_fields; 2546 /** Unused */ 2547 unsigned int generation; 2548 /** Frequency in MHz */ 2549 unsigned int frequency; 2550 /** Channel width of the control channel */ 2551 unsigned int chan_width; 2552 /** Age of this BSS entry in ms */ 2553 unsigned int seen_ms_ago; 2554 /** Unused */ 2555 unsigned int nrf_wifi_flags; 2556 /** Status, if this BSS is "used" */ 2557 signed int status; 2558 /** TSF of the received probe response/beacon (u64) */ 2559 unsigned long long ies_tsf; 2560 /** TSF of the last received beacon 2561 * (not present if no beacon frame has been received yet). 2562 */ 2563 unsigned long long beacon_ies_tsf; 2564 /** Beacon interval of BSS */ 2565 unsigned short beacon_interval; 2566 /** Capability field */ 2567 unsigned short capability; 2568 /** Signal strength, nrf_wifi_signal */ 2569 struct nrf_wifi_signal signal; 2570 /** BSSID of the BSS (6 octets) */ 2571 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 2572 /** Indicates length of IE's present at the starting of ies[0] */ 2573 unsigned int ies_len; 2574 /** Indicates length of beacon_ies present after ies+ies_len */ 2575 unsigned int beacon_ies_len; 2576 /** contains raw information elements from the probe response/beacon. 2577 * If beacon_ies are not present then the IEs here are from a Probe Response 2578 * frame; otherwise they are from a Beacon frame. 2579 */ 2580 unsigned char ies[0]; 2581 } __NRF_WIFI_PKD; 2582 2583 #define NRF_WIFI_802_11A (1 << 0) 2584 #define NRF_WIFI_802_11B (1 << 1) 2585 #define NRF_WIFI_802_11G (1 << 2) 2586 #define NRF_WIFI_802_11N (1 << 3) 2587 #define NRF_WIFI_802_11AC (1 << 4) 2588 #define NRF_WIFI_802_11AX (1 << 5) 2589 2590 #define NRF_WIFI_MFP_REQUIRED (1 << 0) 2591 #define NRF_WIFI_MFP_CAPABLE (1 << 1) 2592 /** 2593 * @brief This structure represents the response for NRF_WIFI_UMAC_CMD_GET_SCAN_RESULTS. 2594 * It contains the displayed scan result. 2595 * 2596 */ 2597 2598 struct umac_display_results { 2599 /** Network SSID nrf_wifi_ssid */ 2600 struct nrf_wifi_ssid ssid; 2601 /** BSSID of the BSS (6 octets) */ 2602 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 2603 /** Network band of operation, refer &enum nrf_wifi_band */ 2604 signed int nwk_band; 2605 /** Network channel number */ 2606 unsigned int nwk_channel; 2607 /** Protocol type (NRF_WIFI_802_11A) */ 2608 unsigned char protocol_flags; 2609 /** Network security mode, refer &enum nrf_wifi_security_type */ 2610 signed int security_type; 2611 /** Beacon interval of the BSS */ 2612 unsigned short beacon_interval; 2613 /** Capability field */ 2614 unsigned short capability; 2615 /** Signal strength. Refer &struct nrf_wifi_signal */ 2616 struct nrf_wifi_signal signal; 2617 /** TWT support */ 2618 unsigned char twt_support; 2619 /** management frame protection NRF_WIFI_MFP_REQUIRED/NRF_WIFI_MFP_CAPABLE */ 2620 unsigned char mfp_flag; 2621 /** reserved */ 2622 unsigned char reserved3; 2623 /** reserved */ 2624 unsigned char reserved4; 2625 } __NRF_WIFI_PKD; 2626 2627 #define DISPLAY_BSS_TOHOST_PEREVNT 8 2628 2629 /** 2630 * @brief This structure serves as a response to the command NRF_WIFI_UMAC_CMD_GET_SCAN_RESULTS 2631 * of display scan type. It contains a maximum of DISPLAY_BSS_TOHOST_PEREVENT scan results 2632 * in each event. When umac_hdr->seq == 0, it indicates the last scan event. 2633 * 2634 */ 2635 2636 struct nrf_wifi_umac_event_new_scan_display_results { 2637 /** Header nrf_wifi_umac_hdr */ 2638 struct nrf_wifi_umac_hdr umac_hdr; 2639 /** Number of scan results in the current event */ 2640 unsigned char event_bss_count; 2641 /** Display scan results info umac_display_results */ 2642 struct umac_display_results display_results[DISPLAY_BSS_TOHOST_PEREVNT]; 2643 } __NRF_WIFI_PKD; 2644 2645 #define NRF_WIFI_EVENT_MLME_FRAME_VALID (1 << 0) 2646 #define NRF_WIFI_EVENT_MLME_MAC_ADDR_VALID (1 << 1) 2647 #define NRF_WIFI_EVENT_MLME_FREQ_VALID (1 << 2) 2648 #define NRF_WIFI_EVENT_MLME_COOKIE_VALID (1 << 3) 2649 #define NRF_WIFI_EVENT_MLME_RX_SIGNAL_DBM_VALID (1 << 4) 2650 #define NRF_WIFI_EVENT_MLME_WME_UAPSD_QUEUES_VALID (1 << 5) 2651 #define NRF_WIFI_EVENT_MLME_RXMGMT_FLAGS_VALID (1 << 6) 2652 #define NRF_WIFI_EVENT_MLME_IE_VALID (1 << 7) 2653 2654 #define NRF_WIFI_EVENT_MLME_TIMED_OUT (1 << 0) 2655 #define NRF_WIFI_EVENT_MLME_ACK (1 << 1) 2656 2657 /** 2658 * @brief This structure represent different responses received from the access point during 2659 * various stages of the connection process like Authentication Response and Association Response. 2660 * 2661 */ 2662 2663 struct nrf_wifi_umac_event_mlme { 2664 /** Header nrf_wifi_umac_hdr */ 2665 struct nrf_wifi_umac_hdr umac_hdr; 2666 /** Indicate which of the following parameters are valid */ 2667 unsigned int valid_fields; 2668 /** Frequency of the channel in MHz */ 2669 unsigned int frequency; 2670 /** Signal strength in dBm */ 2671 unsigned int rx_signal_dbm; 2672 /** Indicate whether the frame was acked or timed out */ 2673 unsigned int nrf_wifi_flags; 2674 /** cookie identifier */ 2675 unsigned long long cookie; 2676 /** Frame data, including frame header and body nrf_wifi_frame */ 2677 struct nrf_wifi_frame frame; 2678 /** BSSID of the BSS */ 2679 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 2680 /** Bitmap of uapsd queues */ 2681 unsigned char wme_uapsd_queues; 2682 /** Request(AUTH/ASSOC) ie length */ 2683 unsigned int req_ie_len; 2684 /** ie's */ 2685 unsigned char req_ie[0]; 2686 } __NRF_WIFI_PKD; 2687 2688 #define NRF_WIFI_CMD_SEND_STATION_ASSOC_REQ_IES_VALID (1 << 0) 2689 2690 /** 2691 * @brief This structure represents an event that is generated when a station is added or removed. 2692 * 2693 */ 2694 2695 struct nrf_wifi_umac_event_new_station { 2696 /** Header nrf_wifi_umac_hdr */ 2697 struct nrf_wifi_umac_hdr umac_hdr; 2698 /** Indicate if assoc_req ies is valid */ 2699 unsigned int valid_fields; 2700 /** set to 1: STA supports QoS/WME */ 2701 unsigned char wme; 2702 /** Set to 1 if STA is Legacy(a/b/g) */ 2703 unsigned char is_sta_legacy; 2704 /** Station mac address */ 2705 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 2706 /** generation number */ 2707 unsigned int generation; 2708 /** Station information nrf_wifi_sta_info */ 2709 struct nrf_wifi_sta_info sta_info; 2710 /** nrf_wifi_ie */ 2711 struct nrf_wifi_ie assoc_req_ies; 2712 2713 } __NRF_WIFI_PKD; 2714 2715 #define NRF_WIFI_CMD_COOKIE_RSP_COOKIE_VALID (1 << 0) 2716 #define NRF_WIFI_CMD_COOKIE_RSP_MAC_ADDR_VALID (1 << 1) 2717 2718 /** 2719 * @brief This structure specifies the cookie response event, which is used to receive an 2720 * RPU cookie associated with the host cookie passed during NRF_WIFI_UMAC_CMD_FRAME. 2721 * 2722 */ 2723 2724 struct nrf_wifi_umac_event_cookie_rsp { 2725 /** Header nrf_wifi_umac_hdr */ 2726 struct nrf_wifi_umac_hdr umac_hdr; 2727 /** Indicate if assoc_req ies is valid */ 2728 unsigned int valid_fields; 2729 /** Identifier passed during NRF_WIFI_UMAC_CMD_FRAME */ 2730 unsigned long long host_cookie; 2731 /** Cookie used to indicate TX done in NRF_WIFI_UMAC_EVENT_FRAME_TX_STATUS */ 2732 unsigned long long cookie; 2733 /** Mac address */ 2734 unsigned char mac_addr[NRF_WIFI_ETH_ADDR_LEN]; 2735 2736 } __NRF_WIFI_PKD; 2737 2738 /** 2739 * @brief This structure represents the event that corresponds to the command 2740 * NRF_WIFI_UMAC_CMD_GET_TX_POWER. It is used to retrieve the transmit power 2741 * information from the device 2742 * 2743 */ 2744 2745 struct nrf_wifi_umac_event_get_tx_power { 2746 /** Header nrf_wifi_umac_hdr */ 2747 struct nrf_wifi_umac_hdr umac_hdr; 2748 /** Tx power in dbm */ 2749 signed int txpwr_level; 2750 2751 } __NRF_WIFI_PKD; 2752 2753 /** 2754 * @brief This structure represents the response to the command NRF_WIFI_UMAC_CMD_SET_INTERFACE. 2755 * It contains the necessary information indicating the result or status of the interface 2756 * configuration operation after the command has been executed. 2757 * 2758 */ 2759 2760 struct nrf_wifi_umac_event_set_interface { 2761 /** Header nrf_wifi_umac_hdr */ 2762 struct nrf_wifi_umac_hdr umac_hdr; 2763 /** return value */ 2764 signed int return_value; 2765 } __NRF_WIFI_PKD; 2766 2767 /** 2768 * @brief channel flags. 2769 * 2770 * Channel flags set by the regulatory control code. 2771 * 2772 */ 2773 2774 enum nrf_wifi_channel_flags { 2775 /** This channel is disabled */ 2776 CHAN_DISABLED = 1<<0, 2777 /** do not initiate radiation, this includes sending probe requests or beaconing */ 2778 CHAN_NO_IR = 1<<1, 2779 /** Radar detection is required on this channel hole at 1<<2 */ 2780 CHAN_RADAR = 1<<3, 2781 /** extension channel above this channel is not permitted */ 2782 CHAN_NO_HT40PLUS = 1<<4, 2783 /** extension channel below this channel is not permitted */ 2784 CHAN_NO_HT40MINUS = 1<<5, 2785 /** OFDM is not allowed on this channel */ 2786 CHAN_NO_OFDM = 1<<6, 2787 /** If the driver supports 80 MHz on the band, 2788 * this flag indicates that an 80 MHz channel cannot use this 2789 * channel as the control or any of the secondary channels. 2790 * This may be due to the driver or due to regulatory bandwidth 2791 * restrictions. 2792 */ 2793 CHAN_NO_80MHZ = 1<<7, 2794 /** If the driver supports 160 MHz on the band, 2795 * this flag indicates that an 160 MHz channel cannot use this 2796 * channel as the control or any of the secondary channels. 2797 * This may be due to the driver or due to regulatory bandwidth 2798 * restrictions. 2799 */ 2800 CHAN_NO_160MHZ = 1<<8, 2801 /** NL80211_FREQUENCY_ATTR_INDOOR_ONLY */ 2802 CHAN_INDOOR_ONLY = 1<<9, 2803 /** NL80211_FREQUENCY_ATTR_GO_CONCURRENT */ 2804 CHAN_GO_CONCURRENT = 1<<10, 2805 /** 20 MHz bandwidth is not permitted on this channel */ 2806 CHAN_NO_20MHZ = 1<<11, 2807 /** 10 MHz bandwidth is not permitted on this channel */ 2808 CHAN_NO_10MHZ = 1<<12, 2809 }; 2810 2811 /** 2812 * @brief channel definition. 2813 * 2814 */ 2815 2816 struct nrf_wifi_chan_definition { 2817 /** Frequency of the selected channel in MHz */ 2818 struct nrf_wifi_channel chan; 2819 /** channel width */ 2820 signed int width; 2821 /** center frequency of first segment */ 2822 unsigned int center_frequency1; 2823 /** center frequency of second segment (only with 80+80 MHz) */ 2824 unsigned int center_frequency2; 2825 } __NRF_WIFI_PKD; 2826 2827 /** 2828 * @brief This structure represents channel information and serves as the event for the 2829 * command NRF_WIFI_UMAC_CMD_GET_CHANNEL. 2830 * 2831 */ 2832 struct nrf_wifi_umac_event_get_channel { 2833 /** Header nrf_wifi_umac_hdr */ 2834 struct nrf_wifi_umac_hdr umac_hdr; 2835 /** Channel information.nrf_wifi_chan_definition */ 2836 struct nrf_wifi_chan_definition chan_def; 2837 } __NRF_WIFI_PKD; 2838 2839 /** 2840 * @brief This structure represents the command used to retrieve connection information. 2841 * 2842 */ 2843 struct nrf_wifi_umac_cmd_conn_info { 2844 /** Header nrf_wifi_umac_hdr */ 2845 struct nrf_wifi_umac_hdr umac_hdr; 2846 } __NRF_WIFI_PKD; 2847 2848 enum link_mode { 2849 NRF_WIFI_MODE_11B = 1, 2850 NRF_WIFI_MODE_11A, 2851 NRF_WIFI_MODE_11G, 2852 NRF_WIFI_MODE_11N, 2853 NRF_WIFI_MODE_11AC, 2854 NRF_WIFI_MODE_11AX 2855 }; 2856 2857 /** 2858 * @brief This structure represents the information related to the connection of a station. 2859 * 2860 */ 2861 2862 struct nrf_wifi_umac_event_conn_info { 2863 /** Header nrf_wifi_umac_hdr */ 2864 struct nrf_wifi_umac_hdr umac_hdr; 2865 /** Beacon interval */ 2866 unsigned short beacon_interval; 2867 /** DTIM interval */ 2868 unsigned char dtim_interval; 2869 /** Station association state */ 2870 unsigned char associated; 2871 /** TWT supported or not */ 2872 unsigned char twt_capable; 2873 /** Refer &enum link_mode */ 2874 unsigned char linkmode; 2875 } __NRF_WIFI_PKD; 2876 2877 2878 /** 2879 * @brief This structure defines the command used to retrieve power save information. 2880 * 2881 */ 2882 struct nrf_wifi_umac_cmd_get_power_save_info { 2883 /** Header nrf_wifi_umac_hdr */ 2884 struct nrf_wifi_umac_hdr umac_hdr; 2885 } __NRF_WIFI_PKD; 2886 2887 /** 2888 * @brief This structure defines the command used to set the listen interval period. 2889 * It determines how frequently a device wakes up to check for any pending data or traffic 2890 * from the access point. By setting the listen interval, devices can adjust their power-saving 2891 * behavior to balance power efficiency and responsiveness to incoming data. 2892 * 2893 */ 2894 struct nrf_wifi_umac_cmd_set_listen_interval { 2895 /** Header nrf_wifi_umac_hdr */ 2896 struct nrf_wifi_umac_hdr umac_hdr; 2897 /** listen interval */ 2898 unsigned short listen_interval; 2899 } __NRF_WIFI_PKD; 2900 2901 /** 2902 * @brief This structure represents the command used to enable or disable extended power save mode. 2903 * When enabled, the RPU wakes up based on the listen interval, allowing the device to spend more 2904 * time in a lower power state. When disabled, the RPU wakes up based on the DTIM period, which 2905 * may require more frequent wake-ups but can provide better responsiveness for receiving 2906 * multicast/broadcast traffic. 2907 * 2908 */ 2909 struct nrf_wifi_umac_cmd_config_extended_ps { 2910 /** Header nrf_wifi_umac_hdr */ 2911 struct nrf_wifi_umac_hdr umac_hdr; 2912 /** 1=enable 0=disable */ 2913 unsigned char enable_extended_ps; 2914 } __NRF_WIFI_PKD; 2915 2916 #define NRF_WIFI_MAX_TWT_FLOWS 8 2917 #define NRF_WIFI_PS_MODE_LEGACY 0 2918 #define NRF_WIFI_PS_MODE_WMM 1 2919 2920 /** 2921 * @brief Given that most APs typically use a DTIM value of 3, 2922 * we anticipate a minimum listen interval of 3 beacon intervals. 2923 * 2924 */ 2925 #define NRF_WIFI_LISTEN_INTERVAL_MIN 3 2926 2927 /** 2928 * @brief This structure represents an event that provides information about the RPU power save 2929 * mode. It contains details regarding the current power save mode and its settings. 2930 * 2931 */ 2932 struct nrf_wifi_umac_event_power_save_info { 2933 /** Header nrf_wifi_umac_hdr */ 2934 struct nrf_wifi_umac_hdr umac_hdr; 2935 /** Power save mode. NRF_WIFI_PS_MODE_LEGACY/NRF_WIFI_PS_MODE_WMM */ 2936 unsigned char ps_mode; 2937 /** Power save enable flag */ 2938 unsigned char enabled; 2939 /** Extended power save ON(1)/OFF(0) */ 2940 unsigned char extended_ps; 2941 /** Is TWT responder */ 2942 unsigned char twt_responder; 2943 /** Power save timed out value */ 2944 unsigned int ps_timeout; 2945 /** Listen interval value */ 2946 unsigned short listen_interval; 2947 /** Power save exit strategy */ 2948 unsigned char ps_exit_strategy; 2949 /** Number TWT flows */ 2950 unsigned char num_twt_flows; 2951 /** TWT info of each flow nrf_wifi_umac_config_twt_info */ 2952 struct nrf_wifi_umac_config_twt_info twt_flow_info[0]; 2953 } __NRF_WIFI_PKD; 2954 2955 #define NRF_WIFI_EVENT_TRIGGER_SCAN_IE_VALID (1 << 0) 2956 #define NRF_WIFI_EVENT_TRIGGER_SCAN_SCAN_FLAGS_VALID (1 << 1) 2957 /** 2958 * @brief This structure contains information relevant to the "Remain on Channel" operation. 2959 * It is used to specify the details related to the duration and channel on which a device 2960 * needs to stay without regular data transmission or reception. 2961 * 2962 */ 2963 2964 struct remain_on_channel_info { 2965 /** Amount of time to remain on specified channel */ 2966 unsigned int dur; 2967 /** Frequency configuration, see &struct freq_params */ 2968 struct freq_params nrf_wifi_freq_params; 2969 /** Identifier to be used for processing NRF_WIFI_UMAC_EVENT_COOKIE_RESP event */ 2970 unsigned long long host_cookie; 2971 /** Unused */ 2972 unsigned long long cookie; 2973 2974 } __NRF_WIFI_PKD; 2975 2976 #define NRF_WIFI_CMD_ROC_FREQ_PARAMS_VALID (1 << 0) 2977 #define NRF_WIFI_CMD_ROC_DURATION_VALID (1 << 1) 2978 /** 2979 * @brief This structure represents the command used to keep the device awake on the specified 2980 * channel for a designated period. The command initiates the "Remain on Channel" operation. 2981 * 2982 */ 2983 2984 struct nrf_wifi_umac_cmd_remain_on_channel { 2985 /** Header nrf_wifi_umac_hdr */ 2986 struct nrf_wifi_umac_hdr umac_hdr; 2987 /** Indicate which of the following parameters are valid */ 2988 unsigned int valid_fields; 2989 /** Information about channel parameters.remain_on_channel_info */ 2990 struct remain_on_channel_info info; 2991 2992 } __NRF_WIFI_PKD; 2993 2994 #define NRF_WIFI_CMD_CANCEL_ROC_COOKIE_VALID (1 << 0) 2995 /** 2996 * @brief This structure represents the command to cancel "Remain on Channel" operation. 2997 * 2998 */ 2999 struct nrf_wifi_umac_cmd_cancel_remain_on_channel { 3000 /** Header nrf_wifi_umac_hdr */ 3001 struct nrf_wifi_umac_hdr umac_hdr; 3002 /** Indicate which of the following parameters are valid */ 3003 unsigned int valid_fields; 3004 /** cookie to identify remain on channel */ 3005 unsigned long long cookie; 3006 } __NRF_WIFI_PKD; 3007 3008 #define NRF_WIFI_EVENT_ROC_FREQ_VALID (1 << 0) 3009 #define NRF_WIFI_EVENT_ROC_COOKIE_VALID (1 << 1) 3010 #define NRF_WIFI_EVENT_ROC_DURATION_VALID (1 << 2) 3011 #define NRF_WIFI_EVENT_ROC_CH_TYPE_VALID (1 << 3) 3012 /** 3013 * @brief This structure represents the response to command "Remain on Channel". 3014 * 3015 */ 3016 3017 struct nrf_wifi_event_remain_on_channel { 3018 /** Header nrf_wifi_umac_hdr */ 3019 struct nrf_wifi_umac_hdr umac_hdr; 3020 /** Indicate which of the following parameters are valid */ 3021 unsigned int valid_fields; 3022 /** Frequency of the channel */ 3023 unsigned int frequency; 3024 /** duration that can be requested with the remain-on-channel operation(ms) */ 3025 unsigned int dur; 3026 /** see &enum nrf_wifi_channel_type */ 3027 unsigned int ch_type; 3028 /** cookie to identify remain on channel */ 3029 unsigned long long cookie; 3030 } __NRF_WIFI_PKD; 3031 3032 /** 3033 * @brief This structure defines the command used to retrieve interface information. 3034 * 3035 */ 3036 struct nrf_wifi_cmd_get_interface { 3037 /** Header nrf_wifi_umac_hdr */ 3038 struct nrf_wifi_umac_hdr umac_hdr; 3039 } __NRF_WIFI_PKD; 3040 3041 #define NRF_WIFI_INTERFACE_INFO_CHAN_DEF_VALID (1 << 0) 3042 #define NRF_WIFI_INTERFACE_INFO_SSID_VALID (1 << 1) 3043 #define NRF_WIFI_INTERFACE_INFO_IFNAME_VALID (1 << 2) 3044 3045 /** 3046 * @brief This structure represents an event that contains information about a network interface. 3047 * 3048 */ 3049 3050 struct nrf_wifi_interface_info { 3051 /** Header nrf_wifi_umac_hdr */ 3052 struct nrf_wifi_umac_hdr umac_hdr; 3053 /** Indicate which of the following parameters are valid */ 3054 unsigned int valid_fields; 3055 /** Interface type, see &enum nrf_wifi_iftype */ 3056 signed int nrf_wifi_iftype; 3057 /** Interface name */ 3058 signed char ifacename[IFACENAMSIZ]; 3059 /** Mac address */ 3060 unsigned char nrf_wifi_eth_addr[NRF_WIFI_ETH_ADDR_LEN]; 3061 /** nrf_wifi_chan_definition */ 3062 struct nrf_wifi_chan_definition chan_def; 3063 /** nrf_wifi_ssid */ 3064 struct nrf_wifi_ssid ssid; 3065 } __NRF_WIFI_PKD; 3066 3067 #define NRF_WIFI_HT_MCS_MASK_LEN 10 3068 #define NRF_WIFI_HT_MCS_RES_LEN 3 3069 3070 /** 3071 * @brief MCS information. 3072 * 3073 */ 3074 struct nrf_wifi_event_mcs_info { 3075 /** Highest supported RX rate */ 3076 unsigned short nrf_wifi_rx_highest; 3077 /** RX mask */ 3078 unsigned char nrf_wifi_rx_mask[NRF_WIFI_HT_MCS_MASK_LEN]; 3079 /** TX parameters */ 3080 unsigned char nrf_wifi_tx_params; 3081 /** reserved */ 3082 unsigned char nrf_wifi_reserved[NRF_WIFI_HT_MCS_RES_LEN]; 3083 } __NRF_WIFI_PKD; 3084 3085 /** 3086 * @brief This structure represents HT capability parameters. 3087 * 3088 */ 3089 struct nrf_wifi_event_sta_ht_cap { 3090 /** 1 indicates HT Supported */ 3091 signed int nrf_wifi_ht_supported; 3092 /** HT capabilities, as in the HT information IE */ 3093 unsigned short nrf_wifi_cap; 3094 /** MCS information. nrf_wifi_event_mcs_info */ 3095 struct nrf_wifi_event_mcs_info mcs; 3096 /** A-MPDU factor, as in 11n */ 3097 unsigned char nrf_wifi_ampdu_factor; 3098 /** A-MPDU density, as in 11n */ 3099 unsigned char nrf_wifi_ampdu_density; 3100 } __NRF_WIFI_PKD; 3101 3102 #define NRF_WIFI_CHAN_FLAG_FREQUENCY_ATTR_NO_IR (1 << 0) 3103 #define NRF_WIFI_CHAN_FLAG_FREQUENCY_ATTR_NO_IBSS (1 << 1) 3104 #define NRF_WIFI_CHAN_FLAG_FREQUENCY_ATTR_RADAR (1 << 2) 3105 #define NRF_WIFI_CHAN_FLAG_FREQUENCY_ATTR_NO_HT40_MINUS (1 << 3) 3106 #define NRF_WIFI_CHAN_FLAG_FREQUENCY_ATTR_NO_HT40_PLUS (1 << 4) 3107 #define NRF_WIFI_CHAN_FLAG_FREQUENCY_ATTR_NO_80MHZ (1 << 5) 3108 #define NRF_WIFI_CHAN_FLAG_FREQUENCY_ATTR_NO_160MHZ (1 << 6) 3109 #define NRF_WIFI_CHAN_FLAG_FREQUENCY_ATTR_INDOOR_ONLY (1 << 7) 3110 #define NRF_WIFI_CHAN_FLAG_FREQUENCY_ATTR_GO_CONCURRENT (1 << 8) 3111 #define NRF_WIFI_CHAN_FLAG_FREQUENCY_ATTR_NO_20MHZ (1 << 9) 3112 #define NRF_WIFI_CHAN_FLAG_FREQUENCY_ATTR_NO_10MHZ (1 << 10) 3113 #define NRF_WIFI_CHAN_FLAG_FREQUENCY_DISABLED (1 << 11) 3114 3115 #define NRF_WIFI_CHAN_DFS_VALID (1 << 12) 3116 #define NRF_WIFI_CHAN_DFS_CAC_TIME_VALID (1 << 13) 3117 3118 /** 3119 * @brief This structure represents channel parameters. 3120 */ 3121 struct nrf_wifi_event_channel { 3122 /** channel flags NRF_WIFI_CHAN_FLAG_FREQUENCY_ATTR_NO_IBSS */ 3123 unsigned short nrf_wifi_flags; 3124 /** maximum transmission power (in dBm) */ 3125 signed int nrf_wifi_max_power; 3126 /** DFS state time */ 3127 unsigned int nrf_wifi_time; 3128 /** DFS CAC time in ms */ 3129 unsigned int dfs_cac_msec; 3130 /** Channel parameters are valid or not 1=valid */ 3131 signed char ch_valid; 3132 /** Channel center frequency */ 3133 unsigned short center_frequency; 3134 /** Current dfs state */ 3135 signed char dfs_state; 3136 } __NRF_WIFI_PKD; 3137 3138 #define NRF_WIFI_EVENT_GET_WIPHY_FLAG_RATE_SHORT_PREAMBLE (1 << 0) 3139 /** 3140 * @brief This structure represents rate information. 3141 */ 3142 struct nrf_wifi_event_rate { 3143 /** NRF_WIFI_EVENT_GET_WIPHY_FLAG_RATE_SHORT_PREAMBLE */ 3144 unsigned short nrf_wifi_flags; 3145 /** Bitrate in units of 100 kbps */ 3146 unsigned short nrf_wifi_bitrate; 3147 } __NRF_WIFI_PKD; 3148 /** 3149 * @brief VHT MCS information. 3150 * 3151 */ 3152 3153 struct nrf_wifi_event_vht_mcs_info { 3154 /** RX MCS map 2 bits for each stream, total 8 streams */ 3155 unsigned short rx_mcs_map; 3156 /** Indicates highest long GI VHT PPDU data rate 3157 * STA can receive. Rate expressed in units of 1 Mbps. 3158 * If this field is 0 this value should not be used to 3159 * consider the highest RX data rate supported. 3160 */ 3161 unsigned short rx_highest; 3162 /** TX MCS map 2 bits for each stream, total 8 streams */ 3163 unsigned short tx_mcs_map; 3164 /** Indicates highest long GI VHT PPDU data rate 3165 * STA can transmit. Rate expressed in units of 1 Mbps. 3166 * If this field is 0 this value should not be used to 3167 * consider the highest TX data rate supported. 3168 */ 3169 unsigned short tx_highest; 3170 } __NRF_WIFI_PKD; 3171 3172 /** 3173 * @brief This structure represents VHT capability parameters. 3174 * 3175 */ 3176 struct nrf_wifi_event_sta_vht_cap { 3177 /** 1 indicates VHT Supported */ 3178 signed char nrf_wifi_vht_supported; 3179 /** VHT capability info */ 3180 unsigned int nrf_wifi_cap; 3181 /** Refer nrf_wifi_event_vht_mcs_info */ 3182 struct nrf_wifi_event_vht_mcs_info vht_mcs; 3183 } __NRF_WIFI_PKD; 3184 3185 /** 3186 * @brief Frequency band information. 3187 * 3188 */ 3189 struct nrf_wifi_event_supported_band { 3190 /** No.of channels */ 3191 unsigned short nrf_wifi_n_channels; 3192 /** No.of bitrates */ 3193 unsigned short nrf_wifi_n_bitrates; 3194 /** Array of channels the hardware can operate in this band */ 3195 struct nrf_wifi_event_channel channels[29]; 3196 /** Array of bitrates the hardware can operate with in this band */ 3197 struct nrf_wifi_event_rate bitrates[13]; 3198 /** HT capabilities in this band */ 3199 struct nrf_wifi_event_sta_ht_cap ht_cap; 3200 /** VHT capabilities in this band */ 3201 struct nrf_wifi_event_sta_vht_cap vht_cap; 3202 /** the band this structure represents */ 3203 signed char band; 3204 } __NRF_WIFI_PKD; 3205 3206 /** 3207 * @brief Interface limits. 3208 * 3209 */ 3210 struct nrf_wifi_event_iface_limit { 3211 /** max interface limits */ 3212 unsigned short nrf_wifi_max; 3213 /** types */ 3214 unsigned short nrf_wifi_types; 3215 } __NRF_WIFI_PKD; 3216 3217 3218 #define NRF_WIFI_EVENT_GET_WIPHY_VALID_RADAR_DETECT_WIDTHS (1 << 0) 3219 #define NRF_WIFI_EVENT_GET_WIPHY_VALID_RADAR_DETECT_REGIONS (1 << 1) 3220 #define NRF_WIFI_EVENT_GET_WIPHY_VALID_ (1 << 2) 3221 /** 3222 * @brief This structure defines an event that represents interface combinations. 3223 * 3224 */ 3225 struct nrf_wifi_event_iface_combination { 3226 /** channels count */ 3227 unsigned int nrf_wifi_num_different_channels; 3228 /** Unused */ 3229 signed int beacon_int_infra_match; 3230 /** nrf_wifi_event_iface_limit */ 3231 struct nrf_wifi_event_iface_limit limits[2]; 3232 /** Max interfaces */ 3233 unsigned short nrf_wifi_max_interfaces; 3234 /** Not used */ 3235 unsigned char nrf_wifi_radar_detect_widths; 3236 /** Not used */ 3237 unsigned char nrf_wifi_n_limits; 3238 /** Not used */ 3239 unsigned char nrf_wifi_radar_detect_regions; 3240 /** Not used */ 3241 unsigned char comb_valid; 3242 } __NRF_WIFI_PKD; 3243 3244 #define NRF_WIFI_EVENT_GET_WIPHY_IBSS_RSN (1 << 0) 3245 #define NRF_WIFI_EVENT_GET_WIPHY_MESH_AUTH (1 << 1) 3246 #define NRF_WIFI_EVENT_GET_WIPHY_AP_UAPSD (1 << 2) 3247 #define NRF_WIFI_EVENT_GET_WIPHY_SUPPORTS_FW_ROAM (1 << 3) 3248 #define NRF_WIFI_EVENT_GET_WIPHY_SUPPORTS_TDLS (1 << 4) 3249 #define NRF_WIFI_EVENT_GET_WIPHY_TDLS_EXTERNAL_SETUP (1 << 5) 3250 #define NRF_WIFI_EVENT_GET_WIPHY_CONTROL_PORT_ETHERTYPE (1 << 6) 3251 #define NRF_WIFI_EVENT_GET_WIPHY_OFFCHANNEL_TX_OK (1 << 7) 3252 3253 #define NRF_WIFI_GET_WIPHY_VALID_PROBE_RESP_OFFLOAD (1 << 0) 3254 #define NRF_WIFI_GET_WIPHY_VALID_TX_ANT (1 << 1) 3255 #define NRF_WIFI_GET_WIPHY_VALID_RX_ANT (1 << 2) 3256 #define NRF_WIFI_GET_WIPHY_VALID_MAX_NUM_SCAN_SSIDS (1 << 3) 3257 #define NRF_WIFI_GET_WIPHY_VALID_NUM_SCHED_SCAN_SSIDS (1 << 4) 3258 #define NRF_WIFI_GET_WIPHY_VALID_MAX_MATCH_SETS (1 << 5) 3259 #define NRF_WIFI_GET_WIPHY_VALID_MAC_ACL_MAX (1 << 6) 3260 #define NRF_WIFI_GET_WIPHY_VALID_HAVE_AP_SME (1 << 7) 3261 #define NRF_WIFI_GET_WIPHY_VALID_EXTENDED_CAPABILITIES (1 << 8) 3262 #define NRF_WIFI_GET_WIPHY_VALID_MAX_AP_ASSOC_STA (1 << 9) 3263 #define NRF_WIFI_GET_WIPHY_VALID_WIPHY_NAME (1 << 10) 3264 #define NRF_WIFI_GET_WIPHY_VALID_EXTENDED_FEATURES (1 << 11) 3265 3266 #define NRF_WIFI_EVENT_GET_WIPHY_MAX_CIPHER_COUNT 30 3267 3268 #define NRF_WIFI_INDEX_IDS_WIPHY_NAME 32 3269 #define NRF_WIFI_EVENT_GET_WIPHY_NUM_BANDS 2 3270 3271 #define EXTENDED_FEATURE_LEN 60 3272 #define DIV_ROUND_UP_NL(n, d) (((n) + (d)-1) / (d)) 3273 3274 /** 3275 * @brief This structure represents wiphy parameters. 3276 * 3277 */ 3278 struct nrf_wifi_event_get_wiphy { 3279 /** Header nrf_wifi_umac_hdr */ 3280 struct nrf_wifi_umac_hdr umac_hdr; 3281 /** Unused */ 3282 unsigned int nrf_wifi_frag_threshold; 3283 /** RTS threshold value */ 3284 unsigned int nrf_wifi_rts_threshold; 3285 /** Unused */ 3286 unsigned int nrf_wifi_available_antennas_tx; 3287 /** Unused */ 3288 unsigned int nrf_wifi_available_antennas_rx; 3289 /** Unused */ 3290 unsigned int nrf_wifi_probe_resp_offload; 3291 /** Unused */ 3292 unsigned int tx_ant; 3293 /** Unused */ 3294 unsigned int rx_ant; 3295 /** Unused */ 3296 unsigned int split_start2_flags; 3297 /** Maximum ROC duration */ 3298 unsigned int max_remain_on_channel_duration; 3299 /** Unused */ 3300 unsigned int ap_sme_capa; 3301 /** Unused */ 3302 unsigned int features; 3303 /** Unused */ 3304 unsigned int max_acl_mac_addresses; 3305 /** maximum number of associated stations supported in AP mode */ 3306 unsigned int max_ap_assoc_sta; 3307 /** supported cipher suites */ 3308 unsigned int cipher_suites[NRF_WIFI_EVENT_GET_WIPHY_MAX_CIPHER_COUNT]; 3309 /** wiphy flags NRF_WIFI_EVENT_GET_WIPHY_AP_UAPSD */ 3310 unsigned int get_wiphy_flags; 3311 /** valid parameters NRF_WIFI_GET_WIPHY_VALID_WIPHY_NAME */ 3312 unsigned int params_valid; 3313 /** Maximum scan IE length */ 3314 unsigned short int max_scan_ie_len; 3315 /** Unused */ 3316 unsigned short int max_sched_scan_ie_len; 3317 /** bit mask of interface value of see &enum nrf_wifi_iftype */ 3318 unsigned short int interface_modes; 3319 /** Unused */ 3320 struct nrf_wifi_event_iface_combination iface_com[6]; 3321 /** Unused */ 3322 signed char supp_commands[40]; 3323 /** Retry limit for short frames */ 3324 unsigned char retry_short; 3325 /** Retry limit for long frames */ 3326 unsigned char retry_long; 3327 /** Unused */ 3328 unsigned char coverage_class; 3329 /** Maximum ssids supported in scan */ 3330 unsigned char max_scan_ssids; 3331 /** Unused */ 3332 unsigned char max_sched_scan_ssids; 3333 /** Unused */ 3334 unsigned char max_match_sets; 3335 /** Unused */ 3336 unsigned char n_cipher_suites; 3337 /** Unused */ 3338 unsigned char max_num_pmkids; 3339 /** length of the extended capabilities */ 3340 unsigned char extended_capabilities_len; 3341 /** Extended capabilities */ 3342 unsigned char extended_capabilities[10]; 3343 /** Extended capabilities mask */ 3344 unsigned char extended_capabilities_mask[10]; 3345 /** Unused */ 3346 unsigned char ext_features[DIV_ROUND_UP_NL(EXTENDED_FEATURE_LEN, 8)]; 3347 /** Unused */ 3348 unsigned char ext_features_len; 3349 /** Unused */ 3350 signed char num_iface_com; 3351 /** Wiphy name */ 3352 signed char wiphy_name[NRF_WIFI_INDEX_IDS_WIPHY_NAME]; 3353 /** Supported bands info. nrf_wifi_event_supported_band */ 3354 struct nrf_wifi_event_supported_band sband[NRF_WIFI_EVENT_GET_WIPHY_NUM_BANDS]; 3355 } __NRF_WIFI_PKD; 3356 /** 3357 * @brief This structure represents the command used to retrieve Wireless PHY (wiphy) information. 3358 * 3359 */ 3360 struct nrf_wifi_cmd_get_wiphy { 3361 /** Header nrf_wifi_umac_hdr */ 3362 struct nrf_wifi_umac_hdr umac_hdr; 3363 } __NRF_WIFI_PKD; 3364 3365 /** 3366 * @brief This structure represents the command to get hardware address. 3367 * 3368 */ 3369 struct nrf_wifi_cmd_get_ifhwaddr { 3370 /** Header nrf_wifi_umac_hdr */ 3371 struct nrf_wifi_umac_hdr umac_hdr; 3372 /** Interface name */ 3373 signed char ifacename[IFACENAMSIZ]; 3374 } __NRF_WIFI_PKD; 3375 3376 /** 3377 * @brief This structure represents the command used to retrieve the hardware address or 3378 * MAC address of the device. 3379 * 3380 */ 3381 struct nrf_wifi_cmd_set_ifhwaddr { 3382 /** Header nrf_wifi_umac_hdr */ 3383 struct nrf_wifi_umac_hdr umac_hdr; 3384 /** Interface name */ 3385 signed char ifacename[IFACENAMSIZ]; 3386 /** Hardware address to be set */ 3387 unsigned char nrf_wifi_hwaddr[NRF_WIFI_ETH_ADDR_LEN]; 3388 } __NRF_WIFI_PKD; 3389 3390 #define REG_RULE_FLAGS_VALID (1 << 0) 3391 #define FREQ_RANGE_START_VALID (1 << 1) 3392 #define FREQ_RANGE_END_VALID (1 << 2) 3393 #define FREQ_RANGE_MAX_BW_VALID (1 << 3) 3394 #define POWER_RULE_MAX_EIRP_VALID (1 << 4) 3395 3396 #define NRF_WIFI_RULE_FLAGS_NO_OFDM (1<<0) 3397 #define NRF_WIFI_RULE_FLAGS_NO_CCK (1<<1) 3398 #define NRF_WIFI_RULE_FLAGS_NO_INDOOR (1<<2) 3399 #define NRF_WIFI_RULE_FLAGS_NO_OUTDOOR (1<<3) 3400 #define NRF_WIFI_RULE_FLAGS_DFS (1<<4) 3401 #define NRF_WIFI_RULE_FLAGS_PTP_ONLY (1<<5) 3402 #define NRF_WIFI_RULE_FLAGS_PTMP_ONLY (1<<6) 3403 #define NRF_WIFI_RULE_FLAGS_NO_IR (1<<7) 3404 #define NRF_WIFI_RULE_FLAGS_IBSS (1<<8) 3405 #define NRF_WIFI_RULE_FLAGS_AUTO_BW (1<<11) 3406 #define NRF_WIFI_RULE_FLAGS_IR_CONCURRENT (1<<12) 3407 #define NRF_WIFI_RULE_FLAGS_NO_HT40MINUS (1<<13) 3408 #define NRF_WIFI_RULE_FLAGS_NO_HT40PLUS (1<<14) 3409 #define NRF_WIFI_RULE_FLAGS_NO_80MHZ (1<<15) 3410 #define NRF_WIFI_RULE_FLAGS_NO_160MHZ (1<<16) 3411 3412 /** 3413 * @brief This structure represents the information related to the regulatory domain 3414 * of a wireless device. The regulatory domain defines the specific rules and regulations 3415 * that govern the usage of radio frequencies in a particular geographical region. 3416 * 3417 */ 3418 3419 struct nrf_wifi_reg_rules { 3420 /** Indicate which of the following parameters are valid */ 3421 unsigned int valid_fields; 3422 /** NRF_WIFI_RULE_FLAGS_NO_CCK and NRF_WIFI_RULE_FLAGS_NO_INDOOR */ 3423 unsigned int rule_flags; 3424 /** starting frequencry for the regulatory rule in KHz */ 3425 unsigned int freq_range_start; 3426 /** ending frequency for the regulatory rule in KHz */ 3427 unsigned int freq_range_end; 3428 /** maximum allowed bandwidth for this frequency range */ 3429 unsigned int freq_range_max_bw; 3430 /** maximum allowed EIRP mBm (100 * dBm) */ 3431 unsigned int pwr_max_eirp; 3432 3433 } __NRF_WIFI_PKD; 3434 3435 /** 3436 * @brief This structure represents channels information like maximum power, 3437 * center frequency, channel supported and active or passive scan. 3438 * 3439 */ 3440 struct nrf_wifi_get_reg_chn_info { 3441 /** center frequency in MHz */ 3442 unsigned int center_frequency; 3443 /** maximum transmission power (in dBm) */ 3444 unsigned int max_power; 3445 /** Particular channel is supported or not */ 3446 char supported; 3447 /** Particular channel is supports passive scanning or not */ 3448 char passive_channel; 3449 /** Particular channel is dfs or not */ 3450 char dfs; 3451 } __NRF_WIFI_PKD; 3452 3453 #define NRF_WIFI_CMD_SET_REG_ALPHA2_VALID (1 << 0) 3454 #define NRF_WIFI_CMD_SET_REG_RULES_VALID (1 << 1) 3455 #define NRF_WIFI_CMD_SET_REG_DFS_REGION_VALID (1 << 2) 3456 3457 #define MAX_NUM_REG_RULES 32 3458 3459 /** 3460 * @brief This structure represents an event that contains regulatory domain information. 3461 * 3462 */ 3463 3464 struct nrf_wifi_reg { 3465 /** Header nrf_wifi_umac_hdr */ 3466 struct nrf_wifi_umac_hdr umac_hdr; 3467 /** Country code */ 3468 unsigned char nrf_wifi_alpha2[NRF_WIFI_COUNTRY_CODE_LEN]; 3469 /** Number of channel list information */ 3470 unsigned int num_channels; 3471 /** channels list information */ 3472 struct nrf_wifi_get_reg_chn_info chn_info[0]; 3473 } __NRF_WIFI_PKD; 3474 3475 #define NRF_WIFI_CMD_REQ_SET_REG_ALPHA2_VALID (1 << 0) 3476 #define NRF_WIFI_CMD_REQ_SET_REG_USER_REG_HINT_TYPE_VALID (1 << 1) 3477 #define NRF_WIFI_CMD_REQ_SET_REG_USER_REG_FORCE (1 << 2) 3478 /** 3479 * @brief This structure represents the command used to set the regulatory domain 3480 * for a wireless device. It allows configuring the device to adhere to the rules 3481 * and regulations specific to the geographical region in which it is operating. 3482 * 3483 */ 3484 struct nrf_wifi_cmd_req_set_reg { 3485 /** Header nrf_wifi_umac_hdr */ 3486 struct nrf_wifi_umac_hdr umac_hdr; 3487 /** Indicate which of the following parameters are valid */ 3488 unsigned int valid_fields; 3489 /** Type of regulatory hint passed from userspace */ 3490 unsigned int nrf_wifi_user_reg_hint_type; 3491 /** Country code */ 3492 unsigned char nrf_wifi_alpha2[NRF_WIFI_COUNTRY_CODE_LEN]; 3493 } __NRF_WIFI_PKD; 3494 3495 /** 3496 * @brief This structure represents the event that is generated when the regulatory domain 3497 * is modified or updated. It contains the new regulatory domain information. 3498 * 3499 */ 3500 struct nrf_wifi_event_regulatory_change { 3501 struct nrf_wifi_umac_hdr umac_hdr; 3502 unsigned short nrf_wifi_flags; 3503 signed int intr; 3504 signed char regulatory_type; 3505 unsigned char nrf_wifi_alpha2[2]; 3506 } __NRF_WIFI_PKD; 3507 3508 /** 3509 * @brief This structure represents the status code for a command. It is used to indicate 3510 * the outcome or result of executing a specific command. The status code provides valuable 3511 * information about the success, failure, or any errors encountered during the execution 3512 * of the command, helping to understand the current state of the device. 3513 * 3514 */ 3515 struct nrf_wifi_umac_event_cmd_status { 3516 /** Header nrf_wifi_umac_hdr */ 3517 struct nrf_wifi_umac_hdr umac_hdr; 3518 /** Command id. see &enum nrf_wifi_umac_commands */ 3519 unsigned int cmd_id; 3520 /** Status codes */ 3521 unsigned int cmd_status; 3522 } __NRF_WIFI_PKD; 3523 3524 /** 3525 * @brief This structure represents the command used to configure quiet period. 3526 * 3527 */ 3528 struct nrf_wifi_umac_cmd_config_quiet_period { 3529 /** Header nrf_wifi_umac_hdr */ 3530 struct nrf_wifi_umac_hdr umac_hdr; 3531 /** quiet period value in seconds */ 3532 unsigned int quiet_period_in_sec; 3533 } __NRF_WIFI_PKD; 3534 3535 /** 3536 * @} 3537 */ 3538 /** 3539 * @brief This structure defines the command used to configure the power save exit 3540 * strategy for retrieving buffered data from the AP in power save mode. 3541 * 3542 */ 3543 struct nrf_wifi_cmd_ps_exit_strategy { 3544 /** Header @ref nrf_wifi_umac_hdr */ 3545 struct nrf_wifi_umac_hdr umac_hdr; 3546 /** Power save exit strategy */ 3547 unsigned char ps_exit_strategy; 3548 } __NRF_WIFI_PKD; 3549 3550 #endif /* __HOST_RPU_UMAC_IF_H */ 3551