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
committed by nshrivas
vanhempi b7f1c6fa92
commit d1f8fbb225
4 muutettua tiedostoa jossa 38 lisäystä ja 28 poistoa

Näytä tiedosto

@@ -89,6 +89,31 @@ dp_peer_find_by_id(struct dp_soc *soc,
}
#endif /* PEER_LOCK_REF_PROTECT */
#ifdef PEER_CACHE_RX_PKTS
/**
* dp_rx_flush_rx_cached() - flush cached rx frames
* @peer: peer
* @drop: set flag to drop frames
*
* Return: None
*/
void dp_rx_flush_rx_cached(struct dp_peer *peer, bool drop);
#else
static inline void dp_rx_flush_rx_cached(struct dp_peer *peer, bool drop)
{
}
#endif
static inline void
dp_clear_peer_internal(struct dp_soc *soc, struct dp_peer *peer)
{
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);
}
void dp_print_ast_stats(struct dp_soc *soc);
void dp_rx_peer_map_handler(struct dp_soc *soc, uint16_t peer_id,
uint16_t hw_peer_id, uint8_t vdev_id,