qcacmn: Acquire lock before calling rx tid setup
The rx tid setup function is called from multiple contexts. Acquire lock before calling that function to avoid race condition. Change-Id: I7a0443e5e09a068301de171afeb4d400bf54b1c8 CRs-Fixed: 3291079
This commit is contained in:

committed by
Madan Koyyalamudi

parent
c3ea01cd1b
commit
cb33f7e1d3
@@ -4074,6 +4074,7 @@ static int dp_rx_tid_delete_wifi3(struct dp_peer *peer, int tid)
|
||||
if (!freedesc) {
|
||||
dp_peer_err("%pK: malloc failed for freedesc: tid %d",
|
||||
soc, tid);
|
||||
qdf_assert(0);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@@ -1354,13 +1354,17 @@ dp_rx_null_q_desc_handle(struct dp_soc *soc, qdf_nbuf_t nbuf,
|
||||
|
||||
if (hal_rx_is_unicast(soc->hal_soc, rx_tlv_hdr)) {
|
||||
struct dp_peer *peer;
|
||||
struct dp_rx_tid *rx_tid;
|
||||
tid = hal_rx_tid_get(soc->hal_soc, rx_tlv_hdr);
|
||||
peer = dp_peer_get_ref_by_id(soc, txrx_peer->peer_id,
|
||||
DP_MOD_ID_RX_ERR);
|
||||
if (peer) {
|
||||
rx_tid = &peer->rx_tid[tid];
|
||||
qdf_spin_lock_bh(&rx_tid->tid_lock);
|
||||
if (!peer->rx_tid[tid].hw_qdesc_vaddr_unaligned)
|
||||
dp_rx_tid_setup_wifi3(peer, tid, 1,
|
||||
IEEE80211_SEQ_MAX);
|
||||
qdf_spin_unlock_bh(&rx_tid->tid_lock);
|
||||
/* IEEE80211_SEQ_MAX indicates invalid start_seq */
|
||||
dp_peer_unref_delete(peer, DP_MOD_ID_RX_ERR);
|
||||
}
|
||||
|
Reference in New Issue
Block a user