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

Commit

Permalink
in son_slave store hardware_supported_channels & use during TLV
Browse files Browse the repository at this point in the history
  • Loading branch information
itayx committed Apr 1, 2020
1 parent f2aaf0b commit b0b8a9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion agent/src/beerocks/slave/son_slave_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1627,6 +1627,11 @@ bool slave_thread::handle_cmdu_ap_manager_message(Socket *sd,
}
hostap_params = notification->params();
hostap_cs_params = notification->cs_params();
hardware_supported_channels.clear();
for (int idx = 0; idx < beerocks::message::SUPPORTED_CHANNELS_LENGTH; idx++)
hardware_supported_channels.push_back(
std::get<1>(notification->supported_channels_list(idx)));

if (slave_state == STATE_WAIT_FOR_AP_MANAGER_JOINED) {
slave_state = STATE_AP_MANAGER_JOINED;
} else {
Expand Down Expand Up @@ -3383,7 +3388,7 @@ bool slave_thread::slave_fsm(bool &call_slave_select)

std::array<beerocks::message::sWifiChannel, beerocks::message::SUPPORTED_CHANNELS_LENGTH>
supported_channels;
std::copy_n(std::begin(hostap_params.supported_channels), supported_channels.size(),
std::copy_n(std::begin(hardware_supported_channels), supported_channels.size(),
supported_channels.begin());

if (!tlvf_utils::add_ap_radio_basic_capabilities(cmdu_tx, hostap_params.iface_mac,
Expand Down
1 change: 1 addition & 0 deletions agent/src/beerocks/slave/son_slave_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ class slave_thread : public beerocks::socket_thread {
sSlaveBackhaulParams backhaul_params;
beerocks_message::sNodeHostap hostap_params;
beerocks_message::sApChannelSwitch hostap_cs_params;
std::vector<beerocks::message::sWifiChannel> hardware_supported_channels;
std::vector<wireless_utils::sChannelPreference> channel_preferences;

SocketClient *platform_manager_socket = nullptr;
Expand Down

0 comments on commit b0b8a9e

Please sign in to comment.