hostapd: update to 2023-03-29
[openwrt/openwrt.git] / package / network / services / hostapd / patches / 340-reload_freq_change.patch
index b59107463477b5b313dc37eba28cf69d96bfbc00..9a468079d1a54ab2d7e63ae99e92ae7a42fc1dba 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -119,6 +119,29 @@ static void hostapd_reload_bss(struct ho
+@@ -142,6 +142,29 @@ static void hostapd_reload_bss(struct ho
  #endif /* CONFIG_NO_RADIUS */
  
        ssid = &hapd->conf->ssid;
@@ -30,7 +30,7 @@
        if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next &&
            ssid->wpa_passphrase_set && ssid->wpa_passphrase) {
                /*
-@@ -220,6 +243,7 @@ int hostapd_reload_config(struct hostapd
+@@ -250,6 +273,7 @@ int hostapd_reload_config(struct hostapd
        struct hostapd_data *hapd = iface->bss[0];
        struct hostapd_config *newconf, *oldconf;
        size_t j;
@@ -38,7 +38,7 @@
  
        if (iface->config_fname == NULL) {
                /* Only in-memory config in use - assume it has been updated */
-@@ -270,24 +294,20 @@ int hostapd_reload_config(struct hostapd
+@@ -300,6 +324,17 @@ int hostapd_reload_config(struct hostapd
        }
        iface->conf = newconf;
  
 +
        for (j = 0; j < iface->num_bss; j++) {
                hapd = iface->bss[j];
+               if (!hapd->conf->config_id || !newconf->bss[j]->config_id ||
+@@ -307,21 +342,6 @@ int hostapd_reload_config(struct hostapd
+                             newconf->bss[j]->config_id) != 0)
+                       hostapd_clear_old_bss(hapd);
                hapd->iconf = newconf;
 -              hapd->iconf->channel = oldconf->channel;
 -              hapd->iconf->acs = oldconf->acs;