diff --git a/src/wifi_dataelements.h b/src/wifi_dataelements.h index 7516869ee6404884bbff8c99132af162b166a1ef..81ebf635acfd7adaeb6fc722ed8f9d737f664072 100644 --- a/src/wifi_dataelements.h +++ b/src/wifi_dataelements.h @@ -82,6 +82,40 @@ struct ip_address { }; #endif +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; + 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]; +}; + + struct wifi_sta_meas_report { struct list_head list; @@ -100,12 +134,6 @@ struct wifi_sta_meas_report { uint8_t optional[]; }; -struct wifi_opclass_channels { - uint8_t opclass; - size_t num_channel; - uint8_t *channel; -}; - struct wifi_cac_available_channel { uint8_t opclass; uint8_t channel; @@ -210,11 +238,8 @@ struct wifi_opclass_disallowed_element { uint8_t *chanlist; }; -/* The maximum value that can be represented as an unsignedLong - * (i.e. 0xffffffffffffffff) indicates that no data is available - * for this parameter. - */ -#define STEER_STATS_NO_DATA UINT64_MAX +#define STEER_STATS_NO_DATA UINT64_MAX + struct wifi_steer_summary { uint64_t no_candidate_cnt; uint64_t blacklist_attempt_cnt; @@ -455,8 +480,6 @@ struct wifi_radio_element { char country_code[4]; uint32_t num_bss; - uint32_t num_curr_opclass; - uint32_t num_disallowed_opclass; uint32_t num_unassoc_sta; uint32_t num_scanresult; @@ -464,9 +487,10 @@ struct wifi_radio_element { struct wifi_caps_element caps; + struct wifi_opclass opclass; /* E-4 table reported by device */ + struct wifi_opclass cur_opclass; /* current opclass reported by device */ + struct list_head bsslist; /* list of wifi_bss_element */ - struct list_head curr_opclasslist; /* list of wifi_opclass_current_element */ - struct list_head disallowed_opclasslist; /* wifi_opclass_disallowed_element */ struct list_head unassoc_stalist; /* list of wifi_unassoc_sta_element */ struct list_head scanlist; /* list of wifi_scanres_element */