Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Make agents wait for dev_set_config/WPS PBC before master discovery #1572

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1ec5ab4
agent: Move front radio configuration to AgentDB
orenvor Aug 4, 2020
a90ff11
agent: Move back radio configuration to AgentDB
orenvor Aug 4, 2020
e0f140c
agent: Move mem_only_psk configuration to AgentDB
orenvor Aug 5, 2020
9684b1c
agent: Move backhaul_max_vaps configuration to AgentDB
orenvor Aug 6, 2020
c6e86bf
agent: Move backhaul_network_enabled configuration to AgentDB
orenvor Aug 6, 2020
7e31c72
agent: Move backhaul_preferred_radio_band configuration to AgentDB
orenvor Aug 6, 2020
e4b3863
agent: Move operating_mode configuration to AgentDB
orenvor Aug 6, 2020
9a2d18a
agent: Move management_mode configuration to AgentDB
orenvor Aug 6, 2020
b5eff11
agent: Move certification_mode configuration to AgentDB
orenvor Aug 6, 2020
00e80bc
agent: Move stop_on_failure_attempts configuration to AgentDB
orenvor Aug 6, 2020
16907ff
agent: Move client_band_steering_enabled configuration to AgentDB
orenvor Aug 6, 2020
f479475
agent: Move client_optimal_path_roaming_enabled configuration to AgentDB
orenvor Aug 6, 2020
50c0a7f
agent: Move dfs_reentry_enabled configuration to AgentDB
orenvor Aug 6, 2020
b12b1dd
agent: Move client_optimal_path_prefer_signal_strength to AgentDB
orenvor Aug 6, 2020
0254f28
agent: Move client_11k_roaming_enabled configuration to AgentDB
orenvor Aug 6, 2020
cd995b3
agent: Move load_balancing_enabled configuration to AgentDB
orenvor Aug 6, 2020
869767a
agent: Move service_fairness_enabled configuration to AgentDB
orenvor Aug 6, 2020
0134cb2
agent: Move rdkb_extensions_enabled configuration to AgentDB
orenvor Aug 6, 2020
5881aa0
agent: remove unused onboarding configuration
orenvor Aug 10, 2020
dde1284
tlvf: beerocks_message::sPlatformSettings remove unused settings
orenvor Aug 9, 2020
ccac7e9
agent: Remove "platform_settings" local variable from son_slave_thread
orenvor Aug 11, 2020
12ca153
agent: Move wlan_settings configuration to AgentDB
orenvor Aug 11, 2020
a9638cc
fixup! agent: Move wlan_settings configuration to AgentDB
orenvor Aug 12, 2020
e355119
tlvf: PLATFORM_SON_SLAVE_REGISTER_RESPONSE remove unused fields
orenvor Aug 12, 2020
9f3ce07
test_flows.py: add timeouts to make tests pass
vitalii-komisarenko Aug 10, 2020
5610ca4
test_gw_repeater: disable operational test for repeaters
vitalii-komisarenko Aug 10, 2020
fb61391
test_flows: send dev_set_config to repeaters before tests
vitalii-komisarenko Aug 10, 2020
de689cf
agent: backhaul_manager: wait for dev_set_config in certification
vitalii-komisarenko Jul 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
agent: Move wlan_settings configuration to AgentDB
Move "wlan_settings" configuration from son_slave_thread local variable
to the AgentDB.

Currently son_slave receive "wlan_settings" from platform_manager
using "PLATFORM_SON_SLAVE_REGISTER_REQUEST/RESPONSE" messages,
and save the settings in a local variable.

This transfer will be replaced by the use of agent_db to pass and
store "wlan_settings".

Removing of "sWlanSettings" from the tlvf will take place on
future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
  • Loading branch information
orenvor authored and vitalii-komisarenko committed Aug 13, 2020
commit 12ca153691a7a45f857b28a77180aeffaa9bc534
6 changes: 6 additions & 0 deletions agent/src/beerocks/slave/agent_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ class AgentDB {
uint8_t load_balancing_enabled;
uint8_t service_fairness_enabled;
uint8_t rdkb_extensions_enabled;

struct sWlanSettings {
uint8_t band_enabled;
uint8_t channel;
} wlan_settings;

} device_conf;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ static beerocks::eFreqType bpl_band_to_freq_type(int bpl_band)
}

static bool fill_platform_settings(
std::string iface_name,
std::shared_ptr<beerocks_message::cACTION_PLATFORM_SON_SLAVE_REGISTER_RESPONSE> msg,
main_thread::platform_common_conf_t &platform_common_conf,
std::string iface_name, main_thread::platform_common_conf_t &platform_common_conf,
std::unordered_map<std::string, std::shared_ptr<beerocks_message::sWlanSettings>>
&iface_wlan_params_map,
Socket *sd)
Expand Down Expand Up @@ -103,12 +101,13 @@ static bool fill_platform_settings(
return false;
}
/* update message */
msg->wlan_settings().band_enabled = params.enabled;
msg->wlan_settings().channel = params.channel;
db->device_conf.wlan_settings.band_enabled = params.enabled;
db->device_conf.wlan_settings.channel = params.channel;

