IPACM: Code cleanup for the WLAN guest ap filtering rule

WLAN guest ap fileting rules are installed with destination
mac address and meta-data of WLAN interface. There is no
need to install an explicitly WLAN guest ap filtering rule
beacause IPA HW path is supported between guest ap clients.

Change-Id: Idbc4ef633171146161a956b7bda97485a1990d6c
diff --git a/ipacm/inc/IPACM_Defs.h b/ipacm/inc/IPACM_Defs.h
index 237ac5b..aefe419 100644
--- a/ipacm/inc/IPACM_Defs.h
+++ b/ipacm/inc/IPACM_Defs.h
@@ -71,7 +71,6 @@
 
 #define IPA_MAX_IFACE_ENTRIES 15
 #define IPA_MAX_PRIVATE_SUBNET_ENTRIES 3
-#define IPA_GUEST_AP_IPv6_FLT_RULE_ENTRIES 2
 #define IPA_MAX_ALG_ENTRIES 20
 #define IPA_MAX_RM_ENTRY 6
 
diff --git a/ipacm/inc/IPACM_Lan.h b/ipacm/inc/IPACM_Lan.h
index 386b050..3c909dc 100644
--- a/ipacm/inc/IPACM_Lan.h
+++ b/ipacm/inc/IPACM_Lan.h
@@ -251,8 +251,6 @@
 
 	virtual int eth_bridge_handle_dummy_wlan_client_flt_rule(ipa_ip_type iptype);
 
-	virtual int eth_bridge_add_wlan_guest_ap_flt_rule(ipa_ip_type iptype);
-
 	virtual int eth_bridge_handle_dummy_lan_client_flt_rule(ipa_ip_type iptype);
 
 	int eth_bridge_add_lan_client_flt_rule(uint8_t* mac, ipa_ip_type iptype);
diff --git a/ipacm/inc/IPACM_Wlan.h b/ipacm/inc/IPACM_Wlan.h
index 598c14f..d14368f 100644
--- a/ipacm/inc/IPACM_Wlan.h
+++ b/ipacm/inc/IPACM_Wlan.h
@@ -95,10 +95,6 @@
 	eth_bridge_client_flt_info eth_bridge_lan_client_flt_info[IPA_LAN_TO_LAN_MAX_LAN_CLIENT];
 	int lan_client_flt_info_count;
 
-	uint32_t wlan_guest_ap_flt_rule_hdl_v4[IPA_MAX_PRIVATE_SUBNET_ENTRIES];
-
-	uint32_t wlan_guest_ap_flt_rule_hdl_v6[IPA_GUEST_AP_IPv6_FLT_RULE_ENTRIES];
-
 	static lan2lan_flt_rule_hdl self_client_flt_rule_hdl_v4[IPA_LAN_TO_LAN_MAX_WLAN_CLIENT];
 	static lan2lan_flt_rule_hdl self_client_flt_rule_hdl_v6[IPA_LAN_TO_LAN_MAX_WLAN_CLIENT];
 
@@ -117,8 +113,6 @@
 	eth_bridge_client_rt_info* eth_bridge_wlan_client_rt_from_wlan_info_v6;
 	int wlan_client_rt_from_wlan_info_count_v6;
 
-	virtual int eth_bridge_add_wlan_guest_ap_flt_rule(ipa_ip_type iptype);
-
 	int eth_bridge_install_wlan_guest_ap_ipv6_flt_rule();
 
 	virtual int eth_bridge_handle_dummy_wlan_client_flt_rule(ipa_ip_type iptype);
diff --git a/ipacm/src/IPACM_Lan.cpp b/ipacm/src/IPACM_Lan.cpp
index 5a5aa7e..a6d603e 100644
--- a/ipacm/src/IPACM_Lan.cpp
+++ b/ipacm/src/IPACM_Lan.cpp
@@ -1286,7 +1286,7 @@
 			flt_rule_entry.status = -1;
 			flt_rule_entry.rule.action = IPA_PASS_TO_ROUTING;
 
