aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wnm_sta.h
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-11-22 13:37:27 (GMT)
committerJouni Malinen <j@w1.fi>2014-11-22 16:06:37 (GMT)
commit093226783dc78a7c80af516f2fe76909bda8b400 (patch)
tree5c2fef37d18d3fa2e8d8a7967846c9a144240338 /wpa_supplicant/wnm_sta.h
parent8c9af762f30d0a52d7397716b735a4f81b279dda (diff)
downloadhostap-093226783dc78a7c80af516f2fe76909bda8b400.zip
hostap-093226783dc78a7c80af516f2fe76909bda8b400.tar.gz
hostap-093226783dc78a7c80af516f2fe76909bda8b400.tar.bz2
WNM: Simplify how candidate subelements are stored
There is no need to use a separately allocated data structures for this. A bitfield indicating which information is present and variables within struct neighbor_report are simpler to use and more efficient. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/wnm_sta.h')
-rw-r--r--wpa_supplicant/wnm_sta.h47
1 files changed, 16 insertions, 31 deletions
diff --git a/wpa_supplicant/wnm_sta.h b/wpa_supplicant/wnm_sta.h
index 22a0730..1117c82 100644
--- a/wpa_supplicant/wnm_sta.h
+++ b/wpa_supplicant/wnm_sta.h
@@ -9,37 +9,12 @@
#ifndef WNM_STA_H
#define WNM_STA_H
-struct tsf_info {
- u8 tsf_offset[2];
- u8 beacon_interval[2];
-};
-
-struct condensed_country_string {
- u8 country_string[2];
-};
-
-struct bss_transition_candidate {
- u8 preference;
-};
-
-struct bss_termination_duration {
- u8 duration[10];
-};
-
-struct bearing {
- u8 bearing[8];
-};
-
struct measurement_pilot {
u8 measurement_pilot;
u8 subelem_len;
u8 subelems[255];
};
-struct rrm_enabled_capabilities {
- u8 capabilities[5];
-};
-
struct multiple_bssid {
u8 max_bssid_indicator;
u8 subelem_len;
@@ -52,13 +27,23 @@ struct neighbor_report {
u8 regulatory_class;
u8 channel_number;
u8 phy_type;
- struct tsf_info *tsf_info;
- struct condensed_country_string *con_coun_str;
- struct bss_transition_candidate *bss_tran_can;
- struct bss_termination_duration *bss_term_dur;
- struct bearing *bearing;
+ u8 preference; /* valid if preference_present=1 */
+ u16 tsf_offset; /* valid if tsf_present=1 */
+ u16 beacon_int; /* valid if tsf_present=1 */
+ char country[2]; /* valid if country_present=1 */
+ u8 rm_capab[5]; /* valid if rm_capab_present=1 */
+ u16 bearing; /* valid if bearing_present=1 */
+ u16 rel_height; /* valid if bearing_present=1 */
+ u32 distance; /* valid if bearing_present=1 */
+ u64 bss_term_tsf; /* valid if bss_term_present=1 */
+ u16 bss_term_dur; /* valid if bss_term_present=1 */
+ unsigned int preference_present:1;
+ unsigned int tsf_present:1;
+ unsigned int country_present:1;
+ unsigned int rm_capab_present:1;
+ unsigned int bearing_present:1;
+ unsigned int bss_term_present:1;
struct measurement_pilot *meas_pilot;
- struct rrm_enabled_capabilities *rrm_cap;
struct multiple_bssid *mul_bssid;
};