diff options
| author | Hanumanth Reddy Pothula <c_hpothu@codeaurora.org> | 2017-02-20 19:08:38 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-02-28 16:58:57 -0800 |
| commit | 4b5d6497c6ad1aee7a16c4411611a448b3e92548 (patch) | |
| tree | b055f4eb16eb85e75504e9ccc9400fdd6c45318f | |
| parent | 1896ed77bcea6d38179774c19118b15d5e0a12b7 (diff) | |
qcacld-3.0: Update scan failure timestamp only on connection in progress
propagation from prima to qcacld-3.0.
Presently, along with connection in progress scenario, scan failure
timestamp is also incremented on BTcoex operation is in progress,
leading scan failure timestamp to be updated not due to connection in
progress state but due to BTCoex mode in progress.
Hence update last scan failure timestamp only when connection is in
progress
Change-Id: I50cc13d2091f4418899ebce6fcacb8008dc47d9f
CRs-Fixed: 1066610
| -rw-r--r-- | core/cds/src/cds_concurrency.c | 4 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 5 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_hostapd.c | 10 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_p2p.c | 8 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_scan.c | 5 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_api_roam.c | 14 |
6 files changed, 37 insertions, 9 deletions
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index 3424cba69de2..2832db68836f 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -2716,10 +2716,6 @@ bool cds_is_connection_in_progress(uint8_t *session_id, return false; } - if (true == hdd_ctx->btCoexModeSet) { - cds_info("BTCoex Mode operation in progress"); - return true; - } status = hdd_get_front_adapter(hdd_ctx, &adapter_node); while (NULL != adapter_node && QDF_STATUS_SUCCESS == status) { adapter = adapter_node->pAdapter; diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 053012dd0ce4..4417abcd9079 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -12008,6 +12008,11 @@ static int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter, goto ret_status; } + if (pHddCtx->btCoexModeSet) { + hdd_err("BTCoex Mode operation in progress"); + return -EBUSY; + } + if (true == cds_is_connection_in_progress(NULL, NULL)) { hdd_err("Connection refused: conn in progress"); status = -EINVAL; diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 8bbd9cb1fd2f..fc246663c655 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -7272,8 +7272,10 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, ENTER(); - if (!update_beacon && cds_is_connection_in_progress(NULL, NULL)) { - hdd_err("Can't start BSS: connection is in progress"); + if (!update_beacon && (cds_is_connection_in_progress(NULL, NULL) || + pHddCtx->btCoexModeSet)) { + hdd_err("Can't start BSS: connection ot btcoex(%d) is in progress", + pHddCtx->btCoexModeSet); return -EINVAL; } @@ -8150,6 +8152,10 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, pAdapter, hdd_device_mode_to_string(pAdapter->device_mode), pAdapter->device_mode, cds_is_sub_20_mhz_enabled()); + if (pHddCtx->btCoexModeSet) { + hdd_info("BTCoex Mode operation in progress"); + return -EBUSY; + } if (cds_is_connection_in_progress(NULL, NULL)) { hdd_err("Can't start BSS: connection is in progress"); diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c index 863872605a73..db92d6909687 100644 --- a/core/hdd/src/wlan_hdd_p2p.c +++ b/core/hdd/src/wlan_hdd_p2p.c @@ -853,7 +853,13 @@ static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy, ret = wlan_hdd_validate_context(pHddCtx); if (0 != ret) return ret; - if (cds_is_connection_in_progress(NULL, NULL)) { + + if (pHddCtx->btCoexModeSet) { + hdd_notice("BTCoex Mode operation in progress"); + isBusy = true; + } + + if (!isBusy && cds_is_connection_in_progress(NULL, NULL)) { hdd_notice("Connection is in progress"); isBusy = true; } diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index 20b8e290b36f..4ec3d996415a 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -1672,6 +1672,11 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, } #endif + if (pHddCtx->btCoexModeSet) { + cds_info("BTCoex Mode operation in progress"); + return -EBUSY; + } + /* Check if scan is allowed at this point of time */ if (cds_is_connection_in_progress(&curr_session_id, &curr_reason)) { hdd_err("Scan not allowed"); diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index b2167089d731..a5d5dcd7e5c4 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -19448,6 +19448,13 @@ void csr_process_set_hw_mode(tpAniSirGlobal mac, tSmeCmd *command) tSirMsgQ msg; struct sir_set_hw_mode_resp *param; enum cds_hw_mode_change cds_hw_mode; + hdd_context_t *hdd_ctx; + + hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); + if (!hdd_ctx) { + cds_err("HDD context is NULL"); + goto fail; + } /* Setting HW mode is for the entire system. * So, no need to check session @@ -19483,8 +19490,11 @@ void csr_process_set_hw_mode(tpAniSirGlobal mac, tSmeCmd *command) if ((SIR_UPDATE_REASON_OPPORTUNISTIC == command->u.set_hw_mode_cmd.reason) && - (true == cds_is_connection_in_progress(NULL, NULL))) { - sms_log(mac, LOGE, FL("Set HW mode refused: conn in progress")); + (hdd_ctx->btCoexModeSet || + (cds_is_connection_in_progress(NULL, NULL)))) { + sms_log(mac, LOGE, + FL("Set HW mode refused: conn or btcoex(%d) is in progress"), + hdd_ctx->btCoexModeSet); cds_restart_opportunistic_timer(false); goto fail; } |
