From 61464ceddee804fe250eba259912f0f9b469f1b1 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Reddy B Date: Mon, 3 Aug 2026 22:46:48 +0530 Subject: [PATCH] RDKB-66345 Disable 160MHz if DFS at boot up is false --- .../xb6/jst/wireless_network_configuration.jst | 14 +++++++++++--- .../jst/wireless_network_configuration_edit.jst | 10 +++++++++- ...wireless_network_configuration_edit_onewifi.jst | 10 +++++++++- .../jst/wireless_network_configuration_onewifi.jst | 10 +++++++++- 4 files changed, 38 insertions(+), 6 deletions(-) diff --git a/source/Styles/xb6/jst/wireless_network_configuration.jst b/source/Styles/xb6/jst/wireless_network_configuration.jst index f66b1a4..02a102d 100644 --- a/source/Styles/xb6/jst/wireless_network_configuration.jst +++ b/source/Styles/xb6/jst/wireless_network_configuration.jst @@ -1018,6 +1018,7 @@ $(document).ready(function() { } // disable NOT 20MHz channel if 165 // Warning for DFS channel (52-140) + $dfsBoot= ''; $("#channel_number1").change(function(){ var channel = $("#channel_number1 option:selected").val(); if(channel >= 52 && channel <= 140 ) { @@ -1044,18 +1045,25 @@ $(document).ready(function() { $('[name="channel_bandwidth1"]:not([value="20MHz"])').prop("disabled", true); } else{ + /* + * Re-enable bandwidth options for non-165 channels, + * but preserve DFS-at-boot restrictions. + */ $('[name="channel_bandwidth1"]').prop("disabled", false); + + if ($dfsBoot == "false") { + $("#channel_bandwidth3").prop("disabled", true); + } } }); // disable NOT 20MHz channel if 165 - $dfsBoot= ''; if ( "true" != "" && "165" == ""){ $('[name="channel_bandwidth1"]:not([value="20MHz"])').prop("disabled", true); } else{ if($dfsBoot=="false" && (platformSupported=="true" )) - $("#channel_bandwidth3").prop("disabled", true); - else + $("#channel_bandwidth3").prop("disabled", true); + else $('[name="channel_bandwidth1"]').prop("disabled", false); } // now we can show target content diff --git a/source/Styles/xb6/jst/wireless_network_configuration_edit.jst b/source/Styles/xb6/jst/wireless_network_configuration_edit.jst index 9b116c4..8349ecc 100644 --- a/source/Styles/xb6/jst/wireless_network_configuration_edit.jst +++ b/source/Styles/xb6/jst/wireless_network_configuration_edit.jst @@ -610,12 +610,21 @@ $(document).ready(function() { } } }).trigger("change"); + $dfsBoot= ''; $("#channel_number").change(function() { if ("165" == $(this).val()){ $('[name="channel_bandwidth1"]:not([value="20MHz"])').prop("disabled", true); } else{ + /* + * Re-enable bandwidth options for non-165 channels, + * but preserve DFS-at-boot restrictions. + */ $('[name="channel_bandwidth1"]').prop("disabled", false); + + if ($dfsBoot == "false") { + $("#channel_bandwidth3").prop("disabled", true); + } } }).trigger("change"); $("#wireless_network_switch").change(function() { @@ -757,7 +766,6 @@ wpa2psk ==> 8 to 63 Ascii characters click_save(); } }); - $dfsBoot= ''; if($dfsBoot=="false" && (platformSupported=="true" )){ $("#channel_bandwidth3").prop("disabled", true); } diff --git a/source/Styles/xb6/jst/wireless_network_configuration_edit_onewifi.jst b/source/Styles/xb6/jst/wireless_network_configuration_edit_onewifi.jst index 291c3db..e02344e 100644 --- a/source/Styles/xb6/jst/wireless_network_configuration_edit_onewifi.jst +++ b/source/Styles/xb6/jst/wireless_network_configuration_edit_onewifi.jst @@ -635,12 +635,21 @@ $(document).ready(function() { } } }).trigger("change"); + $dfsBoot= ''; $("#channel_number").change(function() { if ("165" == $(this).val()){ $('[name="channel_bandwidth1"]:not([value="20MHz"])').prop("disabled", true); } else{ + /* + * Re-enable bandwidth options for non-165 channels, + * but preserve DFS-at-boot restrictions. + */ $('[name="channel_bandwidth1"]').prop("disabled", false); + + if ($dfsBoot == "false") { + $("#channel_bandwidth3").prop("disabled", true); + } } }).trigger("change"); $("#wireless_network_switch").change(function() { @@ -782,7 +791,6 @@ wpa2psk ==> 8 to 63 Ascii characters click_save(); } }); - $dfsBoot= ''; if($dfsBoot=="false" && (platformSupported=="true" )){ $("#channel_bandwidth3").prop("disabled", true); } diff --git a/source/Styles/xb6/jst/wireless_network_configuration_onewifi.jst b/source/Styles/xb6/jst/wireless_network_configuration_onewifi.jst index 8ac0c1e..c4f6082 100644 --- a/source/Styles/xb6/jst/wireless_network_configuration_onewifi.jst +++ b/source/Styles/xb6/jst/wireless_network_configuration_onewifi.jst @@ -1037,6 +1037,7 @@ $(document).ready(function() { } // disable NOT 20MHz channel if 165 // Warning for DFS channel (52-140) + $dfsBoot= ''; $("#channel_number1").change(function(){ var channel = $("#channel_number1 option:selected").val(); if(channel >= 52 && channel <= 140 ) { @@ -1063,11 +1064,18 @@ $(document).ready(function() { $('[name="channel_bandwidth1"]:not([value="20MHz"])').prop("disabled", true); } else{ + /* + * Re-enable bandwidth options for non-165 channels, + * but preserve DFS-at-boot restrictions. + */ $('[name="channel_bandwidth1"]').prop("disabled", false); + + if ($dfsBoot == "false") { + $("#channel_bandwidth3").prop("disabled", true); + } } }); // disable NOT 20MHz channel if 165 - $dfsBoot= ''; if ( "true" != "" && "165" == ""){ $('[name="channel_bandwidth1"]:not([value="20MHz"])').prop("disabled", true); }