nl80211: Add concurrency capabilities to driver status

Extend the nl80211 interface command "driver status" to retrieve the
concurrency capabilities from the driver using the QCA vendor
extensions.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Ahmad Kholaif 2015-07-23 17:01:17 -07:00 committed by Jouni Malinen
parent d0cdccd307
commit 079a28f7b8
3 changed files with 30 additions and 2 deletions

View file

@ -1297,6 +1297,13 @@ struct wpa_driver_capa {
*/
#define WPA_DRIVER_FLAGS_TX_POWER_INSERTION 0x00000008
u32 rrm_flags;
/* Driver concurrency capabilities */
unsigned int conc_capab;
/* Maximum number of concurrent channels on 2.4 GHz */
unsigned int max_conc_chan_2_4;
/* Maximum number of concurrent channels on 5 GHz */
unsigned int max_conc_chan_5_0;
};

View file

@ -7488,7 +7488,10 @@ static int wpa_driver_nl80211_status(void *priv, char *buf, size_t buflen)
"capa.max_acl_mac_addrs=%u\n"
"capa.num_multichan_concurrent=%u\n"
"capa.mac_addr_rand_sched_scan_supported=%d\n"
"capa.mac_addr_rand_scan_supported=%d\n",
"capa.mac_addr_rand_scan_supported=%d\n"
"capa.conc_capab=%u\n"
"capa.max_conc_chan_2_4=%u\n"
"capa.max_conc_chan_5_0=%u\n",
drv->capa.key_mgmt,
drv->capa.enc,
drv->capa.auth,
@ -7504,7 +7507,10 @@ static int wpa_driver_nl80211_status(void *priv, char *buf, size_t buflen)
drv->capa.max_acl_mac_addrs,
drv->capa.num_multichan_concurrent,
drv->capa.mac_addr_rand_sched_scan_supported,
drv->capa.mac_addr_rand_scan_supported);
drv->capa.mac_addr_rand_scan_supported,
drv->capa.conc_capab,
drv->capa.max_conc_chan_2_4,
drv->capa.max_conc_chan_5_0);
if (os_snprintf_error(end - pos, res))
return pos - buf;
pos += res;

View file

@ -751,6 +751,7 @@ static void qca_nl80211_check_dfs_capa(struct wpa_driver_nl80211_data *drv)
struct features_info {
u8 *flags;
size_t flags_len;
struct wpa_driver_capa *capa;
};
@ -776,6 +777,19 @@ static int features_info_handler(struct nl_msg *msg, void *arg)
info->flags = nla_data(attr);
info->flags_len = nla_len(attr);
}
attr = tb_vendor[QCA_WLAN_VENDOR_ATTR_CONCURRENCY_CAPA];
if (attr)
info->capa->conc_capab = nla_get_u32(attr);
attr = tb_vendor[
QCA_WLAN_VENDOR_ATTR_MAX_CONCURRENT_CHANNELS_2_4_BAND];
if (attr)
info->capa->max_conc_chan_2_4 = nla_get_u32(attr);
attr = tb_vendor[
QCA_WLAN_VENDOR_ATTR_MAX_CONCURRENT_CHANNELS_5_0_BAND];
if (attr)
info->capa->max_conc_chan_5_0 = nla_get_u32(attr);
}
return NL_SKIP;
@ -810,6 +824,7 @@ static void qca_nl80211_get_features(struct wpa_driver_nl80211_data *drv)
}
os_memset(&info, 0, sizeof(info));
info.capa = &drv->capa;
ret = send_and_recv_msgs(drv, msg, features_info_handler, &info);
if (ret || !info.flags)
return;