Skip to content

fix: XB10-2960 — 5GHz 160MHz channel bandwidth always disabled on page load - #81

Open
udaybhadauria wants to merge 1 commit into
rdkcentral:developfrom
udaybhadauria:fix/XB10-2960-dfs-boot-160mhz-disabled
Open

fix: XB10-2960 — 5GHz 160MHz channel bandwidth always disabled on page load#81
udaybhadauria wants to merge 1 commit into
rdkcentral:developfrom
udaybhadauria:fix/XB10-2960-dfs-boot-160mhz-disabled

Conversation

@udaybhadauria

Copy link
Copy Markdown
Contributor

Summary

The 20/40/80/160 channel bandwidth radio button (#channel_bandwidth3) in the 5GHz wireless config page is permanently disabled on every page load, regardless of backend DFS state. All other options (20 / 20/40 / 20/40/80) work correctly.

Affected Build

  • Model: CGM601TCOM
  • Build: CGM601TCOM_DEV_26Q3_sprint_20260728232920sdy_NG (SPIN 12)
  • File: source/Styles/xb3/jst/wireless_network_configuration_onestack.jst

Root Cause

// BEFORE (broken)
$("[name='DFS_boot_disabled']").change(function() {
    if($("#DFS_boot_disabled").is(":checked"))  {
        $("#channel_bandwidth3").prop("disabled", true);
    }else{
        $("#channel_bandwidth3").prop("disabled", false);
    }
}).trigger("change");   // <-- BUG: fires on every page load

.trigger("change") unconditionally invokes the onChange handler at page load.
Since #DFS_boot_disabled is HTML-default-checked (Disable), this always calls .prop("disabled", true) on #channel_bandwidth3, overriding the correct $dfsBoot backend-driven init block above it.

Introduced by: PR #37RDKB-63519, RDKB-63615: 6GHz & XB10 models support in BWG GUI
Commit: 7b48cbac07 | Merged: 2026-02-26 | Author: Pavan Kumar Reddy B

Fix

// AFTER (fixed)
$("[name='DFS_boot_disabled']").change(function() {
    if($("#DFS_boot_disabled").is(":checked"))  {
        $("#channel_bandwidth3").prop("disabled", true);
    }else{
        $("#channel_bandwidth3").prop("disabled", false);
    }
});
// $dfsBoot static check above already handles initial page-load state from backend

Remove .trigger("change"). The $dfsBoot='<?% echo($dfsAtBootup); ?>' check immediately above already correctly sets initial disabled state from backend data — no trigger needed.

Impact

  • Only #channel_bandwidth3 (160MHz) affected
  • 100% reproducible on every page load on affected builds
  • No backend / API changes required — JS-only, one-line fix

Test

  1. Navigate to Wireless → 5GHz → Edit
  2. Verify 160MHz radio button is no longer greyed out
  3. Toggle DFS Boot Disabled checkbox — verify 160MHz enables/disables correctly

Fixes: XB10-2960

The .trigger(change) call was unconditionally firing the DFS_boot_disabled
onChange handler on every page load. Since #DFS_boot_disabled is HTML
default-checked (Disable), this always called .prop(disabled,true) on
#channel_bandwidth3 (160MHz option), overriding the correct $dfsBoot
backend-driven initialization.

Fix: remove .trigger(change); the $dfsBoot static check above already
handles initial page-load state from backend correctly.

Ref: XB10-2960
@udaybhadauria
udaybhadauria requested review from a team as code owners July 31, 2026 02:46
@github-actions

Copy link
Copy Markdown

📋 PR Format Reminder

  • Title: fix: XB10-2960 — 5GHz 160MHz channel bandwidth always disabled on page load — expected TICKET-123 : description
    (Multiple tickets OK: RDKCOM-5492 RDKBDEV-3336 : ... | Include US ticket + subtask for user-stories)
  • Description missing:
    • Reason for change
    • Test Procedure
    • Risks (Low / Medium / High)
    • Priority (P0 / P1 / P2)

Expected:

TICKET-123 : brief description

Reason for change: why
Test Procedure: how to verify
Risks: Low / Medium / High
Priority: P0 / P1 / P2

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.

1 participant