summaryrefslogtreecommitdiff
path: root/ipacm/src/IPACM_IfaceManager.cpp
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-08-01 03:14:34 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-08-01 03:14:34 +0000
commit18bf331751ad242be19c9d809f3e71660d6e4650 (patch)
treea7c6c2bea92b95bacfda363e736b0764b71006f1 /ipacm/src/IPACM_IfaceManager.cpp
parentf22064088b1538509e1f1f8cafd07ca3c13f00c9 (diff)
parent3f5615325989d5c739f08f75155f84908611c95e (diff)
downloadipacfg-mgr-18bf331751ad242be19c9d809f3e71660d6e4650.tar.gz
Snap for 4924178 from 3f5615325989d5c739f08f75155f84908611c95e to pi-qpr1-release
Change-Id: Id910996ff03bad8cfd39f2a2acd6415dc2be0f83
Diffstat (limited to 'ipacm/src/IPACM_IfaceManager.cpp')
-rw-r--r--ipacm/src/IPACM_IfaceManager.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/ipacm/src/IPACM_IfaceManager.cpp b/ipacm/src/IPACM_IfaceManager.cpp
index 85033a3..e7660b1 100644
--- a/ipacm/src/IPACM_IfaceManager.cpp
+++ b/ipacm/src/IPACM_IfaceManager.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
+Copyright (c) 2013-2018, 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
@@ -257,6 +257,12 @@ int IPACM_IfaceManager::create_iface_instance(ipacm_ifacemgr_data *param)
{
IPACMDBG_H("Creating Lan interface\n");
IPACM_Lan *lan = new IPACM_Lan(ipa_interface_index);
+ if (lan->rx_prop == NULL && lan->tx_prop == NULL)
+ {
+ /* close the netdev instance if IPA not support*/
+ lan->delete_iface();
+ return IPACM_FAILURE;
+ }
IPACM_EvtDispatcher::registr(IPA_ADDR_ADD_EVENT, lan);
//IPACM_EvtDispatcher::registr(IPA_ROUTE_ADD_EVENT, lan);
//IPACM_EvtDispatcher::registr(IPA_ROUTE_DEL_EVENT, lan);
@@ -365,6 +371,14 @@ int IPACM_IfaceManager::create_iface_instance(ipacm_ifacemgr_data *param)
{
IPACMDBG_H("Creating WLan interface\n");
IPACM_Wlan *wl = new IPACM_Wlan(ipa_interface_index);
+ if (wl->rx_prop == NULL && wl->tx_prop == NULL)
+ {
+ /* reset the AP-iface category to unknown */
+ IPACM_Iface::ipacmcfg->iface_table[ipa_interface_index].if_cat = UNKNOWN_IF;
+ /* close the netdev instance if IPA not support*/
+ wl->delete_iface();
+ return IPACM_FAILURE;
+ }
IPACM_EvtDispatcher::registr(IPA_ADDR_ADD_EVENT, wl);
IPACM_EvtDispatcher::registr(IPA_ROUTE_DEL_EVENT, wl);
IPACM_EvtDispatcher::registr(IPA_WLAN_CLIENT_ADD_EVENT, wl);
@@ -421,6 +435,14 @@ int IPACM_IfaceManager::create_iface_instance(ipacm_ifacemgr_data *param)
if(is_sta_mode == WLAN_WAN)
{
w = new IPACM_Wan(ipa_interface_index, is_sta_mode, param->mac_addr);
+ if (w->rx_prop == NULL && w->tx_prop == NULL)
+ {
+ /* reset the AP-iface category to unknown */
+ IPACM_Iface::ipacmcfg->iface_table[ipa_interface_index].if_cat = UNKNOWN_IF;
+ /* close the netdev instance if IPA not support*/
+ w->delete_iface();
+ return IPACM_FAILURE;
+ }
}
else
{