Merge "Making possible to set multiple wifi-iface in single radio" am: 966bc05d1f am: a57c093468

Original change: https://android-review.googlesource.com/c/platform/external/openwrt-prebuilts/+/2369052

Change-Id: I9010e92515448f1c5cbac64737fde5920a584bda
Signed-off-by: Automerger Merge Worker <[email protected]>
diff --git a/shared/config/dhcp b/shared/config/dhcp
index c55d720..f994bbe 100644
--- a/shared/config/dhcp
+++ b/shared/config/dhcp
@@ -39,14 +39,14 @@
 	option leasetrigger '/usr/sbin/odhcpd-update'
 	option loglevel '4'
 
-config 'dhcp' 'wifi'
-	option 'interface' 'wifi'
-	option 'start' '100'
-	option 'limit' '150'
-	option 'leasetime' '12h'
+config dhcp 'wifi0'
+	option interface 'wifi0'
+	option start '100'
+	option limit '150'
+	option leasetime '12h'
 
-config 'dhcp' 'wifi2'
-	option 'interface' 'wifi2'
-	option 'start' '100'
-	option 'limit' '150'
-	option 'leasetime' '12h'
+config dhcp 'wifi1'
+	option interface 'wifi1'
+	option start '100'
+	option limit '150'
+	option leasetime '12h'
diff --git a/shared/config/firewall b/shared/config/firewall
index 76f85e7..a1d9369 100644
--- a/shared/config/firewall
+++ b/shared/config/firewall
@@ -5,26 +5,26 @@
 	option forward 'REJECT'
 
 config zone
-	option name wifi
-	list network 'wifi'
-	option input ACCEPT
-	option output ACCEPT
-	option forward REJECT
+	option name 'wifi0'
+	list network 'wifi0'
+	option input 'ACCEPT'
+	option output 'ACCEPT'
+	option forward 'REJECT'
 
-config 'forwarding'
-	option 'src' 'wifi'
-	option 'dest' 'wan'
+config forwarding
+	option src 'wifi0'
+	option dest 'wan'
 
 config zone
-	option name wifi2
-	list network 'wifi2'
-	option input ACCEPT
-	option output ACCEPT
-	option forward REJECT
+	option name 'wifi1'
+	list network 'wifi1'
+	option input 'ACCEPT'
+	option output 'ACCEPT'
+	option forward 'REJECT'
 
-config 'forwarding'
-	option 'src' 'wifi2'
-	option 'dest' 'wan'
+config forwarding
+	option src 'wifi1'
+	option dest 'wan'
 
 config zone
 	option name 'lan'
diff --git a/shared/config/network b/shared/config/network
index 4fae663..ab71eb2 100644
--- a/shared/config/network
+++ b/shared/config/network
@@ -12,6 +12,24 @@
 	option type 'bridge'
 	list ports 'eth0'
 
+config device
+	option name 'br-wifi0'
+	option type 'bridge'
+	list ports 'eth0.0'
+
+config device
+	option name 'br-wifi1'
+	option type 'bridge'
+	list ports 'eth0.1'
+
+config device
+	option name 'eth0.0'
+	option macaddr '28:80:88:2A:6D:01'
+
+config device
+	option name 'eth0.1'
+	option macaddr '28:80:88:2A:6D:02'
+
 config interface 'wan'
 	option device 'br-lan'
 	option proto 'static'
@@ -22,12 +40,14 @@
 	option dns '8.8.8.8'
 	option broadcast '192.168.96.3'
 
-config 'interface' 'wifi'
-	option 'proto' 'static'
-	option 'ipaddr' '192.168.2.1'
-	option 'netmask' '255.255.255.0'
+config interface 'wifi0'
+	option proto 'static'
+	option ipaddr '192.168.2.1'
+	option netmask '255.255.255.0'
+	option device 'br-wifi0'
 
-config 'interface' 'wifi2'
-	option 'proto' 'static'
-	option 'ipaddr' '192.168.3.1'
-	option 'netmask' '255.255.255.0'
+config interface 'wifi1'
+	option proto 'static'
+	option ipaddr '192.168.3.1'
+	option netmask '255.255.255.0'
+	option device 'br-wifi1'
diff --git a/shared/config/wireless b/shared/config/wireless
index 7232d47..7152192 100644
--- a/shared/config/wireless
+++ b/shared/config/wireless
@@ -10,7 +10,7 @@
 	option device 'radio0'
 	option mode 'ap'
 	option encryption 'none'
-	option network 'wifi'
+	option network 'wifi0'
 	option ssid 'VirtWifi'
 
 config wifi-device 'radio1'
@@ -25,5 +25,5 @@
 	option device 'radio1'
 	option mode 'ap'
 	option encryption 'none'
-	option network 'wifi2'
+	option network 'wifi1'
 	option ssid 'VirtWifi2'