-                        /* Support priave subnet feature including guest-AP can't talk to primary AP etc */
+                        /* Support private subnet feature including guest-AP can't talk to primary AP etc */
 			flt_rule_entry.rule.rt_tbl_hdl = IPACM_Iface::ipacmcfg->rt_tbl_default_v4.hdl;
 			IPACMDBG_H(" private filter rule use table: %s\n",IPACM_Iface::ipacmcfg->rt_tbl_default_v4.name);
 
@@ -4988,12 +4988,6 @@
 	return res;
 }
 
-int IPACM_Lan::eth_bridge_add_wlan_guest_ap_flt_rule(ipa_ip_type iptype)
-{
-	IPACMDBG_H("No need to add WLAN guest AP flt rule on USB pipe.\n");
-	return IPACM_SUCCESS;
-}
-
 int IPACM_Lan::eth_bridge_handle_dummy_lan_client_flt_rule(ipa_ip_type iptype)
 {
 	if(rx_prop == NULL)
diff --git a/ipacm/src/IPACM_Wlan.cpp b/ipacm/src/IPACM_Wlan.cpp
index e58345a..363499b 100644
--- a/ipacm/src/IPACM_Wlan.cpp
+++ b/ipacm/src/IPACM_Wlan.cpp
@@ -111,9 +111,9 @@
 	}
 
 #ifdef FEATURE_ETH_BRIDGE_LE
-	exp_index_v4 = IPV4_DEFAULT_FILTERTING_RULES + 2 * IPACM_Iface::ipacmcfg->ipa_num_private_subnet
+	exp_index_v4 = IPV4_DEFAULT_FILTERTING_RULES + IPACM_Iface::ipacmcfg->ipa_num_private_subnet
 			+ IPA_LAN_TO_LAN_MAX_WLAN_CLIENT + IPA_LAN_TO_LAN_MAX_LAN_CLIENT + NUM_IPV4_ICMP_FLT_RULE;
-	exp_index_v6 = IPV6_DEFAULT_FILTERTING_RULES + IPA_GUEST_AP_IPv6_FLT_RULE_ENTRIES + IPA_LAN_TO_LAN_MAX_WLAN_CLIENT + IPA_LAN_TO_LAN_MAX_LAN_CLIENT
+	exp_index_v6 = IPV6_DEFAULT_FILTERTING_RULES + IPA_LAN_TO_LAN_MAX_WLAN_CLIENT + IPA_LAN_TO_LAN_MAX_LAN_CLIENT
 			+ NUM_IPV6_PREFIX_FLT_RULE + NUM_IPV6_ICMP_FLT_RULE;
 #else
 #ifndef CT_OPT
@@ -132,8 +132,6 @@
 	IPACMDBG_H("Now the number of wlan AP iface is %d\n", IPACM_Wlan::num_wlan_ap_iface);
 	add_dummy_flt_rule();
 
-	memset(wlan_guest_ap_flt_rule_hdl_v4, 0, IPA_MAX_PRIVATE_SUBNET_ENTRIES * sizeof(uint32_t));
-	memset(wlan_guest_ap_flt_rule_hdl_v6, 0, IPA_GUEST_AP_IPv6_FLT_RULE_ENTRIES * sizeof(uint32_t));
 	is_guest_ap = false;
 
 	memset(eth_bridge_lan_client_flt_info, 0, IPA_LAN_TO_LAN_MAX_LAN_CLIENT * sizeof(eth_bridge_client_flt_info));
@@ -481,18 +479,6 @@
 		IPACMDBG_H("Received IPA_WAN_V6_DOWN in WLAN-instance and need clean up client IPv6 address \n");
 		/* reset wifi-client ipv6 rt-rules */
 		handle_wlan_client_reset_rt(IPA_IP_v6);
