]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EHT: Process puncturing bitmap from channel select driver event for ACS
authorChenming Huang <quic_chenhuan@quicinc.com>
Thu, 23 Mar 2023 08:04:45 +0000 (16:04 +0800)
committerJouni Malinen <j@w1.fi>
Thu, 22 Jun 2023 14:49:10 +0000 (17:49 +0300)
Retrieve the puncturing bitmap sent by the driver in channel select
events for ACS when using the QCA vendor specific event.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/ap/drv_callbacks.c
src/drivers/driver.h
src/drivers/driver_nl80211_event.c

index 9732c8e83dcbf6376f29a0f94e7f3deae8abc439..4d765dcb101e6fe513fdc25195ce85d66ce5c3dc 100644 (file)
@@ -1202,6 +1202,9 @@ void hostapd_acs_channel_selected(struct hostapd_data *hapd,
                        hapd->iconf, acs_res->vht_seg1_center_ch);
                hostapd_set_oper_centr_freq_seg1_idx(hapd->iconf, 0);
        }
+
+       if (hapd->iface->conf->ieee80211be && acs_res->puncture_bitmap)
+               hapd->iconf->punct_bitmap = acs_res->puncture_bitmap;
 #endif /* CONFIG_IEEE80211BE */
 
 out:
index b6171dde35b9b0eb4792042267a317bcd4ee0d70..8e462c8b7a1b893bf75ae2f7d1037991a7779eb2 100644 (file)
@@ -6540,6 +6540,7 @@ union wpa_event_data {
                u8 vht_seg1_center_ch;
                u16 ch_width;
                enum hostapd_hw_mode hw_mode;
+               u16 puncture_bitmap;
        } acs_selected_channels;
 
        /**
index 34e74da7f91f24099a8d6fb34638e809629cd1e3..e7aff260d6adb0d94071bd862af6896d7a005703 100644 (file)
@@ -2652,15 +2652,19 @@ static void qca_nl80211_acs_select_ch(struct wpa_driver_nl80211_data *drv,
        if (tb[QCA_WLAN_VENDOR_ATTR_ACS_CHWIDTH])
                event.acs_selected_channels.ch_width =
                        nla_get_u16(tb[QCA_WLAN_VENDOR_ATTR_ACS_CHWIDTH]);
+       if (tb[QCA_WLAN_VENDOR_ATTR_ACS_PUNCTURE_BITMAP])
+               event.acs_selected_channels.puncture_bitmap =
+                       nla_get_u16(tb[QCA_WLAN_VENDOR_ATTR_ACS_PUNCTURE_BITMAP]);
        wpa_printf(MSG_INFO,
-                  "nl80211: ACS Results: PFreq: %d SFreq: %d BW: %d VHT0: %d VHT1: %d HW_MODE: %d EDMGCH: %d",
+                  "nl80211: ACS Results: PFreq: %d SFreq: %d BW: %d VHT0: %d VHT1: %d HW_MODE: %d EDMGCH: %d PUNCBITMAP: 0x%x",
                   event.acs_selected_channels.pri_freq,
                   event.acs_selected_channels.sec_freq,
                   event.acs_selected_channels.ch_width,
                   event.acs_selected_channels.vht_seg0_center_ch,
                   event.acs_selected_channels.vht_seg1_center_ch,
                   event.acs_selected_channels.hw_mode,
-                  event.acs_selected_channels.edmg_channel);
+                  event.acs_selected_channels.edmg_channel,
+                  event.acs_selected_channels.puncture_bitmap);
 
        /* Ignore ACS channel list check for backwards compatibility */