qcacmn: Add support for intra-bss forwarding
pkts should be forwarded from one STA to another
STA belonging to same VAP from within the driver
Change-Id: I68eb0dd91f7ac54352b4882ffdb9d5d53d627db1
Conflicts:
dp/wifi3.0/dp_rx.c
dp/wifi3.0/dp_types.h
Conflicts:
dp/wifi3.0/dp_rx.c
Change-Id: I68eb0dd91f7ac54352b4882ffdb9d5d53d627db1
diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c
index 687294d..7197812 100644
--- a/dp/wifi3.0/dp_main.c
+++ b/dp/wifi3.0/dp_main.c
@@ -1692,6 +1692,13 @@
if (!peer)
return NULL; /* failure */
+ TAILQ_INIT(&peer->ast_entry_list);
+ qdf_mem_copy(&peer->self_ast_entry.mac_addr, peer_mac_addr,
+ DP_MAC_ADDR_LEN);
+ peer->self_ast_entry.peer = peer;
+ TAILQ_INSERT_HEAD(&peer->ast_entry_list, &peer->self_ast_entry,
+ ast_entry_elem);
+
qdf_mem_zero(peer, sizeof(struct dp_peer));
qdf_spinlock_create(&peer->peer_info_lock);
@@ -1849,6 +1856,8 @@
struct dp_peer *tmppeer;
int found = 0;
uint16_t peer_id;
+ uint16_t hw_peer_id;
+ struct dp_ast_entry *ast_entry;
/*
* Hold the lock all the way from checking if the peer ref count
@@ -1932,6 +1941,17 @@
#ifdef notyet
qdf_mempool_free(soc->osdev, soc->mempool_ol_ath_peer, peer);
#else
+ TAILQ_FOREACH(ast_entry, &peer->ast_entry_list,
+ ast_entry_elem) {
+ hw_peer_id = ast_entry->ast_idx;
+ if (peer->self_ast_entry.ast_idx != hw_peer_id)
+ qdf_mem_free(ast_entry);
+ else
+ peer->self_ast_entry.ast_idx =
+ HTT_INVALID_PEER;
+
+ soc->ast_table[hw_peer_id] = NULL;
+ }
qdf_mem_free(peer);
#endif
if (soc->cdp_soc.ol_ops->peer_unref_delete) {