From 9632da55bbae250a92888f588198dd70dad0abdf Mon Sep 17 00:00:00 2001 From: Amar Singhal Date: Thu, 28 Apr 2016 12:13:23 -0700 Subject: [PATCH] qcacld-3.0: Correct comparison for 5G channel width Correct comparison for 5G and 2G channel width. Currently the maximum channel width test in cds_set_5g_channel_pararms() or cds_set_2g_channel_params is incorrect. Set input channel width to 80p80 if input width is more than equal to maximum channel width. Change-Id: I5a418c15474b355ea3c62c2de45052908f28113c CRs-Fixed: 1009720 --- core/cds/src/cds_reg_service.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/cds/src/cds_reg_service.c b/core/cds/src/cds_reg_service.c index cd0ed13839c2..dcdc20031e6c 100644 --- a/core/cds/src/cds_reg_service.c +++ b/core/cds/src/cds_reg_service.c @@ -450,7 +450,7 @@ static void cds_set_5g_channel_params(uint16_t oper_ch, enum channel_state chan_state2 = CHANNEL_STATE_ENABLE; const struct bonded_chan *bonded_chan_ptr; - if (CH_WIDTH_MAX >= ch_params->ch_width) + if (CH_WIDTH_MAX <= ch_params->ch_width) ch_params->ch_width = CH_WIDTH_80P80MHZ; while (ch_params->ch_width != CH_WIDTH_INVALID) { @@ -506,8 +506,8 @@ static void cds_set_2g_channel_params(uint16_t oper_ch, { enum channel_state chan_state = CHANNEL_STATE_ENABLE; - if (CH_WIDTH_MAX >= ch_params->ch_width) - ch_params->ch_width = CH_WIDTH_80P80MHZ; + if (CH_WIDTH_MAX <= ch_params->ch_width) + ch_params->ch_width = CH_WIDTH_40MHZ; while (ch_params->ch_width != CH_WIDTH_INVALID) { chan_state = cds_get_2g_bonded_channel_state(oper_ch,