-#ifdef FEATURE_ETH_BRIDGE_LE
-		if (is_guest_ap == true)
-		{
-			/* delete wlan guest ap global flt rule */
-			if (reset_to_dummy_flt_rule(IPA_IP_v6, wlan_guest_ap_flt_rule_hdl_v6[1]) == IPACM_FAILURE)
-			{
-				IPACMERR("Error deleting wlan guest ap global IPv6 flt rules.\n");
-				return;
-			}
-			wlan_guest_ap_flt_rule_hdl_v6[1] = 0;
-		}
-#endif
 		IPACMDBG_H("Backhaul is sta mode?%d\n", data_wan->is_sta);
 		if(data_wan->is_sta == false && wlan_ap_index > 0)
 		{
@@ -1055,7 +1041,7 @@
 			return IPACM_FAILURE;
 		}
 #ifdef FEATURE_ETH_BRIDGE_LE
-		offset = IPA_GUEST_AP_IPv6_FLT_RULE_ENTRIES + IPA_LAN_TO_LAN_MAX_WLAN_CLIENT + IPA_LAN_TO_LAN_MAX_LAN_CLIENT;
+		offset = IPA_LAN_TO_LAN_MAX_WLAN_CLIENT + IPA_LAN_TO_LAN_MAX_LAN_CLIENT;
 #else
 #ifndef CT_OPT
 		offset = wlan_ap_index * (IPV6_DEFAULT_FILTERTING_RULES + MAX_OFFLOAD_PAIR) + MAX_OFFLOAD_PAIR;
@@ -2327,22 +2313,6 @@
 		}
 #endif
 		IPACMDBG_H("Deleted default v4 filter rules successfully.\n");
-#ifdef FEATURE_ETH_BRIDGE_LE
-		if(is_guest_ap == true)
-		{
-			IPACMDBG_H("Delete wlan guest ap v4 flt rules.\n");
-			for(i=0; i<IPACM_Iface::ipacmcfg->ipa_num_private_subnet; i++)
-			{
-				if(reset_to_dummy_flt_rule(IPA_IP_v4, wlan_guest_ap_flt_rule_hdl_v4[i]) == IPACM_FAILURE)
-				{
-					IPACMERR("Error deleting wlan guest ap IPv4 flt rules.\n");
-					res = IPACM_FAILURE;
-					goto fail;
-				}
-			}
-		}
-		IPACMDBG_H("Deleted guest ap v4 filter rules successfully.\n");
-#endif
 #ifndef FEATURE_ETH_BRIDGE_LE
 #ifdef CT_OPT
 		IPACMDBG_H("Delete tcp control flt rules.\n");
@@ -2463,23 +2433,6 @@
 			}
 		}
 #endif
-#ifdef FEATURE_ETH_BRIDGE_LE
-		if (is_guest_ap == true)
-		{
-			IPACMDBG_H("Delete wlan guest ap IPv6 flt rules.\n");
-			for (i=0; i<IPA_GUEST_AP_IPv6_FLT_RULE_ENTRIES; i++)
-			{
-				if (reset_to_dummy_flt_rule(IPA_IP_v6, wlan_guest_ap_flt_rule_hdl_v6[i]) == IPACM_FAILURE)
-				{
-					IPACMERR("Error deleting wlan guest ap IPv6 flt rules.\n");
-					res = IPACM_FAILURE;
-					goto fail;
-				}
-				wlan_guest_ap_flt_rule_hdl_v6[i] = 0;
-			}
-		}
-		IPACMDBG_H("Deleted wlan guest ap IPv6 filter rules successfully.\n");
-#endif
 	}
 	IPACMDBG_H("finished delete filtering rules\n ");
 
@@ -3080,8 +3033,8 @@
 			return;
 		}
 #ifdef FEATURE_ETH_BRIDGE_LE
