From f6edb7312a6787aea8ebaaa3af6ca76519a01df4 Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Thu, 14 Jan 2021 10:13:16 +0800 Subject: [PATCH] qcacld-3.0: Fix channel width and center freq1 mismatch issue In beacon, if STA Channel Width is 1, indicate 40M width is supported, but Secondary Channel Offset is 0, indicate 40M channel is disabled, 20M width should be set instead of 40M. Refer 802.11-2016 Table 9-168 HT Operation element fields and subfields. Change-Id: Ifb130b3447e4f10723295b93e505df929a16486d CRs-Fixed: 2854933 --- core/mac/src/pe/lim/lim_ft.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c index e52db9b9e008..5a9da592933e 100644 --- a/core/mac/src/pe/lim/lim_ft.c +++ b/core/mac/src/pe/lim/lim_ft.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -654,8 +654,12 @@ void lim_fill_ft_session(struct mac_context *mac, PHY_DOUBLE_CHANNEL_HIGH_PRIMARY) ft_session->ch_center_freq_seg0 = bss_chan_id - 2; - else + else { pe_warn("Invalid sec ch offset"); + ft_session->ch_width = CH_WIDTH_20MHZ; + ft_session->ch_center_freq_seg0 = 0; + ft_session->ch_center_freq_seg1 = 0; + } } } else { ft_session->ch_width = CH_WIDTH_20MHZ;