qcacld-3.0: Fix race between wpa_supplicant and scheduler_thread

Driver receives roam invoke command from supplicant, Host start
processing it in wpa_supplicant thread and sends ROAM_INVOKE
command to firmware. FW indicates roam invoke failure, so host
clean up the AP (Disconnect). But wpa_supplicant did not get
scheduled till disconnection completion. After disconnection,
wpa_supplicant thread gets resume and sets the roaming in progress
true. This results in roaming in progress remain set in a
disconnection state.

sme_fast_reassoc should be protected with sme lock to avoid
the race between SB disconnect and sme_fast_reassoc.

Fix is to protect sme_fast_reassoc with sme lock and
set roaming in progress flag before sending sme_fast_reassoc
command to FW and reset it again if sme_fast_reassoc fail to
initiate the roam invoke.

Change-Id: I05d92f8d5916decbd2c6f99eb67da0a29525ead5
CRs-Fixed: 2608398
This commit is contained in:
Abhinav Kumar
2020-01-23 18:19:36 +05:30
کامیت شده توسط nshrivas
والد 73e0acb2e2
کامیت c0716d4f8a
5فایلهای تغییر یافته به همراه184 افزوده شده و 122 حذف شده

مشاهده پرونده

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -409,6 +409,23 @@ QDF_STATUS
csr_roam_auth_offload_callback(struct mac_context *mac_ctx,
uint8_t vdev_id,
struct qdf_mac_addr bssid);
/**
* csr_fast_reassoc() - invokes FAST REASSOC command
* @mac_handle: handle returned by mac_open
* @profile: current connected profile
* @bssid: bssid to look for in scan cache
* @ch_freq: channel on which reassoc should be send
* @vdev_id: vdev id
* @connected_bssid: bssid of currently connected profile
*
* Return: QDF_STATUS
*/
QDF_STATUS csr_fast_reassoc(mac_handle_t mac_handle,
struct csr_roam_profile *profile,
const tSirMacAddr bssid, uint32_t ch_freq,
uint8_t vdev_id, const tSirMacAddr connected_bssid);
#else
static inline QDF_STATUS csr_roam_synch_callback(struct mac_context *mac,
struct roam_offload_synch_ind *roam_synch_data,
@@ -424,6 +441,15 @@ csr_roam_auth_offload_callback(struct mac_context *mac_ctx,
{
return QDF_STATUS_E_NOSUPPORT;
}
static inline
QDF_STATUS csr_fast_reassoc(mac_handle_t mac_handle,
struct csr_roam_profile *profile,
const tSirMacAddr bssid, uint32_t ch_freq,
uint8_t vdev_id, const tSirMacAddr connected_bssid)
{
return QDF_STATUS_SUCCESS;
}
#endif
void csr_neighbor_roam_state_transition(struct mac_context *mac_ctx,
uint8_t newstate, uint8_t session);