From fe6bdb777efa124cad355230cebe782e6d89722b Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 14 Aug 2009 20:01:41 +0300 Subject: [PATCH] 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). --- hostapd/Makefile | 2 +- hostapd/ap_list.h | 6 +++--- hostapd/beacon.h | 6 +++--- hostapd/ctrl_iface.c | 8 ++++---- hostapd/drv_callbacks.c | 4 ++-- hostapd/hw_features.h | 6 +++--- hostapd/ieee802_11.h | 6 +++--- hostapd/ieee802_11_auth.c | 4 ++-- hostapd/sta_info.c | 8 ++++---- hostapd/wme.h | 6 +++--- hostapd/wpa_ft.c | 4 ++-- wpa_supplicant/Makefile | 2 +- wpa_supplicant/ap.c | 8 ++++---- 13 files changed, 35 insertions(+), 35 deletions(-) diff --git a/hostapd/Makefile b/hostapd/Makefile index 453cc3efa..fe09dfe9c 100644 --- a/hostapd/Makefile +++ b/hostapd/Makefile @@ -547,7 +547,7 @@ endif ifdef NEED_AP_MLME OBJS += beacon.o wme.o ap_list.o ieee802_11.o OBJS += hw_features.o -CFLAGS += -DNEED_MLME +CFLAGS += -DNEED_AP_MLME endif ifdef CONFIG_NO_STDOUT_DEBUG diff --git a/hostapd/ap_list.h b/hostapd/ap_list.h index 2ac9edf84..2845aa429 100644 --- a/hostapd/ap_list.h +++ b/hostapd/ap_list.h @@ -63,10 +63,10 @@ void ap_list_process_beacon(struct hostapd_iface *iface, struct ieee80211_mgmt *mgmt, struct ieee802_11_elems *elems, struct hostapd_frame_info *fi); -#ifdef NEED_MLME +#ifdef NEED_AP_MLME int ap_list_init(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) { 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) { } -#endif /* NEED_MLME */ +#endif /* NEED_AP_MLME */ int ap_list_reconfig(struct hostapd_iface *iface, struct hostapd_config *oldconf); diff --git a/hostapd/beacon.h b/hostapd/beacon.h index afca98b70..ca80ac0f0 100644 --- a/hostapd/beacon.h +++ b/hostapd/beacon.h @@ -20,10 +20,10 @@ struct ieee80211_mgmt; void handle_probe_req(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt, size_t len); -#ifdef NEED_MLME +#ifdef NEED_AP_MLME void ieee802_11_set_beacon(struct hostapd_data *hapd); 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) { } @@ -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) { } -#endif /* NEED_MLME */ +#endif /* NEED_AP_MLME */ #endif /* BEACON_H */ diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index 3cd498c6d..6fe401e58 100644 --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c @@ -231,7 +231,7 @@ static int hostapd_ctrl_iface_new_sta(struct hostapd_data *hapd, #ifdef CONFIG_IEEE80211W -#ifdef NEED_MLME +#ifdef NEED_AP_MLME static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd, const char *txtaddr) { @@ -248,7 +248,7 @@ static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd, return 0; } -#endif /* NEED_MLME */ +#endif /* NEED_AP_MLME */ #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)) reply_len = -1; #ifdef CONFIG_IEEE80211W -#ifdef NEED_MLME +#ifdef NEED_AP_MLME } else if (os_strncmp(buf, "SA_QUERY ", 9) == 0) { if (hostapd_ctrl_iface_sa_query(hapd, buf + 9)) reply_len = -1; -#endif /* NEED_MLME */ +#endif /* NEED_AP_MLME */ #endif /* CONFIG_IEEE80211W */ #ifdef CONFIG_WPS } else if (os_strncmp(buf, "WPS_PIN ", 8) == 0) { diff --git a/hostapd/drv_callbacks.c b/hostapd/drv_callbacks.c index de686f4df..6c940b5eb 100644 --- a/hostapd/drv_callbacks.c +++ b/hostapd/drv_callbacks.c @@ -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, 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; 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) diff --git a/hostapd/hw_features.h b/hostapd/hw_features.h index 4449cbbcb..0295549fe 100644 --- a/hostapd/hw_features.h +++ b/hostapd/hw_features.h @@ -16,7 +16,7 @@ #ifndef 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, size_t num_hw_features); 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_channel(struct hostapd_data *hapd, int freq); int hostapd_check_ht_capab(struct hostapd_iface *iface); -#else /* NEED_MLME */ +#else /* NEED_AP_MLME */ static inline void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features, size_t num_hw_features) @@ -57,6 +57,6 @@ static inline int hostapd_check_ht_capab(struct hostapd_iface *iface) return 0; } -#endif /* NEED_MLME */ +#endif /* NEED_AP_MLME */ #endif /* HW_FEATURES_H */ diff --git a/hostapd/ieee802_11.h b/hostapd/ieee802_11.h index c6b7ccbe4..ca56c2071 100644 --- a/hostapd/ieee802_11.h +++ b/hostapd/ieee802_11.h @@ -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, u16 stype, int ok); 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_sta(struct hostapd_data *hapd, struct sta_info *sta, 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, size_t buflen) { @@ -47,7 +47,7 @@ static inline int ieee802_11_get_mib_sta(struct hostapd_data *hapd, { return 0; } -#endif /* NEED_MLME */ +#endif /* NEED_AP_MLME */ u16 hostapd_own_capab_info(struct hostapd_data *hapd, struct sta_info *sta, int probe); u8 * hostapd_eid_supp_rates(struct hostapd_data *hapd, u8 *eid); diff --git a/hostapd/ieee802_11_auth.c b/hostapd/ieee802_11_auth.c index 5ae3ac337..b20404991 100644 --- a/hostapd/ieee802_11_auth.c +++ b/hostapd/ieee802_11_auth.c @@ -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, cache->session_timeout); #else /* CONFIG_DRIVER_RADIUS_ACL */ -#ifdef NEED_MLME +#ifdef NEED_AP_MLME /* Re-send original authentication frame for 802.11 processing */ wpa_printf(MSG_DEBUG, "Re-sending authentication frame after " "successful RADIUS ACL query"); ieee802_11_mgmt(hapd, query->auth_msg, query->auth_msg_len, WLAN_FC_STYPE_AUTH, NULL); -#endif /* NEED_MLME */ +#endif /* NEED_AP_MLME */ #endif /* CONFIG_DRIVER_RADIUS_ACL */ done: diff --git a/hostapd/sta_info.c b/hostapd/sta_info.c index 7a22e9298..70bf716cf 100644 --- a/hostapd/sta_info.c +++ b/hostapd/sta_info.c @@ -171,10 +171,10 @@ void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta) hapd->iface->num_sta_ht_20mhz--; } -#ifdef NEED_MLME +#ifdef NEED_AP_MLME if (hostapd_ht_operation_update(hapd->iface) > 0) set_beacon++; -#endif /* NEED_MLME */ +#endif /* NEED_AP_MLME */ #endif /* CONFIG_IEEE80211N */ if (set_beacon) @@ -697,9 +697,9 @@ static void ap_sa_query_timer(void *eloop_ctx, void *timeout_ctx) HOSTAPD_LEVEL_DEBUG, "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); -#endif /* NEED_MLME */ +#endif /* NEED_AP_MLME */ } diff --git a/hostapd/wme.h b/hostapd/wme.h index 1ddb647d8..63847b2dd 100644 --- a/hostapd/wme.h +++ b/hostapd/wme.h @@ -20,15 +20,15 @@ struct ieee80211_mgmt; u8 * hostapd_eid_wmm(struct hostapd_data *hapd, u8 *eid); 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); -#else /* NEED_MLME */ +#else /* NEED_AP_MLME */ static inline int hostapd_wmm_sta_config(struct hostapd_data *hapd, struct sta_info *sta) { return 0; } -#endif /* NEED_MLME */ +#endif /* NEED_AP_MLME */ void hostapd_wmm_action(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt, size_t len); int wmm_process_tspec(struct wmm_tspec_element *tspec); diff --git a/hostapd/wpa_ft.c b/hostapd/wpa_ft.c index b3801ff4e..115f1fc29 100644 --- a/hostapd/wpa_ft.c +++ b/hostapd/wpa_ft.c @@ -526,7 +526,7 @@ static u8 * wpa_ft_process_rdie(u8 *pos, u8 *end, u8 id, u8 descr_count, return pos; } -#ifdef NEED_MLME +#ifdef NEED_AP_MLME if (parse.wmm_tspec) { struct wmm_tspec_element *tspec; int res; @@ -562,7 +562,7 @@ static u8 * wpa_ft_process_rdie(u8 *pos, u8 *end, u8 id, u8 descr_count, } return pos; } -#endif /* NEED_MLME */ +#endif /* NEED_AP_MLME */ wpa_printf(MSG_DEBUG, "FT: No supported resource requested"); rdie->status_code = host_to_le16(WLAN_STATUS_UNSPECIFIED_FAILURE); diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 15fcf5927..15c86884e 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -544,7 +544,7 @@ OBJS += ../hostapd/wme.o OBJS += ../hostapd/ap_list.o OBJS += ../hostapd/ieee802_11.o OBJS += ../hostapd/hw_features.o -CFLAGS += -DNEED_MLME +CFLAGS += -DNEED_AP_MLME endif ifdef CONFIG_WPS CFLAGS += -DEAP_SERVER_WSC diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index e45407d61..7907267a2 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -18,9 +18,9 @@ #include "common.h" #include "../hostapd/hostapd.h" #include "../hostapd/config.h" -#ifdef NEED_MLME +#ifdef NEED_AP_MLME #include "../hostapd/ieee802_11.h" -#endif /* NEED_MLME */ +#endif /* NEED_AP_MLME */ #include "../hostapd/wps_hostapd.h" #include "eap_common/eap_defs.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, 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; 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,