nl80211: Report the number of concurrent support channels
Previously, drivers only reported if they support multiple concurrent channels, but did not report the maximum number of supported channels. Add this reporting to the driver capabilities and add the implementation to driver_nl80211. Signed-hostap: Ilan Peer <ilan.peer@intel.com> Signed-hostap: David Spinadel <david.spinadel@intel.com>
This commit is contained in:
parent
d7df0fa727
commit
4752147d88
4 changed files with 19 additions and 4 deletions
|
@ -911,6 +911,11 @@ struct wpa_driver_capa {
|
|||
|
||||
unsigned int max_acl_mac_addrs;
|
||||
|
||||
/**
|
||||
* Number of supported concurrent channels
|
||||
*/
|
||||
unsigned int num_multichan_concurrent;
|
||||
|
||||
/**
|
||||
* extended_capa - extended capabilities in driver/device
|
||||
*
|
||||
|
|
|
@ -2875,6 +2875,8 @@ struct wiphy_info_data {
|
|||
struct wpa_driver_nl80211_data *drv;
|
||||
struct wpa_driver_capa *capa;
|
||||
|
||||
unsigned int num_multichan_concurrent;
|
||||
|
||||
unsigned int error:1;
|
||||
unsigned int device_ap_sme:1;
|
||||
unsigned int poll_command_supported:1;
|
||||
|
@ -2885,7 +2887,6 @@ struct wiphy_info_data {
|
|||
unsigned int p2p_go_supported:1;
|
||||
unsigned int p2p_client_supported:1;
|
||||
unsigned int p2p_concurrent:1;
|
||||
unsigned int p2p_multichan_concurrent:1;
|
||||
};
|
||||
|
||||
|
||||
|
@ -2995,8 +2996,8 @@ static int wiphy_info_iface_comb_process(struct wiphy_info_data *info,
|
|||
|
||||
if (combination_has_p2p && combination_has_mgd) {
|
||||
info->p2p_concurrent = 1;
|
||||
if (nla_get_u32(tb_comb[NL80211_IFACE_COMB_NUM_CHANNELS]) > 1)
|
||||
info->p2p_multichan_concurrent = 1;
|
||||
info->num_multichan_concurrent =
|
||||
nla_get_u32(tb_comb[NL80211_IFACE_COMB_NUM_CHANNELS]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -3246,10 +3247,12 @@ static int wpa_driver_nl80211_get_info(struct wpa_driver_nl80211_data *drv,
|
|||
drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_CONCURRENT;
|
||||
drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P;
|
||||
}
|
||||
if (info->p2p_multichan_concurrent) {
|
||||
if (info->num_multichan_concurrent > 1) {
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Enable multi-channel "
|
||||
"concurrent (driver advertised support)");
|
||||
drv->capa.flags |= WPA_DRIVER_FLAGS_MULTI_CHANNEL_CONCURRENT;
|
||||
drv->capa.num_multichan_concurrent =
|
||||
info->num_multichan_concurrent;
|
||||
}
|
||||
|
||||
/* default to 5000 since early versions of mac80211 don't set it */
|
||||
|
|
|
@ -2965,6 +2965,8 @@ next_driver:
|
|||
wpa_s->extended_capa = capa.extended_capa;
|
||||
wpa_s->extended_capa_mask = capa.extended_capa_mask;
|
||||
wpa_s->extended_capa_len = capa.extended_capa_len;
|
||||
wpa_s->num_multichan_concurrent =
|
||||
capa.num_multichan_concurrent;
|
||||
}
|
||||
if (wpa_s->max_remain_on_chan == 0)
|
||||
wpa_s->max_remain_on_chan = 1000;
|
||||
|
@ -2979,6 +2981,9 @@ next_driver:
|
|||
else
|
||||
iface->p2p_mgmt = 1;
|
||||
|
||||
if (wpa_s->num_multichan_concurrent == 0)
|
||||
wpa_s->num_multichan_concurrent = 1;
|
||||
|
||||
if (wpa_supplicant_driver_init(wpa_s) < 0)
|
||||
return -1;
|
||||
|
||||
|
|
|
@ -722,6 +722,8 @@ struct wpa_supplicant {
|
|||
u8 last_gtk[32];
|
||||
size_t last_gtk_len;
|
||||
#endif /* CONFIG_TESTING_GET_GTK */
|
||||
|
||||
unsigned int num_multichan_concurrent;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue