| // Copyright 2017 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library fuchsia.wlan.mlme; |
| |
| using fuchsia.wlan.common; |
| using fuchsia.wlan.mesh; |
| |
| // Stub types for communicating between the wlan service and the MLME drivers. Based on the 802.11 |
| // MLME SAP interface (IEEE Std 802.11-2016 section 6.3). |
| |
| // TODO(NET-631): restore the commented out enum aliases |
| |
| // MLME-SCAN.request (IEEE Std 802.11-2016 6.3.3.2) |
| |
| enum BSSTypes { |
| INFRASTRUCTURE = 1; |
| PERSONAL = 2; |
| INDEPENDENT = 3; |
| MESH = 4; |
| ANY_BSS = 5; |
| //LAST = ANY_BSS; |
| }; |
| |
| enum ScanTypes { |
| ACTIVE = 1; |
| PASSIVE = 2; |
| //LAST = PASSIVE; |
| }; |
| |
| struct ScanRequest { |
| uint64 txn_id; |
| BSSTypes bss_type; |
| array<uint8>:6 bssid; |
| bytes:32 ssid; |
| ScanTypes scan_type; |
| uint32 probe_delay; // in TimeUnits |
| vector<uint8>? channel_list; |
| uint32 min_channel_time; // in TimeUnits |
| uint32 max_channel_time; // in TimeUnits |
| // RequestInformation |
| vector<bytes:32>? ssid_list; |
| // ChannelUsage |
| // AccessNetworkType |
| // HESSID |
| // Mesh ID |
| // DiscoveryMode |
| // VendorSpecificInfo |
| }; |
| |
| // MLME-SCAN.confirm (IEEE Std 802.11-2016 6.3.3.3) |
| |
| // IEEE Std 802.11-2016, 9.4.1.4 |
| using CapabilityInfo = uint16; |
| |
| // IEEE Std 802.11-2016 9.4.2.56 |
| const uint8 HT_CAP_LEN = 26; |
| // IEEE Std 802.11-2016 9.4.2.57 |
| const uint8 HT_OP_LEN = 22; |
| // IEEE Std 802.11-2016 9.5.2.158 |
| const uint8 VHT_CAP_LEN = 12; |
| // IEEE Std 802.11-2016 9.5.2.159 |
| const uint8 VHT_OP_LEN = 5; |
| // IEEE Std 802.11-2016 defines 12 values in dot11SupportedDataRatesRxTable and |
| // 2 values for BSS Membership Selector in Table 9-78. Only these 14 values are valid. |
| // But in fxb/41022, some of these values may be duplicated in both SupportedRates(SR) and |
| // ExtendedSupportedRates(ESR). Since the SR element allows 8 bytes, and assuming the ESR element |
| // duplicates all the values in the SR element plus contains all the remaining valid values, the |
| // maximum is set to 8 + 14 = 22. |
| const uint8 RATES_MAX_LEN = 22; |
| |
| // IEEE Std 802.11-2016 9.4.2.56 |
| struct HtCapabilities { |
| array<uint8>:HT_CAP_LEN bytes; |
| }; |
| |
| // IEEE Std 802.11-2016 9.4.2.57 |
| struct HtOperation { |
| array<uint8>:HT_OP_LEN bytes; |
| }; |
| |
| // IEEE Std 802.11-2016 9.5.2.158 |
| struct VhtCapabilities { |
| array<uint8>:VHT_CAP_LEN bytes; |
| }; |
| |
| // IEEE Std 802.11-2016 9.5.2.159 |
| struct VhtOperation { |
| array<uint8>:VHT_OP_LEN bytes; |
| }; |
| |
| // IEEE Std 802.11-2016 6.3.3.3.2 |
| struct BSSDescription { |
| array<uint8>:6 bssid; |
| |
| bytes:32 ssid; |
| |
| BSSTypes bss_type; |
| uint16 beacon_period; // in TU |
| uint8 dtim_period; |
| uint64 timestamp; |
| uint64 local_time; |
| |
| CapabilityInfo cap; |
| // IEEE Std 802.11-2016 9.4.2.3 |
| // in 0.5 Mbps, with MSB indicating basic rate. See Table 9-78 for 126, 127. |
| bytes:RATES_MAX_LEN rates; |
| bytes? country; |
| |
| bytes? rsne; |
| |
| /// All vendor info elements present in the beacon frame. E.g. this may include a WPA1 IE. |
| /// This slice should be a valid chain of IEs including IE headers for each element. |
| bytes? vendor_ies; |
| |
| /// As per IEEE 802.11-2016, RCPI indicates total channel power (rssi, snr and noise) of |
| /// the received frame measured on the channel at the antenna connector. This value is |
| /// specifically meant for beacon reception. |
| int16 rcpi_dbmh; // 0.5 step dBm. Do not use encoding from IEEE Std 802.11-2016 9.4.2.38. |
| /// As per IEEE 802.11-2016, RSNI indicates SNR + interference ratio of received frame. |
| /// This value is specifically meant for beacon reception. |
| int16 rsni_dbh; // 0.5 step dB. Do not use encoding from IEEE Std 802.11-2016 9.4.2.41. |
| |
| HtCapabilities? ht_cap; |
| HtOperation? ht_op; |
| |
| VhtCapabilities? vht_cap; |
| VhtOperation? vht_op; |
| |
| // List up non-standard, Fuchsia only parameters |
| fuchsia.wlan.common.WlanChan chan; |
| // The running average of received signal strength indicator in units of dBm. This value is |
| // updated periodically when the client is associated to an AP. |
| int8 rssi_dbm; // dBm |
| // The running average of snr in units of dB. This value is updated periodically when the |
| // client is associated to an AP. |
| int8 snr_db; |
| }; |
| |
| enum ScanResultCodes { |
| SUCCESS = 0; |
| NOT_SUPPORTED = 1; |
| INVALID_ARGS = 2; |
| INTERNAL_ERROR = 3; |
| }; |
| |
| struct ScanResult { |
| uint64 txn_id; |
| BSSDescription bss; |
| }; |
| |
| struct ScanEnd { |
| uint64 txn_id; |
| ScanResultCodes code; |
| }; |
| |
| // MLME-JOIN.request (IEEE Std 802.11-2016, 6.3.4.2) |
| |
| struct JoinRequest { |
| BSSDescription selected_bss; |
| uint32 join_failure_timeout; |
| uint32 nav_sync_delay; |
| bytes:RATES_MAX_LEN op_rates; |
| |
| // Combined with what MLME knows about the device capabilities, |
| // following parameters determine what to be advertised to the peer |
| // (in AssociationRequest). Effectively this way replaces the following |
| // fields originally defined in MLME-JOIN.request |
| // - Capability Information |
| // - HT Capabilities |
| // - VHT Capabilities |
| // - Extended Capabilities |
| fuchsia.wlan.common.PHY phy; |
| fuchsia.wlan.common.CBW cbw; |
| }; |
| |
| // MLME-JOIN.confirm (IEEE Std 802.11-2016, 6.3.4.3) |
| |
| enum JoinResultCodes { |
| SUCCESS = 0; |
| JOIN_FAILURE_TIMEOUT = 1; |
| //LAST = JOIN_FAILURE_TIMEOUT; |
| }; |
| |
| struct JoinConfirm { |
| JoinResultCodes result_code; |
| }; |
| |
| // MLME-AUTHENTICATE.request (IEEE Std 802.11-2016, 6.3.5.2) |
| |
| enum AuthenticationTypes { |
| OPEN_SYSTEM = 1; |
| SHARED_KEY = 2; |
| FAST_BSS_TRANSITION = 3; |
| SAE = 4; |
| //LAST = SAE; |
| }; |
| |
| struct AuthenticateRequest { |
| array<uint8>:6 peer_sta_address; |
| AuthenticationTypes auth_type; |
| uint32 auth_failure_timeout; |
| bytes? auth_content; |
| |
| // etc |
| }; |
| |
| // MLME-AUTHENTICATE.confirm (IEEE Std 802.11-2016, 6.3.5.3) |
| |
| enum AuthenticateResultCodes { |
| SUCCESS = 0; |
| REFUSED = 1; |
| ANTI_CLOGGING_TOKEN_REQUIRED = 2; |
| FINITE_CYCLIC_GROUP_NOT_SUPPORTED = 3; |
| AUTHENTICATION_REJECTED = 4; |
| AUTH_FAILURE_TIMEOUT = 5; |
| //LAST = AUTH_FAILURE_TIMEOUT; |
| }; |
| |
| struct AuthenticateConfirm { |
| array<uint8>:6 peer_sta_address; |
| AuthenticationTypes auth_type; |
| AuthenticateResultCodes result_code; |
| bytes? auth_content; |
| |
| // etc |
| }; |
| |
| // MLME-AUTHENTICATE.indication (IEEE Std 802.11-2016, 6.3.5.4) |
| |
| struct AuthenticateIndication { |
| array<uint8>:6 peer_sta_address; |
| AuthenticationTypes auth_type; |
| |
| // etc |
| }; |
| |
| // MLME-AUTHENTICATE.response (IEEE Std 802.11-2016, 6.3.5.5) |
| |
| struct AuthenticateResponse { |
| array<uint8>:6 peer_sta_address; |
| AuthenticateResultCodes result_code; |
| |
| // etc |
| }; |
| |
| // MLME-DEAUTHENTICATE.request (IEEE Std 802.11-2016, 6.3.6.2) |
| |
| // IEEE Std 802.11-2016, 9.4.1.7, Table 9-45 |
| enum ReasonCode : uint16 { |
| // 0 Reserved |
| UNSPECIFIED_REASON = 1; |
| INVALID_AUTHENTICATION = 2; |
| LEAVING_NETWORK_DEAUTH = 3; |
| REASON_INACTIVITY = 4; |
| NO_MORE_STAS = 5; |
| INVALID_CLASS2_FRAME = 6; |
| INVALID_CLASS3_FRAME = 7; |
| LEAVING_NETWORK_DISASSOC = 8; |
| NOT_AUTHENTICATED = 9; |
| UNACCEPTABLE_POWER_CA = 10; |
| UNACCEPTABLE_SUPPORTED_CHANNELS = 11; |
| BSS_TRANSITION_DISASSOC = 12; |
| REASON_INVALID_ELEMENT = 13; |
| MIC_FAILURE = 14; |
| FOURWAY_HANDSHAKE_TIMEOUT = 15; |
| GK_HANDSHAKE_TIMEOUT = 16; |
| HANDSHAKE_ELEMENT_MISMATCH = 17; |
| REASON_INVALID_GROUP_CIPHER = 18; |
| REASON_INVALID_PAIRWISE_CIPHER = 19; |
| REASON_INVALID_AKMP = 20; |
| UNSUPPORTED_RSNE_VERSION = 21; |
| INVALID_RSNE_CAPABILITIES = 22; |
| IEEE802_1_X_AUTH_FAILED = 23; |
| REASON_CIPHER_OUT_OF_POLICY = 24; |
| TDLS_PEER_UNREACHABLE = 25; |
| TDLS_UNSPECIFIED_REASON = 26; |
| SSP_REQUESTED_DISASSOC = 27; |
| NO_SSP_ROAMING_AGREEMENT = 28; |
| BAD_CIPHER_OR_AKM = 29; |
| NOT_AUTHORIZED_THIS_LOCATION = 30; |
| SERVICE_CHANGE_PRECLUDES_TS = 31; |
| UNSPECIFIED_QOS_REASON = 32; |
| NOT_ENOUGH_BANDWIDTH = 33; |
| MISSING_ACKS = 34; |
| EXCEEDED_TXOP = 35; |
| STA_LEAVING = 36; |
| // Values 37 and 38 are overloaded but should be clear from context. |
| END_TS_BA_DLS = 37; |
| UNKNOWN_TS_BA = 38; |
| TIMEOUT = 39; |
| // 40-44 Reserved |
| PEERKEY_MISMATCH = 45; |
| PEER_INITIATED = 46; |
| AP_INITIATED = 47; |
| REASON_INVALID_FT_ACTION_FRAME_COUNT = 48; |
| REASON_INVALID_PMKID = 49; |
| REASON_INVALID_MDE = 50; |
| REASON_INVALID_FTE = 51; |
| MESH_PEERING_CANCELED = 52; |
| MESH_MAX_PEERS = 53; |
| MESH_CONFIGURATION_POLICY_VIOLATION = 54; |
| MESH_CLOSE_RCVD = 55; |
| MESH_MAX_RETRIES = 56; |
| MESH_CONFIRM_TIMEOUT = 57; |
| MESH_INVALID_GTK = 58; |
| MESH_INCONSISTENT_PARAMETERS = 59; |
| MESH_INVALID_SECURITY_CAPABILITY = 60; |
| MESH_PATH_ERROR_NO_PROXY_INFORMATION = 61; |
| MESH_PATH_ERROR_NO_FORWARDING_INFORMATION = 62; |
| MESH_PATH_ERROR_DESTINATION_UNREACHABLE = 63; |
| MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS = 64; |
| MESH_CHANNEL_SWITCH_REGULATORY_REQUIREMENTS = 65; |
| MESH_CHANNEL_SWITCH_UNSPECIFIED = 66; |
| // 67 - 65535 Reserved |
| }; |
| |
| struct DeauthenticateRequest { |
| array <uint8>:6 peer_sta_address; |
| // TODO(tkilbourn): define a ReasonCode enum for FIDL |
| ReasonCode reason_code; |
| // VendorSpecificInfo |
| }; |
| |
| // MLME-DEAUTHENTICATE.confirm (IEEE Std 802.11-2016, 6.3.6.3) |
| |
| struct DeauthenticateConfirm { |
| array <uint8>:6 peer_sta_address; |
| }; |
| |
| // MLME-DEAUTHENTICATE.indication (IEEE Std 802.11-2016, 6.3.6.4) |
| |
| struct DeauthenticateIndication { |
| array<uint8>:6 peer_sta_address; |
| // TODO(tkilbourn): define a ReasonCode enum for FIDL |
| ReasonCode reason_code; |
| // VendorSpecificInfo |
| }; |
| |
| // MLME-ASSOCIATE.request (IEEE Std 802.11-2016, 6.3.7.2) |
| |
| struct AssociateRequest { |
| array<uint8>:6 peer_sta_address; |
| CapabilityInfo cap_info; |
| bytes:RATES_MAX_LEN rates; |
| HtCapabilities? ht_cap; |
| VhtCapabilities? vht_cap; |
| bytes? rsne; |
| // Serialized list of vendor IEs to be appended after all other associate request IEs. |
| bytes? vendor_ies; |
| |
| // etc |
| }; |
| |
| // MLME-ASSOCIATE.confrm (IEEE Std 802.11-2016, 6.3.7.3) |
| |
| enum AssociateResultCodes { |
| SUCCESS = 0; |
| REFUSED_REASON_UNSPECIFIED = 1; |
| REFUSED_NOT_AUTHENTICATED = 2; |
| REFUSED_CAPABILITIES_MISMATCH = 3; |
| REFUSED_EXTERNAL_REASON = 4; |
| REFUSED_AP_OUT_OF_MEMORY = 5; |
| REFUSED_BASIC_RATES_MISMATCH = 6; |
| REJECTED_EMERGENCY_SERVICES_NOT_SUPPORTED = 7; |
| REFUSED_TEMPORARILY = 8; |
| }; |
| |
| struct AssociateConfirm { |
| AssociateResultCodes result_code; |
| // CapabilityInformation |
| uint16 association_id; |
| |
| // TODO(43063): If we are able to intersect the capabilities with beacon before associating, |
| // remove these fields. |
| CapabilityInfo cap_info; |
| bytes:RATES_MAX_LEN rates; |
| HtCapabilities? ht_cap; |
| VhtCapabilities? vht_cap; |
| |
| // etc |
| }; |
| |
| // MLME-ASSOCIATE.indication (IEEE Std 802.11-2016, 6.3.7.4) |
| |
| struct AssociateIndication { |
| array<uint8>:6 peer_sta_address; |
| CapabilityInfo cap; |
| uint16 listen_interval; |
| bytes? ssid; |
| bytes:RATES_MAX_LEN rates; |
| // BSSMembershipSelectorSet |
| bytes? rsne; |
| |
| // etc |
| }; |
| |
| // MLME-ASSOCIATE.response (IEEE Std 802.11-2016, 6.3.7.5) |
| |
| struct AssociateResponse { |
| array<uint8>:6 peer_sta_address; |
| AssociateResultCodes result_code; |
| |
| uint16 association_id; |
| |
| // This is not part of the MLME SAP, but we need this to set the association context state in |
| // the MLME. |
| CapabilityInfo cap; |
| |
| // This combines both the BSSBasicRateSet and the OperationalRateSet, as the MLME will split |
| // them up. |
| bytes:RATES_MAX_LEN rates; |
| |
| // etc |
| }; |
| |
| // MLME-DISASSOCIATE.request (IEEE Std 802.11-2016, 6.3.9.1) |
| |
| struct DisassociateRequest { |
| array<uint8>:6 peer_sta_address; |
| // TODO(tkilbourn): define a ReasonCode enum for FIDL |
| uint16 reason_code; |
| // VendorSpecificInfo |
| }; |
| |
| // MLME-DISASSOCIATE.confirm (IEEE Std 802.11-2016, 6.3.9.2) |
| |
| struct DisassociateConfirm { |
| int32 status; |
| }; |
| |
| // MLME-DISASSOCIATE.indication (IEEE Std 802.11-2016, 6.3.9.3) |
| |
| struct DisassociateIndication { |
| array<uint8>:6 peer_sta_address; |
| // TODO(tkilbourn): define a ReasonCode enum for FIDL |
| uint16 reason_code; |
| // VendorSpecificInfo |
| }; |
| |
| // MLME-RESET.request (IEEE Std 802.11-2016, 6.3.10.2) |
| |
| struct ResetRequest { |
| array<uint8>:6 sta_address; |
| bool set_default_mib; |
| }; |
| |
| // MLME-START.request (IEEE Std 802.11-2016, 6.3.11.2) |
| |
| // See dot11CountryString of IEEE Std 802.11-2016, Annex C |
| const uint8 countryEnvironAll = 32; // an ASCII ' ' character |
| const uint8 countryEnvironOutdoor = 79; // an ASCII 'O' character |
| const uint8 countryEnvironIndoor = 73; // an ASCII 'I' character |
| const uint8 countryEnvironNonCountry = 88; // an ASCII 'X' character |
| |
| // Information derived from Country Element, IEEE Std 802.11-2016, 9.4.2.9. |
| struct Country { |
| array<uint8>:2 alpha2; // ISO 3116-1 |
| |
| // countryEnviron constant from above |
| // or Operating Class Table number from IEEE Std 802.11-2016 Annex D. |
| uint8 suffix; |
| }; |
| |
| struct StartRequest { |
| bytes:32 ssid; |
| BSSTypes bss_type; |
| uint16 beacon_period; // in TU |
| uint8 dtim_period; |
| |
| // PHY parameter sets |
| uint8 channel; |
| |
| // Capability information. |
| CapabilityInfo cap; |
| |
| // This combines both the BSSBasicRateSet and the OperationalRateSet, as the MLME will split |
| // them up. |
| bytes:RATES_MAX_LEN rates; |
| |
| // TODO(porce): Conditionally present. See IEEE Std 802.11-2016, 10.2, 11.8, 11.10. |
| // See also dot11MultiDomainCapabilityActivated. |
| Country country; |
| |
| bytes:32 mesh_id; |
| |
| // TODO(hahnr): Add additional elements. |
| |
| // Although MLME-START.request is used to start a BSS, IEEE does not include an RSNE in this |
| // primitive. However, IEEE doesn't define any other primitive to configure the RSN after its |
| // BSS was started. The RSNE must be available when the BSS is started, and thus, this is the |
| // right place to transfer the RSNE to the MLME. |
| bytes? rsne; |
| |
| // Combined with what MLME knows about the device capabilities, |
| // following parameters determine what to be advertised to the peer |
| // (in Beacons/ProbeResponse/AssociationResponse). Effectively this way replaces the following |
| // fields originally defined in MLME-START.request. |
| // TODO(WLAN-909): Replace phy and cbw with full-fledged parameters below. |
| // - Capability Information |
| // - HT Capabilities |
| // - HT Operation |
| // - VHT Capabilities |
| // - VHT Operation |
| // - Extended Capabilities |
| fuchsia.wlan.common.PHY phy; |
| fuchsia.wlan.common.CBW cbw; |
| }; |
| |
| // MLME-START.confirm (IEEE Std 802.11-2016, 6.3.11.3) |
| |
| enum StartResultCodes { |
| SUCCESS = 0; |
| BSS_ALREADY_STARTED_OR_JOINED = 1; |
| RESET_REQUIRED_BEFORE_START = 2; |
| NOT_SUPPORTED = 3; |
| INTERNAL_ERROR = 4; |
| }; |
| |
| struct StartConfirm { |
| StartResultCodes result_code; |
| }; |
| |
| // MLME-STOP.request (IEEE Std 802.11-2016, 6.3.12.2) |
| |
| struct StopRequest { |
| bytes:32 ssid; |
| }; |
| |
| enum StopResultCodes { |
| SUCCESS = 0; |
| BSS_ALREADY_STOPPED = 1; |
| INTERNAL_ERROR = 2; |
| }; |
| |
| struct StopConfirm { |
| StopResultCodes result_code; |
| }; |
| |
| // MLME-SETKEYS.request (IEEE Std 802.11-2016 6.3.19.1) |
| |
| enum KeyType { |
| GROUP = 1; |
| PAIRWISE = 2; |
| PEER_KEY = 3; |
| IGTK = 4; |
| }; |
| |
| struct SetKeyDescriptor { |
| // Specs specify a bit string, we use byte array. |
| bytes key; |
| uint16 key_id; |
| KeyType key_type; |
| array<uint8>:6 address; |
| uint64 rsc; |
| array<uint8>:3 cipher_suite_oui; |
| uint8 cipher_suite_type; |
| }; |
| |
| struct SetKeysRequest { |
| vector<SetKeyDescriptor> keylist; |
| }; |
| |
| // MLME-DELETEKEYS.request (IEEE Std 802.11-2016 6.3.20.1) |
| |
| struct DeleteKeyDescriptor { |
| uint16 key_id; |
| KeyType key_type; |
| array<uint8>:6 address; |
| }; |
| |
| struct DeleteKeysRequest { |
| vector<DeleteKeyDescriptor> keylist; |
| }; |
| |
| // MLME-EAPOL.request (IEEE Std 802.11-2016 6.3.22.1) |
| |
| struct EapolRequest { |
| array<uint8>:6 src_addr; |
| array<uint8>:6 dst_addr; |
| bytes data; |
| }; |
| |
| // MLME-EAPOL.confirm (IEEE Std 802.11-2016 6.3.22.2) |
| |
| enum EapolResultCodes { |
| SUCCESS = 0; |
| TRANSMISSION_FAILURE = 1; |
| //LAST = TRANSMISSION_FAILURE; |
| }; |
| |
| struct EapolConfirm { |
| EapolResultCodes result_code; |
| }; |
| |
| // IEEE Std 802.11-2016, 9.4.2.98 |
| struct MeshConfiguration { |
| uint8 active_path_sel_proto_id; |
| uint8 active_path_sel_metric_id; |
| uint8 congest_ctrl_method_id; |
| uint8 sync_method_id; |
| uint8 auth_proto_id; |
| uint8 mesh_formation_info; |
| uint8 mesh_capability; |
| }; |
| |
| // Fields that are common between the MPM Open and Confirm actions |
| struct MeshPeeringCommon { |
| array<uint8>:6 peer_sta_address; |
| uint16 protocol_id; |
| uint16 local_link_id; |
| bytes:32 mesh_id; |
| vector<uint8> rates; |
| MeshConfiguration mesh_config; |
| HtCapabilities? ht_cap; |
| HtOperation? ht_op; |
| VhtCapabilities? vht_cap; |
| VhtOperation? vht_op; |
| }; |
| |
| // IEEE Std 802.11-2016, 9.6.16.2.2 |
| struct MeshPeeringOpenAction { |
| MeshPeeringCommon common; |
| }; |
| |
| // IEEE Std 802.11-2016, 9.6.16.3.2 |
| struct MeshPeeringConfirmAction { |
| MeshPeeringCommon common; |
| uint16 aid; |
| uint16 peer_link_id; |
| }; |
| |
| struct MeshPeeringParams { |
| array<uint8>:6 peer_sta_address; |
| uint16 local_aid; |
| vector<uint8> rates; |
| // TODO(gbonik): HT/VHT caps |
| }; |
| |
| struct GetMeshPathTableRequest { |
| uint8 dummy; |
| }; |
| |
| // Because these methods rely on an external entity to provide a response, events are used instead |
| // of return values. |
| protocol MLME { |
| // ==== 01xxxx: scanning ==== |
| // We deviate from the spec here in order to support incremental scan |
| // results easily. We could stay closer to 802.11ai, but the protocol |
| // that is described there is more difficult to implement correctly. |
| |
| // Initiate a scan transaction. The caller is responsible for filling |
| // the `txn_id` field in `req` with a unique number that will be used |
| // to identify the transaction. |
| // |
| // Zero or more `OnScanResult` events with a matching `txn_id` will be sent |
| // in response. |
| // |
| // At the end on the transaction, whether it is successful or not, |
| // a `OnScanEnd` event with a matching `txn_id` is guaranteed to be sent |
| // in response (unless the channel is closed first). |
| // |
| // After `OnScanEnd`, no further events with the same `txn_id` shall be sent. |
| StartScan(ScanRequest req); |
| |
| // An incremental scan result containing information about a single BSS. |
| // Only one event per unique BSSID per transaction will be sent. |
| -> OnScanResult(ScanResult result); |
| |
| // An event that signals the end of a scan transaction. |
| -> OnScanEnd(ScanEnd end); |
| |
| // ==== |
| |
| JoinReq(JoinRequest req); |
| -> JoinConf(JoinConfirm resp); |
| |
| AuthenticateReq(AuthenticateRequest req); |
| -> AuthenticateConf(AuthenticateConfirm resp); |
| |
| -> AuthenticateInd(AuthenticateIndication ind); |
| AuthenticateResp(AuthenticateResponse resp); |
| |
| DeauthenticateReq(DeauthenticateRequest req); |
| -> DeauthenticateConf(DeauthenticateConfirm resp); |
| |
| -> DeauthenticateInd(DeauthenticateIndication ind); |
| |
| AssociateReq(AssociateRequest req); |
| -> AssociateConf(AssociateConfirm resp); |
| |
| -> AssociateInd(AssociateIndication ind); |
| AssociateResp(AssociateResponse resp); |
| |
| DisassociateReq(DisassociateRequest req); |
| -> DisassociateConf(DisassociateConfirm resp); |
| |
| -> DisassociateInd(DisassociateIndication ind); |
| |
| ResetReq(ResetRequest req); |
| |
| StartReq(StartRequest req); |
| -> StartConf(StartConfirm resp); |
| |
| StopReq(StopRequest req); |
| -> StopConf(StopConfirm resp); |
| |
| SetKeysReq(SetKeysRequest req); |
| |
| DeleteKeysReq(DeleteKeysRequest req); |
| |
| EapolReq(EapolRequest req); |
| -> EapolConf(EapolConfirm resp); |
| |
| // The following are extensions to the 802.11 MLME SAP interface. |
| |
| // ==== Mesh === |
| -> IncomingMpOpenAction(MeshPeeringOpenAction action); |
| SendMpOpenAction(MeshPeeringOpenAction action); |
| -> IncomingMpConfirmAction(MeshPeeringConfirmAction action); |
| SendMpConfirmAction(MeshPeeringConfirmAction action); |
| |
| MeshPeeringEstablished(MeshPeeringParams peering); |
| |
| GetMeshPathTableReq(GetMeshPathTableRequest req) -> (fuchsia.wlan.mesh.MeshPathTable table); |
| |
| -> SignalReport(SignalReportIndication ind); |
| |
| -> EapolInd(EapolIndication ind); |
| SetControlledPort(SetControlledPortRequest req); |
| |
| QueryDeviceInfo() -> (DeviceInfo info); |
| |
| StatsQueryReq(); |
| -> StatsQueryResp(StatsQueryResponse resp); |
| |
| ListMinstrelPeers() -> (MinstrelListResponse resp); |
| GetMinstrelStats(MinstrelStatsRequest req) -> (MinstrelStatsResponse resp); |
| |
| StartCaptureFrames(StartCaptureFramesRequest req) -> (StartCaptureFramesResponse resp); |
| StopCaptureFrames(); |
| -> RelayCapturedFrame(CapturedFrameResult result); |
| |
| -> OnChannelSwitched(ChannelSwitchInfo info); |
| |
| -> OnPmkAvailable(PmkInfo info); |
| |
| // For SoftMAC drivers only. Let SME inform MLME about the capability negotiation outcome. |
| // TODO(43063): If we are able to intersect the capabilities with beacon before associating, |
| // remove this function and the capabilities from AssociateConfirm and use AssociateRequest. |
| FinalizeAssociationReq(NegotiatedCapabilities cap); |
| }; |
| |
| // Temporary interface for bridging between the devhost-owned channel model and |
| // the driver-owned channel model of connection management. |
| /// This protocol is used to connect to the interface's underlying MLME. |
| [Layout = "Simple"] |
| protocol Connector { |
| Connect(request<MLME> request); |
| }; |