From 94ff22ea0870f1a36ae21c4129d51abdeb3d3ec8 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 3 Feb 2014 21:11:46 +0200 Subject: [PATCH] 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 --- wpa_supplicant/ap.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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 */