hostapd: enable compilation of OCV and add build feature discovery
[openwrt/openwrt.git] / package / network / services / hostapd / src / src / utils / build_features.h
1 #ifndef BUILD_FEATURES_H
2 #define BUILD_FEATURES_H
3
4 static inline int has_feature(const char *feat)
5 {
6 #if defined(IEEE8021X_EAPOL) || (defined(HOSTAPD) && !defined(CONFIG_NO_RADIUS))
7 if (!strcmp(feat, "eap"))
8 return 1;
9 #endif
10 #ifdef CONFIG_IEEE80211N
11 if (!strcmp(feat, "11n"))
12 return 1;
13 #endif
14 #ifdef CONFIG_IEEE80211AC
15 if (!strcmp(feat, "11ac"))
16 return 1;
17 #endif
18 #ifdef CONFIG_IEEE80211AX
19 if (!strcmp(feat, "11ax"))
20 return 1;
21 #endif
22 #ifdef CONFIG_IEEE80211R
23 if (!strcmp(feat, "11r"))
24 return 1;
25 #endif
26 #ifdef CONFIG_ACS
27 if (!strcmp(feat, "acs"))
28 return 1;
29 #endif
30 #ifdef CONFIG_SAE
31 if (!strcmp(feat, "sae"))
32 return 1;
33 #endif
34 #ifdef CONFIG_OWE
35 if (!strcmp(feat, "owe"))
36 return 1;
37 #endif
38 #ifdef CONFIG_SUITEB192
39 if (!strcmp(feat, "suiteb192"))
40 return 1;
41 #endif
42 #ifdef CONFIG_WEP
43 if (!strcmp(feat, "wep"))
44 return 1;
45 #endif
46 #ifdef CONFIG_HS20
47 if (!strcmp(feat, "hs20"))
48 return 1;
49 #endif
50 #ifdef CONFIG_WPS
51 if (!strcmp(feat, "wps"))
52 return 1;
53 #endif
54 #ifdef CONFIG_FILS
55 if (!strcmp(feat, "fils"))
56 return 1;
57 #endif
58 #ifdef CONFIG_OCV
59 if (!strcmp(feat, "ocv"))
60 return 1;
61 #endif
62 return 0;
63 }
64
65 #endif /* BUILD_FEATURES_H */