Skip to content

XB-2787: Fix radio bitmap calculation - #1297

Open
bmilcz-comcast wants to merge 1 commit into
rdkcentral:developfrom
bmilcz-comcast:xb10-2878
Open

XB-2787: Fix radio bitmap calculation#1297
bmilcz-comcast wants to merge 1 commit into
rdkcentral:developfrom
bmilcz-comcast:xb10-2878

Conversation

@bmilcz-comcast

Copy link
Copy Markdown
Contributor

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

Copilot AI review requested due to automatic review settings July 24, 2026 15:17
@bmilcz-comcast
bmilcz-comcast requested a review from a team as a code owner July 24, 2026 15:17
@bmilcz-comcast
bmilcz-comcast marked this pull request as draft July 24, 2026 15:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 original mld_enable state per VAP and only set radio_bitmap when the final enable state differs from the baseline (and when mld_link_id is overridden).
  • Centralize MAX_VAP_INDEX in wifi_ctrl.h (removing the local define from wifi_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.

Comment thread source/core/wifi_ctrl.h
Comment thread source/core/wifi_ctrl.c
@bmilcz-comcast bmilcz-comcast changed the title XB2787: Fix radio bitmap calculation XB-2787: Fix radio bitmap calculation Jul 28, 2026
@bmilcz-comcast
bmilcz-comcast marked this pull request as ready for review July 30, 2026 09:19
Copilot AI review requested due to automatic review settings July 30, 2026 09:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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__);

Copilot AI review requested due to automatic review settings July 30, 2026 09:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 uses wifi_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);

Copilot AI review requested due to automatic review settings July 30, 2026 09:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

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>
Copilot AI review requested due to automatic review settings July 31, 2026 15:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants