qcacmn: Avoid entry free only based on WDS feature flag

Allow AST entry deletion from del_ast call for HTT V1 cases

Change-Id: If7cd1dfe59680b29c8664a460a236e608c00b158
This commit is contained in:
Radha Krishna Simha Jiguru
2020-02-07 16:16:12 +05:30
committed by nshrivas
parent 4631007d0c
commit 89a6c08c9b
2 changed files with 30 additions and 11 deletions

View File

@@ -6301,7 +6301,6 @@ void dp_peer_unref_delete(struct dp_peer *peer)
struct cdp_peer_cookie peer_cookie; struct cdp_peer_cookie peer_cookie;
enum wlan_op_mode vdev_opmode; enum wlan_op_mode vdev_opmode;
uint8_t vdev_mac_addr[QDF_MAC_ADDR_SIZE]; uint8_t vdev_mac_addr[QDF_MAC_ADDR_SIZE];
struct dp_ast_entry *peer_ast_entry = NULL;
/* /*
* Hold the lock all the way from checking if the peer ref count * Hold the lock all the way from checking if the peer ref count
@@ -6333,10 +6332,7 @@ void dp_peer_unref_delete(struct dp_peer *peer)
qdf_spin_lock_bh(&soc->ast_lock); qdf_spin_lock_bh(&soc->ast_lock);
if (peer->self_ast_entry) { if (peer->self_ast_entry) {
peer_ast_entry = peer->self_ast_entry; dp_peer_del_ast(soc, peer->self_ast_entry);
dp_peer_unlink_ast_entry(soc, peer_ast_entry);
dp_peer_free_ast_entry(soc, peer_ast_entry);
peer->self_ast_entry = NULL;
} }
qdf_spin_unlock_bh(&soc->ast_lock); qdf_spin_unlock_bh(&soc->ast_lock);

View File

@@ -34,6 +34,34 @@
#include "dp_tx_capture.h" #include "dp_tx_capture.h"
#endif #endif
#ifdef FEATURE_WDS
static inline bool
dp_peer_ast_free_in_unmap_supported(struct dp_peer *peer,
struct dp_ast_entry *ast_entry)
{
/* if peer map v2 is enabled we are not freeing ast entry
* here and it is supposed to be freed in unmap event (after
* we receive delete confirmation from target)
*
* if peer_id is invalid we did not get the peer map event
* for the peer free ast entry from here only in this case
*/
if ((ast_entry->type != CDP_TXRX_AST_TYPE_WDS_HM_SEC) &&
(ast_entry->type != CDP_TXRX_AST_TYPE_SELF))
return true;
return false;
}
#else
static inline bool
dp_peer_ast_free_in_unmap_supported(struct dp_peer *peer,
struct dp_ast_entry *ast_entry)
{
return false;
}
#endif
static inline void static inline void
dp_set_ssn_valid_flag(struct hal_reo_cmd_params *params, dp_set_ssn_valid_flag(struct hal_reo_cmd_params *params,
uint8_t valid) uint8_t valid)
@@ -935,12 +963,7 @@ void dp_peer_del_ast(struct dp_soc *soc, struct dp_ast_entry *ast_entry)
* if peer_id is invalid we did not get the peer map event * if peer_id is invalid we did not get the peer map event
* for the peer free ast entry from here only in this case * for the peer free ast entry from here only in this case
*/ */
if (dp_peer_ast_free_in_unmap_supported(peer, ast_entry))
/* For HM_SEC and SELF type we do not receive unmap event
* free ast_entry from here it self
*/
if ((ast_entry->type != CDP_TXRX_AST_TYPE_WDS_HM_SEC) &&
(ast_entry->type != CDP_TXRX_AST_TYPE_SELF))
return; return;
/* for WDS secondary entry ast_entry->next_hop would be set so /* for WDS secondary entry ast_entry->next_hop would be set so