[qca-nss-ecm] Fixed the VLAN over LAG acceleration issue

Change-Id: I85e54f73d0ec516488302047469c4caefc80fea2
Signed-off-by: Shyam Sunder <ssunde@codeaurora.org>
diff --git a/ecm_interface.c b/ecm_interface.c
index a1836e9..5cce32a 100644
--- a/ecm_interface.c
+++ b/ecm_interface.c
@@ -3341,6 +3341,7 @@
 	ip_addr_t next_dest_addr;
 	uint8_t next_dest_node_addr[ETH_ALEN] = {0};
 	struct net_device *bridge;
+	struct net_device *top_dev_vlan = NULL;
 	uint32_t serial = ecm_db_connection_serial_get(feci->ci);
 
 	/*
@@ -3656,6 +3657,9 @@
 					dev_hold(next_dev);
 					DEBUG_TRACE("Net device: %p is VLAN, slave dev: %p (%s)\n",
 							dest_dev, next_dev, next_dev->name);
+					if (current_interface_index == (ECM_DB_IFACE_HEIRARCHY_MAX - 1)) {
+						top_dev_vlan = dest_dev;
+					}
 					break;
 				}
 #endif
@@ -3753,6 +3757,9 @@
 						} else {
 							memcpy(src_mac_addr, dest_dev->dev_addr, ETH_ALEN);
 							master_dev = dest_dev;
+							if (top_dev_vlan) {
+								master_dev = top_dev_vlan;
+							}
 							dev_hold(master_dev);
 						}