esp_wifi: Modify ESP_IF_WIFI_STA to WIFI_IF_STA

This commit is contained in:
xiehang 2021-02-18 11:36:37 +08:00
parent 91e019ea97
commit adb15e4a5d
2 changed files with 10 additions and 10 deletions

View File

@ -73,7 +73,7 @@ void esp_send_action_frame(uint8_t *dest_mac, const uint8_t *buf, uint32_t len,
return;
}
req->ifx = ESP_IF_WIFI_STA;
req->ifx = WIFI_IF_STA;
memcpy(req->dest_mac, dest_mac, ETH_ALEN);
req->no_ack = false;
req->data_len = len;
@ -373,7 +373,7 @@ static void esp_dpp_task(void *pvParameters )
int channel;
channel = p->chan_list[counter++ % p->num_chan];
esp_wifi_remain_on_channel(ESP_IF_WIFI_STA, WIFI_ROC_REQ, channel,
esp_wifi_remain_on_channel(WIFI_IF_STA, WIFI_ROC_REQ, channel,
BOOTSTRAP_ROC_WAIT_TIME, s_action_rx_cb);
}
break;
@ -533,7 +533,7 @@ esp_supp_dpp_bootstrap_gen(const char *chan_list, enum dpp_bootstrap_type type,
goto fail;
}
params->type = type;
esp_wifi_get_mac(ESP_IF_WIFI_STA, params->mac);
esp_wifi_get_mac(WIFI_IF_STA, params->mac);
if (uri_info) {
params->info_len = strlen(uri_info);
@ -608,7 +608,7 @@ esp_err_t esp_supp_dpp_start_listen(void)
void esp_supp_dpp_stop_listen(void)
{
s_dpp_stop_listening = true;
esp_wifi_remain_on_channel(ESP_IF_WIFI_STA, WIFI_ROC_CANCEL, 0, 0, NULL);
esp_wifi_remain_on_channel(WIFI_IF_STA, WIFI_ROC_CANCEL, 0, 0, NULL);
}
esp_err_t esp_supp_dpp_init(esp_supp_dpp_event_cb_t cb)

View File

@ -128,7 +128,7 @@ void esp_send_action_frame(uint8_t *dest_mac, const uint8_t *buf, uint32_t len,
wifi_action_tx_req_t *req = os_zalloc(sizeof(*req) + len);;
TEST_ASSERT( req != NULL);
req->ifx = ESP_IF_WIFI_STA;
req->ifx = WIFI_IF_STA;
memcpy(req->dest_mac, dest_mac, ETH_ALEN);
req->no_ack = false;
req->data_len = len;
@ -155,7 +155,7 @@ TEST_CASE("Test scan and ROC simultaneously", "[Offchan]")
xEventGroupWaitBits(wifi_event, WIFI_START_EVENT, 1, 0, 5000 / portTICK_RATE_MS);
TEST_ESP_OK(esp_wifi_remain_on_channel(ESP_IF_WIFI_STA, WIFI_ROC_REQ, TEST_LISTEN_CHANNEL,
TEST_ESP_OK(esp_wifi_remain_on_channel(WIFI_IF_STA, WIFI_ROC_REQ, TEST_LISTEN_CHANNEL,
100, rx_cb));
ESP_ERROR_CHECK(esp_wifi_scan_start(NULL, false));
bits = xEventGroupWaitBits(wifi_event, WIFI_ROC_DONE_EVENT | WIFI_SCAN_DONE_EVENT,
@ -164,7 +164,7 @@ TEST_CASE("Test scan and ROC simultaneously", "[Offchan]")
vTaskDelay(1000 / portTICK_PERIOD_MS);
ESP_ERROR_CHECK(esp_wifi_scan_start(NULL, false));
TEST_ESP_OK(esp_wifi_remain_on_channel(ESP_IF_WIFI_STA, WIFI_ROC_REQ, TEST_LISTEN_CHANNEL,
TEST_ESP_OK(esp_wifi_remain_on_channel(WIFI_IF_STA, WIFI_ROC_REQ, TEST_LISTEN_CHANNEL,
100, rx_cb));
bits = xEventGroupWaitBits(wifi_event, WIFI_ROC_DONE_EVENT | WIFI_SCAN_DONE_EVENT,
pdTRUE, pdFALSE, 5000 / portTICK_RATE_MS);
@ -221,17 +221,17 @@ static void test_wifi_roc(void)
start_wifi_as_sta();
xEventGroupWaitBits(wifi_event, WIFI_START_EVENT, 1, 0, 5000 / portTICK_RATE_MS);
TEST_ESP_OK(esp_wifi_get_mac(ESP_IF_WIFI_STA, mac));
TEST_ESP_OK(esp_wifi_get_mac(WIFI_IF_STA, mac));
sprintf(mac_str, MACSTR, MAC2STR(mac));
unity_send_signal_param("Listener mac", mac_str);
TEST_ESP_OK(esp_wifi_remain_on_channel(ESP_IF_WIFI_STA, WIFI_ROC_REQ, TEST_LISTEN_CHANNEL,
TEST_ESP_OK(esp_wifi_remain_on_channel(WIFI_IF_STA, WIFI_ROC_REQ, TEST_LISTEN_CHANNEL,
10000, rx_cb));
bits = xEventGroupWaitBits(wifi_event, WIFI_ROC_DONE_EVENT | WIFI_ACTION_RX_EVENT,
pdTRUE, pdFALSE, portMAX_DELAY);
/* Confirm that Frame has been received successfully */
if (bits == WIFI_ACTION_RX_EVENT) {
TEST_ESP_OK(esp_wifi_remain_on_channel(ESP_IF_WIFI_STA, WIFI_ROC_CANCEL, 0, 0, NULL));
TEST_ESP_OK(esp_wifi_remain_on_channel(WIFI_IF_STA, WIFI_ROC_CANCEL, 0, 0, NULL));
vTaskDelay(1000 / portTICK_PERIOD_MS);
stop_wifi();
} else {