summaryrefslogtreecommitdiff
path: root/server.h
diff options
context:
space:
mode:
authorNingyuan Wang <nywang@google.com>2017-03-13 09:41:29 -0700
committerNingyuan Wang <nywang@google.com>2017-03-13 14:42:47 -0700
commit075145ad1dcb8058222196becaa884b961dfced2 (patch)
treed32e750c521c9581b5064a3d2df785bf4add53dc /server.h
parent682ce488763cb20c92a846fbcdd28f65ced0ca95 (diff)
downloadwificond-075145ad1dcb8058222196becaa884b961dfced2.tar.gz
Cleanup p2p0 interface upon tearDownInterfaces().
This replaces NetlinkUtils::GetInterfaceInfo with NetlinkUtils:: GetInterfaces. Instead of picking client interface inside NetlinkUtils, this change allows wificond main object(server) to dump all the interfaces from kernel. Being able to dump all interfaces, wificond main object therefore can mark down all the interfaces upon cleanup. Bug: 36139978 Bug: 35949498 Test: compile, unit tests, manual test, integration test Change-Id: I66dd4f8c3b26087dd182591763de8fa4da29f1d6
Diffstat (limited to 'server.h')
-rw-r--r--server.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/server.h b/server.h
index 5ceca25..a0f5b2c 100644
--- a/server.h
+++ b/server.h
@@ -40,6 +40,8 @@ class NL80211Packet;
class NetlinkUtils;
class ScanUtils;
+struct InterfaceInfo;
+
class Server : public android::net::wifi::BnWificond {
public:
Server(std::unique_ptr<wifi_system::InterfaceTool> if_tool,
@@ -91,9 +93,7 @@ class Server : public android::net::wifi::BnWificond {
// interface on behalf of createApInterace(), it is Hostapd that configure
// the interface to Ap mode later.
// Returns true on success, false otherwise.
- bool SetupInterface(std::string* interface_name,
- uint32_t* interface_index,
- std::vector<uint8_t>* interface_mac_addr);
+ bool SetupInterface(InterfaceInfo* interface);
bool RefreshWiphyIndex();
void LogSupportedBands();
void OnRegDomainChanged(std::string& country_code);
@@ -105,6 +105,7 @@ class Server : public android::net::wifi::BnWificond {
android::sp<android::net::wifi::IClientInterface> network_interface);
void BroadcastApInterfaceTornDown(
android::sp<android::net::wifi::IApInterface> network_interface);
+ void MarkDownAllInterfaces();
const std::unique_ptr<wifi_system::InterfaceTool> if_tool_;
const std::unique_ptr<wifi_system::SupplicantManager> supplicant_manager_;