From 1dea75b34d45168b602c6da5e5bf0563ca7371c8 Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Thu, 10 Jan 2019 13:53:43 +0530 Subject: [PATCH] qcacld-3.0: Fix channel numbers in SAP ACS 80MHZ channel bonding currently the driver just ignore the channel numbers greater than 165 for 80MHZ channel bonding, which results in best channel selected as 169, 173 in 20MHZ bandwidth as the respective channels does not support 80, or even 40 MHZ channel bandwidth. Fix is to assign the maximum weight to channel numbers greater than 165, so that they do not get selected as best channel for 80MHZ bandwidth operation. Change-Id: I44c5073a806f39d98103681267faa317a6b6d73b CRs-Fixed: 2375375 --- core/sap/src/sap_ch_select.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c index 1271eaac06..f7f9e03240 100644 --- a/core/sap/src/sap_ch_select.c +++ b/core/sap/src/sap_ch_select.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2019 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 @@ -1962,7 +1962,7 @@ static void sap_sort_chl_weight_ht80(tSapChSelSpectInfo *pSpectInfoParams) for (j = 0; j < pSpectInfoParams->numSpectChans; j++) { if ((pSpectInfo[j].chNum >= WLAN_REG_CH_NUM(CHAN_ENUM_1) && pSpectInfo[j].chNum <= WLAN_REG_CH_NUM(CHAN_ENUM_14)) || - (CHANNEL_165 == pSpectInfo[j].chNum)) + (pSpectInfo[j].chNum >= CHANNEL_165)) pSpectInfo[j].weight = SAP_ACS_WEIGHT_MAX * 4; } @@ -2392,7 +2392,7 @@ static void sap_sort_chl_weight_ht40_5_g(tSapChSelSpectInfo *pSpectInfoParams) /* avoid channel 165 by setting its weight to max */ pSpectInfo = pSpectInfoParams->pSpectCh; for (j = 0; j < pSpectInfoParams->numSpectChans; j++) { - if (CHANNEL_165 == pSpectInfo[j].chNum) { + if (pSpectInfo[j].chNum >= CHANNEL_165) { pSpectInfo[j].weight = SAP_ACS_WEIGHT_MAX * 2; break; }