From a1ba9a2bfceb01296990d82ff852feb3b03a8471 Mon Sep 17 00:00:00 2001 From: yeshwanth sriram guntuka Date: Tue, 28 Feb 2017 16:17:32 +0530 Subject: [PATCH] qcacld-3.0: Downgrade WMM AC for data frames for invalid tspec As per the current implementation wmmAcTspecValid is reset during roaming and set after establishing TSpec but currently wmmAcTspecValid is not considered before classifying the data frames based on AC and UP. Due to above issue after roaming we are still sending packets with UP for which tspec session is not established. Fix above issue by checking wmmAcTspecValid for AC before classifying the frame. Change-Id: I37039fa568696f0861b02d094c3a513dbc2b9967 CRs-Fixed: 915555 --- core/hdd/src/wlan_hdd_assoc.c | 5 ++--- core/hdd/src/wlan_hdd_wmm.c | 11 +++++++++++ core/sme/inc/sme_api.h | 22 ++++++++++++++++++++++ core/sme/src/common/sme_api.c | 12 ++++++++++++ 4 files changed, 47 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index b6618876256f..088353e88f16 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -2194,8 +2194,6 @@ static inline bool hdd_is_key_install_required_for_ibss( static void hdd_change_peer_state_after_set_key(hdd_adapter_t *adapter, tCsrRoamInfo *roaminfo, eCsrRoamResult roam_result) { - tHalHandle hal_ctx = WLAN_HDD_GET_HAL_CTX(adapter); - tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal_ctx); hdd_station_ctx_t *hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); eCsrEncryptionType encr_type = hdd_sta_ctx->conn_info.ucEncryptionType; @@ -2221,7 +2219,8 @@ static void hdd_change_peer_state_after_set_key(hdd_adapter_t *adapter, * ptk_installed is true. So, make ptk_installed to true in * case of 11R roaming. */ - if (csr_neighbor_roam_is11r_assoc(mac_ctx, adapter->sessionId)) + if (sme_neighbor_roam_is11r_assoc(WLAN_HDD_GET_HAL_CTX(adapter), + adapter->sessionId)) hdd_sta_ctx->conn_info.ptk_installed = true; } else { hdd_sta_ctx->conn_info.ptk_installed = true; diff --git a/core/hdd/src/wlan_hdd_wmm.c b/core/hdd/src/wlan_hdd_wmm.c index 51992c7a443d..3e2c66ad4654 100644 --- a/core/hdd/src/wlan_hdd_wmm.c +++ b/core/hdd/src/wlan_hdd_wmm.c @@ -61,6 +61,7 @@ #include #include #include +#include "sme_api.h" #define WLAN_HDD_MAX_DSCP 0x3f @@ -1971,6 +1972,16 @@ QDF_STATUS hdd_wmm_connect(hdd_adapter_t *pAdapter, pAdapter->hddWmmStatus.wmmAcStatus[ac]. wmmAcAccessAllowed = true; } + if (!pRoamInfo->fReassocReq && + !sme_neighbor_roam_is11r_assoc( + WLAN_HDD_GET_HAL_CTX(pAdapter), + pAdapter->sessionId) && + !sme_roam_is_ese_assoc(pRoamInfo)) { + pAdapter->hddWmmStatus.wmmAcStatus[ac]. + wmmAcTspecValid = false; + pAdapter->hddWmmStatus.wmmAcStatus[ac]. + wmmAcAccessAllowed = false; + } } else { hdd_info("ac %d off", ac); /* admission is not required so access is allowed */ diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index d36c5f992de8..20d4a18ebe72 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -1331,6 +1331,28 @@ QDF_STATUS sme_update_short_retry_limit_threshold(tHalHandle hal_handle, struct sme_short_retry_limit *short_retry_limit_th); QDF_STATUS sme_update_long_retry_limit_threshold(tHalHandle hal_handle, struct sme_long_retry_limit *long_retry_limit_th); +/** + * sme_roam_is_ese_assoc() - Check if association type is ESE + * @roam_info: Pointer to roam info + * + * Return: true if ESE Association, false otherwise. + */ +#ifdef FEATURE_WLAN_ESE +bool sme_roam_is_ese_assoc(tCsrRoamInfo *roam_info); +#else +static inline bool sme_roam_is_ese_assoc(tCsrRoamInfo *roam_info) +{ + return false; +} +#endif +/** + * sme_neighbor_roam_is11r_assoc() - Check if association type is 11R + * @hal_ctx: HAL handle + * @session_id: session id + * + * Return: true if 11r Association, false otherwise. + */ +bool sme_neighbor_roam_is11r_assoc(tHalHandle hal_ctx, uint8_t session_id); /** * sme_update_sta_inactivity_timeout(): Update sta_inactivity_timeout to FW diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 53a6a96ffaf1..0d9352afda1a 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -16252,6 +16252,18 @@ QDF_STATUS sme_set_lost_link_info_cb(tHalHandle hal, return status; } +#ifdef FEATURE_WLAN_ESE +bool sme_roam_is_ese_assoc(tCsrRoamInfo *roam_info) +{ + return roam_info->isESEAssoc; +} +#endif + +bool sme_neighbor_roam_is11r_assoc(tHalHandle hal_ctx, uint8_t session_id) +{ + tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal_ctx); + return csr_neighbor_roam_is11r_assoc(mac_ctx, session_id); +} #ifdef WLAN_FEATURE_WOW_PULSE /**