Remove P4 wifi undefs

This commit is contained in:
Theo Arends 2025-10-24 15:50:07 +02:00
parent 5b64b0d559
commit 1460f685ff

View File

@ -166,10 +166,6 @@ int WiFiHelper::getPhyMode() {
WIFI_PHY_MODE_HE20, // PHY mode for Bandwidth HE20 (11ax)
} wifi_phy_mode_t;
*/
#ifndef SOC_WIFI_SUPPORTED
// ESP32-P4 does not support PHY modes, return 0
return 0;
#else
int phy_mode = 0; // "low rate|11b|11g|HT20|HT40|HE20"
wifi_phy_mode_t WiFiMode;
if (esp_wifi_sta_get_negotiated_phymode(&WiFiMode) == ESP_OK) {
@ -179,13 +175,9 @@ int WiFiHelper::getPhyMode() {
}
}
return phy_mode;
#endif
}
bool WiFiHelper::setPhyMode(WiFiPhyMode_t mode) {
#ifndef SOC_WIFI_SUPPORTED
return false; // ESP32-P4 does not support PHY modes
#else
uint8_t protocol_bitmap = WIFI_PROTOCOL_11B; // 1
switch (mode) {
#if ESP_IDF_VERSION_MAJOR >= 5
@ -195,7 +187,6 @@ bool WiFiHelper::setPhyMode(WiFiPhyMode_t mode) {
case 2: protocol_bitmap |= WIFI_PROTOCOL_11G; // 2
}
return (ESP_OK == esp_wifi_set_protocol(WIFI_IF_STA, protocol_bitmap));
#endif // CONFIG_IDF_TARGET_ESP32P4
}
void WiFiHelper::setOutputPower(int n) {