-		num_v4_dummy_rule = IPV4_DEFAULT_FILTERTING_RULES + IPACM_Iface::ipacmcfg->ipa_num_private_subnet + IPA_LAN_TO_LAN_MAX_WLAN_CLIENT + IPA_LAN_TO_LAN_MAX_LAN_CLIENT + IPACM_Iface::ipacmcfg->ipa_num_private_subnet;
-		num_v6_dummy_rule = IPV6_DEFAULT_FILTERTING_RULES + IPA_GUEST_AP_IPv6_FLT_RULE_ENTRIES + IPA_LAN_TO_LAN_MAX_WLAN_CLIENT + IPA_LAN_TO_LAN_MAX_LAN_CLIENT;
+		num_v4_dummy_rule = IPV4_DEFAULT_FILTERTING_RULES + IPA_LAN_TO_LAN_MAX_WLAN_CLIENT + IPA_LAN_TO_LAN_MAX_LAN_CLIENT + IPACM_Iface::ipacmcfg->ipa_num_private_subnet;
+		num_v6_dummy_rule = IPV6_DEFAULT_FILTERTING_RULES + IPA_LAN_TO_LAN_MAX_WLAN_CLIENT + IPA_LAN_TO_LAN_MAX_LAN_CLIENT;
 #else
 #ifndef CT_OPT
 		num_v4_dummy_rule = 2*(IPV4_DEFAULT_FILTERTING_RULES + MAX_OFFLOAD_PAIR + IPACM_Iface::ipacmcfg->ipa_num_private_subnet);
@@ -3283,8 +3236,8 @@
 #endif
 
 #ifdef FEATURE_ETH_BRIDGE_LE
-		num_v4_dummy_rule = IPV4_DEFAULT_FILTERTING_RULES + IPACM_Iface::ipacmcfg->ipa_num_private_subnet + IPA_LAN_TO_LAN_MAX_WLAN_CLIENT + IPA_LAN_TO_LAN_MAX_LAN_CLIENT + IPACM_Iface::ipacmcfg->ipa_num_private_subnet;
-		num_v6_dummy_rule = IPV6_DEFAULT_FILTERTING_RULES + IPA_GUEST_AP_IPv6_FLT_RULE_ENTRIES + IPA_LAN_TO_LAN_MAX_WLAN_CLIENT + IPA_LAN_TO_LAN_MAX_LAN_CLIENT;
+		num_v4_dummy_rule = IPV4_DEFAULT_FILTERTING_RULES + IPA_LAN_TO_LAN_MAX_WLAN_CLIENT + IPA_LAN_TO_LAN_MAX_LAN_CLIENT + IPACM_Iface::ipacmcfg->ipa_num_private_subnet;
+		num_v6_dummy_rule = IPV6_DEFAULT_FILTERTING_RULES + IPA_LAN_TO_LAN_MAX_WLAN_CLIENT + IPA_LAN_TO_LAN_MAX_LAN_CLIENT;
 #endif
 
 		if(m_filtering.DeleteFilteringHdls(IPACM_Wlan::dummy_flt_rule_hdl_v4, IPA_IP_v4, num_v4_dummy_rule) == false)
@@ -3492,190 +3445,6 @@
 	return IPACM_SUCCESS;
 }
 
