]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix set_ap() to add frequency without CONFIG_IEEE80211AX
authorJouni Malinen <quic_jouni@quicinc.com>
Wed, 27 Mar 2024 09:31:25 +0000 (11:31 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 27 Mar 2024 16:12:39 +0000 (18:12 +0200)
This call was added within a conditional CONFIG_IEEE80211AX block even
though this can apply without that build option. Move this outside that
conditional block.

Fixes: b3921db426ea ("nl80211: Add frequency info in start AP command")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/drivers/driver_nl80211.c

index 46f155e45dae23d21e38abf99105ba2863f7ae3d..830b0fe33fd8aa9375f70250a35f3d73114fcdaf 100644 (file)
@@ -5319,6 +5319,9 @@ static int wpa_driver_nl80211_set_ap(void *priv,
                nla_nest_end(msg, ftm);
        }
 
+       if (params->freq && nl80211_put_freq_params(msg, params->freq) < 0)
+               goto fail;
+
 #ifdef CONFIG_IEEE80211AX
        if (params->he_spr_ctrl) {
                struct nlattr *spr;
@@ -5353,9 +5356,6 @@ static int wpa_driver_nl80211_set_ap(void *priv,
                nla_nest_end(msg, spr);
        }
 
-       if (params->freq && nl80211_put_freq_params(msg, params->freq) < 0)
-               goto fail;
-
        if (params->freq && params->freq->he_enabled &&
            nl80211_attr_supported(drv, NL80211_ATTR_HE_BSS_COLOR)) {
                struct nlattr *bss_color;