From 3c599bae57c6ec0e97122a9ed49deb8d7a5b170e Mon Sep 17 00:00:00 2001 From: tropicsquirrel Date: Sat, 11 Jul 2026 19:52:10 -0500 Subject: [PATCH] Beacon spam: drop redundant per-frame delay(1) in broadcastSetSSID broadcastSetSSID() calls changeChannel(set_channel) -- which already does esp_wifi_set_channel() + delay(1) so the channel switch settles -- and then a second bare delay(1) before the TX. The second delay is redundant per-frame loop-blocking; the channel is already settled by changeChannel(). Removing it roughly halves the per-send block on the beacon-spam path with no behavioral change. --- esp32_marauder/WiFiScan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esp32_marauder/WiFiScan.cpp b/esp32_marauder/WiFiScan.cpp index e3d5d50..4fcf232 100644 --- a/esp32_marauder/WiFiScan.cpp +++ b/esp32_marauder/WiFiScan.cpp @@ -7951,8 +7951,8 @@ void WiFiScan::broadcastSetSSID(uint32_t current_time, const char* ESSID, uint8_ } this->changeChannel(set_channel); - - delay(1); + // (changeChannel() already delay(1)'d for the channel switch to settle; the extra + // delay here was a redundant per-frame block on the beacon-spam path.) // Randomize SRC MAC if(!legit) {