summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2014-05-25 19:15:04 +0200
committerPaul Kocialkowski <contact@paulk.fr>2014-05-25 19:15:04 +0200
commite3dde5a96997c7cae1b324f453c76d11a8a23507 (patch)
tree9b23da20ee0c3e9227d3e7f890315896c2133072
parent57311aa6b81dd423e51d582694355d859adc94d9 (diff)
downloaddevice_goldelico_gta04-e3dde5a96997c7cae1b324f453c76d11a8a23507.zip
device_goldelico_gta04-e3dde5a96997c7cae1b324f453c76d11a8a23507.tar.gz
device_goldelico_gta04-e3dde5a96997c7cae1b324f453c76d11a8a23507.tar.bz2
Wi-Fi support
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rwxr-xr-xBoardConfig.mk8
-rw-r--r--configs/wpa_supplicant.conf4
-rw-r--r--gta04.mk10
-rw-r--r--overlay/frameworks/base/core/res/res/values/config.xml11
-rw-r--r--rootdir/init.gta04.rc23
5 files changed, 55 insertions, 1 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk
index cd4b27a..621f3cd 100755
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -80,3 +80,11 @@ TARGET_DISABLE_TRIPLE_BUFFERING := true
# Audio
BOARD_USE_TINYALSA_AUDIO := true
+
+# Wi-Fi
+WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/libertas_sdio.ko"
+WIFI_DRIVER_MODULE_NAME := "libertas_sdio"
+WIFI_DRIVER_FW_PATH_STA := "/system/vendor/firmware/sd8686.bin"
+BOARD_WPA_SUPPLICANT_DRIVER := NL80211
+WPA_SUPPLICANT_VERSION := VER_0_8_X_TI
+BOARD_WLAN_DEVICE := libertas
diff --git a/configs/wpa_supplicant.conf b/configs/wpa_supplicant.conf
new file mode 100644
index 0000000..05a4fdb
--- /dev/null
+++ b/configs/wpa_supplicant.conf
@@ -0,0 +1,4 @@
+update_config=1
+ctrl_interface=wlan0
+eapol_version=1
+ap_scan=1
diff --git a/gta04.mk b/gta04.mk
index 26d11f3..a3ed958 100644
--- a/gta04.mk
+++ b/gta04.mk
@@ -76,7 +76,15 @@ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \
frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
- frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
+ frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \
+ frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml
+
+# Wi-Fi
+PRODUCT_COPY_FILES += \
+ device/goldelico/gta04/configs/wpa_supplicant.conf:system/etc/wifi/wpa_supplicant.conf
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ wifi.interface=wlan0
# APNS
PRODUCT_COPY_FILES += \
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 064db9d..59f6e44 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -25,4 +25,15 @@
<integer name="config_screenBrightnessSettingMinimum">10</integer>
<integer name="config_screenBrightnessDim">15</integer>
+
+ <string-array translatable="false" name="networkAttributes">
+ <item>"wifi,1,1,1,-1,true"</item>
+ </string-array>
+
+ <string-array translatable="false" name="radioAttributes">
+ <item>"1,1"</item>
+ </string-array>
+
+ <bool translatable="false" name="config_wifi_dual_band_support">false</bool>
+ <bool translatable="false" name="config_wifi_p2p_support">false</bool>
</resources>
diff --git a/rootdir/init.gta04.rc b/rootdir/init.gta04.rc
index b5d9399..d6d0278 100644
--- a/rootdir/init.gta04.rc
+++ b/rootdir/init.gta04.rc
@@ -62,7 +62,30 @@ on fs
on post-fs-data
mkdir /data/media 0770 media_rw media_rw
+ # Wi-Fi
+ mkdir /data/misc/wifi 0770 wifi wifi
+ mkdir /data/misc/wifi/sockets 0770 wifi wifi
+ mkdir /data/misc/dhcp 0770 dhcp dhcp
+ chown dhcp dhcp /data/misc/dhcp
+
setprop vold.post_fs_data_done 1
service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
class late_start
+
+# Wi-Fi
+service wpa_supplicant /system/bin/wpa_supplicant -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf
+ class main
+ socket wpa_wlan0 dgram 660 wifi wifi
+ disabled
+ oneshot
+
+service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
+ class main
+ disabled
+ oneshot
+
+service iprenew_wlan0 /system/bin/dhcpcd -n
+ class main
+ disabled
+ oneshot