Squashed commit of the following:

commit 2328f8590a540cfcdb9c2ff781eda274b6886619
Author: Andreas Huber <andih@google.com>
Date:   Thu Feb 22 14:21:25 2018 -0800

    wifi_relay_{guest,host} => wifi_relay

    Change-Id: I4b85e2b66d3325f924f1a0b5fcdc0347d65ced05

commit 26130991cfef3bd092efa633ea21150a5ca4cc59
Author: Andreas Huber <andih@google.com>
Date:   Thu Feb 15 16:35:15 2018 -0800

    separate "inject" into wifi_relay_guest and wifi_relay_host

    Change-Id: I6cb12503f70d163976dd2cb1bc3b93698d092243

commit ec8876a1b761063a15e6c388499fa699adf2083f
Author: Andreas Huber <andih@google.com>
Date:   Wed Feb 14 11:44:47 2018 -0800

    initial attempt to support wifi through mac80211_hwsim

    Change-Id: Id721e7e2230a790363ba5699d0acf99fe1d0a930

Bug: 62789500
Test: foo
Change-Id: I98155fc27b94b9a74a03299733b3a9585e524748
(cherry picked from commit bd4065812b32d6255b993c733ccb796f19f5a25d)
diff --git a/host_package.mk b/host_package.mk
index 89ef9d6..f45fbf6 100644
--- a/host_package.mk
+++ b/host_package.mk
@@ -22,8 +22,8 @@
 cvd_host_executables := \
     launch_cvd \
     socket_forward_proxy \
-    wificlient \
     vnc_server \
+    wifi_relay \
     record_audio \
 
 cvd_host_tests := \
diff --git a/shared/config/init.vsoc.rc b/shared/config/init.vsoc.rc
index 402fa8e..33dba35 100644
--- a/shared/config/init.vsoc.rc
+++ b/shared/config/init.vsoc.rc
@@ -64,8 +64,9 @@
 
 on boot
     chmod 0660 /dev/cpuctl
-    mkdir /data/misc/wifi 0770 system wifi
-    mkdir /data/misc/wifi/sockets 0770 system wifi
+    mkdir /data/vendor/wifi 0770 wifi wifi
+    mkdir /data/vendor/wifi/wpa 0770 wifi wifi
+    mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
     start socket_forward_proxy
 
     # TODO(ender): Re-enable these
@@ -113,15 +114,11 @@
     user root
 
 
-service wifirouter /vendor/bin/wifirouter
-    class main
-    user root
-
-
-service wificlient /vendor/bin/wificlient -iface=wlan0 -macaddr=00:43:56:44:01:02
+service wifi_relay /vendor/bin/wifi_relay
     class late_start
     user root
 
+
 service bugreport /system/bin/dumpstate -d -p -B -z -o /sdcard/bugreport
     class main
     disabled
diff --git a/shared/device.mk b/shared/device.mk
index 4c20d62..57b1ca1 100644
--- a/shared/device.mk
+++ b/shared/device.mk
@@ -60,8 +60,7 @@
     socket_forward_proxy \
     usbforward \
     VSoCService \
-    wifirouter \
-    wificlient \
+    wifi_relay \
     wpa_supplicant.vsoc.conf \
     vsoc_input_service \
 
@@ -267,4 +266,3 @@
 # WLAN driver configuration files
 PRODUCT_COPY_FILES += \
     $(LOCAL_PATH)/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf
-
diff --git a/shared/sepolicy/file_contexts b/shared/sepolicy/file_contexts
index ecc4072..d2ec6cb 100644
--- a/shared/sepolicy/file_contexts
+++ b/shared/sepolicy/file_contexts
@@ -33,5 +33,6 @@
 /vendor/bin/vsoc_guest_region_e2e_test  u:object_r:vsoc_guest_region_e2e_test_exec:s0
 /vendor/bin/wificlient  u:object_r:wificlient_exec:s0
 /vendor/bin/wifirouter  u:object_r:wifirouter_exec:s0
+/vendor/bin/wifi_relay  u:object_r:wifi_relay_exec:s0
 /vendor/bin/hw/android\.hardware\.bluetooth@1\.0-service\.sim             u:object_r:hal_bluetooth_sim_exec:s0
 /vendor/bin/hw/android\.hardware\.dumpstate@1\.0-service\.cuttlefish      u:object_r:hal_dumpstate_impl_exec:s0
diff --git a/shared/sepolicy/wifi_relay.te b/shared/sepolicy/wifi_relay.te
new file mode 100644
index 0000000..1d2c122
--- /dev/null
+++ b/shared/sepolicy/wifi_relay.te
@@ -0,0 +1,5 @@
+type wifi_relay, domain;
+type wifi_relay_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(wifi_relay)
+allow wifi_relay self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;