summaryrefslogtreecommitdiffstats
path: root/client_interface_impl.h
diff options
context:
space:
mode:
authorChristopher Wiley <wiley@google.com>2016-09-22 08:57:40 -0700
committerChristopher Wiley <wiley@google.com>2016-09-26 15:49:09 -0700
commit4fc3792b547087f9fd425393cd3159d2f74fa831 (patch)
tree0aff6ba5fec4fa9bd352f6ca71b9f98346cfb1c6 /client_interface_impl.h
parentced07e8491229d282adbf6c6443964e25c0a2dff (diff)
downloadplatform_system_connectivity_wificond-4fc3792b547087f9fd425393cd3159d2f74fa831.tar.gz
platform_system_connectivity_wificond-4fc3792b547087f9fd425393cd3159d2f74fa831.tar.bz2
platform_system_connectivity_wificond-4fc3792b547087f9fd425393cd3159d2f74fa831.zip
Always set interface down in object destruction
We would like to reason about our interfaces as being up when they are configured and ready for use, and down otherwise. This helps when switching modes. For example, when setting up a SoftAP, you can expect that the interface starts in a down state, and transitions to up when hostapd is ready for business. Note that we cannot do this after firmware reload, because this may cause driver de-initialization (see c#6 in b/31205821). Bug: 31337216 Test: Integration tests pass Change-Id: I03a71ea623e29ef9b023d97afc81cf836ebfb1ff
Diffstat (limited to 'client_interface_impl.h')
-rw-r--r--client_interface_impl.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/client_interface_impl.h b/client_interface_impl.h
index a73252c..efeccfe 100644
--- a/client_interface_impl.h
+++ b/client_interface_impl.h
@@ -21,6 +21,7 @@
#include <android-base/macros.h>
#include <utils/StrongPointer.h>
+#include <wifi_system/interface_tool.h>
#include <wifi_system/supplicant_manager.h>
#include "android/net/wifi/IClientInterface.h"
@@ -44,6 +45,7 @@ class ClientInterfaceImpl {
const std::string& interface_name,
uint32_t interface_index,
const std::vector<uint8_t>& interface_mac_addr,
+ android::wifi_system::InterfaceTool* if_tool,
android::wifi_system::SupplicantManager* supplicant_manager,
NetlinkUtils* netlink_utils,
ScanUtils* scan_utils);
@@ -68,6 +70,7 @@ class ClientInterfaceImpl {
const std::string interface_name_;
const uint32_t interface_index_;
const std::vector<uint8_t> interface_mac_addr_;
+ android::wifi_system::InterfaceTool* const if_tool_;
android::wifi_system::SupplicantManager* const supplicant_manager_;
NetlinkUtils* const netlink_utils_;
ScanUtils* const scan_utils_;