mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacld-3.0: Add support to enable/disable WMM using nl cmd
Add support to enable/disable WMM feature using nl command Change-Id: I71f5afd0f922854f8756a0428cbb290e641d5021 CRs-Fixed: 2187621
This commit is contained in:
parent
f7662e5fed
commit
707eb78287
3 changed files with 35 additions and 9 deletions
|
|
@ -15352,6 +15352,15 @@ struct reg_table_entry {
|
|||
unsigned long notifyId; /* Dynamic modification identifier */
|
||||
};
|
||||
|
||||
/**
|
||||
* hdd_to_csr_wmm_mode() - Utility function to convert HDD to CSR WMM mode
|
||||
*
|
||||
* @enum hdd_wmm_user_mode - hdd WMM user mode
|
||||
*
|
||||
* Return: CSR WMM mode
|
||||
*/
|
||||
eCsrRoamWmmUserModeType hdd_to_csr_wmm_mode(enum hdd_wmm_user_mode mode);
|
||||
|
||||
/* Function declarations and documenation */
|
||||
QDF_STATUS hdd_parse_config_ini(struct hdd_context *hdd_ctx);
|
||||
|
||||
|
|
|
|||
|
|
@ -8661,15 +8661,8 @@ QDF_STATUS hdd_set_policy_mgr_user_cfg(struct hdd_context *hdd_ctx)
|
|||
|
||||
return status;
|
||||
}
|
||||
/**
|
||||
* hdd_to_csr_wmm_mode() - Utility function to convert HDD to CSR WMM mode
|
||||
*
|
||||
* @enum hdd_wmm_user_mode - hdd WMM user mode
|
||||
*
|
||||
* Return: CSR WMM mode
|
||||
*/
|
||||
static eCsrRoamWmmUserModeType
|
||||
hdd_to_csr_wmm_mode(enum hdd_wmm_user_mode mode)
|
||||
|
||||
eCsrRoamWmmUserModeType hdd_to_csr_wmm_mode(enum hdd_wmm_user_mode mode)
|
||||
{
|
||||
switch (mode) {
|
||||
case HDD_WMM_USER_MODE_QBSS_ONLY:
|
||||
|
|
|
|||
|
|
@ -7232,6 +7232,7 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
|
|||
struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_MAX + 1];
|
||||
int ret_val = 0;
|
||||
uint8_t cfg_val = 0;
|
||||
tSmeConfigParams *sme_config;
|
||||
|
||||
ENTER_DEV(dev);
|
||||
|
||||
|
|
@ -7277,6 +7278,29 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
|
|||
return ret_val;
|
||||
}
|
||||
|
||||
if (tb[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_WMM_ENABLE]) {
|
||||
cfg_val = nla_get_u8(tb[
|
||||
QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_WMM_ENABLE]);
|
||||
sme_config = qdf_mem_malloc(sizeof(*sme_config));
|
||||
if (!sme_config) {
|
||||
hdd_err("mem alloc failed for sme_config");
|
||||
return -ENOMEM;
|
||||
}
|
||||
qdf_mem_zero(sme_config, sizeof(*sme_config));
|
||||
sme_get_config_param(hdd_ctx->hHal, sme_config);
|
||||
if (!cfg_val) {
|
||||
sme_config->csrConfig.WMMSupportMode =
|
||||
hdd_to_csr_wmm_mode(HDD_WMM_USER_MODE_NO_QOS);
|
||||
hdd_debug("wmm is disabled");
|
||||
} else {
|
||||
sme_config->csrConfig.WMMSupportMode =
|
||||
hdd_to_csr_wmm_mode(hdd_ctx->config->WmmMode);
|
||||
hdd_debug("using wmm default value");
|
||||
}
|
||||
sme_update_config(hdd_ctx->hHal, sme_config);
|
||||
qdf_mem_free(sme_config);
|
||||
}
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue