qcacmn: Modify CDP AST APIs to synchronize add and delete cmds to FW

Change the CDP abstraction APIs for ast entry find, add and delete
to avoid external references for ast entry in upper layers

Process the HTT v2 peer map messages which will be enabled for
nexthop ast entries and use these messages instead of WMI event
for HKv1 WAR where we have to wait for delete confirmation from
target event which is processed in control path

Change-Id: Ifa91a259c0762344deb8ab89e868fc5554d75543
CRs-fixed: 2354951
This commit is contained in:
Chaithanya Garrepalli
2018-11-16 18:30:41 +05:30
committed by nshrivas
parent d6bdb6eb36
commit 9cc562c53b
10 changed files with 699 additions and 621 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -328,6 +328,50 @@ enum cdp_txrx_ast_entry_type {
CDP_TXRX_AST_TYPE_MAX
};
/*
* cdp_ast_free_status: status passed to callback function before freeing ast
* @CDP_TXRX_AST_DELETED - AST is deleted from FW and delete response received
* @CDP_TXRX_AST_DELETE_IN_PROGRESS - AST delete command sent to FW and host
* is waiting for FW response
*/
enum cdp_ast_free_status {
CDP_TXRX_AST_DELETED,
CDP_TXRX_AST_DELETE_IN_PROGRESS,
};
/**
* txrx_ast_free_cb - callback registered for ast free
* @ctrl_soc: control path soc context
* @cdp_soc: DP soc context
* @cookie: cookie
* @cdp_ast_free_status: ast free status
*/
typedef void (*txrx_ast_free_cb)(void *ctrl_soc,
void *cdp_soc,
void *cookie,
enum cdp_ast_free_status);
#define CDP_MAC_ADDR_LEN 6
/**
* struct cdp_ast_entry_info - AST entry information
* @peer_mac_addr: mac address of peer on which AST entry is added
* @type: ast entry type
* @vdev_id: vdev_id
* @pdev_id: pdev_id
* @peer_id: peer_id
*
* This structure holds the ast entry information
*
*/
struct cdp_ast_entry_info {
uint8_t peer_mac_addr[CDP_MAC_ADDR_LEN];
enum cdp_txrx_ast_entry_type type;
uint8_t vdev_id;
uint8_t pdev_id;
uint16_t peer_id;
};
/**
* struct cdp_sec_type - security type information
*/