qcacld-3.0: Ignore H2E RSNXE support for test config
Userspace sends the vendor command WIFI_TEST_CONFIGURATION by setting the attribute WIFI_TEST_CONFIG_IGNORE_H2E_RSNXE when driver needs to ignore the SAE H2E mismatch for 6 GHz connection. This is needed for certification test support. Change-Id: Ic26e733e21811a9f19c6e35e27a9d63616c17c1b CRs-Fixed: 3050391
This commit is contained in:

committed by
Madan Koyyalamudi

parent
aeeb366572
commit
109980c95e
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -37,12 +38,23 @@ struct wlan_wfa_cmd_tx_ops {
|
|||||||
struct set_wfatest_params *wfa_test);
|
struct set_wfatest_params *wfa_test);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_wfa_test_feature_flags - WFA test feature flags
|
||||||
|
* @WFA_TEST_IGNORE_RSNXE: Ignore the H2E RSNXE mismatch for 6g connection when
|
||||||
|
* this flag is set
|
||||||
|
*/
|
||||||
|
enum wlan_wfa_test_feature_flags {
|
||||||
|
WFA_TEST_IGNORE_RSNXE = 0x1,
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct wlan_mlme_wfa_cmd - WFA test command tx ops
|
* struct wlan_mlme_wfa_cmd - WFA test command tx ops
|
||||||
* @tx_ops: WFA test command Tx ops to send commands to firmware
|
* @tx_ops: WFA test command Tx ops to send commands to firmware
|
||||||
|
* @flags: WFA test feature flags to do feature specific operations
|
||||||
*/
|
*/
|
||||||
struct wlan_mlme_wfa_cmd {
|
struct wlan_mlme_wfa_cmd {
|
||||||
struct wlan_wfa_cmd_tx_ops tx_ops;
|
struct wlan_wfa_cmd_tx_ops tx_ops;
|
||||||
|
enum wlan_wfa_test_feature_flags flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _WLAN_WFA_CONFIG_PUBLIC_STRUCT_H_ */
|
#endif /* _WLAN_WFA_CONFIG_PUBLIC_STRUCT_H_ */
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
@@ -36,4 +37,13 @@ QDF_STATUS
|
|||||||
wlan_send_wfatest_cmd(struct wlan_objmgr_vdev *vdev,
|
wlan_send_wfatest_cmd(struct wlan_objmgr_vdev *vdev,
|
||||||
struct set_wfatest_params *wmi_wfatest);
|
struct set_wfatest_params *wmi_wfatest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_wfa_get_test_feature_flags() - Check if the given WFA test flag is set
|
||||||
|
* @psoc: psoc pointer
|
||||||
|
* @feature: wfa test feature bit to be checked
|
||||||
|
*
|
||||||
|
* Return: True if the specific feature is configured
|
||||||
|
*/
|
||||||
|
bool wlan_wfa_get_test_feature_flags(struct wlan_objmgr_psoc *psoc,
|
||||||
|
enum wlan_wfa_test_feature_flags feature);
|
||||||
#endif /* WFA_TGT_IF_TX_API_H__ */
|
#endif /* WFA_TGT_IF_TX_API_H__ */
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
@@ -52,6 +53,70 @@ wlan_wfatest_get_tx_ops_from_vdev(struct wlan_objmgr_vdev *vdev)
|
|||||||
return tx_ops;
|
return tx_ops;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS
|
||||||
|
wlan_wfa_set_test_feature_flags(struct wlan_objmgr_psoc *psoc,
|
||||||
|
enum wlan_wfa_test_feature_flags feature,
|
||||||
|
uint8_t value)
|
||||||
|
{
|
||||||
|
mlme_psoc_ext_t *mlme_priv;
|
||||||
|
|
||||||
|
if (!psoc) {
|
||||||
|
mlme_legacy_err("psoc object is NULL");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
mlme_priv = wlan_psoc_mlme_get_ext_hdl(psoc);
|
||||||
|
if (!mlme_priv) {
|
||||||
|
mlme_legacy_err("vdev legacy private object is NULL");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (feature) {
|
||||||
|
case WFA_TEST_IGNORE_RSNXE:
|
||||||
|
if (value)
|
||||||
|
mlme_priv->wfa_testcmd.flags |= WFA_TEST_IGNORE_RSNXE;
|
||||||
|
else
|
||||||
|
mlme_priv->wfa_testcmd.flags &= ~WFA_TEST_IGNORE_RSNXE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
mlme_legacy_debug("Invalid feature flag: 0x%x", feature);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool wlan_wfa_get_test_feature_flags(struct wlan_objmgr_psoc *psoc,
|
||||||
|
enum wlan_wfa_test_feature_flags feature)
|
||||||
|
{
|
||||||
|
mlme_psoc_ext_t *mlme_priv;
|
||||||
|
bool set = false;
|
||||||
|
|
||||||
|
if (!psoc) {
|
||||||
|
mlme_legacy_err("psoc object is NULL");
|
||||||
|
return set;
|
||||||
|
}
|
||||||
|
|
||||||
|
mlme_priv = wlan_psoc_mlme_get_ext_hdl(psoc);
|
||||||
|
if (!mlme_priv) {
|
||||||
|
mlme_legacy_err("psoc legacy private object is NULL");
|
||||||
|
return set;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (feature) {
|
||||||
|
case WFA_TEST_IGNORE_RSNXE:
|
||||||
|
set = !!(mlme_priv->wfa_testcmd.flags & WFA_TEST_IGNORE_RSNXE);
|
||||||
|
if (set)
|
||||||
|
mlme_legacy_debug("IGNORE_RSNXE is set");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
mlme_legacy_debug("Invalid feature flag: 0x%x", feature);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return set;
|
||||||
|
}
|
||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
wlan_send_wfatest_cmd(struct wlan_objmgr_vdev *vdev,
|
wlan_send_wfatest_cmd(struct wlan_objmgr_vdev *vdev,
|
||||||
struct set_wfatest_params *wmi_wfatest)
|
struct set_wfatest_params *wmi_wfatest)
|
||||||
@@ -78,6 +143,10 @@ wlan_send_wfatest_cmd(struct wlan_objmgr_vdev *vdev,
|
|||||||
param.fd_period = DEFAULT_FILS_DISCOVERY_PERIOD;
|
param.fd_period = DEFAULT_FILS_DISCOVERY_PERIOD;
|
||||||
|
|
||||||
return tgt_vdev_mgr_fils_enable_send(mlme_obj, ¶m);
|
return tgt_vdev_mgr_fils_enable_send(mlme_obj, ¶m);
|
||||||
|
} else if (wmi_wfatest->cmd == WFA_IGNORE_H2E_RSNXE) {
|
||||||
|
return wlan_wfa_set_test_feature_flags(wlan_vdev_get_psoc(vdev),
|
||||||
|
WFA_TEST_IGNORE_RSNXE,
|
||||||
|
wmi_wfatest->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
tx_ops = wlan_wfatest_get_tx_ops_from_vdev(vdev);
|
tx_ops = wlan_wfatest_get_tx_ops_from_vdev(vdev);
|
||||||
|
@@ -7458,6 +7458,8 @@ wlan_hdd_wifi_test_config_policy[
|
|||||||
.type = NLA_U8},
|
.type = NLA_U8},
|
||||||
[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_6GHZ_SECURITY_TEST_MODE]
|
[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_6GHZ_SECURITY_TEST_MODE]
|
||||||
= {.type = NLA_U8},
|
= {.type = NLA_U8},
|
||||||
|
[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_IGNORE_H2E_RSNXE]
|
||||||
|
= {.type = NLA_U8},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -11618,6 +11620,23 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
|
|||||||
ret_val = ucfg_send_wfatest_cmd(adapter->vdev, &wfa_param);
|
ret_val = ucfg_send_wfatest_cmd(adapter->vdev, &wfa_param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cmd_id = QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_IGNORE_H2E_RSNXE;
|
||||||
|
if (tb[cmd_id]) {
|
||||||
|
wfa_param.vdev_id = adapter->vdev_id;
|
||||||
|
wfa_param.value = nla_get_u8(tb[cmd_id]);
|
||||||
|
|
||||||
|
if (!(wfa_param.value == H2E_RSNXE_DEFAULT ||
|
||||||
|
wfa_param.value == H2E_RSNXE_IGNORE)) {
|
||||||
|
hdd_debug("Invalid RSNXE_IGNORE config %d",
|
||||||
|
wfa_param.value);
|
||||||
|
goto send_err;
|
||||||
|
}
|
||||||
|
wfa_param.cmd = WFA_IGNORE_H2E_RSNXE;
|
||||||
|
hdd_info("send wfa WFA_IGNORE_H2E_RSNXE config %d",
|
||||||
|
wfa_param.value);
|
||||||
|
ret_val = ucfg_send_wfatest_cmd(adapter->vdev, &wfa_param);
|
||||||
|
}
|
||||||
|
|
||||||
if (update_sme_cfg)
|
if (update_sme_cfg)
|
||||||
sme_update_config(mac_handle, sme_config);
|
sme_update_config(mac_handle, sme_config);
|
||||||
|
|
||||||
|
@@ -319,6 +319,8 @@ wlan_hdd_wifi_test_config_policy[
|
|||||||
#define SA_QUERY_TIMEOUT_IGNORE 1
|
#define SA_QUERY_TIMEOUT_IGNORE 1
|
||||||
#define FILS_DISCV_FRAMES_DISABLE 0
|
#define FILS_DISCV_FRAMES_DISABLE 0
|
||||||
#define FILS_DISCV_FRAMES_ENABLE 1
|
#define FILS_DISCV_FRAMES_ENABLE 1
|
||||||
|
#define H2E_RSNXE_DEFAULT 0
|
||||||
|
#define H2E_RSNXE_IGNORE 1
|
||||||
|
|
||||||
#define FEATURE_VENDOR_SUBCMD_WIFI_TEST_CONFIGURATION \
|
#define FEATURE_VENDOR_SUBCMD_WIFI_TEST_CONFIGURATION \
|
||||||
{ \
|
{ \
|
||||||
|
Reference in New Issue
Block a user