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:
Rakesh Pillai
2020-04-11 11:48:34 +05:30
کامیت شده توسط nshrivas
والد b7f1c6fa92
کامیت d1f8fbb225
4فایلهای تغییر یافته به همراه38 افزوده شده و 28 حذف شده

مشاهده پرونده

@@ -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;
}