XB-2787: Fix radio bitmap calculation - #1297
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts MLO (MLD) update logic so the returned radio_bitmap only flags radios where mld_enable and/or mld_link_id actually changed, preventing unnecessary reconfiguration work that was causing a recurring ~25s delay on subsequent boots.
Changes:
- Update
update_mld_groups()to cache originalmld_enablestate per VAP and only setradio_bitmapwhen the final enable state differs from the baseline (and whenmld_link_idis overridden). - Centralize
MAX_VAP_INDEXinwifi_ctrl.h(removing the local define fromwifi_ctrl_queue_handlers.c). - Minor comment/docstring and formatting adjustments around MLD handling.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| source/core/wifi_ctrl.h | Introduces MAX_VAP_INDEX used for VAP indexing/bounds in core code. |
| source/core/wifi_ctrl.c | Refines update_mld_groups() radio bitmap calculation using baseline mld_enable caching and conditional bitmap updates. |
| source/core/wifi_ctrl_queue_handlers.c | Removes local MAX_VAP_INDEX define to rely on the shared header definition. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5a0749c to
998a147
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (4)
source/core/wifi_ctrl.c:3515
- This info log is very low-level (bound validation) and doesn’t identify which VAP/radio triggered it. Using dbg level and including vap_index makes the message actionable while reducing noise.
wifi_util_info_print(log_type, "%s:%d: mld_id=%u mld_link_id=%u\n",
__func__, __LINE__, mld_conf->mld_id, mld_conf->mld_link_id);
source/core/wifi_ctrl.c:3610
- Similar to the incompatible-case log, this is debug-level output (includes LINE) and should include which VAP was enabled. Switching to dbg level and adding vap_index/group id reduces info log noise and makes the log actionable.
wifi_util_info_print(log_type, "%s:%d: compatible, was false in mgr cache\n",
__func__, __LINE__);
source/core/wifi_ctrl.c:3505
- This log looks like debug-level diagnostic output (includes LINE and an internal condition) and the message lacks key context like vap_index/radio. Consider using wifi_util_dbg_print and include vap_index to avoid noisy info logs during normal operation.
This issue also appears in the following locations of the same file:
- line 3514
- line 3609
wifi_util_info_print(log_type, "%s:%d: target_vap->u.bss_info.enabled false\n",
__func__, __LINE__);
source/core/wifi_ctrl.c:3600
- This diagnostic message is emitted inside a tight loop and currently logs at info level without identifying which entry was incompatible. Consider switching to dbg level and including vap_index/group id to avoid noisy logs and improve debuggability.
wifi_util_info_print(log_type, "%s:%d: not compatible, but was true in mgr cache\n",
__func__, __LINE__);
998a147 to
4422a9b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
source/core/wifi_ctrl.c:3601
- This log uses
entry->vap_info->name, but other code in this file useswifi_vap_info_t::vap_name(e.g., mgr_vap->vap_name). Using the wrong field here can be a build break or log the wrong identifier. Also, the message contains a double newline.
wifi_util_info_print(log_type,
"%s:%d: MLO disabled for VAP %s - not compatible with MLO group %d\n\n",
__func__, __LINE__, entry->vap_info->name, entry->mld_conf->mld_id);
source/core/wifi_ctrl.c:3517
- The format string includes an embedded newline before "out of bounds" and is missing a trailing newline, which will split the log line and make it harder to read/grep.
This issue also appears on line 3599 of the same file.
wifi_util_dbg_print(log_type,
"%s:%d: mld_id=%u mld_link_id=%u\n out of bounds", __func__, __LINE__,
mld_conf->mld_id, mld_conf->mld_link_id);
4422a9b to
1564035
Compare
1564035 to
7098e59
Compare
Reason for change: Due to always being set for all radios on all boots, it was causing constant 25s delay. Test Procedure: Verify if the delay is present on subsequent boots without any changes to specific VAPs Risks: None Priority: P2 Signed-off-by: Brayan Milczarek <brayan_milczarek@comcast.com>
7098e59 to
831aa33
Compare
Reason for change: Due to always being set for all radios on all boots, it was causing constant 25s delay.
Test Procedure: Verify if the delay is present on subsequent boots without any changes to specific VAPs
Risks: None
Priority: P2