diff options
author | Ningyuan Wang | 2017-03-13 11:41:29 -0500 |
---|---|---|
committer | Ningyuan Wang | 2017-03-13 16:42:47 -0500 |
commit | 075145ad1dcb8058222196becaa884b961dfced2 (patch) | |
tree | d32e750c521c9581b5064a3d2df785bf4add53dc /server.h | |
parent | 682ce488763cb20c92a846fbcdd28f65ced0ca95 (diff) | |
download | system-connectivity-wificond-075145ad1dcb8058222196becaa884b961dfced2.tar.gz system-connectivity-wificond-075145ad1dcb8058222196becaa884b961dfced2.tar.xz system-connectivity-wificond-075145ad1dcb8058222196becaa884b961dfced2.zip |
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.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -40,6 +40,8 @@ class NL80211Packet; | |||
40 | class NetlinkUtils; | 40 | class NetlinkUtils; |
41 | class ScanUtils; | 41 | class ScanUtils; |
42 | 42 | ||
43 | struct InterfaceInfo; | ||
44 | |||
43 | class Server : public android::net::wifi::BnWificond { | 45 | class Server : public android::net::wifi::BnWificond { |
44 | public: | 46 | public: |
45 | Server(std::unique_ptr<wifi_system::InterfaceTool> if_tool, | 47 | Server(std::unique_ptr<wifi_system::InterfaceTool> if_tool, |
@@ -91,9 +93,7 @@ class Server : public android::net::wifi::BnWificond { | |||
91 | // interface on behalf of createApInterace(), it is Hostapd that configure | 93 | // interface on behalf of createApInterace(), it is Hostapd that configure |
92 | // the interface to Ap mode later. | 94 | // the interface to Ap mode later. |
93 | // Returns true on success, false otherwise. | 95 | // Returns true on success, false otherwise. |
94 | bool SetupInterface(std::string* interface_name, | 96 | bool SetupInterface(InterfaceInfo* interface); |
95 | uint32_t* interface_index, | ||
96 | std::vector<uint8_t>* interface_mac_addr); | ||
97 | bool RefreshWiphyIndex(); | 97 | bool RefreshWiphyIndex(); |
98 | void LogSupportedBands(); | 98 | void LogSupportedBands(); |
99 | void OnRegDomainChanged(std::string& country_code); | 99 | void OnRegDomainChanged(std::string& country_code); |
@@ -105,6 +105,7 @@ class Server : public android::net::wifi::BnWificond { | |||
105 | android::sp<android::net::wifi::IClientInterface> network_interface); | 105 | android::sp<android::net::wifi::IClientInterface> network_interface); |
106 | void BroadcastApInterfaceTornDown( | 106 | void BroadcastApInterfaceTornDown( |
107 | android::sp<android::net::wifi::IApInterface> network_interface); | 107 | android::sp<android::net::wifi::IApInterface> network_interface); |
108 | void MarkDownAllInterfaces(); | ||
108 | 109 | ||
109 | const std::unique_ptr<wifi_system::InterfaceTool> if_tool_; | 110 | const std::unique_ptr<wifi_system::InterfaceTool> if_tool_; |
110 | const std::unique_ptr<wifi_system::SupplicantManager> supplicant_manager_; | 111 | const std::unique_ptr<wifi_system::SupplicantManager> supplicant_manager_; |