//============================================================================ void WF_SecurityWpsSet(t_wpsContext *p_context) { #if defined(WF_ERROR_CHECKING) uint32_t errorCode = UdSetSecurityWps(p_context); if (errorCode != UD_SUCCESS) { EventEnqueue(WF_EVENT_ERROR, errorCode); return; } #endif /* WF_ERROR_CHECKING */ WF_SetSecurity(p_context->wpsSecurityType, 0, p_context->wpsPin, p_context->wpsPinLength); #if defined(WF_USE_HOST_WPA_KEY_CALCULATION) // if host wants the host to calculate a binary key from a possible WPS-PSK passphrase if (p_context->getPassPhrase == true) { // tell MRF24WG to send wpa-psk passphrase back to host (if AP using WPA passphrase) YieldPassPhraseToHost(); // save pointer to passphrase info block g_p_wpaKeyInfo = p_context->p_keyInfo; } #endif /* WF_USE_HOST_WPA_KEY_CALCULATION */ }
/* Function: void DRV_WIFI_SecurityWpsSet(DRV_WIFI_WPS_CONTEXT *p_context); Summary: Sets WiFi security to use WPS Description: This function sets the WiFi security to WPS. One can only connect to an AP that supports WPS. Parameters: p_context - desired WPA context. See DRV_WIFI_WPS_CONTEXT structure. Returns: None */ void DRV_WIFI_SecurityWpsSet(DRV_WIFI_WPS_CONTEXT *p_context) { SetSecurity(p_context->wpsSecurityType, p_context->wpsPin, p_context->wpsPinLength); #if defined(DRV_WIFI_USE_HOST_WPA_KEY_CALCULATION) // if host wants the host to calculate a binary key from a possible WPS-PSK passphrase if (p_context->getPassPhrase == true) { // tell MRF24WG to send wpa-psk passphrase back to host (if AP using WPA passphrase) YieldPassPhraseToHost(); // save pointer to passphrase info block g_p_wpaKeyInfo = p_context->p_keyInfo; } #endif /* DRV_WIFI_USE_HOST_WPA_KEY_CALCULATION */ }