You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/11/10 22:39:25 UTC
[18/50] [abbrv] incubator-mynewt-core git commit: wifi;
bring back the task to get this to build again.
wifi; bring back the task to get this to build again.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/eefa203f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/eefa203f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/eefa203f
Branch: refs/heads/master
Commit: eefa203fd730b08582c0f7b95d9526c244c18e24
Parents: 6031086
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Nov 8 13:25:31 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Nov 8 13:25:31 2016 -0800
----------------------------------------------------------------------
net/wifi/wifi_mgmt/src/wifi.c | 27 +++++++++++----------------
1 file changed, 11 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/eefa203f/net/wifi/wifi_mgmt/src/wifi.c
----------------------------------------------------------------------
diff --git a/net/wifi/wifi_mgmt/src/wifi.c b/net/wifi/wifi_mgmt/src/wifi.c
index f0be059..75cdd6a 100644
--- a/net/wifi/wifi_mgmt/src/wifi.c
+++ b/net/wifi/wifi_mgmt/src/wifi.c
@@ -31,28 +31,15 @@
#include "wifi_priv.h"
static struct os_task wifi_os_task;
-struct os_eventq *wifi_evq;
+struct os_eventq wifi_evq;
static struct wifi_ap *wifi_find_ap(struct wifi_if *wi, char *ssid);
-static void wifi_events(void *arg);
+static void wifi_events(struct os_event *);
static void wifi_event_state(struct os_event *ev);
static struct wifi_if *wifi_if;
-static struct os_eventq *
-wifi_evq_get(void)
-{
- os_eventq_ensure(&wifi_evq, NULL);
- return wifi_evq;
-}
-
-void
-wifi_evq_set(struct os_eventq *evq)
-{
- os_eventq_designate(&wifi_evq, evq, NULL);
-}
-
/*
* Looks up interface based on port number.
*/
@@ -184,7 +171,7 @@ wifi_find_ap(struct wifi_if *wi, char *ssid)
}
static void
-wifi_events(void *arg)
+wifi_events(struct os_event *ev)
{
/*
* Expire connection attempts. Periodic scanning if tgt AP not visible.
@@ -334,6 +321,14 @@ wifi_event_state(struct os_event *ev)
}
}
+static void
+wifi_task(void *arg)
+{
+ while (1) {
+ os_eventq_run(&wifi_evq);
+ }
+}
+
int
wifi_task_init(uint8_t prio, os_stack_t *stack, uint16_t stack_size)
{