Prechádzať zdrojové kódy

qcacld-3.0: Sort ACS channel list for all channel width cases

Ensure that the channel list used for ACS channel selection
is sorted for all the possible channel width cases. In the
current implementation, channel list sorting is not done for
channels widths 80, 80+80 and 160MHz. Along with this the
ACS channel range is getting set before the 11ac override,
leading to incorrect hardware mode. Fix the same by setting
the ACS range after 11ac override and ensure that channel
list is sorted in all the valid channel width cases.

Change-Id: Ic773b3a4b1c049bc2053c1d0d17dd047d7a88324
CRs-Fixed: 1022304
Manishekar Chandrasekaran 8 rokov pred
rodič
commit
44e334fb7e

+ 2 - 2
core/hdd/src/wlan_hdd_cfg80211.c

@@ -1539,8 +1539,6 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 	if (QDF_STATUS_SUCCESS != status)
 		hddLog(LOGE, FL("Get PCL failed"));
 
-	wlan_hdd_set_acs_ch_range(sap_config, ht_enabled, vht_enabled);
-
 	/* ACS override for android */
 	if (hdd_ctx->config->sap_p2p_11ac_override && ht_enabled) {
 		hddLog(LOG1, FL("ACS Config override for 11AC"));
@@ -1554,6 +1552,8 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 			sap_config->acs_cfg.ch_width = eHT_CHANNEL_WIDTH_40MHZ;
 	}
 
+	wlan_hdd_set_acs_ch_range(sap_config, ht_enabled, vht_enabled);
+
 	hddLog(LOG1, FL("ACS Config for wlan%d: HW_MODE: %d ACS_BW: %d HT: %d VHT: %d START_CH: %d END_CH: %d"),
 		adapter->dev->ifindex, sap_config->acs_cfg.hw_mode,
 		ch_width, ht_enabled, vht_enabled,

+ 5 - 3
core/sap/src/sap_ch_select.c

@@ -1428,6 +1428,8 @@ void sap_sort_chl_weight_ht80(tSapChSelSpectInfo *pSpectInfoParams)
 		}
 	}
 
+	sap_sort_chl_weight(pSpectInfoParams);
+
 	pSpectInfo = pSpectInfoParams->pSpectCh;
 	for (j = 0; j < (pSpectInfoParams->numSpectChans); j++) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
@@ -1565,6 +1567,8 @@ void sap_sort_chl_weight_vht160(tSapChSelSpectInfo *pSpectInfoParams)
 		}
 	}
 
+	sap_sort_chl_weight(pSpectInfoParams);
+
 	pSpectInfo = pSpectInfoParams->pSpectCh;
 	for (j = 0; j < (pSpectInfoParams->numSpectChans); j++) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
@@ -1671,6 +1675,7 @@ void sap_sort_chl_weight_ht40_24_g(tSapChSelSpectInfo *pSpectInfoParams)
 			}
 		}
 	}
+	sap_sort_chl_weight(pSpectInfoParams);
 }
 
 /*==========================================================================
@@ -1797,14 +1802,11 @@ void sap_sort_chl_weight_all(ptSapContext pSapCtx,
 			sap_sort_chl_weight_ht40_24_g(pSpectInfoParams);
 			sap_sort_chl_weight_ht40_5_g(pSpectInfoParams);
 		}
-		sap_sort_chl_weight(pSpectInfoParams);
 		break;
-
 	case CH_WIDTH_80MHZ:
 	case CH_WIDTH_80P80MHZ:
 		sap_sort_chl_weight_ht80(pSpectInfoParams);
 		break;
-
 	case CH_WIDTH_160MHZ:
 		sap_sort_chl_weight_vht160(pSpectInfoParams);
 		break;