]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Avoid forward references to enum types in ieee802_11_common.h
authorJouni Malinen <jouni@codeaurora.org>
Mon, 7 Jan 2019 15:26:40 +0000 (17:26 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 7 Jan 2019 15:26:40 +0000 (17:26 +0200)
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 <jouni@codeaurora.org>
src/common/defs.h
src/common/ieee802_11_common.h
src/drivers/driver.h

index c54f57005ccb03d84a54310ce5a369a5bb9680be..4faf1c8601d048a2baa89b7b45c87ae04927fdae 100644 (file)
@@ -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 */
index 4e8c766e47dc7f145fd6ad2178ee5b168b81cca0..ce3bb8b9f5eb38234273ce08be2b455e8d17ef5b 100644 (file)
@@ -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
 
index 26b6fa3eeb6ad13df970852fa550ddecce05acc9..380e25272fd994b1fe6e4e1afd853ba1190d47ff 100644 (file)
@@ -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
 
 /**