diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-04-26 19:27:01 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-04-26 19:27:01 -0700 |
| commit | dbb58edbfdfd5fd690f9d5af79d4ba174fa0b726 (patch) | |
| tree | 8d45a151b7087155b24f175f2a49266ca8987305 | |
| parent | 4ec6aa676cf4a5e0af5efe50be430b5d2d8dfbd8 (diff) | |
| parent | 7bc5e66cbb93e3da89ed9a0deca848c3017928cd (diff) | |
Merge "qcacld-2.0: Check for SME state in hdd_get_sta_connection_in_progress"
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_assoc.c | 3 | ||||
| -rw-r--r-- | CORE/SME/inc/sme_Api.h | 12 | ||||
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 13 |
3 files changed, 27 insertions, 1 deletions
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c index dc8ede89133a..75fc255bc775 100644 --- a/CORE/HDD/src/wlan_hdd_assoc.c +++ b/CORE/HDD/src/wlan_hdd_assoc.c @@ -6349,7 +6349,8 @@ hdd_adapter_t *hdd_get_sta_connection_in_progress(hdd_context_t *hdd_ctx) return adapter; } else if ((eConnectionState_Associated == hdd_sta_ctx->conn_info.connState) && - !hdd_sta_ctx->conn_info.uIsAuthenticated) { + sme_is_sta_key_exchange_in_progress( + hdd_ctx->hHal, adapter->sessionId)) { hddLog(LOG1, FL("session_id %d: Key exchange is in progress"), adapter->sessionId); return adapter; diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h index 530c9ff144e1..36d79bf68483 100644 --- a/CORE/SME/inc/sme_Api.h +++ b/CORE/SME/inc/sme_Api.h @@ -4878,4 +4878,16 @@ eHalStatus sme_set_chip_pwr_save_fail_cb(tHalHandle hal, void (*cb)( void *, eHalStatus sme_set_ac_txq_optimize(tHalHandle hal_handle, uint8_t *value); VOS_STATUS sme_mnt_filter_type_cmd(struct sme_mnt_filter_type_req *input); + +/** + * sme_is_sta_key_exchange_in_progress() - checks whether the STA/P2P client + * session has key exchange in progress + * + * @hal: global hal handle + * @session_id: session id + * + * Return: true - if key exchange in progress + * false - if not in progress + */ +bool sme_is_sta_key_exchange_in_progress(tHalHandle hal, uint8_t session_id); #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 c5841a4d8a8d..af82624f56f8 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -20663,3 +20663,16 @@ eHalStatus sme_clear_random_mac(tHalHandle hal, uint32_t session_id, } return status; } + +bool sme_is_sta_key_exchange_in_progress(tHalHandle hal, uint8_t session_id) +{ + tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal); + + if (!CSR_IS_SESSION_VALID(mac_ctx, session_id)) { + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, + FL("Invalid session %d"), session_id); + return false; + } + + return CSR_IS_WAIT_FOR_KEY(mac_ctx, session_id); +} |
