EHT: Process puncturing bitmap from channel select driver event for ACS

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>
This commit is contained in:
Chenming Huang 2023-03-23 16:04:45 +08:00 committed by Jouni Malinen
parent 9b233e9f0a
commit 05a2f4c4f8
3 changed files with 10 additions and 2 deletions

View 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:

View 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;
/**

View 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 */