summaryrefslogtreecommitdiff
path: root/code/fe310/eos/wifi.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2020-05-17 04:03:23 +0200
committerUros Majstorovic <majstor@majstor.org>2020-05-17 04:03:23 +0200
commit75e57273a7ffded0ddcd3698ba68603c4be8a4cd (patch)
tree8b882cb41073ceadcdc5c27534a2dcc222adfb93 /code/fe310/eos/wifi.c
parent5d157b4f7ecea4793c9da5c33a890d4ea4afc545 (diff)
power management implemented; net protocol change
Diffstat (limited to 'code/fe310/eos/wifi.c')
-rw-r--r--code/fe310/eos/wifi.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/code/fe310/eos/wifi.c b/code/fe310/eos/wifi.c
index c6b1d73..d58c0eb 100644
--- a/code/fe310/eos/wifi.c
+++ b/code/fe310/eos/wifi.c
@@ -9,13 +9,10 @@
#include "wifi.h"
static eos_evt_handler_t evt_handler[EOS_WIFI_MAX_MTYPE];
-static uint16_t evt_handler_flags_buf_free = 0;
-static uint16_t evt_handler_flags_buf_acq = 0;
static void wifi_handle_evt(unsigned char type, unsigned char *buffer, uint16_t len) {
if ((buffer == NULL) || (len < 1)) {
- eos_evtq_bad_handler(type, buffer, len);
- eos_net_free(buffer, 0);
+ eos_net_bad_handler(type, buffer, len);
return;
}
@@ -23,9 +20,7 @@ static void wifi_handle_evt(unsigned char type, unsigned char *buffer, uint16_t
if (mtype < EOS_WIFI_MAX_MTYPE) {
evt_handler[mtype](type, buffer, len);
} else {
- eos_evtq_bad_handler(type, buffer, len);
- eos_net_free(buffer, 0);
- return;
+ eos_net_bad_handler(type, buffer, len);
}
}
@@ -33,13 +28,13 @@ void eos_wifi_init(void) {
int i;
for (i=0; i<EOS_WIFI_MAX_MTYPE; i++) {
- evt_handler[i] = eos_evtq_bad_handler;
+ evt_handler[i] = eos_net_bad_handler;
}
eos_net_set_handler(EOS_NET_MTYPE_WIFI, wifi_handle_evt);
}
void eos_wifi_set_handler(unsigned char mtype, eos_evt_handler_t handler) {
- if (handler == NULL) handler = eos_evtq_bad_handler;
+ if (handler == NULL) handler = eos_net_bad_handler;
if (mtype < EOS_WIFI_MAX_MTYPE) evt_handler[mtype] = handler;
}