mesh: Remove unreachable code
authorJouni Malinen <j@w1.fi>
Sat, 4 Jun 2016 17:56:55 +0000 (20:56 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 4 Jun 2016 17:59:25 +0000 (20:59 +0300)
ssid->frequency cannot be 0 in wpa_supplicant_mesh_init() since
wpas_supplicant_join_mesh() rejects such a configuration.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/mesh.c

index b13d5a1..70716e9 100644 (file)
@@ -181,13 +181,7 @@ static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s,
        ifmsh->mconf = mconf;
 
        /* need conf->hw_mode for supported rates. */
-       if (ssid->frequency == 0) {
-               conf->hw_mode = HOSTAPD_MODE_IEEE80211G;
-               conf->channel = 1;
-       } else {
-               conf->hw_mode = ieee80211_freq_to_chan(ssid->frequency,
-                                                      &conf->channel);
-       }
+       conf->hw_mode = ieee80211_freq_to_chan(ssid->frequency, &conf->channel);
        if (conf->hw_mode == NUM_HOSTAPD_MODES) {
                wpa_printf(MSG_ERROR, "Unsupported mesh mode frequency: %d MHz",
                           ssid->frequency);