summaryrefslogtreecommitdiffstats
path: root/server.h
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2020-09-08 16:57:18 -0700
committerXin Li <delphij@google.com>2020-09-08 16:57:18 -0700
commiteaf7c4998d15c61360bdcd716fb02b33acd8b526 (patch)
tree7535ac3f76cce213db2f66501107c5e68c4830e3 /server.h
parent0bcc0e4488989dad285c7664b4cdaa6eaad666d4 (diff)
parent7e90494ad7cd8b2a5f52781a636ae34af1904c97 (diff)
downloadplatform_system_connectivity_wificond-master.tar.gz
platform_system_connectivity_wificond-master.tar.bz2
platform_system_connectivity_wificond-master.zip
Merge Android RHEADmaster
Bug: 168057903 Merged-In: I3b0a326c6381091e8721811fb5ea352e6af1031f Change-Id: Id8a690a46c023b26372220ab8878b86b2b881eeb
Diffstat (limited to 'server.h')
-rw-r--r--server.h36
1 files changed, 22 insertions, 14 deletions
diff --git a/server.h b/server.h
index a48ff20..8477671 100644
--- a/server.h
+++ b/server.h
@@ -24,10 +24,10 @@
#include <android-base/macros.h>
#include <wifi_system/interface_tool.h>
-#include "android/net/wifi/BnWificond.h"
-#include "android/net/wifi/IApInterface.h"
-#include "android/net/wifi/IClientInterface.h"
-#include "android/net/wifi/IInterfaceEventCallback.h"
+#include "android/net/wifi/nl80211/BnWificond.h"
+#include "android/net/wifi/nl80211/IApInterface.h"
+#include "android/net/wifi/nl80211/IClientInterface.h"
+#include "android/net/wifi/nl80211/IInterfaceEventCallback.h"
#include "wificond/ap_interface_impl.h"
#include "wificond/client_interface_impl.h"
@@ -41,7 +41,7 @@ class ScanUtils;
struct InterfaceInfo;
-class Server : public android::net::wifi::BnWificond {
+class Server : public android::net::wifi::nl80211::BnWificond {
public:
Server(std::unique_ptr<wifi_system::InterfaceTool> if_tool,
NetlinkUtils* netlink_utils,
@@ -49,10 +49,10 @@ class Server : public android::net::wifi::BnWificond {
~Server() override = default;
android::binder::Status RegisterCallback(
- const android::sp<android::net::wifi::IInterfaceEventCallback>&
+ const android::sp<android::net::wifi::nl80211::IInterfaceEventCallback>&
callback) override;
android::binder::Status UnregisterCallback(
- const android::sp<android::net::wifi::IInterfaceEventCallback>&
+ const android::sp<android::net::wifi::nl80211::IInterfaceEventCallback>&
callback) override;
// Returns a vector of available frequencies for 2.4GHz channels.
android::binder::Status getAvailable2gChannels(
@@ -63,15 +63,18 @@ class Server : public android::net::wifi::BnWificond {
// Returns a vector of available frequencies for DFS channels.
android::binder::Status getAvailableDFSChannels(
::std::optional<::std::vector<int32_t>>* out_frequencies) override;
+ // Returns a vector of available frequencies for 6GHz channels.
+ android::binder::Status getAvailable6gChannels(
+ ::std::optional<::std::vector<int32_t>>* out_frequencies) override;
android::binder::Status createApInterface(
const std::string& iface_name,
- android::sp<android::net::wifi::IApInterface>*
+ android::sp<android::net::wifi::nl80211::IApInterface>*
created_interface) override;
android::binder::Status createClientInterface(
const std::string& iface_name,
- android::sp<android::net::wifi::IClientInterface>*
+ android::sp<android::net::wifi::nl80211::IClientInterface>*
created_interface) override;
android::binder::Status tearDownApInterface(
@@ -90,6 +93,11 @@ class Server : public android::net::wifi::BnWificond {
std::vector<android::sp<android::IBinder>>* out_ap_ifs) override;
status_t dump(int fd, const Vector<String16>& args) override;
+ // Returns device wiphy capabilities for an interface
+ android::binder::Status getDeviceWiphyCapabilities(
+ const std::string& iface_name,
+ ::std::optional<net::wifi::nl80211::DeviceWiphyCapabilities>* capabilities) override;
+
private:
// Request interface information from kernel and setup local interface object.
// This assumes that interface should be in STATION mode. Even if we setup
@@ -101,13 +109,13 @@ class Server : public android::net::wifi::BnWificond {
void LogSupportedBands();
void OnRegDomainChanged(std::string& country_code);
void BroadcastClientInterfaceReady(
- android::sp<android::net::wifi::IClientInterface> network_interface);
+ android::sp<android::net::wifi::nl80211::IClientInterface> network_interface);
void BroadcastApInterfaceReady(
- android::sp<android::net::wifi::IApInterface> network_interface);
+ android::sp<android::net::wifi::nl80211::IApInterface> network_interface);
void BroadcastClientInterfaceTornDown(
- android::sp<android::net::wifi::IClientInterface> network_interface);
+ android::sp<android::net::wifi::nl80211::IClientInterface> network_interface);
void BroadcastApInterfaceTornDown(
- android::sp<android::net::wifi::IApInterface> network_interface);
+ android::sp<android::net::wifi::nl80211::IApInterface> network_interface);
void MarkDownAllInterfaces();
const std::unique_ptr<wifi_system::InterfaceTool> if_tool_;
@@ -117,7 +125,7 @@ class Server : public android::net::wifi::BnWificond {
uint32_t wiphy_index_;
std::map<std::string, std::unique_ptr<ApInterfaceImpl>> ap_interfaces_;
std::map<std::string, std::unique_ptr<ClientInterfaceImpl>> client_interfaces_;
- std::vector<android::sp<android::net::wifi::IInterfaceEventCallback>>
+ std::vector<android::sp<android::net::wifi::nl80211::IInterfaceEventCallback>>
interface_event_callbacks_;
// Cached interface list from kernel.