diff options
| author | Rajeev Kumar <rajekuma@qca.qualcomm.com> | 2014-05-21 16:37:59 -0700 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-05-23 13:13:37 -0700 |
| commit | c1c368e169f5886c8b82661bdfffaab3ce4f5f80 (patch) | |
| tree | cea8e1ce5ab2b1c0d9b23eef513bc6f886b1e58c | |
| parent | 764062d6f2f53f6ae91793c5c543e91f8bc0c924 (diff) | |
qcacld: Fix deadlock caused by flow control lock
Flow control lock is used from 3 different contexts:
1) user context(iperf) 2) Soft IRQ(net tx) and
3) tasklet(wlan_tasklet) so its should be acquired
using bottom half protection to avoid deadlock when
the lock is acquired from user context on core 0 and
it gets pre-empted on same core 0 either by wlan_tasklet
or softIRQ.
Change-Id: Idc0d3b5fc854607492e31e5a9159788f18410c23
CRs-Fixed: 669050
| -rw-r--r-- | CORE/CLD_TXRX/TLSHIM/tl_shim.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/CORE/CLD_TXRX/TLSHIM/tl_shim.c b/CORE/CLD_TXRX/TLSHIM/tl_shim.c index 8e8a070da715..828c9f448b49 100644 --- a/CORE/CLD_TXRX/TLSHIM/tl_shim.c +++ b/CORE/CLD_TXRX/TLSHIM/tl_shim.c @@ -1918,11 +1918,11 @@ v_BOOL_t WLANTL_GetTxResource return VOS_TRUE; } - adf_os_spin_lock(&tl_shim->session_flow_control[sessionId].fc_lock); + adf_os_spin_lock_bh(&tl_shim->session_flow_control[sessionId].fc_lock); if (!tl_shim->session_flow_control[sessionId].vdev) { TLSHIM_LOGD("%s, session id %d, VDEV NULL", __func__, sessionId); - adf_os_spin_unlock(&tl_shim->session_flow_control[sessionId].fc_lock); + adf_os_spin_unlock_bh(&tl_shim->session_flow_control[sessionId].fc_lock); return VOS_TRUE; } @@ -1930,7 +1930,7 @@ v_BOOL_t WLANTL_GetTxResource (struct ol_txrx_vdev_t *)tl_shim->session_flow_control[sessionId].vdev, low_watermark, high_watermark_offset); - adf_os_spin_unlock(&tl_shim->session_flow_control[sessionId].fc_lock); + adf_os_spin_unlock_bh(&tl_shim->session_flow_control[sessionId].fc_lock); return enough_resource; } @@ -1973,7 +1973,7 @@ void WLANTL_TXFlowControlCb return; } - adf_os_spin_lock(&tl_shim->session_flow_control[sessionId].fc_lock); + adf_os_spin_lock_bh(&tl_shim->session_flow_control[sessionId].fc_lock); if ((tl_shim->session_flow_control[sessionId].sessionId == sessionId) && (tl_shim->session_flow_control[sessionId].flowControl)) { flow_control_cb = tl_shim->session_flow_control[sessionId].flowControl; @@ -1983,7 +1983,7 @@ void WLANTL_TXFlowControlCb if ((flow_control_cb) && (adpter_ctxt)) { flow_control_cb(adpter_ctxt, resume_tx); } - adf_os_spin_unlock(&tl_shim->session_flow_control[sessionId].fc_lock); + adf_os_spin_unlock_bh(&tl_shim->session_flow_control[sessionId].fc_lock); return; } @@ -2031,11 +2031,11 @@ void WLANTL_RegisterTXFlowControl return; } - adf_os_spin_lock(&tl_shim->session_flow_control[sessionId].fc_lock); + adf_os_spin_lock_bh(&tl_shim->session_flow_control[sessionId].fc_lock); tl_shim->session_flow_control[sessionId].flowControl = flowControl; tl_shim->session_flow_control[sessionId].sessionId = sessionId; tl_shim->session_flow_control[sessionId].adpaterCtxt = adpaterCtxt; - adf_os_spin_unlock(&tl_shim->session_flow_control[sessionId].fc_lock); + adf_os_spin_unlock_bh(&tl_shim->session_flow_control[sessionId].fc_lock); return; } @@ -2078,12 +2078,12 @@ void WLANTL_DeRegisterTXFlowControl return; } - adf_os_spin_lock(&tl_shim->session_flow_control[sessionId].fc_lock); + adf_os_spin_lock_bh(&tl_shim->session_flow_control[sessionId].fc_lock); tl_shim->session_flow_control[sessionId].flowControl = NULL; tl_shim->session_flow_control[sessionId].sessionId = 0xFF; tl_shim->session_flow_control[sessionId].adpaterCtxt = NULL; tl_shim->session_flow_control[sessionId].vdev = NULL; - adf_os_spin_unlock(&tl_shim->session_flow_control[sessionId].fc_lock); + adf_os_spin_unlock_bh(&tl_shim->session_flow_control[sessionId].fc_lock); return; } @@ -2126,17 +2126,17 @@ void WLANTL_SetAdapterMaxQDepth return; } - adf_os_spin_lock(&tl_shim->session_flow_control[sessionId].fc_lock); + adf_os_spin_lock_bh(&tl_shim->session_flow_control[sessionId].fc_lock); if (!tl_shim->session_flow_control[sessionId].vdev) { TLSHIM_LOGD("%s, session id %d, VDEV NULL", __func__, sessionId); - adf_os_spin_unlock(&tl_shim->session_flow_control[sessionId].fc_lock); + adf_os_spin_unlock_bh(&tl_shim->session_flow_control[sessionId].fc_lock); return; } wdi_in_ll_set_tx_pause_q_depth( (struct ol_txrx_vdev_t *)tl_shim->session_flow_control[sessionId].vdev, max_q_depth); - adf_os_spin_unlock(&tl_shim->session_flow_control[sessionId].fc_lock); + adf_os_spin_unlock_bh(&tl_shim->session_flow_control[sessionId].fc_lock); return; } |
