qcacmn: Add sanity checks

Add sanity checks for ast_entry
structure

Change-Id: I361fac6b62f4b437f8d8d126fbb922d42b9b1b00
这个提交包含在:
phadiman
2018-06-29 15:40:52 +05:30
提交者 nshrivas
父节点 1dfef0346b
当前提交 0381f56e17

查看文件

@@ -326,17 +326,19 @@ static int dp_peer_update_ast_wifi3(struct cdp_soc_t *soc_hdl,
uint8_t *wds_macaddr,
uint32_t flags)
{
int status;
int status = -1;
struct dp_soc *soc = (struct dp_soc *)soc_hdl;
struct dp_ast_entry *ast_entry = NULL;
qdf_spin_lock_bh(&soc->ast_lock);
ast_entry = dp_peer_ast_hash_find(soc, wds_macaddr);
status = dp_peer_update_ast(soc,
(struct dp_peer *)peer_hdl,
ast_entry,
flags);
if (ast_entry) {
status = dp_peer_update_ast(soc,
(struct dp_peer *)peer_hdl,
ast_entry, flags);
}
qdf_spin_unlock_bh(&soc->ast_lock);
return status;
@@ -358,9 +360,11 @@ static void dp_wds_reset_ast_wifi3(struct cdp_soc_t *soc_hdl,
qdf_spin_lock_bh(&soc->ast_lock);
ast_entry = dp_peer_ast_hash_find(soc, wds_macaddr);
if (ast_entry->type != CDP_TXRX_AST_TYPE_STATIC) {
ast_entry->is_active = TRUE;
if (ast_entry) {
if (ast_entry->type != CDP_TXRX_AST_TYPE_STATIC)
ast_entry->is_active = TRUE;
}
qdf_spin_unlock_bh(&soc->ast_lock);
}