mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
refactor(wifi): remove enum values WIFI_BW_HT20 and WIFI_BW_HT40
This commit is contained in:
@@ -437,10 +437,10 @@ static bool wifi_cmd_ap_set(const char* ssid, const char* pass, uint8_t channel,
|
||||
proto.ghz_2g = WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N;
|
||||
proto.ghz_5g = 0;
|
||||
esp_wifi_set_protocols(WIFI_IF_AP, &proto);
|
||||
bws.ghz_2g = WIFI_BW_HT40;
|
||||
bws.ghz_2g = WIFI_BW40;
|
||||
esp_wifi_set_bandwidths(WIFI_IF_AP, &bws);
|
||||
} else {
|
||||
bws.ghz_2g = WIFI_BW_HT20;
|
||||
bws.ghz_2g = WIFI_BW20;
|
||||
esp_wifi_set_bandwidths(WIFI_IF_AP, &bws);
|
||||
}
|
||||
} else {
|
||||
@@ -449,13 +449,13 @@ static bool wifi_cmd_ap_set(const char* ssid, const char* pass, uint8_t channel,
|
||||
proto.ghz_2g = 0;
|
||||
proto.ghz_5g = WIFI_PROTOCOL_11N | WIFI_PROTOCOL_11A;
|
||||
esp_wifi_set_protocols(WIFI_IF_AP, &proto);
|
||||
bws.ghz_5g=WIFI_BW_HT40;
|
||||
bws.ghz_5g=WIFI_BW40;
|
||||
esp_wifi_set_bandwidths(WIFI_IF_AP, &bws);
|
||||
} else {
|
||||
proto.ghz_2g = 0;
|
||||
proto.ghz_5g = WIFI_PROTOCOL_11AC | WIFI_PROTOCOL_11A | WIFI_PROTOCOL_11AX;
|
||||
esp_wifi_set_protocols(WIFI_IF_AP, &proto);
|
||||
bws.ghz_5g = WIFI_BW_HT20;
|
||||
bws.ghz_5g = WIFI_BW20;
|
||||
esp_wifi_set_bandwidths(WIFI_IF_AP, &bws);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,7 @@ dependencies:
|
||||
espressif/iperf-cmd:
|
||||
version: "~0.1.3"
|
||||
esp-qa/wifi-cmd:
|
||||
version: "~0.2.0"
|
||||
version: "~0.2.7"
|
||||
esp-qa/ping-cmd:
|
||||
version: "~1.0.0"
|
||||
espressif/esp_wifi_remote:
|
||||
|
||||
@@ -277,8 +277,8 @@ static void wifi_itwt(void)
|
||||
ESP_ERROR_CHECK(esp_wifi_sta_twt_config(&wifi_twt_config));
|
||||
#if CONFIG_SOC_WIFI_SUPPORT_5G
|
||||
wifi_bandwidths_t bw = {
|
||||
.ghz_2g = WIFI_BW_HT20,
|
||||
.ghz_5g = WIFI_BW_HT20,
|
||||
.ghz_2g = WIFI_BW20,
|
||||
.ghz_5g = WIFI_BW20,
|
||||
};
|
||||
esp_wifi_set_bandwidths(WIFI_IF_STA, &bw);
|
||||
|
||||
@@ -288,7 +288,7 @@ static void wifi_itwt(void)
|
||||
};
|
||||
esp_wifi_set_protocols(WIFI_IF_STA, &protocol);
|
||||
#else
|
||||
esp_wifi_set_bandwidth(WIFI_IF_STA, WIFI_BW_HT20);
|
||||
esp_wifi_set_bandwidth(WIFI_IF_STA, WIFI_BW20);
|
||||
esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N | WIFI_PROTOCOL_11AX);
|
||||
#endif
|
||||
esp_wifi_set_ps(WIFI_PS_MIN_MODEM);
|
||||
|
||||
Reference in New Issue
Block a user