qcacld-3.0: Remove csr_release_command_roam call in csr_roam_issue_connect
In the function csr_queue_sme_command, we memset the memory for the roam command to 0 in case of failure and release the memory to the global command pool. But in csr_roam_issue_connect, csr_release_command_roam is called again in case of failure, and this can lead to memset of memory to 0 that is released to global command pool. Remove the redundant csr_release_command_roam in the function csr_roam_issue_connect and the call to csr_reinit_preauth_cmd in csr_roam_enqueue_preauth. Change-Id: Ifab3551dd3b2dbb2d135b5488f7b09f422648abb CRs-Fixed: 2280904
This commit is contained in:

committed by
nshrivas

parent
45530e7ce9
commit
7dba4a7af8
@@ -6610,6 +6610,7 @@ void csr_reinit_roam_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand)
|
||||
csr_release_profile(pMac, &pCommand->u.roamCmd.roamProfile);
|
||||
pCommand->u.roamCmd.fReleaseProfile = false;
|
||||
}
|
||||
pCommand->u.roamCmd.pLastRoamBss = NULL;
|
||||
pCommand->u.roamCmd.pRoamBssEntry = NULL;
|
||||
/* Because u.roamCmd is union and share with scanCmd and StatusChange */
|
||||
qdf_mem_set(&pCommand->u.roamCmd, sizeof(struct roam_cmd), 0);
|
||||
@@ -8652,7 +8653,6 @@ QDF_STATUS csr_roam_issue_connect(tpAniSirGlobal pMac, uint32_t sessionId,
|
||||
status = csr_queue_sme_command(pMac, pCommand, fImediate);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
sme_err("fail to send message status: %d", status);
|
||||
csr_release_command_roam(pMac, pCommand);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -35,7 +35,6 @@
|
||||
#include "wlan_policy_mgr_api.h"
|
||||
#include "sir_api.h"
|
||||
|
||||
static void csr_reinit_preauth_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand);
|
||||
static QDF_STATUS csr_neighbor_roam_add_preauth_fail(tpAniSirGlobal mac_ctx,
|
||||
uint8_t session_id, tSirMacAddr bssid);
|
||||
|
||||
@@ -92,20 +91,6 @@ void csr_neighbor_roam_tranistion_preauth_done_to_disconnected(
|
||||
pNeighborRoamInfo->uOsRequestedHandoff = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* csr_reinit_preauth_cmd() - Cleanup the preauth command
|
||||
* @mac_ctx: Global MAC context
|
||||
* @command: Command to be cleaned up
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void csr_reinit_preauth_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *command)
|
||||
{
|
||||
command->u.roamCmd.pLastRoamBss = NULL;
|
||||
command->u.roamCmd.pRoamBssEntry = NULL;
|
||||
qdf_mem_set(&command->u.roamCmd, sizeof(struct roam_cmd), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* csr_roam_enqueue_preauth() - Put the preauth command in the queue
|
||||
* @mac_ctx: Global MAC Context
|
||||
@@ -138,7 +123,6 @@ QDF_STATUS csr_roam_enqueue_preauth(tpAniSirGlobal mac_ctx,
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
sme_err("fail to queue preauth,status: %d",
|
||||
status);
|
||||
csr_reinit_preauth_cmd(mac_ctx, command);
|
||||
}
|
||||
} else {
|
||||
status = QDF_STATUS_E_RESOURCES;
|
||||
|
@@ -2889,15 +2889,4 @@ QDF_STATUS wma_config_bmiss_bcnt_params(uint32_t vdev_id, uint32_t first_cnt,
|
||||
*/
|
||||
void wma_check_and_set_wake_timer(uint32_t time);
|
||||
|
||||
/**
|
||||
* wma_vdev_wait_for_peer_delete_completion() - wait for all peers of the vdev
|
||||
* to be deleted.
|
||||
* @wma_handle: wma handle
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void wma_vdev_wait_for_peer_delete_completion(tp_wma_handle wma_handle,
|
||||
uint8_t vdev_id);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user