From 6360485df1db43a1d5ad190eb33e9cd5cf552f27 Mon Sep 17 00:00:00 2001 From: Janusz Dziedzic <janusz.dziedzic@iopsys.eu> Date: Mon, 16 May 2022 14:38:28 +0200 Subject: [PATCH] intruduce wifi_opclass Will be used in both agent/controller. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu> --- src/wifi_dataelements.h | 70 ++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/src/wifi_dataelements.h b/src/wifi_dataelements.h index a5e89e44..ea4e38c2 100644 --- a/src/wifi_dataelements.h +++ b/src/wifi_dataelements.h @@ -82,18 +82,46 @@ 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; size_t len; uint8_t *data; }; -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; @@ -175,29 +203,6 @@ struct wifi_caps_element { struct wifi_mcs mcs; }; -struct wifi_opclass_supported_element { - uint8_t id; /* class number */ - int8_t max_txpower; - uint32_t num_exclude_channels; - uint8_t *exclude_chanlist; /* list of non-operable channels */ - uint32_t num_channels; - uint8_t *chanlist; -}; - -struct wifi_opclass_current_element { - timestamp_t tsp; - uint8_t id; - uint8_t channel; - int8_t txpower; -}; - -struct wifi_opclass_disallowed_element { - bool enabled; - uint8_t opclass; - uint32_t num_channels; - uint8_t *chanlist; -}; - struct wifi_steer_summary { uint64_t no_candidate_cnt; uint64_t blacklist_attempt_cnt; @@ -433,8 +438,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; @@ -442,9 +445,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 */ -- GitLab