From: Jouni Malinen Date: Mon, 7 Jan 2019 15:26:40 +0000 (+0200) Subject: Avoid forward references to enum types in ieee802_11_common.h X-Git-Tag: hostap_2_8~549 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89d79150ac1755bfb4e03a4845874bd4cbcccd77;p=thirdparty%2Fhostap.git Avoid forward references to enum types in ieee802_11_common.h These are not allowed in ISO C++ (and well, not really in ISO C either, but that does not result in compiler warning without pedantic compilation). Since ieee802_11_common.h may end up getting pulled into C++ code for some external interfaces, it is more convenient to keep it free of these cases. Pull in ieee802_11_defs.h to get enum phy_type defined and move enum chan_width to common/defs.h (which was already pulled in into src/drivers/driver.h and src/common/ieee802_11_common.h). Signed-off-by: Jouni Malinen --- diff --git a/src/common/defs.h b/src/common/defs.h index c54f57005..4faf1c860 100644 --- a/src/common/defs.h +++ b/src/common/defs.h @@ -408,4 +408,15 @@ enum eap_proxy_sim_state { #define OCE_STA_CFON BIT(1) #define OCE_AP BIT(2) +/* enum chan_width - Channel width definitions */ +enum chan_width { + CHAN_WIDTH_20_NOHT, + CHAN_WIDTH_20, + CHAN_WIDTH_40, + CHAN_WIDTH_80, + CHAN_WIDTH_80P80, + CHAN_WIDTH_160, + CHAN_WIDTH_UNKNOWN +}; + #endif /* DEFS_H */ diff --git a/src/common/ieee802_11_common.h b/src/common/ieee802_11_common.h index 4e8c766e4..ce3bb8b9f 100644 --- a/src/common/ieee802_11_common.h +++ b/src/common/ieee802_11_common.h @@ -10,9 +10,9 @@ #define IEEE802_11_COMMON_H #include "defs.h" +#include "ieee802_11_defs.h" struct hostapd_hw_modes; -enum chan_width; #define MAX_NOF_MB_IES_SUPPORTED 5 diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 26b6fa3ee..380e25272 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -1939,17 +1939,6 @@ enum smps_mode { SMPS_INVALID, }; -/* enum chan_width - Channel width definitions */ -enum chan_width { - CHAN_WIDTH_20_NOHT, - CHAN_WIDTH_20, - CHAN_WIDTH_40, - CHAN_WIDTH_80, - CHAN_WIDTH_80P80, - CHAN_WIDTH_160, - CHAN_WIDTH_UNKNOWN -}; - #define WPA_INVALID_NOISE 9999 /**