]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
hostapd: ucode: parse frequency and STA-channel radio markers
authorFelix Fietkau <nbd@nbd.name>
Fri, 10 Jul 2026 10:26:31 +0000 (12:26 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 16 Jul 2026 09:50:21 +0000 (11:50 +0200)
Lift the #frequency and #channel_owned_by_sta markers (emitted by the
config generator) onto config.radio and keep them out of radio.data so
they do not perturb the radio comparison. These feed the config-driven
channel switch handling added next.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/hostapd/files/hostapd.uc

index 1258f2d52f317e7124100a504154e75da15e35e2..943b8810492fd6134c22e9a688b87c2e1e280c40 100644 (file)
@@ -935,6 +935,16 @@ function iface_load_config(phy, radio, filename)
                        continue;
                }
 
+               if (val[0] == "#frequency") {
+                       config.radio.frequency = int(val[1]);
+                       continue;
+               }
+
+               if (val[0] == "#channel_follow") {
+                       config.radio.channel_follow = int(val[1]) == 1;
+                       continue;
+               }
+
                if (val[0] == "#num_global_macaddr")
                        config[substr(val[0], 1)] = int(val[1]);
                else if (val[0] == "#macaddr_base")