Replace NEED_MLME with NEED_AP_MLME

This makes it clearer that it's about the AP, not client-side MLME, even
when built into the client (wpa_supplicant).
This commit is contained in:
Johannes Berg 2009-08-14 20:01:41 +03:00 committed by Jouni Malinen
parent e7cd16cac5
commit fe6bdb777e
13 changed files with 35 additions and 35 deletions

View file

@ -547,7 +547,7 @@ endif
ifdef NEED_AP_MLME ifdef NEED_AP_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 OBJS += hw_features.o
CFLAGS += -DNEED_MLME CFLAGS += -DNEED_AP_MLME
endif endif
ifdef CONFIG_NO_STDOUT_DEBUG ifdef CONFIG_NO_STDOUT_DEBUG

View file

@ -63,10 +63,10 @@ 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 #ifdef NEED_AP_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 */ #else /* NEED_AP_MLME */
static inline int ap_list_init(struct hostapd_iface *iface) static inline int ap_list_init(struct hostapd_iface *iface)
{ {
return 0; return 0;
@ -75,7 +75,7 @@ static inline int ap_list_init(struct hostapd_iface *iface)
static inline void ap_list_deinit(struct hostapd_iface *iface) static inline void ap_list_deinit(struct hostapd_iface *iface)
{ {
} }
#endif /* NEED_MLME */ #endif /* NEED_AP_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);

View file

@ -20,10 +20,10 @@ struct ieee80211_mgmt;
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 #ifdef NEED_AP_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 */ #else /* NEED_AP_MLME */
static inline void ieee802_11_set_beacon(struct hostapd_data *hapd) static inline void ieee802_11_set_beacon(struct hostapd_data *hapd)
{ {
} }
@ -31,6 +31,6 @@ static inline void ieee802_11_set_beacon(struct hostapd_data *hapd)
static inline void ieee802_11_set_beacons(struct hostapd_iface *iface) static inline void ieee802_11_set_beacons(struct hostapd_iface *iface)
{ {
} }
#endif /* NEED_MLME */ #endif /* NEED_AP_MLME */
#endif /* BEACON_H */ #endif /* BEACON_H */

View file

@ -231,7 +231,7 @@ static int hostapd_ctrl_iface_new_sta(struct hostapd_data *hapd,
#ifdef CONFIG_IEEE80211W #ifdef CONFIG_IEEE80211W
#ifdef NEED_MLME #ifdef NEED_AP_MLME
static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd, static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd,
const char *txtaddr) const char *txtaddr)
{ {
@ -248,7 +248,7 @@ static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd,
return 0; return 0;
} }
#endif /* NEED_MLME */ #endif /* NEED_AP_MLME */
#endif /* CONFIG_IEEE80211W */ #endif /* CONFIG_IEEE80211W */
@ -383,11 +383,11 @@ static void hostapd_ctrl_iface_receive(int sock, void *eloop_ctx,
if (hostapd_ctrl_iface_new_sta(hapd, buf + 8)) if (hostapd_ctrl_iface_new_sta(hapd, buf + 8))
reply_len = -1; reply_len = -1;
#ifdef CONFIG_IEEE80211W #ifdef CONFIG_IEEE80211W
#ifdef NEED_MLME #ifdef NEED_AP_MLME
} else if (os_strncmp(buf, "SA_QUERY ", 9) == 0) { } else if (os_strncmp(buf, "SA_QUERY ", 9) == 0) {
if (hostapd_ctrl_iface_sa_query(hapd, buf + 9)) if (hostapd_ctrl_iface_sa_query(hapd, buf + 9))
reply_len = -1; reply_len = -1;
#endif /* NEED_MLME */ #endif /* NEED_AP_MLME */
#endif /* CONFIG_IEEE80211W */ #endif /* CONFIG_IEEE80211W */
#ifdef CONFIG_WPS #ifdef CONFIG_WPS
} else if (os_strncmp(buf, "WPS_PIN ", 8) == 0) { } else if (os_strncmp(buf, "WPS_PIN ", 8) == 0) {

View file

@ -339,7 +339,7 @@ void hostapd_eapol_receive(struct hostapd_data *hapd, const u8 *sa,
} }
#ifdef NEED_MLME #ifdef NEED_AP_MLME
void hostapd_mgmt_rx(struct hostapd_data *hapd, u8 *buf, size_t len, void hostapd_mgmt_rx(struct hostapd_data *hapd, u8 *buf, size_t len,
u16 stype, struct hostapd_frame_info *fi) u16 stype, struct hostapd_frame_info *fi)
{ {
@ -387,7 +387,7 @@ void hostapd_mgmt_tx_cb(struct hostapd_data *hapd, u8 *buf, size_t len,
return; return;
ieee802_11_mgmt_cb(hapd, buf, len, stype, ok); ieee802_11_mgmt_cb(hapd, buf, len, stype, ok);
} }
#endif /* NEED_MLME */ #endif /* NEED_AP_MLME */
void hostapd_michael_mic_failure(struct hostapd_data *hapd, const u8 *addr) void hostapd_michael_mic_failure(struct hostapd_data *hapd, const u8 *addr)

View file

@ -16,7 +16,7 @@
#ifndef HW_FEATURES_H #ifndef HW_FEATURES_H
#define HW_FEATURES_H #define HW_FEATURES_H
#ifdef NEED_MLME #ifdef NEED_AP_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);
@ -25,7 +25,7 @@ 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);
int hostapd_check_ht_capab(struct hostapd_iface *iface); int hostapd_check_ht_capab(struct hostapd_iface *iface);
#else /* NEED_MLME */ #else /* NEED_AP_MLME */
static inline void static inline void
hostapd_free_hw_features(struct hostapd_hw_modes *hw_features, hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
size_t num_hw_features) size_t num_hw_features)
@ -57,6 +57,6 @@ static inline int hostapd_check_ht_capab(struct hostapd_iface *iface)
return 0; return 0;
} }
#endif /* NEED_MLME */ #endif /* NEED_AP_MLME */
#endif /* HW_FEATURES_H */ #endif /* HW_FEATURES_H */

