diff --git a/src/cntlr.h b/src/cntlr.h index c751b5d97a1fe9835dc38daa094938a8b59d2e4d..1b050ba66cb938d7bed3aeb961c3d7e66a5f82ae 100644 --- a/src/cntlr.h +++ b/src/cntlr.h @@ -17,9 +17,9 @@ #include <timer_impl.h> #include <cmdu_ackq.h> #include <map_module.h> -#include "utils/opclass.h" #include "wifi_dataelements.h" +#include "utils/opclass.h" extern const char *ubus_socket; diff --git a/src/utils/opclass.c b/src/utils/opclass.c index a56d7979484447e816255b7909baf2ec76147ccf..b7bbb53470c7b01a42bebf6a3d0ee6a86346ea03 100644 --- a/src/utils/opclass.c +++ b/src/utils/opclass.c @@ -7,6 +7,7 @@ #include <map2.h> #include "utils.h" #include "debug.h" +#include "../wifi_dataelements.h" #include "opclass.h" static const struct wifi_opclass e4 = { diff --git a/src/utils/opclass.h b/src/utils/opclass.h index 90849fea0aca91396ab9cd993eebd8c0a33d27be..57ca579c3d997906ef34483c678b765e3a6b11cd 100644 --- a/src/utils/opclass.h +++ b/src/utils/opclass.h @@ -1,40 +1,6 @@ #ifndef _OPCLASS_H_ #define _OPCLASS_H_ -enum wifi_opclass_dfs { - WIFI_OPCLASS_CHANNEL_DFS_NONE, - WIFI_OPCLASS_CHANNEL_DFS_USABLE, - WIFI_OPCLASS_CHANNEL_DFS_AVAILABLE, - WIFI_OPCLASS_CHANNEL_DFS_NOP, - WIFI_OPCLASS_CHANNEL_DFS_CAC, -}; - -struct wifi_opclass_channel { - uint8_t channel; - /* preference and reason */ - uint8_t preference; - - enum wifi_opclass_dfs dfs; - uint32_t cac_time; - uint32_t nop_time; -}; - -struct wifi_opclass_entry { - uint8_t id; - int bandwidth; - int max_txpower; - - int channel_num; - struct wifi_opclass_channel channel[64]; -}; - -struct wifi_opclass { - struct timespec entry_time; - - int entry_num; - struct wifi_opclass_entry entry[64]; -}; - const struct wifi_opclass *wifi_opclass_e4(void); struct wifi_opclass_entry *wifi_opclass_find_entry(struct wifi_opclass *opclass, uint8_t id); @@ -52,4 +18,5 @@ void wifi_opclass_dump(struct wifi_opclass *opclass); uint8_t wifi_opclass_get_id(struct wifi_opclass *opclass, uint8_t channel, int bandwidth); bool wifi_opclass_channel_supported(struct wifi_opclass *opclass, uint8_t id, uint8_t channel, int bandwidth); + #endif /* _OPCLASS_H_ */