nexus: Cleanup the scanner and plug it all in so it works
Signed-off-by: San Mehat <san@google.com>
diff --git a/nexus/WifiScanner.h b/nexus/WifiScanner.h
index 9ba1309..4406e9f 100644
--- a/nexus/WifiScanner.h
+++ b/nexus/WifiScanner.h
@@ -6,12 +6,8 @@
class Supplicant;
class WifiScanner {
- pthread_t mWorker;
- pthread_mutex_t mWorkerLock;
- bool mWorkerRunning;
- bool mAbortRequest;
- pthread_mutex_t mAbortRequestLock;
-
+ pthread_t mThread;
+ int mCtrlPipe[2];
Supplicant *mSuppl;
int mPeriod;
bool mActive;
@@ -23,12 +19,11 @@
int getPeriod() { return mPeriod; }
- int startPeriodicScan(bool active);
- int stopPeriodicScan();
+ int start(bool active);
+ int stop();
private:
static void *threadStart(void *obj);
- static void threadCleanup(void *obj);
void run();
};