qcacmn: Add API to fetch ast entry by mac and ast type
Add API to fetch ast entry by mac and ast type Change-Id: Ib8cfa5c269fd10c149804d02fcfae35e88c2a53f CRs-Fixed: 3614965
This commit is contained in:

committed by
Rahul Choudhary

parent
77cbd24eb2
commit
2e13c17be4
@@ -3894,7 +3894,10 @@ QDF_STATUS dp_htt_reo_migration(struct dp_soc *soc, uint16_t peer_id,
|
|||||||
|
|
||||||
/* delete ast entry for current primary peer */
|
/* delete ast entry for current primary peer */
|
||||||
qdf_spin_lock_bh(¤t_pr_soc->ast_lock);
|
qdf_spin_lock_bh(¤t_pr_soc->ast_lock);
|
||||||
ast_entry = dp_peer_ast_hash_find_soc(current_pr_soc, mld_peer->mac_addr.raw);
|
ast_entry = dp_peer_ast_hash_find_soc_by_type(
|
||||||
|
current_pr_soc,
|
||||||
|
mld_peer->mac_addr.raw,
|
||||||
|
CDP_TXRX_AST_TYPE_MLD);
|
||||||
if (!ast_entry) {
|
if (!ast_entry) {
|
||||||
dp_htt_err("Invalid ast entry");
|
dp_htt_err("Invalid ast entry");
|
||||||
qdf_spin_unlock_bh(¤t_pr_soc->ast_lock);
|
qdf_spin_unlock_bh(¤t_pr_soc->ast_lock);
|
||||||
|
@@ -1289,6 +1289,33 @@ struct dp_ast_entry *dp_peer_ast_hash_find_soc(struct dp_soc *soc,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct dp_ast_entry *dp_peer_ast_hash_find_soc_by_type(
|
||||||
|
struct dp_soc *soc,
|
||||||
|
uint8_t *ast_mac_addr,
|
||||||
|
enum cdp_txrx_ast_entry_type type)
|
||||||
|
{
|
||||||
|
union dp_align_mac_addr local_mac_addr_aligned, *mac_addr;
|
||||||
|
unsigned index;
|
||||||
|
struct dp_ast_entry *ase;
|
||||||
|
|
||||||
|
if (!soc->ast_hash.bins)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
qdf_mem_copy(&local_mac_addr_aligned.raw[0],
|
||||||
|
ast_mac_addr, QDF_MAC_ADDR_SIZE);
|
||||||
|
mac_addr = &local_mac_addr_aligned;
|
||||||
|
|
||||||
|
index = dp_peer_ast_hash_index(soc, mac_addr);
|
||||||
|
TAILQ_FOREACH(ase, &soc->ast_hash.bins[index], hash_list_elem) {
|
||||||
|
if (dp_peer_find_mac_addr_cmp(mac_addr, &ase->mac_addr) == 0 &&
|
||||||
|
ase->type == type) {
|
||||||
|
return ase;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_peer_map_ipa_evt() - Send peer map event to IPA
|
* dp_peer_map_ipa_evt() - Send peer map event to IPA
|
||||||
* @soc: SoC handle
|
* @soc: SoC handle
|
||||||
@@ -2164,6 +2191,14 @@ struct dp_ast_entry *dp_peer_ast_hash_find_soc(struct dp_soc *soc,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct dp_ast_entry *dp_peer_ast_hash_find_soc_by_type(
|
||||||
|
struct dp_soc *soc,
|
||||||
|
uint8_t *ast_mac_addr,
|
||||||
|
enum cdp_txrx_ast_entry_type type)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
QDF_STATUS dp_peer_host_add_map_ast(struct dp_soc *soc, uint16_t peer_id,
|
QDF_STATUS dp_peer_host_add_map_ast(struct dp_soc *soc, uint16_t peer_id,
|
||||||
uint8_t *mac_addr, uint16_t hw_peer_id,
|
uint8_t *mac_addr, uint16_t hw_peer_id,
|
||||||
|
@@ -896,6 +896,23 @@ struct dp_ast_entry *dp_peer_ast_hash_find_by_vdevid(struct dp_soc *soc,
|
|||||||
struct dp_ast_entry *dp_peer_ast_hash_find_soc(struct dp_soc *soc,
|
struct dp_ast_entry *dp_peer_ast_hash_find_soc(struct dp_soc *soc,
|
||||||
uint8_t *ast_mac_addr);
|
uint8_t *ast_mac_addr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* dp_peer_ast_hash_find_soc_by_type() - Find AST entry by MAC address
|
||||||
|
* and AST type
|
||||||
|
* @soc: SoC handle
|
||||||
|
* @ast_mac_addr: Mac address
|
||||||
|
* @type: AST entry type
|
||||||
|
*
|
||||||
|
* It assumes caller has taken the ast lock to protect the access to
|
||||||
|
* AST hash table
|
||||||
|
*
|
||||||
|
* Return: AST entry
|
||||||
|
*/
|
||||||
|
struct dp_ast_entry *dp_peer_ast_hash_find_soc_by_type(
|
||||||
|
struct dp_soc *soc,
|
||||||
|
uint8_t *ast_mac_addr,
|
||||||
|
enum cdp_txrx_ast_entry_type type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_peer_ast_get_pdev_id() - get pdev_id from the ast entry
|
* dp_peer_ast_get_pdev_id() - get pdev_id from the ast entry
|
||||||
* @soc: SoC handle
|
* @soc: SoC handle
|
||||||
|
Reference in New Issue
Block a user