hostapd: fix feature indication
[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_IEEE80211R
19 if (!strcmp(feat, "11r"))
20 return 1;
21 #endif
22 #ifdef CONFIG_IEEE80211W
23 if (!strcmp(feat, "11w"))
24 return 1;
25 #endif
26 return 0;
27 }
28
29 #endif /* BUILD_FEATURES_H */