View file

@ -30,11 +30,11 @@ 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 #ifdef NEED_AP_MLME
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 */ #else /* NEED_AP_MLME */
static inline int ieee802_11_get_mib(struct hostapd_data *hapd, char *buf, static inline int ieee802_11_get_mib(struct hostapd_data *hapd, char *buf,
size_t buflen) size_t buflen)
{ {
@ -47,7 +47,7 @@ static inline int ieee802_11_get_mib_sta(struct hostapd_data *hapd,
{ {
return 0; return 0;
} }
#endif /* NEED_MLME */ #endif /* NEED_AP_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);

View file

@ -465,13 +465,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 #ifdef NEED_AP_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 /* NEED_AP_MLME */
#endif /* CONFIG_DRIVER_RADIUS_ACL */ #endif /* CONFIG_DRIVER_RADIUS_ACL */
done: done:

View file

@ -171,10 +171,10 @@ void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta)
hapd->iface->num_sta_ht_20mhz--; hapd->iface->num_sta_ht_20mhz--;
} }
#ifdef NEED_MLME #ifdef NEED_AP_MLME
if (hostapd_ht_operation_update(hapd->iface) > 0) if (hostapd_ht_operation_update(hapd->iface) > 0)
set_beacon++; set_beacon++;
#endif /* NEED_MLME */ #endif /* NEED_AP_MLME */
#endif /* CONFIG_IEEE80211N */ #endif /* CONFIG_IEEE80211N */
if (set_beacon) if (set_beacon)
@ -697,9 +697,9 @@ static void ap_sa_query_timer(void *eloop_ctx, void *timeout_ctx)
HOSTAPD_LEVEL_DEBUG, HOSTAPD_LEVEL_DEBUG,
"association SA Query attempt %d", sta->sa_query_count); "association SA Query attempt %d", sta->sa_query_count);
#ifdef NEED_MLME #ifdef NEED_AP_MLME
ieee802_11_send_sa_query_req(hapd, sta->addr, trans_id); ieee802_11_send_sa_query_req(hapd, sta->addr, trans_id);
#endif /* NEED_MLME */ #endif /* NEED_AP_MLME */
} }

View file

