Skip to content

Commit

Permalink
markw: Update IPACM
Browse files Browse the repository at this point in the history
* Tag: LA.UM.6.6.r1-11200-89xx.0
  • Loading branch information
Hikari-no-Tenshi authored and Razziell committed Jun 7, 2019
1 parent b16f696 commit 6c0826c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
9 changes: 8 additions & 1 deletion data-ipa-cfg-mgr/ipacm/inc/IPACM_Wan.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
Copyright (c) 2013-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
Expand Down Expand Up @@ -225,6 +225,13 @@ class IPACM_Wan : public IPACM_Iface
return xlat_mux_id;
}

static void clearExtProp()
{
IPACM_Wan::is_ext_prop_set = false;
IPACM_Iface::ipacmcfg->DelExtProp(IPA_IP_v4);
IPACM_Iface::ipacmcfg->DelExtProp(IPA_IP_v6);
}

void event_callback(ipa_cm_event_id event,
void *data);

Expand Down
4 changes: 3 additions & 1 deletion data-ipa-cfg-mgr/ipacm/src/IPACM_Main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
Copyright (c) 2013-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
Expand Down Expand Up @@ -63,6 +63,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "IPACM_Neighbor.h"
#include "IPACM_IfaceManager.h"
#include "IPACM_Log.h"
#include "IPACM_Wan.h"

#include "IPACM_ConntrackListener.h"
#include "IPACM_ConntrackClient.h"
Expand Down Expand Up @@ -706,6 +707,7 @@ void* ipa_driver_msg_notifier(void *param)
continue;
case IPA_SSR_BEFORE_SHUTDOWN:
IPACMDBG_H("Received IPA_SSR_BEFORE_SHUTDOWN\n");
IPACM_Wan::clearExtProp();
OffloadMng = IPACM_OffloadManager::GetInstance();
if (OffloadMng->elrInstance == NULL) {
IPACMERR("OffloadMng->elrInstance is NULL, can't forward to framework!\n");
Expand Down
25 changes: 16 additions & 9 deletions data-ipa-cfg-mgr/ipacm/src/IPACM_Wan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -762,9 +762,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
Expand Down Expand Up @@ -797,15 +797,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 */
{
Expand Down Expand Up @@ -1625,6 +1624,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
{
Expand Down Expand Up @@ -1664,6 +1667,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
}

/* Add corresponding ipa_rm_resource_name of TX-endpoint up before IPV6 RT-rule set */
Expand Down

0 comments on commit 6c0826c

Please sign in to comment.