-int IPACM_Wlan::eth_bridge_add_wlan_guest_ap_flt_rule(ipa_ip_type iptype)
-{
-	if(rx_prop == NULL)
-	{
-		IPACMDBG_H("There is no rx_prop for iface %s, not able to add wlan guest ap filtering rule.\n", dev_name);
-		return IPACM_SUCCESS;
-	}
-	if(is_guest_ap == false)
-	{
-		IPACMDBG_H("This is not WLAN guest AP, do nothing.\n");
-		return IPACM_SUCCESS;
-	}
-	int len, i, offset, res = IPACM_SUCCESS;
-	struct ipa_flt_rule_mdfy flt_rule;
-	struct ipa_ioc_mdfy_flt_rule* pFilteringTable = NULL;
-	if(iptype == IPA_IP_v4)
-	{
-		if(IPACM_Wlan::dummy_flt_rule_hdl_v4 == NULL)
-		{
-			IPACMERR("Dummy ipv4 flt rule has not been installed.\n");
-			return IPACM_FAILURE;
-		}
-		IPACMDBG_H("Install guest ap filtering rule for IPv4 \n");
-		offset = IPV4_DEFAULT_FILTERTING_RULES;
-		len = sizeof(struct ipa_ioc_mdfy_flt_rule) + (IPACM_Iface::ipacmcfg->ipa_num_private_subnet) * sizeof(struct ipa_flt_rule_mdfy);
-		pFilteringTable = (struct ipa_ioc_mdfy_flt_rule*)malloc(len);
-		if (!pFilteringTable)
-		{
-			IPACMERR("Failed to allocate ipa_ioc_mdfy_flt_rule memory...\n");
-			return IPACM_FAILURE;
-		}
-		memset(pFilteringTable, 0, len);
-
-		pFilteringTable->commit = 1;
-		pFilteringTable->ip = iptype;
-		pFilteringTable->num_rules = (uint8_t)IPACM_Iface::ipacmcfg->ipa_num_private_subnet;
-
-		memset(&flt_rule, 0, sizeof(struct ipa_flt_rule_mdfy));
-		flt_rule.status = -1;
-
-		flt_rule.rule.retain_hdr = 1;
-		flt_rule.rule.to_uc = 0;
-		flt_rule.rule.action = IPA_PASS_TO_EXCEPTION;
-		flt_rule.rule.eq_attrib_type = 0;
-
-		memcpy(&flt_rule.rule.attrib, &rx_prop->rx[0].attrib, sizeof(flt_rule.rule.attrib));
-		flt_rule.rule.attrib.attrib_mask |= IPA_FLT_DST_ADDR;
-
-		for (i = 0; i < (IPACM_Iface::ipacmcfg->ipa_num_private_subnet); i++)
-		{
-			flt_rule.rule_hdl = IPACM_Wlan::dummy_flt_rule_hdl_v4[offset+i];
-			flt_rule.rule.attrib.u.v4.dst_addr_mask = IPACM_Iface::ipacmcfg->private_subnet_table[i].subnet_mask;
-			flt_rule.rule.attrib.u.v4.dst_addr = IPACM_Iface::ipacmcfg->private_subnet_table[i].subnet_addr;
-			memcpy(&(pFilteringTable->rules[i]), &flt_rule, sizeof(struct ipa_flt_rule_mdfy));
-		}
-
-		if (false == m_filtering.ModifyFilteringRule(pFilteringTable))
-		{
-			IPACMERR("Failed to modify wlan guest AP IPv4 filtering rules.\n");
-			res = IPACM_FAILURE;
-			goto fail;
-		}
-
-		/* copy filter rule hdls */
-		for (i = 0; i < IPACM_Iface::ipacmcfg->ipa_num_private_subnet; i++)
-		{
-			wlan_guest_ap_flt_rule_hdl_v4[i] = pFilteringTable->rules[i].rule_hdl;
-		}
-	}
-	else
-	{
-		eth_bridge_install_wlan_guest_ap_ipv6_flt_rule();
-	}
-fail:
-	if(pFilteringTable != NULL)
-	{
-		free(pFilteringTable);
-	}
-	return res;
-}
-
-int IPACM_Wlan::eth_bridge_install_wlan_guest_ap_ipv6_flt_rule()
-{
-	if(rx_prop == NULL)
-	{
-		IPACMDBG_H("There is no rx_prop for iface %s, not able to add wlan guest ap filtering rule.\n", dev_name);
-		return IPACM_SUCCESS;
-	}
-	if(is_guest_ap == false)
-	{
-		IPACMDBG_H("This is not WLAN guest AP, do nothing.\n");
-		return IPACM_SUCCESS;
-	}
-
-	int len, offset, res = IPACM_SUCCESS;
-	struct ipa_flt_rule_mdfy flt_rule;
-	struct ipa_ioc_mdfy_flt_rule* pFilteringTable = NULL;
-
-	if(IPACM_Wlan::dummy_flt_rule_hdl_v6 == NULL)
-	{
-		IPACMERR("Dummy ipv6 flt rule has not been installed.\n");
-		return IPACM_FAILURE;
-	}
-	offset = 0;
-	len = sizeof(struct ipa_ioc_mdfy_flt_rule) + sizeof(struct ipa_flt_rule_mdfy);
-	pFilteringTable = (struct ipa_ioc_mdfy_flt_rule*)malloc(len);
-	if (!pFilteringTable)
-	{
-		IPACMERR("Failed to allocate ipa_ioc_mdfy_flt_rule memory...\n");
-		return IPACM_FAILURE;
-	}
-	memset(pFilteringTable, 0, len);
-
-	pFilteringTable->commit = 1;
-	pFilteringTable->ip = IPA_IP_v6;
-	pFilteringTable->num_rules = 1;
-
-	memset(&flt_rule, 0, sizeof(struct ipa_flt_rule_mdfy));
-	flt_rule.status = -1;
-
-	flt_rule.rule.retain_hdr = 1;
-	flt_rule.rule.to_uc = 0;
-	flt_rule.rule.action = IPA_PASS_TO_EXCEPTION;
-	flt_rule.rule.eq_attrib_type = 0;
-
-	IPACMDBG_H("Install guest ap Link-local filtering rule for IPv6. \n");
-	memcpy(&flt_rule.rule.attrib, &rx_prop->rx[0].attrib, sizeof(flt_rule.rule.attrib));
-	flt_rule.rule.attrib.attrib_mask |= IPA_FLT_DST_ADDR;
-	flt_rule.rule.attrib.u.v6.dst_addr[0] = 0xFE800000;
-	flt_rule.rule.attrib.u.v6.dst_addr[1] = 0x0;
-	flt_rule.rule.attrib.u.v6.dst_addr[2] = 0x0;
-	flt_rule.rule.attrib.u.v6.dst_addr[3] = 0X0;
-	flt_rule.rule.attrib.u.v6.dst_addr_mask[0] = 0xFFC00000;
-	flt_rule.rule.attrib.u.v6.dst_addr_mask[1] = 0x0;
-	flt_rule.rule.attrib.u.v6.dst_addr_mask[2] = 0x0;
-	flt_rule.rule.attrib.u.v6.dst_addr_mask[3] = 0x0;
-
-	flt_rule.rule_hdl = IPACM_Wlan::dummy_flt_rule_hdl_v6[offset];
-	memcpy(&(pFilteringTable->rules[0]), &flt_rule, sizeof(struct ipa_flt_rule_mdfy));
-
-	if (false == m_filtering.ModifyFilteringRule(pFilteringTable))
-	{
-		IPACMERR("Failed to modify wlan guest AP IPv6 filtering rules.\n");
-		res = IPACM_FAILURE;
-		goto fail;
-	}
-	/* copy filter rule hdls */
-	wlan_guest_ap_flt_rule_hdl_v6[0] = pFilteringTable->rules[0].rule_hdl;
-
-	if (IPACM_Wan::wan_up_v6 == true)
-	{
-		IPACMDBG_H("Install guest ap global filtering rule for IPv6. \n");
-		memcpy(&flt_rule.rule.attrib, &rx_prop->rx[0].attrib, sizeof(flt_rule.rule.attrib));
-		flt_rule.rule.attrib.attrib_mask |= IPA_FLT_DST_ADDR;
-		flt_rule.rule.attrib.u.v6.dst_addr[0] = IPACM_Wan::backhaul_ipv6_prefix[0];
-		flt_rule.rule.attrib.u.v6.dst_addr[1] = IPACM_Wan::backhaul_ipv6_prefix[1];
-		flt_rule.rule.attrib.u.v6.dst_addr[2] = 0x0;
-		flt_rule.rule.attrib.u.v6.dst_addr[3] = 0x0;
-		flt_rule.rule.attrib.u.v6.dst_addr_mask[0] = 0xFFFFFFFF;
-		flt_rule.rule.attrib.u.v6.dst_addr_mask[1] = 0xFFFFFFFF;
-		flt_rule.rule.attrib.u.v6.dst_addr_mask[2] = 0x0;
-		flt_rule.rule.attrib.u.v6.dst_addr_mask[3] = 0x0;
-
-		flt_rule.rule_hdl = IPACM_Wlan::dummy_flt_rule_hdl_v6[offset+1];
-		memcpy(&(pFilteringTable->rules[0]), &flt_rule, sizeof(struct ipa_flt_rule_mdfy));
-
-		if (false == m_filtering.ModifyFilteringRule(pFilteringTable))
-		{
-			IPACMERR("Failed to modify wlan guest AP IPv6 filtering rules.\n");
-			res = IPACM_FAILURE;
-			goto fail;
-		}
-		/* copy filter rule hdls */
-		wlan_guest_ap_flt_rule_hdl_v6[1] = pFilteringTable->rules[0].rule_hdl;
-	}
-
-fail:
-	if(pFilteringTable != NULL)
-	{
-		free(pFilteringTable);
-	}
-	return res;
-}
-
 int IPACM_Wlan::eth_bridge_handle_dummy_wlan_client_flt_rule(ipa_ip_type iptype)
 {
 	int i, offset;
@@ -3683,7 +3452,7 @@
 	{
 		if(iptype == IPA_IP_v4)
 		{
-			offset = IPV4_DEFAULT_FILTERTING_RULES + IPACM_Iface::ipacmcfg->ipa_num_private_subnet;
+			offset = IPV4_DEFAULT_FILTERTING_RULES;
 			for(i=0; i<IPA_LAN_TO_LAN_MAX_WLAN_CLIENT; i++)
 			{
 				self_client_flt_rule_hdl_v4[i].rule_hdl = IPACM_Wlan::dummy_flt_rule_hdl_v4[offset+i];
@@ -3692,11 +3461,7 @@
 		}
 		else
 		{
-			/* Reserve 2 dummy rules for guest_ap_ipv6
-			   1st for Link-local meta-data based rule
-			   2nd for Global address meta-data based rule
-			*/
-			offset = IPA_GUEST_AP_IPv6_FLT_RULE_ENTRIES;
+			offset = 0;
 			for(i=0; i<IPA_LAN_TO_LAN_MAX_WLAN_CLIENT; i++)
 			{
 				self_client_flt_rule_hdl_v6[i].rule_hdl = IPACM_Wlan::dummy_flt_rule_hdl_v6[offset+i];
@@ -3715,7 +3480,7 @@
 	{
 		if(iptype == IPA_IP_v4)
 		{
-			offset = IPV4_DEFAULT_FILTERTING_RULES + IPACM_Iface::ipacmcfg->ipa_num_private_subnet + IPA_LAN_TO_LAN_MAX_WLAN_CLIENT;
+			offset = IPV4_DEFAULT_FILTERTING_RULES + IPA_LAN_TO_LAN_MAX_WLAN_CLIENT;
 			for(i=0; i<IPA_LAN_TO_LAN_MAX_LAN_CLIENT; i++)
 			{
 				lan_client_flt_rule_hdl_v4[i].rule_hdl = IPACM_Wlan::dummy_flt_rule_hdl_v4[offset+i];
@@ -3724,7 +3489,7 @@
 		}
 		else
 		{
-			offset = IPA_GUEST_AP_IPv6_FLT_RULE_ENTRIES + IPA_LAN_TO_LAN_MAX_WLAN_CLIENT;
+			offset = IPA_LAN_TO_LAN_MAX_WLAN_CLIENT;
 			for(i=0; i<IPA_LAN_TO_LAN_MAX_LAN_CLIENT; i++)
 			{
 				lan_client_flt_rule_hdl_v6[i].rule_hdl = IPACM_Wlan::dummy_flt_rule_hdl_v6[offset+i];