Skip to content

Commit 004abeb

Browse files
author
tarun.kumar
committed
fix)wifi): Add GTK rekeying interval field in softap example
1 parent 6d7593c commit 004abeb

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

examples/wifi/getting_started/softAP/main/Kconfig.projbuild

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,18 @@ menu "Example Configuration"
2323
default 4
2424
help
2525
Max number of the STA connects to AP.
26+
27+
config ESP_GTK_REKEYING_ENABLE
28+
bool "Enable GTK Rekeying"
29+
default y
30+
help
31+
Flag to enable GTK rekeying.
32+
33+
config ESP_GTK_REKEY_INTERVAL
34+
int "GTK rekey interval"
35+
depends on ESP_GTK_REKEYING_ENABLE
36+
range 60 65535
37+
default 600
38+
help
39+
GTK rekeying interval in seconds.
2640
endmenu

examples/wifi/getting_started/softAP/main/softap_example_main.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
#define EXAMPLE_ESP_WIFI_CHANNEL CONFIG_ESP_WIFI_CHANNEL
2929
#define EXAMPLE_MAX_STA_CONN CONFIG_ESP_MAX_STA_CONN
3030

31+
#if CONFIG_ESP_GTK_REKEYING_ENABLE
32+
#define EXAMPLE_GTK_REKEY_INTERVAL CONFIG_ESP_GTK_REKEY_INTERVAL
33+
#else
34+
#define EXAMPLE_GTK_REKEY_INTERVAL 0
35+
#endif
36+
3137
static const char *TAG = "wifi softAP";
3238

3339
static void wifi_event_handler(void* arg, esp_event_base_t event_base,
@@ -81,6 +87,7 @@ void wifi_init_softap(void)
8187
.protected_keep_alive = 1,
8288
},
8389
#endif
90+
.gtk_rekey_interval = EXAMPLE_GTK_REKEY_INTERVAL,
8491
},
8592
};
8693
if (strlen(EXAMPLE_ESP_WIFI_PASS) == 0) {

0 commit comments

Comments
 (0)