From fdbe50ed98047861154f2be4faabbc527c1b895f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 3 Jan 2010 13:05:54 +0200 Subject: [PATCH] Fix CONFIG_AP=y build after driver API changes --- wpa_supplicant/ap.c | 5 +++-- wpa_supplicant/ap.h | 3 +-- wpa_supplicant/events.c | 2 +- wpa_supplicant/sme.c | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index 4ada9cb82..0f89aaacd 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -249,11 +249,12 @@ void ap_tx_status(void *ctx, const u8 *addr, } -void ap_rx_from_unknown_sta(void *ctx, const struct ieee80211_hdr *hdr, - size_t len) +void ap_rx_from_unknown_sta(void *ctx, const u8 *frame, size_t len) { #ifdef NEED_AP_MLME struct wpa_supplicant *wpa_s = ctx; + const struct ieee80211_hdr *hdr = + (const struct ieee80211_hdr *) frame; u16 fc = le_to_host16(hdr->frame_control); ieee802_11_rx_from_unknown(wpa_s->ap_iface->bss[0], hdr->addr2, (fc & (WLAN_FC_TODS | WLAN_FC_FROMDS)) == diff --git a/wpa_supplicant/ap.h b/wpa_supplicant/ap.h index 7f253bb7e..f398db755 100644 --- a/wpa_supplicant/ap.h +++ b/wpa_supplicant/ap.h @@ -34,8 +34,7 @@ int ap_ctrl_iface_wpa_get_status(struct wpa_supplicant *wpa_s, char *buf, size_t buflen, int verbose); void ap_tx_status(void *ctx, const u8 *addr, const u8 *buf, size_t len, int ack); -void ap_rx_from_unknown_sta(void *ctx, const struct ieee80211_hdr *hdr, - size_t len); +void ap_rx_from_unknown_sta(void *ctx, const u8 *frame, size_t len); void ap_mgmt_rx(void *ctx, struct rx_mgmt *rx_mgmt); void ap_mgmt_tx_cb(void *ctx, const u8 *buf, size_t len, u16 stype, int ok); diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 9f17b8235..9d6e2ff00 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -1494,7 +1494,7 @@ void wpa_supplicant_event(void *ctx, wpa_event_type event, case EVENT_RX_FROM_UNKNOWN: if (wpa_s->ap_iface == NULL) break; - ap_rx_from_unknown_sta(wpa_s, data->rx_from_unknown.hdr, + ap_rx_from_unknown_sta(wpa_s, data->rx_from_unknown.frame, data->rx_from_unknown.len); break; case EVENT_RX_MGMT: diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index 580ed2a58..30c94e489 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -35,7 +35,9 @@ void sme_authenticate(struct wpa_supplicant *wpa_s, { struct wpa_driver_auth_params params; struct wpa_ssid *old_ssid; +#ifdef CONFIG_IEEE80211R const u8 *ie; +#endif /* CONFIG_IEEE80211R */ #ifdef CONFIG_IEEE80211R const u8 *md = NULL; #endif /* CONFIG_IEEE80211R */