Remove MLME code from build if none of the enabled drivers need it
This commit is contained in:
parent
bb305cbdcc
commit
9c584c06bd
6 changed files with 62 additions and 3 deletions
|
@ -39,10 +39,10 @@ LIBS += -lws2_32
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OBJS = hostapd.o ieee802_1x.o eapol_sm.o \
|
OBJS = hostapd.o ieee802_1x.o eapol_sm.o \
|
||||||
ieee802_11.o config.o ieee802_11_auth.o accounting.o \
|
config.o ieee802_11_auth.o accounting.o \
|
||||||
sta_info.o wpa.o ctrl_iface.o \
|
sta_info.o wpa.o ctrl_iface.o \
|
||||||
drivers.o preauth.o pmksa_cache.o beacon.o \
|
drivers.o preauth.o pmksa_cache.o \
|
||||||
hw_features.o wme.o ap_list.o \
|
hw_features.o \
|
||||||
mlme.o vlan_init.o wpa_auth_ie.o
|
mlme.o vlan_init.o wpa_auth_ie.o
|
||||||
|
|
||||||
OBJS += ../src/utils/eloop.o
|
OBJS += ../src/utils/eloop.o
|
||||||
|
@ -101,6 +101,7 @@ CFLAGS += -DCONFIG_IEEE80211N
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_DRIVER_HOSTAP
|
ifdef CONFIG_DRIVER_HOSTAP
|
||||||
|
NEED_MLME=y
|
||||||
CFLAGS += -DCONFIG_DRIVER_HOSTAP
|
CFLAGS += -DCONFIG_DRIVER_HOSTAP
|
||||||
OBJS += driver_hostap.o
|
OBJS += driver_hostap.o
|
||||||
endif
|
endif
|
||||||
|
@ -122,6 +123,7 @@ OBJS += driver_prism54.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_DRIVER_NL80211
|
ifdef CONFIG_DRIVER_NL80211
|
||||||
|
NEED_MLME=y
|
||||||
CFLAGS += -DCONFIG_DRIVER_NL80211
|
CFLAGS += -DCONFIG_DRIVER_NL80211
|
||||||
OBJS += driver_nl80211.o radiotap.o
|
OBJS += driver_nl80211.o radiotap.o
|
||||||
LIBS += -lnl
|
LIBS += -lnl
|
||||||
|
@ -140,6 +142,7 @@ CONFIG_L2_FREEBSD=y
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_DRIVER_TEST
|
ifdef CONFIG_DRIVER_TEST
|
||||||
|
NEED_MLME=y
|
||||||
CFLAGS += -DCONFIG_DRIVER_TEST
|
CFLAGS += -DCONFIG_DRIVER_TEST
|
||||||
OBJS += driver_test.o
|
OBJS += driver_test.o
|
||||||
endif
|
endif
|
||||||
|
@ -502,6 +505,11 @@ ifdef NEED_BASE64
|
||||||
OBJS += ../src/utils/base64.o
|
OBJS += ../src/utils/base64.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef NEED_MLME
|
||||||
|
OBJS += beacon.o wme.o ap_list.o ieee802_11.o
|
||||||
|
CFLAGS += -DNEED_MLME
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_NO_STDOUT_DEBUG
|
ifdef CONFIG_NO_STDOUT_DEBUG
|
||||||
CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
|
CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -63,8 +63,19 @@ void ap_list_process_beacon(struct hostapd_iface *iface,
|
||||||
struct ieee80211_mgmt *mgmt,
|
struct ieee80211_mgmt *mgmt,
|
||||||
struct ieee802_11_elems *elems,
|
struct ieee802_11_elems *elems,
|
||||||
struct hostapd_frame_info *fi);
|
struct hostapd_frame_info *fi);
|
||||||
|
#ifdef NEED_MLME
|
||||||
int ap_list_init(struct hostapd_iface *iface);
|
int ap_list_init(struct hostapd_iface *iface);
|
||||||
void ap_list_deinit(struct hostapd_iface *iface);
|
void ap_list_deinit(struct hostapd_iface *iface);
|
||||||
|
#else /* NEED_MLME */
|
||||||
|
static inline int ap_list_init(struct hostapd_iface *iface)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void ap_list_deinit(struct hostapd_iface *iface)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif /* NEED_MLME */
|
||||||
int ap_list_reconfig(struct hostapd_iface *iface,
|
int ap_list_reconfig(struct hostapd_iface *iface,
|
||||||
struct hostapd_config *oldconf);
|
struct hostapd_config *oldconf);
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,17 @@
|
||||||
|
|
||||||
void handle_probe_req(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
|
void handle_probe_req(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
|
||||||
size_t len);
|
size_t len);
|
||||||
|
#ifdef NEED_MLME
|
||||||
void ieee802_11_set_beacon(struct hostapd_data *hapd);
|
void ieee802_11_set_beacon(struct hostapd_data *hapd);
|
||||||
void ieee802_11_set_beacons(struct hostapd_iface *iface);
|
void ieee802_11_set_beacons(struct hostapd_iface *iface);
|
||||||
|
#else /* NEED_MLME */
|
||||||
|
static inline void ieee802_11_set_beacon(struct hostapd_data *hapd)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void ieee802_11_set_beacons(struct hostapd_iface *iface)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif /* NEED_MLME */
|
||||||
|
|
||||||
#endif /* BEACON_H */
|
#endif /* BEACON_H */
|
||||||
|
|
|
@ -38,11 +38,31 @@ void ieee802_11_mgmt(struct hostapd_data *hapd, u8 *buf, size_t len,
|
||||||
void ieee802_11_mgmt_cb(struct hostapd_data *hapd, u8 *buf, size_t len,
|
void ieee802_11_mgmt_cb(struct hostapd_data *hapd, u8 *buf, size_t len,
|
||||||
u16 stype, int ok);
|
u16 stype, int ok);
|
||||||
void ieee802_11_print_ssid(char *buf, const u8 *ssid, u8 len);
|
void ieee802_11_print_ssid(char *buf, const u8 *ssid, u8 len);
|
||||||
|
#ifdef NEED_MLME
|
||||||
void ieee80211_michael_mic_failure(struct hostapd_data *hapd, const u8 *addr,
|
void ieee80211_michael_mic_failure(struct hostapd_data *hapd, const u8 *addr,
|
||||||
int local);
|
int local);
|
||||||
int ieee802_11_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen);
|
int ieee802_11_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen);
|
||||||
int ieee802_11_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta,
|
int ieee802_11_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
char *buf, size_t buflen);
|
char *buf, size_t buflen);
|
||||||
|
#else /* NEED_MLME */
|
||||||
|
static inline void ieee80211_michael_mic_failure(struct hostapd_data *hapd,
|
||||||
|
const u8 *addr, int local)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int ieee802_11_get_mib(struct hostapd_data *hapd, char *buf,
|
||||||
|
size_t buflen)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int ieee802_11_get_mib_sta(struct hostapd_data *hapd,
|
||||||
|
struct sta_info *sta,
|
||||||
|
char *buf, size_t buflen)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif /* NEED_MLME */
|
||||||
u16 hostapd_own_capab_info(struct hostapd_data *hapd, struct sta_info *sta,
|
u16 hostapd_own_capab_info(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
int probe);
|
int probe);
|
||||||
u8 * hostapd_eid_supp_rates(struct hostapd_data *hapd, u8 *eid);
|
u8 * hostapd_eid_supp_rates(struct hostapd_data *hapd, u8 *eid);
|
||||||
|
|
|
@ -453,11 +453,13 @@ hostapd_acl_recv_radius(struct radius_msg *msg, struct radius_msg *req,
|
||||||
hostapd_set_radius_acl_auth(hapd, query->addr, cache->accepted,
|
hostapd_set_radius_acl_auth(hapd, query->addr, cache->accepted,
|
||||||
cache->session_timeout);
|
cache->session_timeout);
|
||||||
#else /* CONFIG_DRIVER_RADIUS_ACL */
|
#else /* CONFIG_DRIVER_RADIUS_ACL */
|
||||||
|
#ifdef NEED_MLME
|
||||||
/* Re-send original authentication frame for 802.11 processing */
|
/* Re-send original authentication frame for 802.11 processing */
|
||||||
wpa_printf(MSG_DEBUG, "Re-sending authentication frame after "
|
wpa_printf(MSG_DEBUG, "Re-sending authentication frame after "
|
||||||
"successful RADIUS ACL query");
|
"successful RADIUS ACL query");
|
||||||
ieee802_11_mgmt(hapd, query->auth_msg, query->auth_msg_len,
|
ieee802_11_mgmt(hapd, query->auth_msg, query->auth_msg_len,
|
||||||
WLAN_FC_STYPE_AUTH, NULL);
|
WLAN_FC_STYPE_AUTH, NULL);
|
||||||
|
#endif /* NEED_MLME */
|
||||||
#endif /* CONFIG_DRIVER_RADIUS_ACL */
|
#endif /* CONFIG_DRIVER_RADIUS_ACL */
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
|
@ -122,7 +122,15 @@ struct ieee80211_mgmt;
|
||||||
|
|
||||||
u8 * hostapd_eid_wme(struct hostapd_data *hapd, u8 *eid);
|
u8 * hostapd_eid_wme(struct hostapd_data *hapd, u8 *eid);
|
||||||
int hostapd_eid_wme_valid(struct hostapd_data *hapd, u8 *eid, size_t len);
|
int hostapd_eid_wme_valid(struct hostapd_data *hapd, u8 *eid, size_t len);
|
||||||
|
#ifdef NEED_MLME
|
||||||
int hostapd_wme_sta_config(struct hostapd_data *hapd, struct sta_info *sta);
|
int hostapd_wme_sta_config(struct hostapd_data *hapd, struct sta_info *sta);
|
||||||
|
#else /* NEED_MLME */
|
||||||
|
static inline int hostapd_wme_sta_config(struct hostapd_data *hapd,
|
||||||
|
struct sta_info *sta)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif /* NEED_MLME */
|
||||||
void hostapd_wme_action(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
|
void hostapd_wme_action(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
|
||||||
size_t len);
|
size_t len);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue