qcacmn: Clear the peer when it is deleted
The peer rx packets should be flushed when deleting the peer and its state should be reset to DISCONNECT, when deleting the peer. If the state of peer is not set to DISCONNECT, then the flushing of rx packets for the peer which is being deleted will call the rx callback and submit these packet to the stack, which can cause unwanted behaviour. This way the UMAC does not need to specifically call clear peer before deleting the peer. Change-Id: I3b5a737126350a361d968f6349aef6291b2e3f56 CRs-Fixed: 2659629
This commit is contained in:
@@ -3400,15 +3400,10 @@ dp_clear_peer(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
|
||||
return QDF_STATUS_E_FAULT;
|
||||
|
||||
peer = dp_find_peer_by_addr((struct cdp_pdev *)pdev, peer_addr.bytes);
|
||||
if (!peer)
|
||||
if (!peer || !peer->valid)
|
||||
return QDF_STATUS_E_FAULT;
|
||||
|
||||
qdf_spin_lock_bh(&peer->peer_info_lock);
|
||||
peer->state = OL_TXRX_PEER_STATE_DISC;
|
||||
qdf_spin_unlock_bh(&peer->peer_info_lock);
|
||||
|
||||
dp_rx_flush_rx_cached(peer, true);
|
||||
|
||||
dp_clear_peer_internal(soc, peer);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
مرجع در شماره جدید
Block a user