Skip to content

RDKBWIFI-517: Fix 2.4GHz 40MHz secondary channel in get_on_channel_sc…#1274

Open
dkyncu wants to merge 1 commit into
rdkcentral:developfrom
dkyncu:fix_2g_40mhz_bw
Open

RDKBWIFI-517: Fix 2.4GHz 40MHz secondary channel in get_on_channel_sc…#1274
dkyncu wants to merge 1 commit into
rdkcentral:developfrom
dkyncu:fix_2g_40mhz_bw

Conversation

@dkyncu

@dkyncu dkyncu commented Jul 16, 2026

Copy link
Copy Markdown

…an_list

The channels_2g_40_mhz[] table in get_on_channel_scan_list() used a +/-2 channel offset for the HT40 secondary channel (e.g. primary 1 -> {1,3}). In 2.4GHz the channel numbers are spaced 5 MHz apart, so the two non overlapping 20MHz halves of a 40MHz bond are 20 MHz = 4 channel numbers apart (secondary = primary +/-4). {1,3} are only 10 MHz apart and overlap, which is not a valid 40MHz pair. The 5GHz and 6GHz tables in the same function already use the correct +4 spacing.

With the wrong offset, get_on_channel_scan_list() returned an overlapping sub channel for every 2.4GHz 40MHz primary, so consumers that check the sub channels against an allowed list (e.g. channel scan, ACS) could not deploy a 2.4GHz 40MHz channel and fell back to 20MHz.

Correct the table to the standard 2.4GHz HT40 pairs (1+5, 6+10, 11+7, ...).

…an_list

The channels_2g_40_mhz[] table in get_on_channel_scan_list() used a +/-2
channel offset for the HT40 secondary channel (e.g. primary 1 -> {1,3}). In
2.4GHz the channel numbers are spaced 5 MHz apart, so the two non overlapping
20MHz halves of a 40MHz bond are 20 MHz = 4 channel numbers apart
(secondary = primary +/-4). {1,3} are only 10 MHz apart and overlap, which is
not a valid 40MHz pair. The 5GHz and 6GHz tables in the same function already
use the correct +4 spacing.

With the wrong offset, get_on_channel_scan_list() returned an overlapping
sub channel for every 2.4GHz 40MHz primary, so consumers that check the
sub channels against an allowed list (e.g. channel scan, ACS) could not deploy
a 2.4GHz 40MHz channel and fell back to 20MHz.

Correct the table to the standard 2.4GHz HT40 pairs (1+5, 6+10, 11+7, ...).

Signed-off-by: Durmus Koyuncu <durmus.kyncu.kd@gmail.com>
Copilot AI review requested due to automatic review settings July 16, 2026 17:00
@dkyncu
dkyncu requested a review from a team as a code owner July 16, 2026 17:00

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

Fixes 2.4GHz HT40 (40MHz) on-channel scan subchannel selection in get_on_channel_scan_list() by correcting the secondary-channel spacing from ±2 channels to the correct ±4 channels (20MHz) separation, aligning behavior with the existing 5GHz/6GHz tables and preventing invalid overlapping 40MHz pairs.

Changes:

  • Update the 2.4GHz 40MHz primary/secondary channel mapping table to use ±4 channel offsets (e.g., 1↔5, 6↔10, 11↔7).
  • Ensure on-channel scan consumers (e.g., channel scan/ACS) receive valid 2.4GHz HT40 subchannels rather than overlapping 10MHz-apart pairs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Nikita-Hakai Nikita-Hakai added the community contribution Contributions from community. label Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community contribution Contributions from community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants