diff options
author | Enrico Granata <egranata@google.com> | 2022-12-01 16:05:27 -0700 |
---|---|---|
committer | Enrico Granata <egranata@google.com> | 2022-12-05 10:25:31 -0700 |
commit | a30468c137444ed218b02d4d0a82c46076eb9196 (patch) | |
tree | b7ee3fc915daf0ffdb63e3ad922b8d24d294fc47 | |
parent | b428cd829fec281b1c3ac3815591b63c2a71a876 (diff) | |
download | cuttlefish-a30468c137444ed218b02d4d0a82c46076eb9196.tar.gz |
Allow targets deriving from CF choosing the interface to setup wifi on.
This is a continuation of commit a376692d7 which has parametrized
setup_wifi service. Now, derived targets (like Trout) can set the
desired interface name during the build process using the
following (for ex.):
DEVICE_VIRTWIFI_PORT ?= eth0
Bug: 246273743
Test: build and TreeHugger
Change-Id: I9301892080a97981a47e96ea420be75abca10c6a
-rw-r--r-- | guest/commands/setup_wifi/setup_wifi.rc | 2 | ||||
-rw-r--r-- | shared/device.mk | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/guest/commands/setup_wifi/setup_wifi.rc b/guest/commands/setup_wifi/setup_wifi.rc index a2f1eb54a..993e95726 100644 --- a/guest/commands/setup_wifi/setup_wifi.rc +++ b/guest/commands/setup_wifi/setup_wifi.rc @@ -1,2 +1,2 @@ -service setup_wifi /vendor/bin/setup_wifi +service setup_wifi /vendor/bin/setup_wifi --interface=${ro.vendor.virtwifi.port} oneshot diff --git a/shared/device.mk b/shared/device.mk index ebd5216f9..3213aebe8 100644 --- a/shared/device.mk +++ b/shared/device.mk @@ -772,6 +772,12 @@ PRODUCT_PACKAGES += \ PRODUCT_COPY_FILES += \ device/google/cuttlefish/shared/config/wpa_supplicant.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/wpa_supplicant.rc +# VirtWifi interface configuration +ifeq ($(DEVICE_VIRTWIFI_PORT),) + DEVICE_VIRTWIFI_PORT := eth2 +endif +PRODUCT_VENDOR_PROPERTIES += ro.vendor.virtwifi.port=${DEVICE_VIRTWIFI_PORT} + # WLAN driver configuration files ifndef LOCAL_WPA_SUPPLICANT_OVERLAY LOCAL_WPA_SUPPLICANT_OVERLAY := $(LOCAL_PATH)/config/wpa_supplicant_overlay.conf |