Skip to content

Commit

Permalink
[Silabs] Adds refactored chip_enable_wifi_ipv4 flag (#25723)
Browse files Browse the repository at this point in the history
* Refactors chip_enable_wifi_ipv4 flag

* Porting changes to SiWx917

* Incorporating comments
  • Loading branch information
rosahay-silabs authored Mar 22, 2023
1 parent f0bd871 commit 82af6b5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion scripts/examples/gn_efr32_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ else
shift
;;
--chip_enable_wifi_ipv4)
optArgs+="chip_enable_wifi_ipv4=true "
ipArgs="chip_enable_wifi_ipv4=true chip_inet_config_enable_ipv4=true "
shift
;;
--additional_data_advertising)
Expand Down Expand Up @@ -234,6 +234,7 @@ else
BUILD_DIR=$OUTDIR/$SILABS_BOARD
echo BUILD_DIR="$BUILD_DIR"
if [ "$USE_WIFI" == true ]; then
optArgs+="$ipArgs"
gn gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --dotfile="$ROOT"/build_for_wifi_gnfile.gn --args="silabs_board=\"$SILABS_BOARD\" $optArgs" "$BUILD_DIR"
else
# OpenThread build
Expand Down
3 changes: 2 additions & 1 deletion src/platform/silabs/SiWx917/wifi_args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ lwip_ethernet = true

chip_device_platform = "SiWx917"
chip_enable_openthread = false
chip_inet_config_enable_ipv4 = true

chip_inet_config_enable_ipv4 = false
chip_inet_config_enable_dns_resolver = false
chip_inet_config_enable_tcp_endpoint = true

Expand Down
3 changes: 2 additions & 1 deletion src/platform/silabs/efr32/wifi_args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ lwip_ethernet = true

chip_device_platform = "efr32"
chip_enable_openthread = false
chip_inet_config_enable_ipv4 = true

chip_inet_config_enable_ipv4 = false
chip_inet_config_enable_dns_resolver = false
chip_inet_config_enable_tcp_endpoint = true

Expand Down
3 changes: 2 additions & 1 deletion third_party/silabs/SiWx917_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ declare_args() {

silabs_log_enabled = true

# Argument to Disable IPv4 for wifi(rs911)
# Argument to enable IPv4 for wifi
# aligning to match chip_inet_config_enable_ipv4 default configuration
chip_enable_wifi_ipv4 = false
}

Expand Down
5 changes: 3 additions & 2 deletions third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ declare_args() {
# Enable Sleepy end device
enable_sleepy_device = false

# Argument to Disable IPv4 for wifi(rs911)
# Argument to enable IPv4 for wifi
# aligning to match chip_inet_config_enable_ipv4 default configuration
chip_enable_wifi_ipv4 = false
}

Expand Down Expand Up @@ -247,7 +248,7 @@ template("efr32_sdk") {
import("${chip_root}/src/platform/silabs/efr32/wifi_args.gni")

defines += [ "LWIP_NETIF_API=1" ]
if (lwip_ipv4) {
if (chip_enable_wifi_ipv4) {
defines += [
"LWIP_IPV4=1",

Expand Down

0 comments on commit 82af6b5

Please sign in to comment.