aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mesh.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-06-04 17:56:55 (GMT)
committerJouni Malinen <j@w1.fi>2016-06-04 17:59:25 (GMT)
commitd2cc8bbbf683e7ad97201e97c9850d6f028cc777 (patch)
tree49f02f63fcf908dd6404b46049c32603e268286c /wpa_supplicant/mesh.c
parenta64476403daa029a01e51eaca989f70c538472bc (diff)
downloadhostap-d2cc8bbbf683e7ad97201e97c9850d6f028cc777.zip
hostap-d2cc8bbbf683e7ad97201e97c9850d6f028cc777.tar.gz
hostap-d2cc8bbbf683e7ad97201e97c9850d6f028cc777.tar.bz2
mesh: Remove unreachable code
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>
Diffstat (limited to 'wpa_supplicant/mesh.c')
-rw-r--r--wpa_supplicant/mesh.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index b13d5a1..70716e9 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -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);