LOG(DEBUG) << "wlan settings:"
<< " band_enabled=" << string_utils::bool_str(msg->wlan_settings().band_enabled)
<< " channel=" << int(msg->wlan_settings().channel);
<< " band_enabled="
<< string_utils::bool_str(db->device_conf.wlan_settings.band_enabled)
<< " channel=" << int(db->device_conf.wlan_settings.channel);

// initialize wlan params cache
//erase interface cache from map if exists
Expand Down Expand Up @@ -223,7 +222,7 @@ static bool fill_platform_settings(
LOG(DEBUG) << "client_optimal_path_roaming_prefer_signal_strength_enabled: "
<< (unsigned)
db->device_conf.client_optimal_path_roaming_prefer_signal_strength_enabled;
LOG(DEBUG) << "band_enabled: " << (unsigned)msg->wlan_settings().band_enabled;
LOG(DEBUG) << "band_enabled: " << (unsigned)db->device_conf.wlan_settings.band_enabled;
LOG(DEBUG) << "local_gw: " << db->device_conf.local_gw;
LOG(DEBUG) << "local_controller: " << db->device_conf.local_controller;
LOG(DEBUG) << "dfs_reentry_enabled: " << (unsigned)db->device_conf.dfs_reentry_enabled;
Expand Down Expand Up @@ -649,7 +648,7 @@ bool main_thread::handle_cmdu(Socket *sd, ieee1905_1::CmduMessageRx &cmdu_rx)
do {
LOG(TRACE) << "Trying to read settings of iface:" << strIfaceName
<< ", attempt=" << int(retry_cnt);
if (fill_platform_settings(strIfaceName, register_response, platform_common_conf,
if (fill_platform_settings(strIfaceName, platform_common_conf,
bpl_iface_wlan_params_map, sd)) {
register_response->valid() = 1;
} else {
Expand Down
18 changes: 11 additions & 7 deletions agent/src/beerocks/slave/son_slave_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1320,8 +1320,6 @@ bool slave_thread::handle_cmdu_platform_manager_message(
return true;
}

wlan_settings = response->wlan_settings();

auto db = AgentDB::get();

/**
Expand Down Expand Up @@ -1380,7 +1378,9 @@ bool slave_thread::handle_cmdu_platform_manager_message(
}

// slave only reacts to band_enabled change
if (wlan_settings.band_enabled != notification->wlan_settings().band_enabled) {
auto db = AgentDB::get();
if (db->device_conf.wlan_settings.band_enabled !=
notification->wlan_settings().band_enabled) {
LOG(DEBUG) << "band_enabled changed - performing slave_reset()";
slave_reset();
}
Expand Down Expand Up @@ -1502,7 +1502,8 @@ bool slave_thread::handle_cmdu_ap_manager_message(Socket *sd,
return false;
}

config_msg->channel() = wlan_settings.channel;
auto db = AgentDB::get();
config_msg->channel() = db->device_conf.wlan_settings.channel;

message_com::send_cmdu(ap_manager_socket, cmdu_tx);

Expand Down Expand Up @@ -3006,7 +3007,7 @@ bool slave_thread::slave_fsm(bool &call_slave_select)

auto db = AgentDB::get();
LOG(DEBUG) << "onboarding: " << int(0);
if (!wlan_settings.band_enabled) {
if (!db->device_conf.wlan_settings.band_enabled) {
LOG(DEBUG) << "wlan_settings.band_enabled=false";
LOG(TRACE) << "goto STATE_BACKHAUL_ENABLE";
slave_state = STATE_BACKHAUL_ENABLE;
Expand Down Expand Up @@ -3177,7 +3178,7 @@ bool slave_thread::slave_fsm(bool &call_slave_select)
master_socket->setPeerMac(backhaul_params.controller_bridge_mac);

auto db = AgentDB::get();
if (!wlan_settings.band_enabled) {
if (!db->device_conf.wlan_settings.band_enabled) {
LOG(TRACE) << "goto STATE_OPERATIONAL";
slave_state = STATE_OPERATIONAL;
break;
Expand Down Expand Up @@ -3384,7 +3385,10 @@ bool slave_thread::slave_fsm(bool &call_slave_select)
notification->platform_settings().local_master = db->device_conf.local_controller;

//Wlan Settings
notification->wlan_settings() = wlan_settings;
notification->wlan_settings().band_enabled =
db->device_conf.wlan_settings.band_enabled;
notification->wlan_settings().channel = db->device_conf.wlan_settings.channel;
;
// Hostap Params
notification->hostap() = hostap_params;
notification->hostap().ant_gain = config.hostap_ant_gain;
Expand Down
1 change: 0 additions & 1 deletion agent/src/beerocks/slave/son_slave_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ class slave_thread : public beerocks::socket_thread {
std::string backhaul_manager_uds;
std::string platform_manager_uds;
sSlaveConfig config;
beerocks_message::sWlanSettings wlan_settings; // from platform manager //
beerocks_message::sSonConfig son_config;
beerocks::logging &logger;
std::string master_version;
Expand Down