OSDN Git Service

init.sh: add quirks for Acer SP111-33
[android-x86/device-generic-common.git] / init.sh
diff --git a/init.sh b/init.sh
index aee4614..3e5ae24 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -44,6 +44,20 @@ function init_misc()
                wifi=$(basename `readlink /sys/class/net/wlan0/device/driver`)
                [ "$wifi" != "wl" ] && rmmod_if_exist wl
        fi
+
+       # enable virt_wifi if needed
+       local eth=`getprop net.virt_wifi eth0`
+       if [ -d /sys/class/net/$eth -a "$VIRT_WIFI" != "0" ]; then
+               if [ -n "$wifi" -a "$VIRT_WIFI" = "1" ]; then
+                       rmmod_if_exist iwlmvm $wifi
+               fi
+               if [ ! -d /sys/class/net/wlan0 ]; then
+                       ifconfig $eth down
+                       ip link set $eth name wifi_eth
+                       ifconfig wifi_eth up
+                       ip link add link wifi_eth name wlan0 type virt_wifi
+               fi
+       fi
 }
 
 function init_hal_audio()
@@ -295,6 +309,9 @@ function init_hal_sensors()
                        set_property ro.iio.accel.x.opt_scale -1
                        set_property ro.iio.accel.y.opt_scale -1
                        ;;
+               *SP111-33*)
+                       set_property ro.iio.accel.quirks no-trig
+                       ;&
                *ST70416-6*)
                        set_property ro.iio.accel.order 102
                        ;;