Fix issue with incorrect secondary_channel in HT40/HT80
authorPawel Kulakowski <pawel.kulakowski@tieto.com>
Wed, 26 Mar 2014 12:18:29 +0000 (13:18 +0100)
committerJouni Malinen <j@w1.fi>
Thu, 27 Mar 2014 13:22:39 +0000 (15:22 +0200)
When primary and secondary channel were switched and config was
reloaded, secondary channel was incorrectly overwritten.

Proceed as for other settings that should not be changed and don't
allow to overwrite.

Signed-off-by: Pawel Kulakowski <pawel.kulakowski@tieto.com>
src/ap/hostapd.c

index ed2226c..614a5bf 100644 (file)
@@ -172,6 +172,7 @@ int hostapd_reload_config(struct hostapd_iface *iface)
                hapd = iface->bss[j];
                hapd->iconf = newconf;
                hapd->iconf->channel = oldconf->channel;
+               hapd->iconf->secondary_channel = oldconf->secondary_channel;
                hapd->iconf->ieee80211n = oldconf->ieee80211n;
                hapd->iconf->ieee80211ac = oldconf->ieee80211ac;
                hapd->iconf->ht_capab = oldconf->ht_capab;