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
This commit is contained in:
Amar Singhal 2016-04-28 12:13:23 -07:00 • committed by Akash Patel
commit 9632da55bb

View file

@ -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,