nl80211: Remove QCA vendor specific HE capability handling

The QCA_NL80211_VENDOR_SUBCMD_GET_HE_CAPABILITIES attributes are not
up-to-date with the latest P802.11ax/D4.0 capabilities and would need to
be updated or replaced. Since the variables from this functionality were
not used for anything in practice, it is easier to simply remove this
functionality completely to avoid issues with upcoming updates to use
upstream nl80211 information to determine HE capabilities.

This is practically reverting the commit ca1ab9db2a ("hostapd: Get
vendor HE capabilities").

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2019-04-25 11:41:18 +03:00 committed by Jouni Malinen
parent 64c20a831f
commit 1b90aae929
2 changed files with 0 additions and 101 deletions

View file

@ -163,7 +163,6 @@ struct wpa_driver_nl80211_data {
unsigned int scan_vendor_cmd_avail:1;
unsigned int connect_reassoc:1;
unsigned int set_wifi_conf_vendor_cmd_avail:1;
unsigned int he_capab_vendor_cmd_avail:1;
unsigned int fetch_bss_trans_status:1;
unsigned int roam_vendor_cmd_avail:1;
unsigned int get_supported_akm_suites_avail:1;
@ -215,8 +214,6 @@ struct wpa_driver_nl80211_data {
* (NL80211_CMD_VENDOR). 0 if no pending scan request.
*/
int last_scan_cmd;
struct he_capabilities he_capab;
};
struct nl_msg;

View file

@ -778,9 +778,6 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
case QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION:
drv->set_wifi_conf_vendor_cmd_avail = 1;
break;
case QCA_NL80211_VENDOR_SUBCMD_GET_HE_CAPABILITIES:
drv->he_capab_vendor_cmd_avail = 1;
break;
case QCA_NL80211_VENDOR_SUBCMD_FETCH_BSS_TRANSITION_STATUS:
drv->fetch_bss_trans_status = 1;
break;
@ -1082,100 +1079,6 @@ static int qca_nl80211_get_akm_suites(struct wpa_driver_nl80211_data *drv)
}
static int qca_nl80211_he_capab_handler(struct nl_msg *msg, void *arg)
{
struct nlattr *tb[NL80211_ATTR_MAX + 1];
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
struct he_capabilities *he_capab = arg;
struct nlattr *nl_vend;
struct nlattr *tb_vendor[QCA_WLAN_VENDOR_ATTR_HE_CAPABILITIES_MAX + 1];
size_t len;
nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
genlmsg_attrlen(gnlh, 0), NULL);
if (!tb[NL80211_ATTR_VENDOR_DATA])
return NL_SKIP;
nl_vend = tb[NL80211_ATTR_VENDOR_DATA];
nla_parse(tb_vendor, QCA_WLAN_VENDOR_ATTR_HE_CAPABILITIES_MAX,
nla_data(nl_vend), nla_len(nl_vend), NULL);
if (tb_vendor[QCA_WLAN_VENDOR_ATTR_HE_SUPPORTED]) {
u8 he_supported;
he_supported = nla_get_u8(
tb_vendor[QCA_WLAN_VENDOR_ATTR_HE_SUPPORTED]);
wpa_printf(MSG_DEBUG, "nl80211: HE capabilities supported: %u",
he_supported);
he_capab->he_supported = he_supported;
if (!he_supported)
return NL_SKIP;
}
if (tb_vendor[QCA_WLAN_VENDOR_ATTR_PHY_CAPAB]) {
len = nla_len(tb_vendor[QCA_WLAN_VENDOR_ATTR_PHY_CAPAB]);
if (len > sizeof(he_capab->phy_cap))
len = sizeof(he_capab->phy_cap);
os_memcpy(he_capab->phy_cap,
nla_data(tb_vendor[QCA_WLAN_VENDOR_ATTR_PHY_CAPAB]),
len);
}
if (tb_vendor[QCA_WLAN_VENDOR_ATTR_MAC_CAPAB])
he_capab->mac_cap =
nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_MAC_CAPAB]);
if (tb_vendor[QCA_WLAN_VENDOR_ATTR_HE_MCS])
he_capab->mcs =
nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_HE_MCS]);
if (tb_vendor[QCA_WLAN_VENDOR_ATTR_NUM_SS])
he_capab->ppet.numss_m1 =
nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_NUM_SS]);
if (tb_vendor[QCA_WLAN_VENDOR_ATTR_RU_IDX_MASK])
he_capab->ppet.ru_count =
nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_RU_IDX_MASK]);
if (tb_vendor[QCA_WLAN_VENDOR_ATTR_PPE_THRESHOLD]) {
len = nla_len(tb_vendor[QCA_WLAN_VENDOR_ATTR_PPE_THRESHOLD]);
if (len > sizeof(he_capab->ppet.ppet16_ppet8_ru3_ru0))
len = sizeof(he_capab->ppet.ppet16_ppet8_ru3_ru0);
os_memcpy(he_capab->ppet.ppet16_ppet8_ru3_ru0,
nla_data(tb_vendor[QCA_WLAN_VENDOR_ATTR_PPE_THRESHOLD]),
len);
}
return NL_SKIP;
}
static void qca_nl80211_check_he_capab(struct wpa_driver_nl80211_data *drv)
{
struct nl_msg *msg;
int ret;
if (!drv->he_capab_vendor_cmd_avail)
return;
if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_VENDOR)) ||
nla_put_u32(msg, NL80211_ATTR_VENDOR_ID, OUI_QCA) ||
nla_put_u32(msg, NL80211_ATTR_VENDOR_SUBCMD,
QCA_NL80211_VENDOR_SUBCMD_GET_HE_CAPABILITIES)) {
nlmsg_free(msg);
return;
}
ret = send_and_recv_msgs(drv, msg, qca_nl80211_he_capab_handler,
&drv->he_capab);
if (!ret && drv->he_capab.he_supported)
drv->capa.flags |= WPA_DRIVER_FLAGS_HE_CAPABILITIES;
}
struct features_info {
u8 *flags;
size_t flags_len;
@ -1373,7 +1276,6 @@ int wpa_driver_nl80211_capa(struct wpa_driver_nl80211_data *drv)
if (!(info.capa->flags & WPA_DRIVER_FLAGS_DFS_OFFLOAD))
qca_nl80211_check_dfs_capa(drv);
qca_nl80211_get_features(drv);
qca_nl80211_check_he_capab(drv);
/*
* To enable offchannel simultaneous support in wpa_supplicant, the