diff options
author | Skylar Chang <chiaweic@codeaurora.org> | 2015-04-03 09:07:56 -0700 |
---|---|---|
committer | Skylar Chang <chiaweic@codeaurora.org> | 2015-04-29 11:11:01 -0700 |
commit | e25e7867a1e05b59fa8046e1f522851b4621b554 (patch) | |
tree | 1769e85a2c13279f2630f9ea49ffe21b5ac642ab /ipacm/src/IPACM_Wlan.cpp | |
parent | 53251c6f1aff7c4343ee2baa4cfe687fa6635ea6 (diff) | |
download | ipacfg-mgr-e25e7867a1e05b59fa8046e1f522851b4621b554.tar.gz |
IPACM: Add initial support for HW path between CPE and USB clients
This change is for supporting HW path between CPE and USB clients.
LAN-LAN routing table is used for traffic between USB and CPE clients.
Filtering, routing table are installed only both CPE and USB interfaces
are up. LAN-WLAN routing table is used for traffic between LAN(USB, CPE),
and WLAN clients.
Change-Id: I5bc28c31a6931dccd6348f7cb8f42e862659e848
Diffstat (limited to 'ipacm/src/IPACM_Wlan.cpp')
-rw-r--r-- | ipacm/src/IPACM_Wlan.cpp | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/ipacm/src/IPACM_Wlan.cpp b/ipacm/src/IPACM_Wlan.cpp index fa3b6af..7256a88 100644 --- a/ipacm/src/IPACM_Wlan.cpp +++ b/ipacm/src/IPACM_Wlan.cpp @@ -734,6 +734,11 @@ void IPACM_Wlan::event_callback(ipa_cm_event_id event, void *param) IPACMDBG_H("The event was not sent by LAN interface, ignore.\n"); return; } + if (IPACM_Lan::is_usb_up == true && IPACM_Lan::is_cpe_up == true) + { + IPACMDBG_H("USB and CPE both are up, lan-wlan routing rules are already installed. \n"); + return; + } for(i=0; i<IPACM_Lan::num_wlan_client; i++) { if(IPACM_Lan::eth_bridge_wlan_client[i].ipa_if_num == ipa_if_num) @@ -760,7 +765,11 @@ void IPACM_Wlan::event_callback(ipa_cm_event_id event, void *param) IPACMDBG_H("The event was not sent by LAN interface, ignore.\n"); return; } - + if (IPACM_Lan::is_usb_up == true || IPACM_Lan::is_cpe_up == true) + { + IPACMDBG_H("USB or CPE is still up, so keep lan-wlan routing rule. \n"); + return; + } for(i=0; i<IPACM_Lan::num_wlan_client; i++) { if(IPACM_Lan::eth_bridge_wlan_client[i].ipa_if_num == ipa_if_num) @@ -2606,13 +2615,21 @@ fail: free(iface_query); } #ifdef FEATURE_ETH_BRIDGE_LE - if(eth_bridge_lan_client_rt_info_v4 != NULL) + if(eth_bridge_lan_client_rt_from_lan_info_v4 != NULL) + { + free(eth_bridge_lan_client_rt_from_lan_info_v4); + } + if(eth_bridge_lan_client_rt_from_lan_info_v6 != NULL) + { + free(eth_bridge_lan_client_rt_from_lan_info_v6); + } + if(eth_bridge_lan_client_rt_from_wlan_info_v4 != NULL) { - free(eth_bridge_lan_client_rt_info_v4); + free(eth_bridge_lan_client_rt_from_wlan_info_v4); } - if(eth_bridge_lan_client_rt_info_v6 != NULL) + if(eth_bridge_lan_client_rt_from_wlan_info_v6 != NULL) { - free(eth_bridge_lan_client_rt_info_v6); + free(eth_bridge_lan_client_rt_from_wlan_info_v6); } if(eth_bridge_wlan_client_rt_from_lan_info_v4 != NULL) { |