Incorrect Response to Channel Scan Request with "Perform Fresh Scan" Bit Set to 0
Closes PPW-344
See merge request prpl-foundation/prplmesh/prplMesh!3962
bwl:process_wpa_ctrl_event: parse and propagate status and reason codes in failed connection event
Closes PPM-3159
See merge request prpl-foundation/prplmesh/prplMesh!3970
In ieee1905 Failed Connection message, Status Code and Reason Code
were previously hardcoded to fixed values (0x0001 and 0x0000).
This commit updates hal_event_handler to extract and use the actual
status and reason codes from the wpa_ctrl event.
Signed-off-by: Nefi Guclu <nefi.guclu@airties.com>
add reason code - operation disallowed due to radar detected for higher
frequency operating classes like 128 and 129, if any 20 MHz is radar detected.
previously it uses the last 20MHz channel preference key, so that even if
the first 20MHz is affected by radar detection and the last 20MHz is radar
free it adds the higher preference.
Closes PPM-3375
Signed-off-by: rramasamy <rramasamy@maxlinear.com>
Agent DB : Status is missing in Channel Scan Results.
if a result is present this implies Status:Good
(0x00) and absent implies all error codes
Solution: adding an explicit variable to handle different error
scenarios.
Channel Scan Task :
sync with BackhaulManager Enable.
son_slave_thread sends beerocks_message::ACTION_BACKHAUL_ENABLE
after all radio processes have joined. at this point, database holds
information about about radios. among this information, channel info is
the relevant info that channel scan task needs.
Upon receiving beerocks_message::ACTION_BACKHAUL_ENABLE,
scan_task inits AgentDB channel scan results with the same
list of channels that was sent in
ChannelScanCapabilities TLV.
Closes: PPW-344
Signed-off-by: Iacob Juc <iacob.juc_ext@softathome.com>
As discussed in documentation/flows/agent/onEasyMeshChannels.md
Channel Scan Capabilities contain 20MHz channels from the subset
of Operable Channels.
Agent:
- tlvf_utils : using the same logic as for AP Radio Basic Capabilities
TLV, compute the subset of Operable Channels that the agent can
scan on.
- capability_reporting_task : call new function from tlvf_utils
to fill the ChannelScanCapabilities TLV.
Closes: PPW-344
Signed-off-by: Iacob Juc <iacob.juc_ext@softathome.com>
Refactored finalize_slaves_connect_state() by separating the connect and
disconnect logic into two dedicated functions:
- handle_backhaul_connect()
- handle_backhaul_disconnect()
This improves code readability and maintainability, as the connect/disconnect
branches were already fully disjoint.
PPM-103.
Signed-off-by: Dmytro Puz <d.puz@inango-systems.com>
This commit provides an interface between the agent and PWHM to
forward the content of channel selection request messages.
It parses the channel selection request message based on rank
values of zero, then creates an acs_list that includes the operating
class, excluded channels, and the length of excluded channels.
The acs_list is then sent from the backhaul manager to the slave
and subsequently to the ap manager.
Example format:
{
"acs_list": [
{
"opclass": 81,
"exclude_channels_length": 5,
"exclude_channels": [
1,
2,
3,
4,
5
]
},
{
"opclass": 83,
"exclude_channels_length": 2,
"exclude_channels": [
1,
2
]
}
]
}
PPM-3254
Signed-off-by: Arda Aras <arda.aras@airties.com>
Current state is that m8 is received in agent and action message ACTION_BACKHAUL_WIFI_CREDENTIALS_UPDATE_REQUEST is sent to backhaul manager.
This commit implements the actual work to be done by the backhaul manager to connect sta_wlan_hal.
Signed-off-by: Florent Couzon <prplmesh.opensources@sagemcom.com>
Current situation is that M8 handling triggers placeholders functions in agent.
This commit adds handling for enabling disabling EP (the function in sta_wlan_hal_whm is to be develloped).
It also adds handling for bsta_reconfiguration from ap_autoconfiguration to backhaul manager. The backhaul manager handling comes in a future commit.
Signed-off-by: Florent Couzon <prplmesh.opensources@sagemcom.com>
create Associated Sta Extended Link Metrics TLV after filling the Associated
STA Link Metrics TLV which fixes adding the garbage value in Link Metrics TLV.
Closes PPM-3362
Signed-off-by: rramasamy <rramasamy@maxlinear.com>
When building prplMesh using recent gcc verion like v13.3.0 some build
errors are occuring :
- Unkown uint32_t, int64_t types
-> Solution : include <cstdint> header
- Calls like std::move(std::string("agent")); (from
platform_manager.cpp and backhaul_manager.cpp are raising a warning
(with -Werror enabled)
-> Solution: change this to std::string("agent");
Closes: PPW-569
Signed-off-by: Houssem Dafdouf <houssem.dafdouf_ext@softathome.com>
The Agent was incorrectly sending RSSI instead of RCPI in the Unassociated
STA Link Metrics Response TLV. This update aligns with the EasyMesh
specification by converting RSSI to RCPI using the existing
convert_rcpi_from_rssi API.
Closes PPM-3331
Signed-off-by: rramasamy <rramasamy@maxlinear.com>
There is a logic bug, that returns false, tho ClientsMeasurementMode
is successfully read from DM. It should have correct logic to
fix the problem with MAP-4.7.4_ETH
Signed-off-by: Volodymyr Pavlenko <pavlenko.vv@pm.me>
Explicitly send another beacon request with the values packed in
beacon_metrics_query. With the introduction of beacon reports multi-channel support we send only requests
for the channels that are packed inside chan_report_list, but not for
the channel inside the beacon metrics query. The 4.7.9 test expects the
beacon request with the beacon metrics query.
PPM-3318
Signed-off-by: Denys Stolbov <d.stolbov@inango-systems.com>
- BandSteeringEnabled and ClientRoamingEnabled are moved to Agent DM
- RadioStatsEnable was added to reduce CPU and messaging load in
cases where the user is not interested in radio statistics. It
seems to be not relevant anymore
Signed-off-by: Volodymyr Pavlenko <pavlenko.vv@pm.me>
During Easymesh onboarding, in SLAVE_JOINED_NOTIFICATION the center frequency
for 6GHz with 160MHz was sent wrong.
Instead of sending center frequency, Agent is sending primary_80MHz center
frequency for 6GHz in 160MHz.
It should be m_center_frequency_2 and not m_center_frequency for 6GHz if the
BW is 160MHz.
Closes PPM-3325
Signed-off-by: rramasamy <rramasamy@maxlinear.com>
Previously, both son_slave_thread and VendorMessageSlave would call
FATAL if the broker client factory failed to create an
instance—immediately terminating the process. In practice a
failed instantiation should be handled gracefully, not crash the agent.
PPM-1768.
Signed-off-by: Dmytro Puz <d.puz@inango-systems.com>
The current implementation of fill_channel_list_to_agent_db() emits a DEBUG
log line for every (channel × bandwidth) combination, generating hundreds of
lines even in normal operation. This makes it hard to spot real issues in the logs.
Instead of spamming per‐bandwidth entries, we should emit a single summary
line listing each channel and its supported bandwidths in the form:
[36(20MHz,40MHz,80MHz,160MHz),40(20MHz,40MHz,80MHz,160MHz),…].
We choose this summarization approach because it preserves all of the same
information in a compact form and drastically reduces noise in DEBUG logs.
- Remove the inner loop of LOG(DEBUG) per supported_bw.
- After populating the AgentDB, build an std::ostringstream with the channel
summary and emit one LOG(DEBUG) for the whole list.
- Add <sstream> include for summary formatting.
Fixes: PPM-1768.
Signed-off-by: Dmytro Puz <d.puz@inango-systems.com>
This commit updates the behavior of Multi-AP devices that function
as both a Multi-AP Agent and a Multi-AP Controller. These devices
now include "Multi-AP Controller" in the SupportedService TLV of the
AP-Autoconfiguration Search message, in addition to the previously
included "Multi-AP Agent".
The AP-Autoconfiguration Search message, being a relayed multicast,
reaches all other Multi-AP devices on the network. When another
Multi-AP Controller receives this message, it can detect the presence
of multiple controllers and logs the following message:
LOG(ERROR) << "[Multiple Controllers Detected] Received AP_AUTOCONFIGURATION_SEARCH_MESSAGE from another Controller: " << al_mac;
This enhancement introduces a more efficient mechanism for detecting
multiple controllers by leveraging the AP-Autoconfiguration Search
message, supplementing the existing approach that relies solely on
unicast 1905 messages, as employed in earlier development commits
associated with PPM-2373.
It is important to note that the Wi-Fi EasyMesh Specification does
not mandate the inclusion of "Multi-AP Controller" in the
SupportedService TLV of the AP-Autoconfiguration Search message.
Therefore, this enhancement is considered a custom extension
aimed at improving network diagnostics.
Despite being a custom extension, this change maintains
interoperability with other prplMesh devices that do not include this
enhancement. Devices that do not expect the additional
"Multi-AP Controller" indication in the SupportedService TLV will
simply ignore it, ensuring seamless operation within mixed-version
prplMesh environments.
https://prplfoundationcloud.atlassian.net/browse/PPM-3314
Signed-off-by: Richard Yu <richard.yu@mitrastar.com.tw>
This commit refines seven existing log messages to improve the
diagnosis of scenarios where multiple controllers are present on the
network, a situation that may arise due to misconfigurations. The
enhancements aim to assist in identifying the presence of unexpected
controllers by providing clearer and more consistent log messages.
Key updates:
1. Implemented a check to prevent the controller from erroneously
logging its own topology response as originating from another
controller. Additionally, limited the logging to a maximum of one
entry per received topology response.
2. Standardized the log messages by setting their level to ERROR and
prepending them with the [Multiple Controllers Detected] tag. This
uniformity facilitates easier identification and filtering of
relevant log entries during debugging sessions.
Refined log messages include:
LOG(ERROR) << "[Multiple Controllers Detected] Received TOPOLOGY_RESPONSE_MESSAGE from another Controller: " << al_mac;
LOG(ERROR) << "[Multiple Controllers Detected] This agent has a local controller with mac=" << db->bridge.mac << " but response came from src_mac=" << src_mac << ", ignoring";
LOG(ERROR) << "[Multiple Controllers Detected] current controller_bridge_mac=" << db->controller_info.bridge_mac << " but response came from src_mac=" << src_mac << ", ignoring";
LOG(ERROR) << "[Multiple Controllers Detected] Ignoring AP-Autoconfiguration Renew Message from an unknown Controller: " << src_mac;
LOG(ERROR) << "[Multiple Controllers Detected] Ignoring CLIENT_CAPABILITY_QUERY_MESSAGE from an unknown Controller: " << src_mac;
LOG(ERROR) << "[Multiple Controllers Detected] Ignoring AP_CAPABILITY_QUERY_MESSAGE from an unknown Controller: " << src_mac;
LOG(ERROR) << "[Multiple Controllers Detected] Ignoring BACKHAUL_STA_CAPABILITY_QUERY_MESSAGE from an unknown Controller: " << src_mac;
https://prplfoundationcloud.atlassian.net/browse/PPM-2373
Signed-off-by: Richard Yu <richard.yu@mitrastar.com.tw>
[CORE_AIR_0030] Ensure that consecutive channel scan requests are blocked until at least 2 seconds have elapsed, preventing overlapping scans
Issue: PPM-3150
Signed-off-by: Nefi Guclu <nefi.guclu@airties.com>
Currently there is no logic for clearing blacklist.
PrplMesh is responsible for managing it, so it
makes sense to reset blacklist to avoid known issues
Closes PPM-3298
Signed-off-by: Volodymyr Pavlenko <pavlenko.vv@pm.me>
In the WAIT_WPS state the FSM was repeatedly calling sta_wlan_hal_whm::reassociate()
on every tick, flooding the logs and risking inconsistent state updates.
Introduce a `reassociation` flag in BackhaulManager that is:
- Reset to false when entering WAIT_WPS.
- Set to true as soon as any `reassociate()` call returns true.
- Prevents further reassociate() calls for the remainder of the WAIT_WPS cycle.
Also update sta_wlan_hal_whm::reassociate() to return true only when it actually
pushes the Event::Connected, and false otherwise.
This guarantees a single, deterministic reassociation attempt per WAIT_WPS run,
eliminates redundant log spam, and ensures the FSM reliably advances to CONNECTED.
Fixes: PPM-3295.
Signed-off-by: Dmytro Puz <d.puz@inango-systems.com>
Ensure that when an agent has a designated local controller, it only accepts
AP Configuration Response messages from that specific controller. This prevents
the agent from mistakenly onboarding to another controller in the network.
https://prplfoundationcloud.atlassian.net/browse/PPM-3297
Signed-off-by: Richard Yu <richard.yu@mitrastar.com.tw>
In order for prplMesh to complete onboarding to a controller, it is essential that all radio's are configured.
During R4 certification tests, some controllers won't answer AP autoconfig searches for the 6GHz band.
This has the effect prplMesh won't advance its FSM, even though all applicable bands are configured.
To workaround this, temporarily skip the configuration of the 6GHz radio in certification mode.
See: PPM-3292
Signed-off-by: Maarten De Decker <maarten.dedecker@mind.be>
This disables EM_AP_AGENT supported service while in certification mode.
In R4 certification, the WFA QCA controller will not answer AP autoconfiguration search messages containing this supported service.
To workaround this limitation, do not add this to the supported service list.
Closes: PPM-3287
Signed-off-by: Maarten De Decker <maarten.dedecker@mind.be>
Sometimes there is a problem applying the transaction
for: X_PRPLWARE-COM_Agent.Info.Fronthaul.
Since dm_create_fronthaul_object has LOG_IF(!inst.size(), FATAL)
it makes beerocks_agent to crash.
This issue mostly like about race condition.
Replace FATAL with better approach.
PPM-3285.
Signed-off-by: Dmytro Puz <d.puz@inango-systems.com>
Wi-Fi 6 Capability TLV are included in the AP Capability Report Message.
However, all the parameters (including wifi6_caps->spatial_reuse) within
these TLVs are set to 0.
This made it impossible for BSS coloring to work.
That's why workaround was added, which set the spatial_reuse parameter to 1.
The problem with the parameters should be fixed in PPM-3028.
Workaround is no longer needed.
Remove workarounds and add proper conditions for handling spatial_reuse.
PPM-2602.
Signed-off-by: Dmytro Puz <d.puz@inango-systems.com>
Dependency: This MR has dependency on PWHM MR
"prpl-foundation/prplmesh/pwhm/plugins/pwhm!97", which
implements Driver to Vendor mapping based on the information
extracted from lower layer and exposes to
WiFi.Radio.*.ChipsetVendor DM parameter"
Problem: Chipset Vendor is displayed as 'prplmesh' in Device Inventory
TLV in AP capability Report message
Cause: Implementation is currently hard-coded in prlmesh,
if no information is available.
Fix: Implementation to read newly implemented parameter "ChipsetVendor"
(see MR 97@PWHM) which exposes the relevant information from the
underlying system
Test: Test on freedom/maxlinear board
Freedom board as agent/Maxlinear as Controller
Closes PPM-266
Signed-off-by: Ashutosh Shandilya <ashutosh.shandilya_ext@softathome.com>
Currently the connection is only made with a single fixed bus provided
(ubus by default), we want to connect to all the bus possible to be
able to access the datamodel on every bus.
We can adapt the libamxrt to not use its own event loop and connect to
all the bus detected.
However we need to be carful, because there is already a connection
done before by an other part of the code, a reset of the config may
be needed if adding more connection, or changing the way it work.
Remove already initialized variables, change the config to not auto
connect to the bus, use libamxrt to detect all the backends, load
them, and fill the config with there info, connect and register the
datamodel to all the bus, and register them to the event loop.
PPW-449
Signed-off-by: Thomas Roussarie <thomas.roussarie@softathome.com>
When agent does not perform any channel change,
reply with CHANNEL_SELECTION_RESPONSE with
status code ACCEPT for all radios : OK
if status code is ACCEPT,
regardless if the agent has changed or not any
radio operating parameters,
it shall send an OPERATING_CHANNEL_REPORT
containing information regarding ALL radios : NOK
this commit covers both cases :
if agent replies with ACCEPT and
a/ does change params
b/ does not change params
it shall send an OPERATING_CHANNEL_REPORT
with all radios
unsolicited OPERATING_CHANNEL_REPORT
son_slave_thread : contained 4 triggers for unsolicited operating
channel report;
-- CSA_NOTIFICATION : moved to channel_selection_task and
used for full report or unsolicited report.
-- CSA_ERROR : expected as a possible result of a channel switch from
channel_selection_task; only used for full report.
-- DFS_CAC_COMPLETED : moved to channel_selection_task;
used only for unsolicited report,
because it is never triggered by CHANNEL_SELECTION_REQUEST.
-- ACS_NOTIFICATION : not triggered by CHANNEL_SELECTION_REQUEST,
but also not forwarded to backhaul_manager; never generated by pwhm;
left untouched.
ap_manager :
-- remove artificial CSA notification that provokes
an extra unsolicited Operating Channel Report without new information.
-- properly fill all csa_params in AP_MANAGER_JOINED notification so
initial OPERATING_CHANNEL_REPORT messages contain correct txPow
information.
added documentation about channel selection request
tested to work with code for generating OPERATING_CHANNEL_REPORT from
MR nr 3904
Signed-off-by: Iacob Juc <iacob.juc_ext@softathome.com>
The prplmesh agent reads LAN interfaces from uci during initialization.
If the LAN interface list is not present in the uci configuration,
the default interface list is used.
Since device-to-device LAN interface names can vary, it is not feasible
to maintain all possible names in a default list. So, setting LAN
interfaces in the uci config is critically important.
To eliminate all these concerns, the idea of detecting LAN interfaces
at runtime emerges.
The core idea is to obtain LAN interfaces by filtering out WLAN and
non-physical interfaces from bridge members.
To summarize the changes;
- All interfaces connected to any bridge are evaluated to determine
whether they are LAN interfaces.
- WLAN and non-physical interfaces are skipped/excluded.
- Removed unused function "beerocks::bpl::bpl_get_lan_interfaces()"
PPM-3245
Signed-off-by: Durmus Koyuncu <durmus.koyuncu@airties.com>