Revert "[wpa_supplicant] Cumulative patch from b8491ae5a"
This reverts commit 878cf7bcbf2d7d8f08c3d060b8c5fbfcf0743eda.
Reason for revert: git_master/sdk_phone_armv7-sdk
Change-Id: I6070fc5c1f9c20867f6dfce90e529e35578d572e
diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c
index 697c3ba..75edbc9 100644
--- a/src/ap/dpp_hostapd.c
+++ b/src/ap/dpp_hostapd.c
@@ -16,7 +16,6 @@
#include "hostapd.h"
#include "ap_drv_ops.h"
#include "gas_query_ap.h"
-#include "gas_serv.h"
#include "wpa_auth.h"
#include "dpp_hostapd.h"
@@ -558,14 +557,6 @@
* received hash values */
dpp_bootstrap_find_pair(hapd->iface->interfaces->dpp, i_bootstrap,
r_bootstrap, &own_bi, &peer_bi);
-#ifdef CONFIG_DPP2
- if (!own_bi) {
- if (dpp_relay_rx_action(hapd->iface->interfaces->dpp,
- src, hdr, buf, len, freq, i_bootstrap,
- r_bootstrap) == 0)
- return;
- }
-#endif /* CONFIG_DPP2 */
if (!own_bi) {
wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_FAIL
"No matching own bootstrapping key found - ignore message");
@@ -1366,12 +1357,6 @@
wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_RX "src=" MACSTR
" freq=%u type=%d", MAC2STR(src), freq, type);
-#ifdef CONFIG_DPP2
- if (dpp_relay_rx_action(hapd->iface->interfaces->dpp,
- src, hdr, buf, len, freq, NULL, NULL) == 0)
- return;
-#endif /* CONFIG_DPP2 */
-
switch (type) {
case DPP_PA_AUTHENTICATION_REQ:
hostapd_dpp_rx_auth_req(hapd, src, hdr, buf, len, freq);
@@ -1425,8 +1410,7 @@
struct wpabuf *
hostapd_dpp_gas_req_handler(struct hostapd_data *hapd, const u8 *sa,
- const u8 *query, size_t query_len,
- const u8 *data, size_t data_len)
+ const u8 *query, size_t query_len)
{
struct dpp_authentication *auth = hapd->dpp_auth;
struct wpabuf *resp;
@@ -1434,13 +1418,6 @@
wpa_printf(MSG_DEBUG, "DPP: GAS request from " MACSTR, MAC2STR(sa));
if (!auth || !auth->auth_success ||
os_memcmp(sa, auth->peer_mac_addr, ETH_ALEN) != 0) {
-#ifdef CONFIG_DPP2
- if (dpp_relay_rx_gas_req(hapd->iface->interfaces->dpp, sa, data,
- data_len) == 0) {
- /* Response will be forwarded once received over TCP */
- return NULL;
- }
-#endif /* CONFIG_DPP2 */
wpa_printf(MSG_DEBUG, "DPP: No matching exchange in progress");
return NULL;
}
@@ -1632,67 +1609,11 @@
}
-#ifdef CONFIG_DPP2
-
-static void hostapd_dpp_relay_tx(void *ctx, const u8 *addr, unsigned int freq,
- const u8 *msg, size_t len)
-{
- struct hostapd_data *hapd = ctx;
- u8 *buf;
-
- wpa_printf(MSG_DEBUG, "DPP: Send action frame dst=" MACSTR " freq=%u",
- MAC2STR(addr), freq);
- buf = os_malloc(2 + len);
- if (!buf)
- return;
- buf[0] = WLAN_ACTION_PUBLIC;
- buf[1] = WLAN_PA_VENDOR_SPECIFIC;
- os_memcpy(buf + 2, msg, len);
- hostapd_drv_send_action(hapd, freq, 0, addr, buf, 2 + len);
- os_free(buf);
-}
-
-
-static void hostapd_dpp_relay_gas_resp_tx(void *ctx, const u8 *addr,
- u8 dialog_token, int prot,
- struct wpabuf *buf)
-{
- struct hostapd_data *hapd = ctx;
-
- gas_serv_req_dpp_processing(hapd, addr, dialog_token, prot, buf);
-}
-
-#endif /* CONFIG_DPP2 */
-
-
-static int hostapd_dpp_add_controllers(struct hostapd_data *hapd)
-{
-#ifdef CONFIG_DPP2
- struct dpp_controller_conf *ctrl;
- struct dpp_relay_config config;
-
- os_memset(&config, 0, sizeof(config));
- config.cb_ctx = hapd;
- config.tx = hostapd_dpp_relay_tx;
- config.gas_resp_tx = hostapd_dpp_relay_gas_resp_tx;
- for (ctrl = hapd->conf->dpp_controller; ctrl; ctrl = ctrl->next) {
- config.ipaddr = &ctrl->ipaddr;
- config.pkhash = ctrl->pkhash;
- if (dpp_relay_add_controller(hapd->iface->interfaces->dpp,
- &config) < 0)
- return -1;
- }
-#endif /* CONFIG_DPP2 */
-
- return 0;
-}
-
-
int hostapd_dpp_init(struct hostapd_data *hapd)
{
hapd->dpp_allowed_roles = DPP_CAPAB_CONFIGURATOR | DPP_CAPAB_ENROLLEE;
hapd->dpp_init_done = 1;
- return hostapd_dpp_add_controllers(hapd);
+ return 0;
}