]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Remove redundant put_freq call in set_ap() for AP MLD
authorAditya Kumar Singh <quic_adisi@quicinc.com>
Wed, 6 Mar 2024 06:38:40 +0000 (12:08 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 27 Mar 2024 16:12:39 +0000 (18:12 +0200)
wpa_driver_nl80211_set_ap() called nl80211_put_freq_params() twice if AP
is an AP MLD. It called once while putting the MLO link ID and the other
time in the normal flow if frequency info is present. Doing this twice
is not required.

Call put_freq once during the normal flow only and separately of that,
add the link ID for AP MLD.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
src/drivers/driver_nl80211.c

index 830b0fe33fd8aa9375f70250a35f3d73114fcdaf..5dec24d518cc9d6c74098f556771a9b4439ff8e2 100644 (file)
@@ -5104,9 +5104,7 @@ static int wpa_driver_nl80211_set_ap(void *priv,
                           params->mld_link_id);
 
                if (nla_put_u8(msg, NL80211_ATTR_MLO_LINK_ID,
-                              params->mld_link_id) ||
-                   (params->freq &&
-                    nl80211_put_freq_params(msg, params->freq) < 0))
+                              params->mld_link_id))
                        goto fail;
 
                if (params->freq)