mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
qcacld-3.0: Avoid sending P2P action frame confirmation twice
qcacld-2.0 to qcacld-3.0 propagation.. P2P action frame confirmation can be called from work queue wma_mgmt_tx_ack_work_handler as well as from MC thread during remain on channel completion. So it can lead to race condition where frame confirmation is called twice and driver tries to free frame buffer twice. To detect duplicate use PE global lock in P2P action frame confirmation. Change-Id: Id193b5a979fad5effa7c6b00d89452ad876ae00e CRs-Fixed: 1035077
This commit is contained in:
parent
e1e691382c
commit
a6b0982b34
1 changed files with 22 additions and 7 deletions
|
|
@ -412,16 +412,31 @@ void lim_send_sme_mgmt_frame_ind(tpAniSirGlobal pMac, uint8_t frameType,
|
|||
|
||||
QDF_STATUS lim_p2p_action_cnf(tpAniSirGlobal pMac, uint32_t txCompleteSuccess)
|
||||
{
|
||||
if (pMac->lim.mgmtFrameSessionId != 0xff) {
|
||||
/* The session entry might be invalid(0xff) action confirmation received after
|
||||
* remain on channel timer expired */
|
||||
if (pMac->p2p_ack_ind_cb)
|
||||
pMac->p2p_ack_ind_cb(pMac->lim.mgmtFrameSessionId,
|
||||
txCompleteSuccess);
|
||||
QDF_STATUS status;
|
||||
uint32_t mgmt_frame_sessionId;
|
||||
|
||||
status = pe_acquire_global_lock(&pMac->lim);
|
||||
if (QDF_IS_STATUS_SUCCESS(status)) {
|
||||
mgmt_frame_sessionId = pMac->lim.mgmtFrameSessionId;
|
||||
pMac->lim.mgmtFrameSessionId = 0xff;
|
||||
pe_release_global_lock(&pMac->lim);
|
||||
|
||||
if (mgmt_frame_sessionId != 0xff) {
|
||||
/*
|
||||
* The session entry might be invalid(0xff)
|
||||
* action confirmation received after
|
||||
* remain on channel timer expired.
|
||||
*/
|
||||
lim_log(pMac, LOG1,
|
||||
FL("mgmt_frame_sessionId %d"),
|
||||
mgmt_frame_sessionId);
|
||||
if (pMac->p2p_ack_ind_cb)
|
||||
pMac->p2p_ack_ind_cb(mgmt_frame_sessionId,
|
||||
txCompleteSuccess);
|
||||
}
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue