]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix AP build without NEED_AP_MLME
authorJouni Malinen <j@w1.fi>
Sat, 7 Jul 2012 09:34:48 +0000 (12:34 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 7 Jul 2012 09:34:48 +0000 (12:34 +0300)
Commit 1b487b8b1e95e1fbd9e00d52d883ba0ac4c2e4bf added CH_SWITCH
event for nl80211, but ended up using hostapd_hw_get_channel()
regardless of build configuration for driver interfaces. This
function is not always available, so make its use conditional
on NEED_AP_MLME.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/ap/drv_callbacks.c

index 7c2e87e938d024dcf0817c0be58fd40602b752b6..cf06a4fb8f4eece5909a62cf376b157a21c865f4 100644 (file)
@@ -277,6 +277,7 @@ void hostapd_event_sta_low_ack(struct hostapd_data *hapd, const u8 *addr)
 void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
                             int offset)
 {
+#ifdef NEED_AP_MLME
        int channel;
 
        hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
@@ -296,6 +297,7 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
        hapd->iconf->channel = channel;
        hapd->iconf->ieee80211n = ht;
        hapd->iconf->secondary_channel = offset;
+#endif /* NEED_AP_MLME */
 }