1 /* 2 * WPA Supplicant - Manager for Aidl interface objects 3 * Copyright (c) 2021, Google Inc. All rights reserved. 4 * 5 * This software may be distributed under the terms of the BSD license. 6 * See README for more details. 7 */ 8 9 #ifndef WPA_SUPPLICANT_AIDL_AIDL_MANAGER_H 10 #define WPA_SUPPLICANT_AIDL_AIDL_MANAGER_H 11 12 #include <map> 13 #include <string> 14 15 #include <aidl/android/hardware/wifi/supplicant/ISupplicantP2pIfaceCallback.h> 16 #include <aidl/android/hardware/wifi/supplicant/ISupplicantStaIfaceCallback.h> 17 #include <aidl/android/hardware/wifi/supplicant/ISupplicantStaNetworkCallback.h> 18 19 #include "certificate_utils.h" 20 #include "p2p_iface.h" 21 #include "p2p_network.h" 22 #include "rsn_supp/pmksa_cache.h" 23 #include "sta_iface.h" 24 #include "sta_network.h" 25 #include "supplicant.h" 26 27 extern "C" 28 { 29 #include "utils/common.h" 30 #include "utils/includes.h" 31 #include "wpa_supplicant_i.h" 32 #include "driver_i.h" 33 } 34 35 namespace aidl { 36 namespace android { 37 namespace hardware { 38 namespace wifi { 39 namespace supplicant { 40 41 /** 42 * AidlManager is responsible for managing the lifetime of all 43 * aidl objects created by wpa_supplicant. This is a singleton 44 * class which is created by the supplicant core and can be used 45 * to get references to the aidl objects. 46 */ 47 class AidlManager 48 { 49 public: 50 static AidlManager *getInstance(); 51 static void destroyInstance(); 52 53 // Methods called from wpa_supplicant core. 54 int registerAidlService(struct wpa_global *global); 55 int registerInterface(struct wpa_supplicant *wpa_s); 56 int unregisterInterface(struct wpa_supplicant *wpa_s); 57 int registerNetwork( 58 struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid); 59 int unregisterNetwork( 60 struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid); 61 int notifyStateChange(struct wpa_supplicant *wpa_s); 62 int notifyNetworkRequest( 63 struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid, int type, 64 const char *param); 65 void notifyPermanentIdReqDenied( 66 struct wpa_supplicant *wpa_s); 67 void notifyAnqpQueryDone( 68 struct wpa_supplicant *wpa_s, const u8 *bssid, const char *result, 69 const struct wpa_bss_anqp *anqp); 70 void notifyHs20IconQueryDone( 71 struct wpa_supplicant *wpa_s, const u8 *bssid, 72 const char *file_name, const u8 *image, u32 image_length); 73 void notifyHs20RxSubscriptionRemediation( 74 struct wpa_supplicant *wpa_s, const char *url, u8 osu_method); 75 void notifyHs20RxDeauthImminentNotice( 76 struct wpa_supplicant *wpa_s, u8 code, u16 reauth_delay, 77 const char *url); 78 void notifyHs20RxTermsAndConditionsAcceptance( 79 struct wpa_supplicant *wpa_s, const char *url); 80 void notifyDisconnectReason(struct wpa_supplicant *wpa_s); 81 void notifyAssocReject(struct wpa_supplicant *wpa_s, const u8 *bssid, 82 u8 timed_out, const u8 *assoc_resp_ie, size_t assoc_resp_ie_len); 83 void notifyAuthTimeout(struct wpa_supplicant *wpa_s); 84 void notifyBssidChanged(struct wpa_supplicant *wpa_s); 85 void notifyWpsEventFail( 86 struct wpa_supplicant *wpa_s, uint8_t *peer_macaddr, 87 uint16_t config_error, uint16_t error_indication); 88 void notifyWpsEventSuccess(struct wpa_supplicant *wpa_s); 89 void notifyWpsEventPbcOverlap(struct wpa_supplicant *wpa_s); 90 void notifyP2pDeviceFound( 91 struct wpa_supplicant *wpa_s, const u8 *addr, 92 const struct p2p_peer_info *info, const u8 *peer_wfd_device_info, 93 u8 peer_wfd_device_info_len, const u8 *peer_wfd_r2_device_info, 94 u8 peer_wfd_r2_device_info_len); 95 void notifyP2pDeviceLost( 96 struct wpa_supplicant *wpa_s, const u8 *p2p_device_addr); 97 void notifyP2pFindStopped(struct wpa_supplicant *wpa_s); 98 void notifyP2pGoNegReq( 99 struct wpa_supplicant *wpa_s, const u8 *src_addr, u16 dev_passwd_id, 100 u8 go_intent); 101 void notifyP2pGoNegCompleted( 102 struct wpa_supplicant *wpa_s, const struct p2p_go_neg_results *res); 103 void notifyP2pGroupFormationFailure( 104 struct wpa_supplicant *wpa_s, const char *reason); 105 void notifyP2pGroupStarted( 106 struct wpa_supplicant *wpa_group_s, const struct wpa_ssid *ssid, 107 int persistent, int client, const u8 *ip); 108 void notifyP2pGroupRemoved( 109 struct wpa_supplicant *wpa_group_s, const struct wpa_ssid *ssid, 110 const char *role); 111 void notifyP2pInvitationReceived( 112 struct wpa_supplicant *wpa_s, const u8 *sa, const u8 *go_dev_addr, 113 const u8 *bssid, int id, int op_freq); 114 void notifyP2pInvitationResult( 115 struct wpa_supplicant *wpa_s, int status, const u8 *bssid); 116 void notifyP2pProvisionDiscovery( 117 struct wpa_supplicant *wpa_s, const u8 *dev_addr, int request, 118 enum p2p_prov_disc_status status, u16 config_methods, 119 unsigned int generated_pin); 120 void notifyP2pSdResponse( 121 struct wpa_supplicant *wpa_s, const u8 *sa, u16 update_indic, 122 const u8 *tlvs, size_t tlvs_len); 123 void notifyApStaAuthorized( 124 struct wpa_supplicant *wpa_s, const u8 *sta, 125 const u8 *p2p_dev_addr); 126 void notifyApStaDeauthorized( 127 struct wpa_supplicant *wpa_s, const u8 *sta, 128 const u8 *p2p_dev_addr); 129 void notifyEapError(struct wpa_supplicant *wpa_s, int error_code); 130 void notifyDppConfigReceived(struct wpa_supplicant *wpa_s, 131 struct wpa_ssid *config, 132 bool conn_status_requested); 133 void notifyDppConfigSent(struct wpa_supplicant *wpa_s); 134 void notifyDppConnectionStatusSent(struct wpa_supplicant *wpa_s, 135 enum dpp_status_error result); 136 void notifyDppSuccess(struct wpa_supplicant *wpa_s, DppEventType code); 137 void notifyDppFailure(struct wpa_supplicant *wpa_s, 138 DppFailureCode code); 139 void notifyDppFailure(struct wpa_supplicant *wpa_s, 140 DppFailureCode code, 141 const char *ssid, const char *channel_list, unsigned short band_list[], 142 int size); 143 void notifyDppProgress(struct wpa_supplicant *wpa_s, 144 DppProgressCode code); 145 void notifyPmkCacheAdded(struct wpa_supplicant *wpa_s, 146 struct rsn_pmksa_cache_entry *pmksa_entry); 147 void notifyBssTmStatus(struct wpa_supplicant *wpa_s); 148 void notifyTransitionDisable(struct wpa_supplicant *wpa_s, 149 struct wpa_ssid *ssid, 150 u8 bitmap); 151 void notifyNetworkNotFound(struct wpa_supplicant *wpa_s); 152 void notifyFrequencyChanged(struct wpa_supplicant *wpa_s, int frequency); 153 void notifyCertification(struct wpa_supplicant *wpa_s, 154 int depth, const char *subject, 155 const char *altsubject[], 156 int num_altsubject, 157 const char *cert_hash, 158 const struct wpabuf *cert); 159 void notifyAuxiliaryEvent(struct wpa_supplicant *wpa_s, 160 AuxiliarySupplicantEventCode event_code, 161 const char *reason_string); 162 void notifyQosPolicyReset(struct wpa_supplicant *wpa_s); 163 void notifyQosPolicyRequest(struct wpa_supplicant *wpa_s, 164 struct dscp_policy_data *policies, 165 int num_policies); 166 ssize_t getCertificate(const char* alias, uint8_t** value); 167 ssize_t listAliases(const char *prefix, char ***aliases); 168 void notifyQosPolicyScsResponse(struct wpa_supplicant *wpa_s, 169 unsigned int count, int **scs_resp); 170 void notifyMloLinksInfoChanged(struct wpa_supplicant *wpa_s, 171 enum mlo_info_change_reason reason); 172 173 // Methods called from aidl objects. 174 void notifyExtRadioWorkStart(struct wpa_supplicant *wpa_s, uint32_t id); 175 void notifyExtRadioWorkTimeout( 176 struct wpa_supplicant *wpa_s, uint32_t id); 177 178 int getP2pIfaceAidlObjectByIfname( 179 const std::string &ifname, 180 std::shared_ptr<ISupplicantP2pIface> *iface_object); 181 int getStaIfaceAidlObjectByIfname( 182 const std::string &ifname, 183 std::shared_ptr<ISupplicantStaIface> *iface_object); 184 int getP2pNetworkAidlObjectByIfnameAndNetworkId( 185 const std::string &ifname, int network_id, 186 std::shared_ptr<ISupplicantP2pNetwork> *network_object); 187 int getStaNetworkAidlObjectByIfnameAndNetworkId( 188 const std::string &ifname, int network_id, 189 std::shared_ptr<ISupplicantStaNetwork> *network_object); 190 int addSupplicantCallbackAidlObject( 191 const std::shared_ptr<ISupplicantCallback> &callback); 192 int addP2pIfaceCallbackAidlObject( 193 const std::string &ifname, 194 const std::shared_ptr<ISupplicantP2pIfaceCallback> &callback); 195 int addStaIfaceCallbackAidlObject( 196 const std::string &ifname, 197 const std::shared_ptr<ISupplicantStaIfaceCallback> &callback); 198 int addStaNetworkCallbackAidlObject( 199 const std::string &ifname, int network_id, 200 const std::shared_ptr<ISupplicantStaNetworkCallback> &callback); 201 int registerNonStandardCertCallbackAidlObject( 202 const std::shared_ptr<INonStandardCertCallback> &callback); 203 204 private: 205 AidlManager() = default; 206 ~AidlManager() = default; 207 AidlManager(const AidlManager &) = default; 208 AidlManager &operator=(const AidlManager &) = default; 209 210 struct wpa_supplicant *getTargetP2pIfaceForGroup( 211 struct wpa_supplicant *wpa_s); 212 void removeSupplicantCallbackAidlObject( 213 const std::shared_ptr<ISupplicantCallback> &callback); 214 void removeP2pIfaceCallbackAidlObject( 215 const std::string &ifname, 216 const std::shared_ptr<ISupplicantP2pIfaceCallback> &callback); 217 void removeStaIfaceCallbackAidlObject( 218 const std::string &ifname, 219 const std::shared_ptr<ISupplicantStaIfaceCallback> &callback); 220 void removeStaNetworkCallbackAidlObject( 221 const std::string &ifname, int network_id, 222 const std::shared_ptr<ISupplicantStaNetworkCallback> &callback); 223 224 void callWithEachSupplicantCallback( 225 const std::function<ndk::ScopedAStatus( 226 std::shared_ptr<ISupplicantCallback>)> &method); 227 void callWithEachP2pIfaceCallback( 228 const std::string &ifname, 229 const std::function<ndk::ScopedAStatus( 230 std::shared_ptr<ISupplicantP2pIfaceCallback>)> &method); 231 void callWithEachStaIfaceCallback( 232 const std::string &ifname, 233 const std::function<ndk::ScopedAStatus( 234 std::shared_ptr<ISupplicantStaIfaceCallback>)> &method); 235 void callWithEachStaNetworkCallback( 236 const std::string &ifname, int network_id, 237 const std::function<::ndk::ScopedAStatus( 238 std::shared_ptr<ISupplicantStaNetworkCallback>)> &method); 239 240 // Singleton instance of this class. 241 static AidlManager *instance_; 242 // Death notifier. 243 AIBinder_DeathRecipient* death_notifier_; 244 // The main aidl service object. 245 std::shared_ptr<Supplicant> supplicant_object_; 246 // Map of all the P2P interface specific aidl objects controlled by 247 // wpa_supplicant. This map is keyed in by the corresponding 248 // |ifname|. 249 std::map<const std::string, std::shared_ptr<P2pIface>> 250 p2p_iface_object_map_; 251 // Map of all the STA interface specific aidl objects controlled by 252 // wpa_supplicant. This map is keyed in by the corresponding 253 // |ifname|. 254 std::map<const std::string, std::shared_ptr<StaIface>> 255 sta_iface_object_map_; 256 // Map of all the P2P network specific aidl objects controlled by 257 // wpa_supplicant. This map is keyed in by the corresponding 258 // |ifname| & |network_id|. 259 std::map<const std::string, std::shared_ptr<P2pNetwork>> 260 p2p_network_object_map_; 261 // Map of all the STA network specific aidl objects controlled by 262 // wpa_supplicant. This map is keyed in by the corresponding 263 // |ifname| & |network_id|. 264 std::map<const std::string, std::shared_ptr<StaNetwork>> 265 sta_network_object_map_; 266 267 // Callbacks registered for the main aidl service object. 268 std::vector<std::shared_ptr<ISupplicantCallback>> supplicant_callbacks_; 269 // Map of all the callbacks registered for P2P interface specific 270 // aidl objects controlled by wpa_supplicant. This map is keyed in by 271 // the corresponding |ifname|. 272 std::map< 273 const std::string, 274 std::vector<std::shared_ptr<ISupplicantP2pIfaceCallback>>> 275 p2p_iface_callbacks_map_; 276 // Map of all the callbacks registered for STA interface specific 277 // aidl objects controlled by wpa_supplicant. This map is keyed in by 278 // the corresponding |ifname|. 279 std::map< 280 const std::string, 281 std::vector<std::shared_ptr<ISupplicantStaIfaceCallback>>> 282 sta_iface_callbacks_map_; 283 // Map of all the callbacks registered for STA network specific 284 // aidl objects controlled by wpa_supplicant. This map is keyed in by 285 // the corresponding |ifname| & |network_id|. 286 std::map< 287 const std::string, 288 std::vector<std::shared_ptr<ISupplicantStaNetworkCallback>>> 289 sta_network_callbacks_map_; 290 // NonStandardCertCallback registered by the client. 291 std::shared_ptr<INonStandardCertCallback> non_standard_cert_callback_; 292 }; 293 294 // The aidl interface uses some values which are the same as internal ones to 295 // avoid nasty runtime conversion functions. So, adding compile time asserts 296 // to guard against any internal changes breaking the aidl interface. 297 static_assert( 298 static_cast<uint32_t>(DebugLevel::EXCESSIVE) == MSG_EXCESSIVE, 299 "Debug level value mismatch"); 300 static_assert( 301 static_cast<uint32_t>(DebugLevel::ERROR) == MSG_ERROR, 302 "Debug level value mismatch"); 303 304 static_assert( 305 static_cast<uint32_t>(KeyMgmtMask::NONE) == 306 WPA_KEY_MGMT_NONE, 307 "KeyMgmt value mismatch"); 308 static_assert( 309 static_cast<uint32_t>(KeyMgmtMask::WPA_PSK) == 310 WPA_KEY_MGMT_PSK, 311 "KeyMgmt value mismatch"); 312 static_assert( 313 static_cast<uint32_t>(KeyMgmtMask::WPA_EAP) == 314 WPA_KEY_MGMT_IEEE8021X, 315 "KeyMgmt value mismatch"); 316 static_assert( 317 static_cast<uint32_t>(KeyMgmtMask::IEEE8021X) == 318 WPA_KEY_MGMT_IEEE8021X_NO_WPA, 319 "KeyMgmt value mismatch"); 320 static_assert( 321 static_cast<uint32_t>(KeyMgmtMask::FT_EAP) == 322 WPA_KEY_MGMT_FT_IEEE8021X, 323 "KeyMgmt value mismatch"); 324 static_assert( 325 static_cast<uint32_t>(KeyMgmtMask::FT_PSK) == 326 WPA_KEY_MGMT_FT_PSK, 327 "KeyMgmt value mismatch"); 328 static_assert( 329 static_cast<uint32_t>(KeyMgmtMask::OSEN) == 330 WPA_KEY_MGMT_OSEN, 331 "KeyMgmt value mismatch"); 332 static_assert( 333 static_cast<uint32_t>(KeyMgmtMask::SAE) == 334 WPA_KEY_MGMT_SAE, 335 "KeyMgmt value mismatch"); 336 static_assert( 337 static_cast<uint32_t>(KeyMgmtMask::SUITE_B_192) == 338 WPA_KEY_MGMT_IEEE8021X_SUITE_B_192, 339 "KeyMgmt value mismatch"); 340 static_assert( 341 static_cast<uint32_t>(KeyMgmtMask::OWE) == 342 WPA_KEY_MGMT_OWE, 343 "KeyMgmt value mismatch"); 344 static_assert( 345 static_cast<uint32_t>(KeyMgmtMask::WPA_PSK_SHA256) == 346 WPA_KEY_MGMT_PSK_SHA256, 347 "KeyMgmt value mismatch"); 348 static_assert( 349 static_cast<uint32_t>(KeyMgmtMask::WPA_EAP_SHA256) == 350 WPA_KEY_MGMT_IEEE8021X_SHA256, 351 "KeyMgmt value mismatch"); 352 static_assert( 353 static_cast<uint32_t>(KeyMgmtMask::WAPI_PSK) == 354 WPA_KEY_MGMT_WAPI_PSK, 355 "KeyMgmt value mismatch"); 356 static_assert( 357 static_cast<uint32_t>(KeyMgmtMask::WAPI_CERT) == 358 WPA_KEY_MGMT_WAPI_CERT, 359 "KeyMgmt value mismatch"); 360 static_assert( 361 static_cast<uint32_t>(ProtoMask::WPA) == 362 WPA_PROTO_WPA, 363 "Proto value mismatch"); 364 static_assert( 365 static_cast<uint32_t>(ProtoMask::RSN) == 366 WPA_PROTO_RSN, 367 "Proto value mismatch"); 368 static_assert( 369 static_cast<uint32_t>(ProtoMask::OSEN) == 370 WPA_PROTO_OSEN, 371 "Proto value mismatch"); 372 static_assert( 373 static_cast<uint32_t>(ProtoMask::WAPI) == 374 WPA_PROTO_WAPI, 375 "Proto value mismatch"); 376 static_assert( 377 static_cast<uint32_t>(AuthAlgMask::OPEN) == 378 WPA_AUTH_ALG_OPEN, 379 "AuthAlg value mismatch"); 380 static_assert( 381 static_cast<uint32_t>(AuthAlgMask::SHARED) == 382 WPA_AUTH_ALG_SHARED, 383 "AuthAlg value mismatch"); 384 static_assert( 385 static_cast<uint32_t>(AuthAlgMask::LEAP) == 386 WPA_AUTH_ALG_LEAP, 387 "AuthAlg value mismatch"); 388 static_assert( 389 static_cast<uint32_t>(GroupCipherMask::WEP40) == 390 WPA_CIPHER_WEP40, 391 "GroupCipher value mismatch"); 392 static_assert( 393 static_cast<uint32_t>(GroupCipherMask::WEP104) == 394 WPA_CIPHER_WEP104, 395 "GroupCipher value mismatch"); 396 static_assert( 397 static_cast<uint32_t>(GroupCipherMask::TKIP) == 398 WPA_CIPHER_TKIP, 399 "GroupCipher value mismatch"); 400 static_assert( 401 static_cast<uint32_t>(GroupCipherMask::CCMP) == 402 WPA_CIPHER_CCMP, 403 "GroupCipher value mismatch"); 404 static_assert( 405 static_cast<uint32_t>(GroupCipherMask::GCMP_256) == 406 WPA_CIPHER_GCMP_256, 407 "GroupCipher value mismatch"); 408 static_assert( 409 static_cast<uint32_t>(GroupCipherMask::SMS4) == 410 WPA_CIPHER_SMS4, 411 "GroupCipher value mismatch"); 412 static_assert( 413 static_cast<uint32_t>( 414 GroupCipherMask::GTK_NOT_USED) == 415 WPA_CIPHER_GTK_NOT_USED, 416 "GroupCipher value mismatch"); 417 static_assert( 418 static_cast<uint32_t>(PairwiseCipherMask::NONE) == 419 WPA_CIPHER_NONE, 420 "PairwiseCipher value mismatch"); 421 static_assert( 422 static_cast<uint32_t>(PairwiseCipherMask::TKIP) == 423 WPA_CIPHER_TKIP, 424 "PairwiseCipher value mismatch"); 425 static_assert( 426 static_cast<uint32_t>(PairwiseCipherMask::CCMP) == 427 WPA_CIPHER_CCMP, 428 "PairwiseCipher value mismatch"); 429 static_assert( 430 static_cast<uint32_t>( 431 PairwiseCipherMask::GCMP_256) == 432 WPA_CIPHER_GCMP_256, 433 "PairwiseCipher value mismatch"); 434 static_assert( 435 static_cast<uint32_t>( 436 PairwiseCipherMask::SMS4) == 437 WPA_CIPHER_SMS4, 438 "PairwiseCipher value mismatch"); 439 static_assert( 440 static_cast<uint32_t>(StaIfaceCallbackState::DISCONNECTED) == 441 WPA_DISCONNECTED, 442 "State value mismatch"); 443 static_assert( 444 static_cast<uint32_t>(StaIfaceCallbackState::COMPLETED) == 445 WPA_COMPLETED, 446 "State value mismatch"); 447 448 static_assert( 449 static_cast<uint32_t>(AnqpInfoId::VENUE_NAME) == 450 ANQP_VENUE_NAME, 451 "ANQP ID value mismatch"); 452 static_assert( 453 static_cast<uint32_t>( 454 AnqpInfoId::ROAMING_CONSORTIUM) == 455 ANQP_ROAMING_CONSORTIUM, 456 "ANQP ID value mismatch"); 457 static_assert( 458 static_cast<uint32_t>(AnqpInfoId::NAI_REALM) == 459 ANQP_NAI_REALM, 460 "ANQP ID value mismatch"); 461 static_assert( 462 static_cast<uint32_t>( 463 AnqpInfoId::IP_ADDR_TYPE_AVAILABILITY) == 464 ANQP_IP_ADDR_TYPE_AVAILABILITY, 465 "ANQP ID value mismatch"); 466 static_assert( 467 static_cast<uint32_t>( 468 AnqpInfoId::ANQP_3GPP_CELLULAR_NETWORK) == 469 ANQP_3GPP_CELLULAR_NETWORK, 470 "ANQP ID value mismatch"); 471 static_assert( 472 static_cast<uint32_t>(AnqpInfoId::DOMAIN_NAME) == 473 ANQP_DOMAIN_NAME, 474 "ANQP ID value mismatch"); 475 static_assert( 476 static_cast<uint32_t>( 477 Hs20AnqpSubtypes::OPERATOR_FRIENDLY_NAME) == 478 HS20_STYPE_OPERATOR_FRIENDLY_NAME, 479 "HS Subtype value mismatch"); 480 static_assert( 481 static_cast<uint32_t>(Hs20AnqpSubtypes::WAN_METRICS) == 482 HS20_STYPE_WAN_METRICS, 483 "HS Subtype value mismatch"); 484 static_assert( 485 static_cast<uint32_t>( 486 Hs20AnqpSubtypes::CONNECTION_CAPABILITY) == 487 HS20_STYPE_CONNECTION_CAPABILITY, 488 "HS Subtype value mismatch"); 489 static_assert( 490 static_cast<uint32_t>( 491 Hs20AnqpSubtypes::OSU_PROVIDERS_LIST) == 492 HS20_STYPE_OSU_PROVIDERS_LIST, 493 "HS Subtype value mismatch"); 494 495 static_assert( 496 static_cast<uint16_t>( 497 WpsConfigError::NO_ERROR) == 498 WPS_CFG_NO_ERROR, 499 "Wps config error value mismatch"); 500 static_assert( 501 static_cast<uint16_t>(WpsConfigError:: 502 PUBLIC_KEY_HASH_MISMATCH) == 503 WPS_CFG_PUBLIC_KEY_HASH_MISMATCH, 504 "Wps config error value mismatch"); 505 static_assert( 506 static_cast<uint16_t>( 507 WpsErrorIndication::NO_ERROR) == 508 WPS_EI_NO_ERROR, 509 "Wps error indication value mismatch"); 510 static_assert( 511 static_cast<uint16_t>( 512 WpsErrorIndication::AUTH_FAILURE) == 513 WPS_EI_AUTH_FAILURE, 514 "Wps error indication value mismatch"); 515 516 static_assert( 517 static_cast<uint32_t>(WpsConfigMethods::USBA) == WPS_CONFIG_USBA, 518 "Wps config value mismatch"); 519 static_assert( 520 static_cast<uint32_t>(WpsConfigMethods::ETHERNET) == WPS_CONFIG_ETHERNET, 521 "Wps config value mismatch"); 522 static_assert( 523 static_cast<uint32_t>(WpsConfigMethods::LABEL) == WPS_CONFIG_LABEL, 524 "Wps config value mismatch"); 525 static_assert( 526 static_cast<uint32_t>(WpsConfigMethods::DISPLAY) == WPS_CONFIG_DISPLAY, 527 "Wps config value mismatch"); 528 static_assert( 529 static_cast<uint32_t>(WpsConfigMethods::INT_NFC_TOKEN) == 530 WPS_CONFIG_INT_NFC_TOKEN, 531 "Wps config value mismatch"); 532 static_assert( 533 static_cast<uint32_t>(WpsConfigMethods::EXT_NFC_TOKEN) == 534 WPS_CONFIG_EXT_NFC_TOKEN, 535 "Wps config value mismatch"); 536 static_assert( 537 static_cast<uint32_t>(WpsConfigMethods::NFC_INTERFACE) == 538 WPS_CONFIG_NFC_INTERFACE, 539 "Wps config value mismatch"); 540 static_assert( 541 static_cast<uint32_t>(WpsConfigMethods::PUSHBUTTON) == 542 WPS_CONFIG_PUSHBUTTON, 543 "Wps config value mismatch"); 544 static_assert( 545 static_cast<uint32_t>(WpsConfigMethods::KEYPAD) == WPS_CONFIG_KEYPAD, 546 "Wps config value mismatch"); 547 static_assert( 548 static_cast<uint32_t>(WpsConfigMethods::VIRT_PUSHBUTTON) == 549 WPS_CONFIG_VIRT_PUSHBUTTON, 550 "Wps config value mismatch"); 551 static_assert( 552 static_cast<uint32_t>(WpsConfigMethods::PHY_PUSHBUTTON) == 553 WPS_CONFIG_PHY_PUSHBUTTON, 554 "Wps config value mismatch"); 555 static_assert( 556 static_cast<uint32_t>(WpsConfigMethods::P2PS) == WPS_CONFIG_P2PS, 557 "Wps config value mismatch"); 558 static_assert( 559 static_cast<uint32_t>(WpsConfigMethods::VIRT_DISPLAY) == 560 WPS_CONFIG_VIRT_DISPLAY, 561 "Wps config value mismatch"); 562 static_assert( 563 static_cast<uint32_t>(WpsConfigMethods::PHY_DISPLAY) == 564 WPS_CONFIG_PHY_DISPLAY, 565 "Wps config value mismatch"); 566 567 static_assert( 568 static_cast<uint32_t>(P2pGroupCapabilityMask::GROUP_OWNER) == 569 P2P_GROUP_CAPAB_GROUP_OWNER, 570 "P2P capability value mismatch"); 571 static_assert( 572 static_cast<uint32_t>(P2pGroupCapabilityMask::PERSISTENT_GROUP) == 573 P2P_GROUP_CAPAB_PERSISTENT_GROUP, 574 "P2P capability value mismatch"); 575 static_assert( 576 static_cast<uint32_t>(P2pGroupCapabilityMask::GROUP_LIMIT) == 577 P2P_GROUP_CAPAB_GROUP_LIMIT, 578 "P2P capability value mismatch"); 579 static_assert( 580 static_cast<uint32_t>(P2pGroupCapabilityMask::INTRA_BSS_DIST) == 581 P2P_GROUP_CAPAB_INTRA_BSS_DIST, 582 "P2P capability value mismatch"); 583 static_assert( 584 static_cast<uint32_t>(P2pGroupCapabilityMask::CROSS_CONN) == 585 P2P_GROUP_CAPAB_CROSS_CONN, 586 "P2P capability value mismatch"); 587 static_assert( 588 static_cast<uint32_t>(P2pGroupCapabilityMask::PERSISTENT_RECONN) == 589 P2P_GROUP_CAPAB_PERSISTENT_RECONN, 590 "P2P capability value mismatch"); 591 static_assert( 592 static_cast<uint32_t>(P2pGroupCapabilityMask::GROUP_FORMATION) == 593 P2P_GROUP_CAPAB_GROUP_FORMATION, 594 "P2P capability value mismatch"); 595 596 static_assert( 597 static_cast<uint16_t>( 598 WpsDevPasswordId::DEFAULT) == 599 DEV_PW_DEFAULT, 600 "Wps dev password id value mismatch"); 601 static_assert( 602 static_cast<uint16_t>( 603 WpsDevPasswordId::USER_SPECIFIED) == 604 DEV_PW_USER_SPECIFIED, 605 "Wps dev password id value mismatch"); 606 static_assert( 607 static_cast<uint16_t>( 608 WpsDevPasswordId::MACHINE_SPECIFIED) == 609 DEV_PW_MACHINE_SPECIFIED, 610 "Wps dev password id value mismatch"); 611 static_assert( 612 static_cast<uint16_t>( 613 WpsDevPasswordId::REKEY) == DEV_PW_REKEY, 614 "Wps dev password id value mismatch"); 615 static_assert( 616 static_cast<uint16_t>( 617 WpsDevPasswordId::PUSHBUTTON) == 618 DEV_PW_PUSHBUTTON, 619 "Wps dev password id value mismatch"); 620 static_assert( 621 static_cast<uint16_t>( 622 WpsDevPasswordId::REGISTRAR_SPECIFIED) == 623 DEV_PW_REGISTRAR_SPECIFIED, 624 "Wps dev password id value mismatch"); 625 static_assert( 626 static_cast<uint16_t>(WpsDevPasswordId:: 627 NFC_CONNECTION_HANDOVER) == 628 DEV_PW_NFC_CONNECTION_HANDOVER, 629 "Wps dev password id value mismatch"); 630 static_assert( 631 static_cast<uint16_t>( 632 WpsDevPasswordId::P2PS_DEFAULT) == 633 DEV_PW_P2PS_DEFAULT, 634 "Wps dev password id value mismatch"); 635 636 static_assert( 637 static_cast<uint16_t>( 638 P2pStatusCode::SUCCESS) == P2P_SC_SUCCESS, 639 "P2P status code value mismatch"); 640 static_assert( 641 static_cast<uint16_t>(P2pStatusCode:: 642 FAIL_INFO_CURRENTLY_UNAVAILABLE) == 643 P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE, 644 "P2P status code value mismatch"); 645 static_assert( 646 static_cast<uint16_t>( 647 P2pStatusCode::FAIL_INCOMPATIBLE_PARAMS) == 648 P2P_SC_FAIL_INCOMPATIBLE_PARAMS, 649 "P2P status code value mismatch"); 650 static_assert( 651 static_cast<uint16_t>( 652 P2pStatusCode::FAIL_LIMIT_REACHED) == 653 P2P_SC_FAIL_LIMIT_REACHED, 654 "P2P status code value mismatch"); 655 static_assert( 656 static_cast<uint16_t>( 657 P2pStatusCode::FAIL_INVALID_PARAMS) == 658 P2P_SC_FAIL_INVALID_PARAMS, 659 "P2P status code value mismatch"); 660 static_assert( 661 static_cast<uint16_t>(P2pStatusCode:: 662 FAIL_UNABLE_TO_ACCOMMODATE) == 663 P2P_SC_FAIL_UNABLE_TO_ACCOMMODATE, 664 "P2P status code value mismatch"); 665 static_assert( 666 static_cast<uint16_t>( 667 P2pStatusCode::FAIL_PREV_PROTOCOL_ERROR) == 668 P2P_SC_FAIL_PREV_PROTOCOL_ERROR, 669 "P2P status code value mismatch"); 670 static_assert( 671 static_cast<uint16_t>( 672 P2pStatusCode::FAIL_NO_COMMON_CHANNELS) == 673 P2P_SC_FAIL_NO_COMMON_CHANNELS, 674 "P2P status code value mismatch"); 675 static_assert( 676 static_cast<uint16_t>( 677 P2pStatusCode::FAIL_UNKNOWN_GROUP) == 678 P2P_SC_FAIL_UNKNOWN_GROUP, 679 "P2P status code value mismatch"); 680 static_assert( 681 static_cast<uint16_t>( 682 P2pStatusCode::FAIL_BOTH_GO_INTENT_15) == 683 P2P_SC_FAIL_BOTH_GO_INTENT_15, 684 "P2P status code value mismatch"); 685 static_assert( 686 static_cast<uint16_t>(P2pStatusCode:: 687 FAIL_INCOMPATIBLE_PROV_METHOD) == 688 P2P_SC_FAIL_INCOMPATIBLE_PROV_METHOD, 689 "P2P status code value mismatch"); 690 static_assert( 691 static_cast<uint16_t>( 692 P2pStatusCode::FAIL_REJECTED_BY_USER) == 693 P2P_SC_FAIL_REJECTED_BY_USER, 694 "P2P status code value mismatch"); 695 static_assert( 696 static_cast<uint16_t>( 697 P2pStatusCode::SUCCESS_DEFERRED) == 698 P2P_SC_SUCCESS_DEFERRED, 699 "P2P status code value mismatch"); 700 701 static_assert( 702 static_cast<uint16_t>( 703 P2pProvDiscStatusCode::SUCCESS) == 704 P2P_PROV_DISC_SUCCESS, 705 "P2P status code value mismatch"); 706 static_assert( 707 static_cast<uint16_t>( 708 P2pProvDiscStatusCode::TIMEOUT) == 709 P2P_PROV_DISC_TIMEOUT, 710 "P2P status code value mismatch"); 711 static_assert( 712 static_cast<uint16_t>( 713 P2pProvDiscStatusCode::REJECTED) == 714 P2P_PROV_DISC_REJECTED, 715 "P2P status code value mismatch"); 716 static_assert( 717 static_cast<uint16_t>( 718 P2pProvDiscStatusCode::TIMEOUT_JOIN) == 719 P2P_PROV_DISC_TIMEOUT_JOIN, 720 "P2P status code value mismatch"); 721 static_assert( 722 static_cast<uint16_t>( 723 P2pProvDiscStatusCode::INFO_UNAVAILABLE) == 724 P2P_PROV_DISC_INFO_UNAVAILABLE, 725 "P2P status code value mismatch"); 726 } // namespace supplicant 727 } // namespace wifi 728 } // namespace hardware 729 } // namespace android 730 } // namespace aidl 731 #endif // WPA_SUPPLICANT_AIDL_AIDL_MANAGER_H 732