diff options
| author | Abhishek Singh <absingh@codeaurora.org> | 2016-09-13 13:45:05 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-09-21 17:02:37 -0700 |
| commit | a84d395e61ad0646167166b39ce31cb70e0b67e8 (patch) | |
| tree | 8eaef278e94cdef599c308eca0da042e2e2ec5b2 | |
| parent | b141b09b362a8187505093802ecb4fe48aa9b500 (diff) | |
qcacld-3.0: Use timeout api to indicate connect timeouts to kernel
qcacld-2.0 to qcacld-3.0 propagation
For supplicant there is no way to differentiate between connect
failure due to assoc rejected by AP and probe resp/auth/assoc
timeout.
Thus use cfg80211_connect_timeout API instead of
cfg80211_connect_bss API if connect request fails due to
probe resp/auth/assoc timeout.
Change-Id: I675fa17d1151e957a04050490f3efe343fdcc7c6
CRs-Fixed: 1056230
| -rw-r--r-- | core/hdd/inc/wlan_hdd_main.h | 3 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_assoc.c | 27 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 56 |
3 files changed, 70 insertions, 16 deletions
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index f6d56290772d..d53758c34a10 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1841,7 +1841,8 @@ int hdd_start_adapter(hdd_adapter_t *adapter); void hdd_connect_result(struct net_device *dev, const u8 *bssid, tCsrRoamInfo *roam_info, const u8 *req_ie, size_t req_ie_len, const u8 *resp_ie, - size_t resp_ie_len, u16 status, gfp_t gfp); + size_t resp_ie_len, u16 status, gfp_t gfp, + bool connect_timeout); #ifdef WLAN_FEATURE_FASTPATH void hdd_enable_fastpath(struct hdd_config *hdd_cfg, diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 1c0f8765a140..1c805a68139e 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -2672,7 +2672,8 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter, pFTAssocRsp, assocRsplen, WLAN_STATUS_SUCCESS, - GFP_KERNEL); + GFP_KERNEL, + false); } } else { /* @@ -2716,7 +2717,8 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter, rspRsnIe, rspRsnLength, WLAN_STATUS_SUCCESS, - GFP_KERNEL); + GFP_KERNEL, + false); } } } @@ -2832,6 +2834,7 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter, sizeof(pAdapter->hdd_stats.hddPmfStats)); #endif } else { + bool connect_timeout = false; hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter); if (pRoamInfo) @@ -2861,6 +2864,7 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter, pRoamInfo ? pRoamInfo->bssid.bytes : pWextState->req_bssId.bytes); + connect_timeout = true; } /* @@ -2896,13 +2900,15 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter, pRoamInfo->bssid.bytes, NULL, NULL, 0, NULL, 0, WLAN_STATUS_ASSOC_DENIED_UNSPEC, - GFP_KERNEL); + GFP_KERNEL, + connect_timeout); else hdd_connect_result(dev, pWextState->req_bssId.bytes, NULL, NULL, 0, NULL, 0, WLAN_STATUS_ASSOC_DENIED_UNSPEC, - GFP_KERNEL); + GFP_KERNEL, + connect_timeout); } else { if (pRoamInfo) { eCsrAuthType authType = @@ -2938,22 +2944,25 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter, pRoamInfo->reasonCode) ? pRoamInfo->reasonCode : WLAN_STATUS_UNSPECIFIED_FAILURE, - GFP_KERNEL); + GFP_KERNEL, + connect_timeout); } else hdd_connect_result(dev, pWextState->req_bssId.bytes, NULL, NULL, 0, NULL, 0, WLAN_STATUS_UNSPECIFIED_FAILURE, - GFP_KERNEL); + GFP_KERNEL, + connect_timeout); } hdd_clear_roam_profile_ie(pAdapter); } else if ((eCSR_ROAM_CANCELLED == roamStatus && !hddDisconInProgress)) { - cfg80211_connect_result(dev, + hdd_connect_result(dev, pWextState->req_bssId.bytes, - NULL, 0, NULL, 0, + NULL, NULL, 0, NULL, 0, WLAN_STATUS_UNSPECIFIED_FAILURE, - GFP_KERNEL); + GFP_KERNEL, + connect_timeout); } /* diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 554fa29703a0..9f1413f46aff 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3697,6 +3697,47 @@ struct cfg80211_bss *hdd_cfg80211_get_bss(struct wiphy *wiphy, #endif #endif +#if defined CFG80211_CONNECT_BSS +/** + * hdd_connect_bss() - API to send connection status to supplicant + * @dev: network device + * @bssid: bssid to which we want to associate + * @req_ie: Request Information Element + * @req_ie_len: len of the req IE + * @resp_ie: Response IE + * @resp_ie_len: len of ht response IE + * @status: status + * @gfp: Kernel Flag + * @connect_timeout: If timed out waiting for Auth/Assoc/Probe resp + * + * The API is a wrapper to send connection status to supplicant + * + * Return: Void + */ +#if defined CFG80211_CONNECT_TIMEOUT +static void hdd_connect_bss(struct net_device *dev, const u8 *bssid, + struct cfg80211_bss *bss, const u8 *req_ie, + size_t req_ie_len, const u8 *resp_ie, + size_t resp_ie_len, int status, gfp_t gfp, + bool connect_timeout) +{ + if (connect_timeout) + cfg80211_connect_timeout(dev, bssid, NULL, 0, GFP_KERNEL); + else + cfg80211_connect_bss(dev, bssid, bss, req_ie, req_ie_len, + resp_ie, resp_ie_len, status, gfp); +} +#else +static void hdd_connect_bss(struct net_device *dev, const u8 *bssid, + struct cfg80211_bss *bss, const u8 *req_ie, + size_t req_ie_len, const u8 *resp_ie, + size_t resp_ie_len, int status, gfp_t gfp, + bool connect_timeout) +{ + cfg80211_connect_bss(dev, bssid, bss, req_ie, req_ie_len, + resp_ie, resp_ie_len, status, gfp); +} +#endif /** * hdd_connect_result() - API to send connection status to supplicant @@ -3709,17 +3750,18 @@ struct cfg80211_bss *hdd_cfg80211_get_bss(struct wiphy *wiphy, * @resp_ie_len: len of ht response IE * @status: status * @gfp: Kernel Flag + * @connect_timeout: If timed out waiting for Auth/Assoc/Probe resp * * The API is a wrapper to send connection status to supplicant * and allow runtime suspend * * Return: Void */ -#if defined CFG80211_CONNECT_BSS void hdd_connect_result(struct net_device *dev, const u8 *bssid, tCsrRoamInfo *roam_info, const u8 *req_ie, size_t req_ie_len, const u8 *resp_ie, - size_t resp_ie_len, u16 status, gfp_t gfp) + size_t resp_ie_len, u16 status, gfp_t gfp, + bool connect_timeout) { hdd_adapter_t *padapter = (hdd_adapter_t *) netdev_priv(dev); struct cfg80211_bss *bss = NULL; @@ -3741,14 +3783,16 @@ void hdd_connect_result(struct net_device *dev, const u8 *bssid, roam_info->u.pConnectedProfile->SSID.ssId, roam_info->u.pConnectedProfile->SSID.length); } - cfg80211_connect_bss(dev, bssid, bss, req_ie, req_ie_len, - resp_ie, resp_ie_len, status, gfp); + hdd_connect_bss(dev, bssid, bss, req_ie, + req_ie_len, resp_ie, resp_ie_len, + status, gfp, connect_timeout); } #else void hdd_connect_result(struct net_device *dev, const u8 *bssid, tCsrRoamInfo *roam_info, const u8 *req_ie, size_t req_ie_len, const u8 *resp_ie, - size_t resp_ie_len, u16 status, gfp_t gfp) + size_t resp_ie_len, u16 status, gfp_t gfp, + bool connect_timeout) { cfg80211_connect_result(dev, bssid, req_ie, req_ie_len, resp_ie, resp_ie_len, status, gfp); @@ -3817,7 +3861,7 @@ QDF_STATUS hdd_start_all_adapters(hdd_context_t *hdd_ctx) hdd_connect_result(adapter->dev, NULL, NULL, NULL, 0, NULL, 0, WLAN_STATUS_ASSOC_DENIED_UNSPEC, - GFP_KERNEL); + GFP_KERNEL, false); } hdd_register_tx_flow_control(adapter, |
