diff options
author | Roshan Pius | 2017-03-01 19:13:40 -0600 |
---|---|---|
committer | Roshan Pius | 2017-03-02 11:49:34 -0600 |
commit | b5c68afba4ae8375e35e9cc6cd6707837de6b7e6 (patch) | |
tree | c9270eb297f92ad3ff6dfb770f51a3a8f7fb144c /server.h | |
parent | 58271c3933d3ecf01c9ff79fa77e48ec5be90bb9 (diff) | |
download | system-connectivity-wificond-b5c68afba4ae8375e35e9cc6cd6707837de6b7e6.tar.gz system-connectivity-wificond-b5c68afba4ae8375e35e9cc6cd6707837de6b7e6.tar.xz system-connectivity-wificond-b5c68afba4ae8375e35e9cc6cd6707837de6b7e6.zip |
wificond: Use Vendor HAL for mode change
Also,
Removed the usage of DriverTool & HalTool from wificond.
Bug: 35765841
Test: Will send for integration tests.
Change-Id: Ie029816bec5b168e34b3b18892b9da82285c66c0
Diffstat (limited to 'server.h')
-rw-r--r-- | server.h | 25 |
1 files changed, 8 insertions, 17 deletions
@@ -22,8 +22,6 @@ | |||
22 | #include <vector> | 22 | #include <vector> |
23 | 23 | ||
24 | #include <android-base/macros.h> | 24 | #include <android-base/macros.h> |
25 | #include <wifi_hal/driver_tool.h> | ||
26 | #include <wifi_system/hal_tool.h> | ||
27 | #include <wifi_system/interface_tool.h> | 25 | #include <wifi_system/interface_tool.h> |
28 | 26 | ||
29 | #include "android/net/wifi/BnWificond.h" | 27 | #include "android/net/wifi/BnWificond.h" |
@@ -44,9 +42,7 @@ class ScanUtils; | |||
44 | 42 | ||
45 | class Server : public android::net::wifi::BnWificond { | 43 | class Server : public android::net::wifi::BnWificond { |
46 | public: | 44 | public: |
47 | Server(std::unique_ptr<wifi_system::HalTool> hal_tool, | 45 | Server(std::unique_ptr<wifi_system::InterfaceTool> if_tool, |
48 | std::unique_ptr<wifi_system::InterfaceTool> if_tool, | ||
49 | std::unique_ptr<wifi_hal::DriverTool> driver_tool, | ||
50 | std::unique_ptr<wifi_system::SupplicantManager> supplicant_man, | 46 | std::unique_ptr<wifi_system::SupplicantManager> supplicant_man, |
51 | std::unique_ptr<wifi_system::HostapdManager> hostapd_man, | 47 | std::unique_ptr<wifi_system::HostapdManager> hostapd_man, |
52 | NetlinkUtils* netlink_utils, | 48 | NetlinkUtils* netlink_utils, |
@@ -90,17 +86,14 @@ class Server : public android::net::wifi::BnWificond { | |||
90 | void CleanUpSystemState(); | 86 | void CleanUpSystemState(); |
91 | 87 | ||
92 | private: | 88 | private: |
93 | // Does the actual work of setting up an interface for a particular mode. | 89 | // Request interface information from kernel and setup local interface object. |
94 | // | 90 | // This assumes that interface should be in STATION mode. Even if we setup |
95 | // |mode| is one of WIFI_GET_FW_PATH_* defined in hardware_legacy/wifi.h. | 91 | // interface on behalf of createApInterace(), it is Hostapd that configure |
96 | // |interface_name| is a pointer to a string to store the name of Linux | 92 | // the interface to Ap mode later. |
97 | // network interface that has been setup. | ||
98 | // | ||
99 | // Returns true on success, false otherwise. | 93 | // Returns true on success, false otherwise. |
100 | bool SetupInterfaceForMode(int mode, | 94 | bool SetupInterface(std::string* interface_name, |
101 | std::string* interface_name, | 95 | uint32_t* interface_index, |
102 | uint32_t* interface_index, | 96 | std::vector<uint8_t>* interface_mac_addr); |
103 | std::vector<uint8_t>* interface_mac_addr); | ||
104 | bool RefreshWiphyIndex(); | 97 | bool RefreshWiphyIndex(); |
105 | void LogSupportedBands(); | 98 | void LogSupportedBands(); |
106 | void OnRegDomainChanged(std::string& country_code); | 99 | void OnRegDomainChanged(std::string& country_code); |
@@ -113,9 +106,7 @@ class Server : public android::net::wifi::BnWificond { | |||
113 | void BroadcastApInterfaceTornDown( | 106 | void BroadcastApInterfaceTornDown( |
114 | android::sp<android::net::wifi::IApInterface> network_interface); | 107 | android::sp<android::net::wifi::IApInterface> network_interface); |
115 | 108 | ||
116 | const std::unique_ptr<wifi_system::HalTool> hal_tool_; | ||
117 | const std::unique_ptr<wifi_system::InterfaceTool> if_tool_; | 109 | const std::unique_ptr<wifi_system::InterfaceTool> if_tool_; |
118 | const std::unique_ptr<wifi_hal::DriverTool> driver_tool_; | ||
119 | const std::unique_ptr<wifi_system::SupplicantManager> supplicant_manager_; | 110 | const std::unique_ptr<wifi_system::SupplicantManager> supplicant_manager_; |
120 | const std::unique_ptr<wifi_system::HostapdManager> hostapd_manager_; | 111 | const std::unique_ptr<wifi_system::HostapdManager> hostapd_manager_; |
121 | NetlinkUtils* const netlink_utils_; | 112 | NetlinkUtils* const netlink_utils_; |