diff options
| author | Agrawal Ashish <ashishka@qti.qualcomm.com> | 2016-08-04 19:05:22 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-08-08 16:10:53 +0530 |
| commit | 2be5bf37f7dd198c4fc67f6f4414e56ecb4b8d2c (patch) | |
| tree | 9559587c51fb8f0ac52688caea618de791f6bd35 | |
| parent | 956d3459edd761e1743b98bac71e94825047e35b (diff) | |
qcacld-2.0: Implement attribute for SET WIFI config for ifindex
Implement QCA_WLAN_VENDOR_ATTR_CONFIG_NON_AGG_RETRY and
QCA_WLAN_VENDOR_ATTR_CONFIG_AGG_RETRY for SET wifi config as per
index as well.
Change-Id: I1da12ee4bb71b389c60970461439f69d34ec9bc7
CRs-Fixed: 1040532
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 48 | ||||
| -rw-r--r-- | CORE/MAC/inc/sirApi.h | 4 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 6 | ||||
| -rw-r--r-- | CORE/SME/inc/sme_Api.h | 4 | ||||
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 4 |
5 files changed, 49 insertions, 17 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 2437ba8da878..a2ee8599c0ce 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -8600,18 +8600,34 @@ static int __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy, if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_NON_AGG_RETRY]) { retry = nla_get_u8( - tb[QCA_WLAN_VENDOR_ATTR_CONFIG_NON_AGG_RETRY]); + tb[QCA_WLAN_VENDOR_ATTR_CONFIG_NON_AGG_RETRY]); retry = retry > CFG_NON_AGG_RETRY_MAX ? CFG_NON_AGG_RETRY_MAX : retry; - ret_val = process_wma_set_command((int)pAdapter->sessionId, - (int)WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, - retry, PDEV_CMD); + + if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_IFINDEX]) { + status = sme_update_short_retry_limit_threshold( + pHddCtx->hHal, + pAdapter->sessionId, + retry); + if (!HAL_STATUS_SUCCESS(status)) { + hddLog(LOGE, + FL("sme_update_short_retry_limit_threshold(err=%d)"), + status); + return -EINVAL; + } + } else { + ret_val = process_wma_set_command( + (int)pAdapter->sessionId, + (int)WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, + retry, PDEV_CMD); + } + } if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_AGG_RETRY]) { retry = nla_get_u8( - tb[QCA_WLAN_VENDOR_ATTR_CONFIG_AGG_RETRY]); + tb[QCA_WLAN_VENDOR_ATTR_CONFIG_AGG_RETRY]); retry = retry > CFG_AGG_RETRY_MAX ? CFG_AGG_RETRY_MAX : retry; @@ -8619,9 +8635,25 @@ static int __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy, /* Value less than CFG_AGG_RETRY_MIN has side effect to t-put */ retry = ((retry > 0) && (retry < CFG_AGG_RETRY_MIN)) ? CFG_AGG_RETRY_MIN : retry; - ret_val = process_wma_set_command((int)pAdapter->sessionId, - (int)WMI_PDEV_PARAM_AGG_SW_RETRY_TH, - retry, PDEV_CMD); + + if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_IFINDEX]) { + status = sme_update_long_retry_limit_threshold( + pHddCtx->hHal, + pAdapter->sessionId, + retry); + if (!HAL_STATUS_SUCCESS(status)) { + hddLog(LOGE, + FL("sme_update_long_retry_limit_threshold(err=%d)"), + status); + return -EINVAL; + } + } else { + ret_val = process_wma_set_command( + (int)pAdapter->sessionId, + (int)WMI_PDEV_PARAM_AGG_SW_RETRY_TH, + retry, PDEV_CMD); + } + } if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_MGMT_RETRY]) { diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h index 5329514e18b4..d64582704281 100644 --- a/CORE/MAC/inc/sirApi.h +++ b/CORE/MAC/inc/sirApi.h @@ -7499,7 +7499,7 @@ struct sme_tx_fail_cnt_threshold { */ struct sme_short_retry_limit { uint8_t session_id; - uint32_t short_retry_limit; + uint8_t short_retry_limit; }; /** @@ -7510,7 +7510,7 @@ struct sme_short_retry_limit { */ struct sme_long_retry_limit { uint8_t session_id; - uint32_t long_retry_limit; + uint8_t long_retry_limit; }; /** diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index cb82c1de991d..2228af5a74d7 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -30303,7 +30303,7 @@ static VOS_STATUS wma_update_short_retry_limit(tp_wma_handle wma, struct sme_short_retry_limit *short_retry_limit_th) { u_int8_t vdev_id; - u_int32_t short_retry_limit; + u_int8_t short_retry_limit; int ret = -EIO; if (!wma || !wma->wmi_handle) { @@ -30342,7 +30342,7 @@ static VOS_STATUS wma_update_long_retry_limit(tp_wma_handle wma, struct sme_long_retry_limit *long_retry_limit_th) { u_int8_t vdev_id; - u_int32_t long_retry_limit; + u_int8_t long_retry_limit; int ret = -EIO; if (!wma || !wma->wmi_handle) { @@ -30351,7 +30351,7 @@ static VOS_STATUS wma_update_long_retry_limit(tp_wma_handle wma, } vdev_id = long_retry_limit_th->session_id; long_retry_limit = long_retry_limit_th->long_retry_limit; - WMA_LOGD("Set TX pkt fail count threshold vdevId %d count %d", + WMA_LOGD("Set long retry limit threshold vdevId %d count %d", vdev_id, long_retry_limit); ret = wmi_unified_vdev_set_param_send(wma->wmi_handle, vdev_id, diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h index ce3f3ad7d70c..87a04da1ee89 100644 --- a/CORE/SME/inc/sme_Api.h +++ b/CORE/SME/inc/sme_Api.h @@ -4594,9 +4594,9 @@ eHalStatus sme_update_access_policy_vendor_ie(tHalHandle hal, eHalStatus sme_update_tx_fail_cnt_threshold(tHalHandle hal_handle, uint8_t session_id, uint32_t tx_fail_count); eHalStatus sme_update_short_retry_limit_threshold(tHalHandle hal_handle, - uint8_t session_id, uint32_t short_limit_count_th); + uint8_t session_id, uint8_t short_limit_count_th); eHalStatus sme_update_long_retry_limit_threshold(tHalHandle hal_handle, - uint8_t session_id, uint32_t long_limit_count_th); + uint8_t session_id, uint8_t long_limit_count_th); eHalStatus sme_update_sta_inactivity_timeout(tHalHandle hal_handle, uint8_t session_id, uint32_t sta_inactivity_timeout); #endif //#if !defined( __SME_API_H ) diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index 871ffbd913bc..bd73880d00ff 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -19323,7 +19323,7 @@ eHalStatus sme_update_tx_fail_cnt_threshold(tHalHandle hal_handle, * Return: VOS_STATUS */ eHalStatus sme_update_short_retry_limit_threshold(tHalHandle hal_handle, - uint8_t session_id, uint32_t short_limit_count_th) + uint8_t session_id, uint8_t short_limit_count_th) { tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal_handle); eHalStatus status = eHAL_STATUS_SUCCESS; @@ -19368,7 +19368,7 @@ eHalStatus sme_update_short_retry_limit_threshold(tHalHandle hal_handle, * Return: VOS_STATUS */ eHalStatus sme_update_long_retry_limit_threshold(tHalHandle hal_handle, - uint8_t session_id, uint32_t long_limit_count_th) + uint8_t session_id, uint8_t long_limit_count_th) { tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal_handle); eHalStatus status = eHAL_STATUS_SUCCESS; |