@ -20,15 +20,15 @@ struct ieee80211_mgmt;
u8 * hostapd_eid_wmm(struct hostapd_data *hapd, u8 *eid); u8 * hostapd_eid_wmm(struct hostapd_data *hapd, u8 *eid);
int hostapd_eid_wmm_valid(struct hostapd_data *hapd, u8 *eid, size_t len); int hostapd_eid_wmm_valid(struct hostapd_data *hapd, u8 *eid, size_t len);
#ifdef NEED_MLME #ifdef NEED_AP_MLME
int hostapd_wmm_sta_config(struct hostapd_data *hapd, struct sta_info *sta); int hostapd_wmm_sta_config(struct hostapd_data *hapd, struct sta_info *sta);
#else /* NEED_MLME */ #else /* NEED_AP_MLME */
static inline int hostapd_wmm_sta_config(struct hostapd_data *hapd, static inline int hostapd_wmm_sta_config(struct hostapd_data *hapd,
struct sta_info *sta) struct sta_info *sta)
{ {
return 0; return 0;
} }
#endif /* NEED_MLME */ #endif /* NEED_AP_MLME */
void hostapd_wmm_action(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt, void hostapd_wmm_action(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
size_t len); size_t len);
int wmm_process_tspec(struct wmm_tspec_element *tspec); int wmm_process_tspec(struct wmm_tspec_element *tspec);

View file

@ -526,7 +526,7 @@ static u8 * wpa_ft_process_rdie(u8 *pos, u8 *end, u8 id, u8 descr_count,
return pos; return pos;
} }
#ifdef NEED_MLME #ifdef NEED_AP_MLME
if (parse.wmm_tspec) { if (parse.wmm_tspec) {
struct wmm_tspec_element *tspec; struct wmm_tspec_element *tspec;
int res; int res;
@ -562,7 +562,7 @@ static u8 * wpa_ft_process_rdie(u8 *pos, u8 *end, u8 id, u8 descr_count,
} }
return pos; return pos;
} }
#endif /* NEED_MLME */ #endif /* NEED_AP_MLME */
wpa_printf(MSG_DEBUG, "FT: No supported resource requested"); wpa_printf(MSG_DEBUG, "FT: No supported resource requested");
rdie->status_code = host_to_le16(WLAN_STATUS_UNSPECIFIED_FAILURE); rdie->status_code = host_to_le16(WLAN_STATUS_UNSPECIFIED_FAILURE);

View file

@ -544,7 +544,7 @@ OBJS += ../hostapd/wme.o
OBJS += ../hostapd/ap_list.o OBJS += ../hostapd/ap_list.o
OBJS += ../hostapd/ieee802_11.o OBJS += ../hostapd/ieee802_11.o
OBJS += ../hostapd/hw_features.o OBJS += ../hostapd/hw_features.o
CFLAGS += -DNEED_MLME CFLAGS += -DNEED_AP_MLME
endif endif
ifdef CONFIG_WPS ifdef CONFIG_WPS
CFLAGS += -DEAP_SERVER_WSC CFLAGS += -DEAP_SERVER_WSC

View file

@ -18,9 +18,9 @@
#include "common.h" #include "common.h"
#include "../hostapd/hostapd.h" #include "../hostapd/hostapd.h"
#include "../hostapd/config.h" #include "../hostapd/config.h"
#ifdef NEED_MLME #ifdef NEED_AP_MLME
#include "../hostapd/ieee802_11.h" #include "../hostapd/ieee802_11.h"
#endif /* NEED_MLME */ #endif /* NEED_AP_MLME */
#include "../hostapd/wps_hostapd.h" #include "../hostapd/wps_hostapd.h"
#include "eap_common/eap_defs.h" #include "eap_common/eap_defs.h"
#include "eap_server/eap_methods.h" #include "eap_server/eap_methods.h"
@ -500,7 +500,7 @@ void ap_rx_from_unknown_sta(void *ctx, const u8 *addr)
} }
#ifdef NEED_MLME #ifdef NEED_AP_MLME
void ap_mgmt_rx(void *ctx, u8 *buf, size_t len, u16 stype, void ap_mgmt_rx(void *ctx, u8 *buf, size_t len, u16 stype,
struct hostapd_frame_info *fi) struct hostapd_frame_info *fi)
{ {
@ -514,7 +514,7 @@ void ap_mgmt_tx_cb(void *ctx, u8 *buf, size_t len, u16 stype, int ok)
struct wpa_supplicant *wpa_s = ctx; struct wpa_supplicant *wpa_s = ctx;
ieee802_11_mgmt_cb(wpa_s->ap_iface->bss[0], buf, len, stype, ok); ieee802_11_mgmt_cb(wpa_s->ap_iface->bss[0], buf, len, stype, ok);
} }
#endif /* NEED_MLME */ #endif /* NEED_AP_MLME */
void wpa_supplicant_ap_rx_eapol(struct wpa_supplicant *wpa_s, void wpa_supplicant_ap_rx_eapol(struct wpa_supplicant *wpa_s,