From 75e57273a7ffded0ddcd3698ba68603c4be8a4cd Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sun, 17 May 2020 04:03:23 +0200 Subject: power management implemented; net protocol change --- code/fe310/eos/wifi.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'code/fe310/eos/wifi.c') 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