From 5643e304811ca8ca7ec053bb0eda9c5c112ef745 Mon Sep 17 00:00:00 2001 From: Vitaly Bukhovsky Date: Mon, 4 Nov 2019 12:51:57 +0200 Subject: [PATCH] agent: ap_manager: adjustments due to bwl interface changes Minor code adjustments due to changes in the BWL interfaces. Signed-off-by: Vitaly Bukhovsky --- agent/src/beerocks/slave/ap_manager_thread.cpp | 6 +++++- agent/src/beerocks/slave/ap_manager_thread.h | 1 + agent/src/beerocks/slave/ap_wlan_hal_loader.cpp | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/agent/src/beerocks/slave/ap_manager_thread.cpp b/agent/src/beerocks/slave/ap_manager_thread.cpp index 2e8e8a2a33..890398e740 100644 --- a/agent/src/beerocks/slave/ap_manager_thread.cpp +++ b/agent/src/beerocks/slave/ap_manager_thread.cpp @@ -179,9 +179,13 @@ void ap_manager_thread::ap_manager_config(ap_manager_conf_t &conf) using namespace std::placeholders; // for `_1` + bwl::hal_conf_t hal_conf; + hal_conf.ap_acs_enabled = acs_enabled; + hal_conf.ap_passive_mode_enabled = conf.passive_mode_enabled; + // Create a new AP HAL instance ap_wlan_hal = std::shared_ptr( - ap_wlan_hal_create(conf.hostap_iface, acs_enabled, + ap_wlan_hal_create(conf.hostap_iface, hal_conf, std::bind(&ap_manager_thread::hal_event_handler, this, _1)), [](bwl::ap_wlan_hal *obj) { if (obj) diff --git a/agent/src/beerocks/slave/ap_manager_thread.h b/agent/src/beerocks/slave/ap_manager_thread.h index d31eeb5948..b361898192 100644 --- a/agent/src/beerocks/slave/ap_manager_thread.h +++ b/agent/src/beerocks/slave/ap_manager_thread.h @@ -28,6 +28,7 @@ class ap_manager_thread : public beerocks::socket_thread { struct ap_manager_conf_t { std::string hostap_iface; beerocks::eIfaceType hostap_iface_type; + bool passive_mode_enabled; int channel; bool iface_filter_low; sMacAddr *backhaul_vaps_bssid; // array diff --git a/agent/src/beerocks/slave/ap_wlan_hal_loader.cpp b/agent/src/beerocks/slave/ap_wlan_hal_loader.cpp index 630abd00b1..b7c48ae1b1 100644 --- a/agent/src/beerocks/slave/ap_wlan_hal_loader.cpp +++ b/agent/src/beerocks/slave/ap_wlan_hal_loader.cpp @@ -37,7 +37,7 @@ static ap_wlan_hal_destroy_t s_obj_destroy = nullptr; extern "C" { -bwl::ap_wlan_hal *ap_wlan_hal_create(std::string iface_name, bool acs_enabled, +bwl::ap_wlan_hal *ap_wlan_hal_create(std::string iface_name, bwl::hal_conf_t hal_conf, bwl::base_wlan_hal::hal_event_cb_t cb) { // Load the shared library on demand @@ -76,7 +76,7 @@ bwl::ap_wlan_hal *ap_wlan_hal_create(std::string iface_name, bool acs_enabled, } // Create and return a new instance of the HAL class - return s_obj_create(iface_name, acs_enabled, cb); + return s_obj_create(iface_name, hal_conf, cb); } void ap_wlan_hal_destroy(bwl::ap_wlan_hal *obj)