Skip to content

Commit 7f61a87

Browse files
MaochenWang1rlubos
authored andcommitted
[nrf fromtree] net: l2: wifi: Add Kconfig option to control automatic DHCPv4 start
Add a new Kconfig option WIFI_STA_AUTO_DHCPV4 to allow applications to control whether DHCPv4 client should be automatically started by the Wi-Fi driver or supplicant after STA connection is established. This addresses the use case where applications need to switch between static IP addressing and DHCP, or prefer to manually control when the DHCP client starts. When CONFIG_WIFI_STA_AUTO_DHCPV4=n, the application layer becomes responsible for either manually starting the DHCPv4 client or configuring a static IPv4 address after Wi-Fi connection is established. The option defaults to 'y' to maintain backward compatibility with existing behavior. Signed-off-by: Maochen Wang <maochen.wang@nxp.com> (cherry picked from commit 742b0e7)
1 parent aae7064 commit 7f61a87

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

subsys/net/l2/wifi/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,18 @@ endif # WIFI_SHELL_RUNTIME_CERTIFICATES
165165

166166
endif # WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
167167

168+
config WIFI_STA_AUTO_DHCPV4
169+
bool "Automatically start DHCPv4 after STA connects"
170+
depends on NET_DHCPV4
171+
default y
172+
help
173+
When enabled, the DHCPv4 client is automatically started
174+
by the Wi-Fi driver or supplicant after the STA connection
175+
is established.
176+
If this option is disabled, the application layer is
177+
responsible for either manually starting the DHCPv4 client
178+
or configuring a static IPv4 address.
179+
168180
config WIFI_MGMT_BSS_MAX_IDLE_TIME
169181
int "BSS max idle timeout in seconds"
170182
range 0 64000

0 commit comments

Comments
 (0)