wifi: esp32: allow wifi symbols into flash

When BT and WiFi coexists, IRAM usage increases a lot.
Add configuration that allow wifi symbols
to be placed in flash, freeing space in IRAM.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
diff --git a/drivers/wifi/esp32/Kconfig.esp32 b/drivers/wifi/esp32/Kconfig.esp32
index 6aa3004..68a941d 100644
--- a/drivers/wifi/esp32/Kconfig.esp32
+++ b/drivers/wifi/esp32/Kconfig.esp32
@@ -225,4 +225,20 @@
 	help
 	  Software controls WiFi/Bluetooth coexistence. Not supported yet.
 
+config ESP32_WIFI_IRAM_OPT
+	bool "WiFi IRAM speed optimization"
+	default y
+	help
+	  Select this option to place frequently called Wi-Fi library functions in IRAM.
+	  When this option is disabled, more than 10Kbytes of IRAM memory will be saved
+	  but Wi-Fi throughput will be reduced.
+
+config ESP32_WIFI_RX_IRAM_OPT
+	bool "WiFi RX IRAM speed optimization"
+	default y
+	help
+	  Select this option to place frequently called Wi-Fi library RX functions in IRAM.
+	  When this option is disabled, more than 17Kbytes of IRAM memory will be saved
+	  but Wi-Fi performance will be reduced.
+
 endif # WIFI_ESP32