nl80211: Remove QCA vendor specific AKM capability handling
Since this functionality was not used for anything in practice, it is
easier to simply remove this functionality completely to avoid potential
conflicts in using the kernel tree upstream commit ab4dfa20534e
("cfg80211: Allow drivers to advertise supported AKM suites").
This is practically reverting the commit 8ec7c99ee4
("nl80211: Fetch
supported AKM list from the driver").
Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
This commit is contained in:
parent
644638819a
commit
6fffb320fc
2 changed files with 0 additions and 130 deletions
|
@ -169,7 +169,6 @@ struct wpa_driver_nl80211_data {
|
|||
unsigned int set_wifi_conf_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;
|
||||
unsigned int add_sta_node_vendor_cmd_avail:1;
|
||||
unsigned int control_port_ap:1;
|
||||
unsigned int multicast_registrations:1;
|
||||
|
|
|
@ -809,9 +809,6 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
|
|||
case QCA_NL80211_VENDOR_SUBCMD_ROAM:
|
||||
drv->roam_vendor_cmd_avail = 1;
|
||||
break;
|
||||
case QCA_NL80211_VENDOR_SUBCMD_GET_SUPPORTED_AKMS:
|
||||
drv->get_supported_akm_suites_avail = 1;
|
||||
break;
|
||||
case QCA_NL80211_VENDOR_SUBCMD_ADD_STA_NODE:
|
||||
drv->add_sta_node_vendor_cmd_avail = 1;
|
||||
break;
|
||||
|
@ -990,126 +987,6 @@ static void qca_nl80211_check_dfs_capa(struct wpa_driver_nl80211_data *drv)
|
|||
}
|
||||
|
||||
|
||||
static unsigned int get_akm_suites_info(struct nlattr *tb)
|
||||
{
|
||||
int i, num;
|
||||
unsigned int key_mgmt = 0;
|
||||
u32 *akms;
|
||||
|
||||
if (!tb)
|
||||
return 0;
|
||||
|
||||
num = nla_len(tb) / sizeof(u32);
|
||||
akms = nla_data(tb);
|
||||
for (i = 0; i < num; i++) {
|
||||
u32 a = akms[i];
|
||||
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"nl80211: Supported AKM %02x-%02x-%02x:%u",
|
||||
a >> 24, (a >> 16) & 0xff,
|
||||
(a >> 8) & 0xff, a & 0xff);
|
||||
switch (a) {
|
||||
case RSN_AUTH_KEY_MGMT_UNSPEC_802_1X:
|
||||
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_WPA |
|
||||
WPA_DRIVER_CAPA_KEY_MGMT_WPA2;
|
||||
break;
|
||||
case RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X:
|
||||
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_WPA_PSK |
|
||||
WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK;
|
||||
break;
|
||||
case RSN_AUTH_KEY_MGMT_FT_802_1X:
|
||||
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_FT;
|
||||
break;
|
||||
case RSN_AUTH_KEY_MGMT_FT_PSK:
|
||||
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_FT_PSK;
|
||||
break;
|
||||
case RSN_AUTH_KEY_MGMT_802_1X_SUITE_B:
|
||||
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B;
|
||||
break;
|
||||
case RSN_AUTH_KEY_MGMT_802_1X_SUITE_B_192:
|
||||
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B_192;
|
||||
break;
|
||||
case RSN_AUTH_KEY_MGMT_OWE:
|
||||
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_OWE;
|
||||
break;
|
||||
case RSN_AUTH_KEY_MGMT_DPP:
|
||||
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_DPP;
|
||||
break;
|
||||
case RSN_AUTH_KEY_MGMT_FILS_SHA256:
|
||||
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_FILS_SHA256;
|
||||
break;
|
||||
case RSN_AUTH_KEY_MGMT_FILS_SHA384:
|
||||
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_FILS_SHA384;
|
||||
break;
|
||||
case RSN_AUTH_KEY_MGMT_FT_FILS_SHA256:
|
||||
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_FT_FILS_SHA256;
|
||||
break;
|
||||
case RSN_AUTH_KEY_MGMT_FT_FILS_SHA384:
|
||||
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_FT_FILS_SHA384;
|
||||
break;
|
||||
case RSN_AUTH_KEY_MGMT_SAE:
|
||||
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_SAE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return key_mgmt;
|
||||
}
|
||||
|
||||
|
||||
static int get_akm_suites_handler(struct nl_msg *msg, void *arg)
|
||||
{
|
||||
struct nlattr *tb[NL80211_ATTR_MAX + 1];
|
||||
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
|
||||
unsigned int *key_mgmt = arg;
|
||||
|
||||
nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
|
||||
genlmsg_attrlen(gnlh, 0), NULL);
|
||||
|
||||
if (tb[NL80211_ATTR_VENDOR_DATA]) {
|
||||
struct nlattr *nl_vend = tb[NL80211_ATTR_VENDOR_DATA];
|
||||
struct nlattr *tb_data[NL80211_ATTR_MAX + 1];
|
||||
|
||||
nla_parse(tb_data, NL80211_ATTR_MAX,
|
||||
nla_data(nl_vend), nla_len(nl_vend), NULL);
|
||||
|
||||
*key_mgmt =
|
||||
get_akm_suites_info(tb_data[NL80211_ATTR_AKM_SUITES]);
|
||||
}
|
||||
|
||||
return NL_SKIP;
|
||||
}
|
||||
|
||||
|
||||
static int qca_nl80211_get_akm_suites(struct wpa_driver_nl80211_data *drv)
|
||||
{
|
||||
struct nl_msg *msg;
|
||||
unsigned int key_mgmt = 0;
|
||||
int ret;
|
||||
|
||||
if (!drv->get_supported_akm_suites_avail)
|
||||
return -1;
|
||||
|
||||
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_SUPPORTED_AKMS)) {
|
||||
nlmsg_free(msg);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = send_and_recv_msgs(drv, msg, get_akm_suites_handler, &key_mgmt);
|
||||
if (!ret) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"nl80211: Replace capa.key_mgmt based on driver advertised capabilities: 0x%x",
|
||||
key_mgmt);
|
||||
drv->capa.key_mgmt = key_mgmt;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
struct features_info {
|
||||
u8 *flags;
|
||||
size_t flags_len;
|
||||
|
@ -1250,12 +1127,6 @@ int wpa_driver_nl80211_capa(struct wpa_driver_nl80211_data *drv)
|
|||
drv->capa.key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_FILS_SHA256 |
|
||||
WPA_DRIVER_CAPA_KEY_MGMT_FILS_SHA384;
|
||||
|
||||
#ifdef CONFIG_DRIVER_NL80211_QCA
|
||||
/* Override drv->capa.key_mgmt based on driver advertised capability
|
||||
* constraints, if available. */
|
||||
qca_nl80211_get_akm_suites(drv);
|
||||
#endif /* CONFIG_DRIVER_NL80211_QCA */
|
||||
|
||||
drv->capa.auth = WPA_DRIVER_AUTH_OPEN |
|
||||
WPA_DRIVER_AUTH_SHARED |
|
||||
WPA_DRIVER_AUTH_LEAP;
|
||||
|
|
Loading…
Reference in a new issue