]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove dead code from AP setup
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 3 Feb 2014 19:11:46 +0000 (21:11 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 4 Feb 2014 11:23:35 +0000 (13:23 +0200)
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 <jouni@qca.qualcomm.com>

wpa_supplicant/ap.c

index ce3efcbad815a5555c90954aeae0191dd1d924ef..4ff27d6c99933bd831dc96a6c023efb4ce9bc08a 100644 (file)
@@ -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 */