mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
qcacld-3.0: Fix disconnect event missing for kernel
For reassociate case, when disconnect is triggered by wlan_hdd_try_disconnect, then disconnect event is not indicated to kernel in disconnect handler - hdd_dis_connect_handler. And if the csr_roam_connect get failure for some reason, the kernel will only get error code from driver connect request interface and the connected bss information in kernel will not get cleared. Then kernel / driver will be out of sync. To fix that, for such csr_roam_connect failure case, let driver return successful status code from driver connect interface and indicate connection result failure event to kernel to clear kernel bss information. Change-Id: I5367262751e63c04553deeb7607cbe13c70f8e15 CRs-Fixed: 2940994
This commit is contained in:
parent
7a8a190b9f
commit
74ed6f8a6c
1 changed files with 9 additions and 6 deletions
|
|
@ -18807,7 +18807,7 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter,
|
|||
enum nl80211_chan_width ch_width)
|
||||
{
|
||||
int status = 0;
|
||||
QDF_STATUS qdf_status;
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
struct hdd_context *hdd_ctx;
|
||||
struct hdd_station_ctx *hdd_sta_ctx;
|
||||
uint32_t roam_id = INVALID_ROAM_ID;
|
||||
|
|
@ -19123,14 +19123,17 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter,
|
|||
if ((QDF_STATUS_SUCCESS != qdf_status) &&
|
||||
(QDF_STA_MODE == adapter->device_mode ||
|
||||
QDF_P2P_CLIENT_MODE == adapter->device_mode)) {
|
||||
hdd_err("Vdev %d connect failed with status %d",
|
||||
hdd_err("Vdev %d connect failed with status %d to krnl",
|
||||
adapter->vdev_id, qdf_status);
|
||||
/* change back to NotAssociated */
|
||||
hdd_conn_set_connection_state(adapter,
|
||||
eConnectionState_NotConnected);
|
||||
qdf_runtime_pm_allow_suspend(
|
||||
&hdd_ctx->runtime_context.connect);
|
||||
hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_CONNECT);
|
||||
hdd_connect_result(adapter->dev,
|
||||
NULL, NULL, NULL, 0, NULL, 0,
|
||||
WLAN_STATUS_UNSPECIFIED_FAILURE,
|
||||
GFP_KERNEL, false,
|
||||
eSIR_SME_INVALID_PARAMETERS);
|
||||
status = 0;
|
||||
}
|
||||
|
||||
/* Reset connect_in_progress */
|
||||
|
|
@ -19153,7 +19156,7 @@ ret_status:
|
|||
* Enable roaming on other STA adapter for failure case.
|
||||
* For success case, it is enabled in assoc completion handler
|
||||
*/
|
||||
if (status)
|
||||
if (status || qdf_status != QDF_STATUS_SUCCESS)
|
||||
wlan_hdd_enable_roaming(adapter, RSO_CONNECT_START);
|
||||
|
||||
return status;
|
||||
|
|
|
|||
Loading…
Reference in a new issue