Removed hw_features.o from build if hostapd MLME is not used

This commit is contained in:
Jouni Malinen 2009-01-12 22:03:58 +02:00
parent 7fd46d466f
commit a9843f614f
2 changed files with 24 additions and 1 deletions

View file

@ -42,7 +42,6 @@ OBJS = hostapd.o ieee802_1x.o eapol_sm.o \
config.o ieee802_11_auth.o \ config.o ieee802_11_auth.o \
sta_info.o wpa.o \ sta_info.o wpa.o \
drivers.o preauth.o pmksa_cache.o \ drivers.o preauth.o pmksa_cache.o \
hw_features.o \
drv_callbacks.o \ drv_callbacks.o \
tkip_countermeasures.o \ tkip_countermeasures.o \
mlme.o wpa_auth_ie.o mlme.o wpa_auth_ie.o
@ -538,6 +537,7 @@ endif
ifdef NEED_MLME ifdef NEED_MLME
OBJS += beacon.o wme.o ap_list.o ieee802_11.o OBJS += beacon.o wme.o ap_list.o ieee802_11.o
OBJS += hw_features.o
CFLAGS += -DNEED_MLME CFLAGS += -DNEED_MLME
endif endif

View file

@ -50,6 +50,7 @@ struct hostapd_hw_modes {
}; };
#ifdef NEED_MLME
void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features, void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
size_t num_hw_features); size_t num_hw_features);
int hostapd_get_hw_features(struct hostapd_iface *iface); int hostapd_get_hw_features(struct hostapd_iface *iface);
@ -57,5 +58,27 @@ int hostapd_select_hw_mode(struct hostapd_iface *iface);
const char * hostapd_hw_mode_txt(int mode); const char * hostapd_hw_mode_txt(int mode);
int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan); int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan);
int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq); int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq);
#else /* NEED_MLME */
static inline void
hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
size_t num_hw_features)
{
}
static inline int hostapd_get_hw_features(struct hostapd_iface *iface)
{
return -1;
}
static inline int hostapd_select_hw_mode(struct hostapd_iface *iface)
{
return -1;
}
static inline int hostapd_hw_get_freq(struct hostapd_data *hapd, int chan)
{
return -1;
}
#endif /* NEED_MLME */
#endif /* HW_FEATURES_H */ #endif /* HW_FEATURES_H */