Extend offloaded ACS QCA vendor command to support VHT
Update ACS driver offload feature for VHT configuration. In addition, this allows the chanlist parameter to be used to specify which channels are included as options for the offloaded ACS case. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
0fd52a612a
commit
857d94225a
15 changed files with 229 additions and 51 deletions
|
@ -1588,6 +1588,16 @@ struct drv_acs_params {
|
|||
|
||||
/* Indicates whether HT40 is enabled */
|
||||
int ht40_enabled;
|
||||
|
||||
/* Indicates whether VHT is enabled */
|
||||
int vht_enabled;
|
||||
|
||||
/* Configured ACS channel width */
|
||||
u16 ch_width;
|
||||
|
||||
/* ACS channel list info */
|
||||
unsigned int ch_list_len;
|
||||
const u8 *ch_list;
|
||||
};
|
||||
|
||||
|
||||
|
@ -4546,10 +4556,18 @@ union wpa_event_data {
|
|||
* struct acs_selected_channels - Data for EVENT_ACS_CHANNEL_SELECTED
|
||||
* @pri_channel: Selected primary channel
|
||||
* @sec_channel: Selected secondary channel
|
||||
* @vht_seg0_center_ch: VHT mode Segment0 center channel
|
||||
* @vht_seg1_center_ch: VHT mode Segment1 center channel
|
||||
* @ch_width: Selected Channel width by driver. Driver may choose to
|
||||
* change hostapd configured ACS channel width due driver internal
|
||||
* channel restrictions.
|
||||
*/
|
||||
struct acs_selected_channels {
|
||||
u8 pri_channel;
|
||||
u8 sec_channel;
|
||||
u8 vht_seg0_center_ch;
|
||||
u8 vht_seg1_center_ch;
|
||||
u16 ch_width;
|
||||
} acs_selected_channels;
|
||||
};
|
||||
|
||||
|
|
|
@ -8382,12 +8382,24 @@ static int wpa_driver_do_acs(void *priv, struct drv_acs_params *params)
|
|||
(params->ht_enabled &&
|
||||
nla_put_flag(msg, QCA_WLAN_VENDOR_ATTR_ACS_HT_ENABLED)) ||
|
||||
(params->ht40_enabled &&
|
||||
nla_put_flag(msg, QCA_WLAN_VENDOR_ATTR_ACS_HT40_ENABLED))) {
|
||||
nla_put_flag(msg, QCA_WLAN_VENDOR_ATTR_ACS_HT40_ENABLED)) ||
|
||||
(params->vht_enabled &&
|
||||
nla_put_flag(msg, QCA_WLAN_VENDOR_ATTR_ACS_VHT_ENABLED)) ||
|
||||
nla_put_u16(msg, QCA_WLAN_VENDOR_ATTR_ACS_CHWIDTH,
|
||||
params->ch_width) ||
|
||||
(params->ch_list_len &&
|
||||
nla_put(msg, QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST, params->ch_list_len,
|
||||
params->ch_list))) {
|
||||
nlmsg_free(msg);
|
||||
return -ENOBUFS;
|
||||
}
|
||||
nla_nest_end(msg, data);
|
||||
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"nl80211: ACS Params: HW_MODE: %d HT: %d HT40: %d VHT: %d BW: %d CH_LIST_LEN: %u",
|
||||
params->hw_mode, params->ht_enabled, params->ht40_enabled,
|
||||
params->vht_enabled, params->ch_width, params->ch_list_len);
|
||||
|
||||
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
|
||||
if (ret) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
|
|
|
@ -1500,6 +1500,25 @@ static void qca_nl80211_acs_select_ch(struct wpa_driver_nl80211_data *drv,
|
|||
nla_get_u8(tb[QCA_WLAN_VENDOR_ATTR_ACS_PRIMARY_CHANNEL]);
|
||||
event.acs_selected_channels.sec_channel =
|
||||
nla_get_u8(tb[QCA_WLAN_VENDOR_ATTR_ACS_SECONDARY_CHANNEL]);
|
||||
if (tb[QCA_WLAN_VENDOR_ATTR_ACS_VHT_SEG0_CENTER_CHANNEL])
|
||||
event.acs_selected_channels.vht_seg0_center_ch =
|
||||
nla_get_u8(tb[QCA_WLAN_VENDOR_ATTR_ACS_VHT_SEG0_CENTER_CHANNEL]);
|
||||
if (tb[QCA_WLAN_VENDOR_ATTR_ACS_VHT_SEG0_CENTER_CHANNEL])
|
||||
event.acs_selected_channels.vht_seg1_center_ch =
|
||||
nla_get_u8(tb[QCA_WLAN_VENDOR_ATTR_ACS_VHT_SEG1_CENTER_CHANNEL]);
|
||||
if (tb[QCA_WLAN_VENDOR_ATTR_ACS_CHWIDTH])
|
||||
event.acs_selected_channels.ch_width =
|
||||
nla_get_u16(tb[QCA_WLAN_VENDOR_ATTR_ACS_CHWIDTH]);
|
||||
|
||||
wpa_printf(MSG_INFO,
|
||||
"nl80211: ACS Results: PCH: %d SCH: %d BW: %d VHT0: %d VHT1: %d",
|
||||
event.acs_selected_channels.pri_channel,
|
||||
event.acs_selected_channels.sec_channel,
|
||||
event.acs_selected_channels.ch_width,
|
||||
event.acs_selected_channels.vht_seg0_center_ch,
|
||||
event.acs_selected_channels.vht_seg1_center_ch);
|
||||
|
||||
/* Ignore ACS channel list check for backwards compatibility */
|
||||
|
||||
wpa_supplicant_event(drv->ctx, EVENT_ACS_CHANNEL_SELECTED, &event);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue