From: Jouni Malinen Date: Mon, 3 Feb 2014 19:11:46 +0000 (+0200) Subject: Remove dead code from AP setup X-Git-Tag: hostap_2_2~894 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94ff22ea0870f1a36ae21c4129d51abdeb3d3ec8;p=thirdparty%2Fhostap.git Remove dead code from AP setup wpa_supplicant_create_ap() is only called for AP mode, so there is no point in trying to address station (infra/IBSS) modes. Signed-hostap: Jouni Malinen --- diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index ce3efcbad..4ff27d6c9 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -505,17 +505,13 @@ int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s, params.ssid = ssid->ssid; params.ssid_len = ssid->ssid_len; switch (ssid->mode) { - case WPAS_MODE_INFRA: - params.mode = IEEE80211_MODE_INFRA; - break; - case WPAS_MODE_IBSS: - params.mode = IEEE80211_MODE_IBSS; - break; case WPAS_MODE_AP: case WPAS_MODE_P2P_GO: case WPAS_MODE_P2P_GROUP_FORMATION: params.mode = IEEE80211_MODE_AP; break; + default: + return -1; } if (ssid->frequency == 0) ssid->frequency = 2462; /* default channel 11 */