mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
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
This commit is contained in:
parent
b141b09b36
commit
a84d395e61
3 changed files with 70 additions and 16 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue