From patchwork Wed Jun 8 22:48:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 69689 Delivered-To: patches@linaro.org Received: by 10.140.106.246 with SMTP id e109csp40375qgf; Wed, 8 Jun 2016 15:48:27 -0700 (PDT) X-Received: by 10.66.80.72 with SMTP id p8mr8388862pax.38.1465426103935; Wed, 08 Jun 2016 15:48:23 -0700 (PDT) Return-Path: Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com. [2607:f8b0:400e:c03::22c]) by mx.google.com with ESMTPS id k1si3683063pae.152.2016.06.08.15.48.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jun 2016 15:48:23 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c03::22c as permitted sender) client-ip=2607:f8b0:400e:c03::22c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c03::22c as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-pa0-x22c.google.com with SMTP id ec8so6492249pac.0 for ; Wed, 08 Jun 2016 15:48:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=77FNbyXy2mYHfHCvz05kmj4P3SXS0b2FAAcJQajNzRs=; b=SLbAf8yPnxcDrdiR+vquNwfZm3POw8bt23Ismi+iuNMB78HmvDXj2QBiUXvD3OE5rw 5JAfIEGol7vPDC+5tnwduyvQK/iB4Wm3PzA04AcNbdFcIKyqIgorh6PnlNWSVK6uq4Vk Mbw3Gnd54YRJ5cSZRZ/pHoqYyJDeeOh1k0e1M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=77FNbyXy2mYHfHCvz05kmj4P3SXS0b2FAAcJQajNzRs=; b=QwTQOSA/IBA3ZTKw6opLlGKN2EMtEP6wonghOWrfhN/P9Gh804Iew+FQE/m2zixniW ASxRsnmFFL6xlIgKRQSyhBhS/GOQtfelYoF9qqn06vyqMndVvnbI9sZWiWujUNrVbekJ pmEVWy1kOl3MQnPbfn4Ycbr1mQMidQtXr67u+uxT+tp4zxZNRvOAC2zt82RkiRb3IRMz 8E/wXPDxgeM2HzW/6GNyy0G7w14qVZn0DsDKgRNXWrsMStxLU4lN+Xkyyq0c2Dgc6Q4r xPWunSj4zN/mF2vVleTGGH5zOV9hI9LAhx+zjO8gngsSk/f1Ht+Fqglq3yFCHOwus2ju ACig== X-Gm-Message-State: ALyK8tK3oPjb6v9cGMvHMQe6hWJz1MPBZx1yoie06sWXkYSRGVLfW2o/vE89h/dpmHxcHHBKhS4= X-Received: by 10.66.41.43 with SMTP id c11mr8358060pal.96.1465426103541; Wed, 08 Jun 2016 15:48:23 -0700 (PDT) Return-Path: Received: from localhost.localdomain (c-73-67-244-238.hsd1.or.comcast.net. [73.67.244.238]) by smtp.gmail.com with ESMTPSA id l129sm4839351pfc.5.2016.06.08.15.48.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jun 2016 15:48:23 -0700 (PDT) From: John Stultz To: Rob Herring , Vishal Bhoj , Amit Kumar , Amit Pundir Cc: John Stultz Subject: [PATCH 4/5] linaro_generic: Add basic generic wifi settings Date: Wed, 8 Jun 2016 15:48:10 -0700 Message-Id: <1465426091-21102-5-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465426091-21102-1-git-send-email-john.stultz@linaro.org> References: <1465426091-21102-1-git-send-email-john.stultz@linaro.org> Add basic entries for wifi support. I suspect with a simple usb-wifi adapter on db410 this would work, but I've not been able to validate. Signed-off-by: John Stultz --- BoardConfig.mk | 6 ++++++ device.mk | 13 +++++++++++++ init.rc | 22 ++++++++++++++++++++++ 3 files changed, 41 insertions(+) -- 1.9.1 diff --git a/BoardConfig.mk b/BoardConfig.mk index 69ffdd2..c0acc56 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -20,3 +20,9 @@ BOARD_SYSTEMIMAGE_PARTITION_SIZE := 644245504 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false WITH_DEXPREOPT := false + +# generic wifi +WPA_SUPPLICANT_VERSION := VER_0_8_X +BOARD_WPA_SUPPLICANT_DRIVER := NL80211 +BOARD_HOSTAPD_DRIVER := NL80211 +CONFIG_DRIVER_NL80211 := y diff --git a/device.mk b/device.mk index 9f889f1..f27a5ae 100644 --- a/device.mk +++ b/device.mk @@ -43,3 +43,16 @@ PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\ vendor/qcom/flo/proprietary/a300_pfp.fw:/system/vendor/firmware/a300_pfp.fw \ vendor/qcom/flo/proprietary/a300_pm4.fw:/system/vendor/firmware/a300_pm4.fw \ ) + +#wifi items +PRODUCT_PACKAGES += \ + libwpa_client \ + hostapd \ + dhcpcd.conf \ + wpa_supplicant \ + wpa_supplicant.conf + + +PRODUCT_PROPERTY_OVERRIDES += \ + wifi.interface=wlan0 \ + wifi.supplicant_scan_interval=15 diff --git a/init.rc b/init.rc index 40c5608..ba6fc15 100644 --- a/init.rc +++ b/init.rc @@ -34,6 +34,28 @@ on boot setprop status.battery.level_raw 50 setprop status.battery.level_scale 9 + +on property:init.svc.wpa_supplicant=stopped + stop dhcpcd + +service wpa_supplicant /system/bin/wpa_supplicant \ + -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf \ + -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 + socket wpa_wlan0 dgram 660 wifi wifi + class main + disabled + oneshot + +service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL + class main + disabled + oneshot + +service iprenew_wlan0 /system/bin/dhcpcd -n + class main + disabled + oneshot + service dhcpcd_eth0 /system/bin/dhcpcd -aABDKL class late_start disabled