summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ipacm/src/Android.mk1
-rw-r--r--ipacm/src/IPACM_Wan.cpp25
-rw-r--r--ipacm/src/ipacm.rc34
-rw-r--r--ipacm/src/ipacm_vendor_propduct.mk6
4 files changed, 57 insertions, 9 deletions
diff --git a/ipacm/src/Android.mk b/ipacm/src/Android.mk
index ca303de..99e83cd 100644
--- a/ipacm/src/Android.mk
+++ b/ipacm/src/Android.mk
@@ -63,6 +63,7 @@ LOCAL_SRC_FILES := IPACM_Main.cpp \
IPACM_OffloadManager.cpp
LOCAL_MODULE := ipacm
+LOCAL_INIT_RC := ipacm.rc
LOCAL_CLANG := false
LOCAL_MODULE_TAGS := optional
diff --git a/ipacm/src/IPACM_Wan.cpp b/ipacm/src/IPACM_Wan.cpp
index be2c0a2..784fb0e 100644
--- a/ipacm/src/IPACM_Wan.cpp
+++ b/ipacm/src/IPACM_Wan.cpp
@@ -767,9 +767,9 @@ void IPACM_Wan::event_callback(ipa_cm_event_id event, void *param)
}
}
#ifdef FEATURE_IPA_ANDROID
-#ifdef FEATURE_IPACM_HAL
- post_wan_up_tether_evt(data->iptype, 0);
-#else
+#ifndef FEATURE_IPACM_HAL
+ /* Fixed CR 2438491 for HAL-android platform trgets.
+ Need to revisit for non-hal-android-platform targets if issue could be reproduced there as well */
/* using ipa_if_index, not netdev_index */
post_wan_up_tether_evt(data->iptype, iface_ipa_index_query(data->if_index_tether));
#endif
@@ -802,15 +802,14 @@ void IPACM_Wan::event_callback(ipa_cm_event_id event, void *param)
handle_route_add_evt(data->iptype);
}
}
+ }
#ifdef FEATURE_IPA_ANDROID
-#ifdef FEATURE_IPACM_HAL
- post_wan_up_tether_evt(data->iptype, 0);
-#else
- /* using ipa_if_index, not netdev_index */
- post_wan_up_tether_evt(data->iptype, iface_ipa_index_query(data->if_index_tether));
+#ifndef FEATURE_IPACM_HAL
+ /* using ipa_if_index, not netdev_index */
+ post_wan_up_tether_evt(data->iptype, iface_ipa_index_query(data->if_index_tether));
#endif
#endif
- }
+
}
else /* double check if current default iface is not itself */
{
@@ -1638,6 +1637,10 @@ int IPACM_Wan::handle_route_add_evt(ipa_ip_type iptype)
evt_data.event = IPA_HANDLE_WAN_UP;
evt_data.evt_data = (void *)wanup_data;
IPACM_EvtDispatcher::PostEvt(&evt_data);
+
+#ifdef FEATURE_IPACM_HAL
+ post_wan_up_tether_evt(IPA_IP_v4, 0);
+#endif
}
else
{
@@ -1677,6 +1680,10 @@ int IPACM_Wan::handle_route_add_evt(ipa_ip_type iptype)
evt_data.event = IPA_HANDLE_WAN_UP_V6;
evt_data.evt_data = (void *)wanup_data;
IPACM_EvtDispatcher::PostEvt(&evt_data);
+
+#ifdef FEATURE_IPACM_HAL
+ post_wan_up_tether_evt(IPA_IP_v6, 0);
+#endif
}
if(IPACM_Iface::ipacmcfg->GetIPAVer() >= IPA_HW_None && IPACM_Iface::ipacmcfg->GetIPAVer() < IPA_HW_v4_0)
{
diff --git a/ipacm/src/ipacm.rc b/ipacm/src/ipacm.rc
new file mode 100644
index 0000000..c1c876b
--- /dev/null
+++ b/ipacm/src/ipacm.rc
@@ -0,0 +1,34 @@
+# Copyright (c) 2019, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+service vendor.ipacm /system/vendor/bin/ipacm
+ class main
+ user radio
+ group radio inet
+
+on post-fs
+ start vendor.ipacm
diff --git a/ipacm/src/ipacm_vendor_propduct.mk b/ipacm/src/ipacm_vendor_propduct.mk
new file mode 100644
index 0000000..96c6116
--- /dev/null
+++ b/ipacm/src/ipacm_vendor_propduct.mk
@@ -0,0 +1,6 @@
+#IPACM_DATA
+IPACM_DATA += IPACM_cfg.xml
+IPACM_DATA += ipacm
+IPACM_DATA += ipacm.rc
+
+PRODUCT_PACKAGES += $(IPACM_DATA)