Changes for enabling Wi-Fi on panda board

Change-Id: I39090caff35e0601699bdc0ca28d076c2171f5e9
diff --git a/BoardConfig.mk b/BoardConfig.mk
index c2ed8fd..14fad4d 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -53,6 +53,11 @@
 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
 BOARD_FLASH_BLOCK_SIZE := 4096
 
+BOARD_WPA_SUPPLICANT_DRIVER      := NL80211
+WPA_SUPPLICANT_VERSION           := VER_0_8_X
+BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_wl12xx
+BOARD_WLAN_DEVICE                := wl12xx_mac80211
+
 #TARGET_PROVIDES_INIT_RC := true
 #TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
 
diff --git a/device.mk b/device.mk
index ce2882c..e547b1e 100644
--- a/device.mk
+++ b/device.mk
@@ -27,6 +27,7 @@
 	device/ti/panda/ueventd.omap4pandaboard.rc:root/ueventd.omap4pandaboard.rc \
 	device/ti/panda/media_profiles.xml:system/etc/media_profiles.xml \
 	frameworks/base/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \
+	frameworks/base/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
 	frameworks/base/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml
 
 PRODUCT_PACKAGES := \
@@ -34,6 +35,7 @@
 	com.android.future.usb.accessory
 
 PRODUCT_PROPERTY_OVERRIDES := \
+	wifi.interface=wlan0 \
 	hwui.render_dirty_regions=false
 
 PRODUCT_CHARACTERISTICS := tablet,nosdcard
@@ -56,6 +58,11 @@
 	audio.a2dp.default \
 	libaudioutils
 
+PRODUCT_PACKAGES += \
+	dhcpcd.conf \
+	TQS_D_1.7.ini \
+	calibrator
+
 # Filesystem management tools
 PRODUCT_PACKAGES += \
 	make_ext4fs
diff --git a/init.omap4pandaboard.rc b/init.omap4pandaboard.rc
index 6947e81..e66cf37 100644
--- a/init.omap4pandaboard.rc
+++ b/init.omap4pandaboard.rc
@@ -13,6 +13,7 @@
     setprop vold.post_fs_data_done 1
     mkdir /data/misc/dhcp 0770 dhcp dhcp
     chown dhcp dhcp /data/misc/dhcp
+    mkdir /data/misc/wifi/sockets 0770 wifi wifi
 
 on boot
 	mount debugfs /sys/kernel/debug /sys/kernel/debug
@@ -37,3 +38,16 @@
 # underlying files in /data/media will be created with user and group media_rw (1023)
 service sdcard /system/bin/sdcard /data/media 1023 1023
     class late_start
+
+service wpa_supplicant /system/bin/wpa_supplicant -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd
+    socket wpa_wlan0 dgram 660 wifi wifi
+    disabled
+    oneshot
+
+service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
+    disabled
+    oneshot
+
+service iprenew_wlan0 /system/bin/dhcpcd -n
+    disabled
+    oneshot