]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EHT: Send puncturing bitmap to the driver for AP bring up
authorAloka Dixit <quic_alokad@quicinc.com>
Tue, 14 Mar 2023 04:59:19 +0000 (21:59 -0700)
committerJouni Malinen <j@w1.fi>
Fri, 17 Mar 2023 17:46:24 +0000 (19:46 +0200)
Send the user configured puncturing bitmap to the driver.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
src/ap/beacon.c
src/drivers/driver.h
src/drivers/driver_nl80211.c

index ec7ca7fc62e780d8ea854742e97fc1394ed1f05c..c25a5bbc38512d0280a40d8b77f6655c33fb5573 100644 (file)
@@ -2101,6 +2101,10 @@ static int __ieee802_11_set_beacon(struct hostapd_data *hapd)
        params.fd_frame_tmpl = hostapd_fils_discovery(hapd, &params);
 #endif /* CONFIG_FILS */
 
+#ifdef CONFIG_IEEE80211BE
+       params.punct_bitmap = iconf->punct_bitmap;
+#endif /* CONFIG_IEEE80211BE */
+
        if (cmode &&
            hostapd_set_freq_params(&freq, iconf->hw_mode, iface->freq,
                                    iconf->channel, iconf->enable_edmg,
index 64b71a51c47b6361a1f5af59386b8590f9e73235..a3ce31f606468ecfe7d59783c34a434ea26cc0aa 100644 (file)
@@ -1713,6 +1713,14 @@ struct wpa_driver_ap_params {
         * ema - Enhanced MBSSID advertisements support.
         */
        bool ema;
+
+       /**
+        * punct_bitmap - Preamble puncturing bitmap
+        * Each bit corresponds to a 20 MHz subchannel, the lowest bit for the
+        * channel with the lowest frequency. A bit set to 1 indicates that the
+        * subchannel is punctured, otherwise active.
+        */
+       u16 punct_bitmap;
 };
 
 struct wpa_driver_mesh_bss_params {
index db1d73f2f6a7eab29c596278921b1269a97c2702..edbecc7e8b99924ac20cb86edaa370c0de50ed7c 100644 (file)
@@ -5045,6 +5045,14 @@ static int wpa_driver_nl80211_set_ap(void *priv,
                goto fail;
 #endif /* CONFIG_FILS */
 
+       if (params->punct_bitmap) {
+               wpa_printf(MSG_DEBUG, "nl80211: Puncturing bitmap=0x%04x",
+                          params->punct_bitmap);
+               if (nla_put_u32(msg, NL80211_ATTR_PUNCT_BITMAP,
+                               params->punct_bitmap))
+                       goto fail;
+       }
+
        ret = send_and_recv_msgs_connect_handle(drv, msg, bss, 1);
        if (ret) {
                wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)",