summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartijn Coenen2017-11-27 17:28:54 -0600
committerSteven Moreland2017-12-06 19:29:43 -0600
commited1f3ddbe13fed1d5fedd5dfcdb6912bc40ee68d (patch)
tree14ea0f7c0f861fd0153c9836ee3a7f443de24b14
parent1e04497ba90b8e8adcfd166948659c9110286d2c (diff)
downloadsystem-connectivity-wificond-ed1f3ddbe13fed1d5fedd5dfcdb6912bc40ee68d.tar.gz
system-connectivity-wificond-ed1f3ddbe13fed1d5fedd5dfcdb6912bc40ee68d.tar.xz
system-connectivity-wificond-ed1f3ddbe13fed1d5fedd5dfcdb6912bc40ee68d.zip
Bug: 34388964 Test: wifi works Change-Id: I001e2da21d173fada2ad7f78c76e89227cbe37cc
-rw-r--r--Android.mk3
-rw-r--r--main.cpp11
2 files changed, 4 insertions, 10 deletions
diff --git a/Android.mk b/Android.mk
index 5a5a078..f745285 100644
--- a/Android.mk
+++ b/Android.mk
@@ -35,7 +35,6 @@ LOCAL_SHARED_LIBRARIES := \
35 libbase \ 35 libbase \
36 libcutils \ 36 libcutils \
37 libhidlbase \ 37 libhidlbase \
38 libhwbinder \
39 libhidltransport \ 38 libhidltransport \
40 libminijail \ 39 libminijail \
41 libutils \ 40 libutils \
@@ -79,7 +78,6 @@ LOCAL_SHARED_LIBRARIES := \
79 libbase \ 78 libbase \
80 libutils \ 79 libutils \
81 libhidlbase \ 80 libhidlbase \
82 libhwbinder \
83 libhidltransport \ 81 libhidltransport \
84 libwifi-system \ 82 libwifi-system \
85 libwifi-system-iface 83 libwifi-system-iface
@@ -203,7 +201,6 @@ LOCAL_SHARED_LIBRARIES := \
203 libcutils \ 201 libcutils \
204 libhidltransport \ 202 libhidltransport \
205 libhidlbase \ 203 libhidlbase \
206 libhwbinder \
207 liblog \ 204 liblog \
208 libutils \ 205 libutils \
209 libwifi-system \ 206 libwifi-system \
diff --git a/main.cpp b/main.cpp
index 50e8d67..488447c 100644
--- a/main.cpp
+++ b/main.cpp
@@ -26,8 +26,7 @@
26#include <binder/IServiceManager.h> 26#include <binder/IServiceManager.h>
27#include <binder/ProcessState.h> 27#include <binder/ProcessState.h>
28#include <cutils/properties.h> 28#include <cutils/properties.h>
29#include <hwbinder/IPCThreadState.h> 29#include <hidl/HidlTransportSupport.h>
30#include <hwbinder/ProcessState.h>
31#include <libminijail.h> 30#include <libminijail.h>
32#include <utils/String16.h> 31#include <utils/String16.h>
33#include <wifi_system/interface_tool.h> 32#include <wifi_system/interface_tool.h>
@@ -93,10 +92,8 @@ int SetupBinderOrCrash() {
93 92
94// Setup our interface to the hw Binder driver or die trying. 93// Setup our interface to the hw Binder driver or die trying.
95int SetupHwBinderOrCrash() { 94int SetupHwBinderOrCrash() {
96 int binder_fd = -1; 95 android::hardware::configureRpcThreadpool(1, true /* callerWillJoin */);
97 android::hardware::ProcessState::self()->setThreadPoolConfiguration(1, true); 96 int binder_fd = android::hardware::setupTransportPolling();
98 int err = android::hardware::IPCThreadState::self()->setupPolling(&binder_fd);
99 CHECK_EQ(err, 0) << "Error setting up hw binder polling: " << strerror(-err);
100 CHECK_GE(binder_fd, 0) << "Invalid hw binder FD: " << binder_fd; 97 CHECK_GE(binder_fd, 0) << "Invalid hw binder FD: " << binder_fd;
101 return binder_fd; 98 return binder_fd;
102} 99}
@@ -116,7 +113,7 @@ void OnBinderReadReady(int fd) {
116} 113}
117 114
118void OnHwBinderReadReady(int fd) { 115void OnHwBinderReadReady(int fd) {
119 android::hardware::IPCThreadState::self()->handlePolledCommands(); 116 android::hardware::handleTransportPoll(fd);
120} 117}
121 118
122int main(int argc, char** argv) { 119int main(int argc, char** argv) {