Parcourir la source

qcacmn: Initialize pcl length to 0 in cds_get_alternate_channel_for_sap

When number of connections is more than 2 then the pcl length will be
garbage value. Initialize the pcl length with 0 to avoid wrong channel
list initialization.

Change-Id: If08dc2670ff5ff296220d6ad68766becb252fab7
CRs-Fixed: 2164773
Bala Venkatesh il y a 7 ans
Parent
commit
090d649236
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      umac/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c

+ 1 - 1
umac/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c

@@ -1706,7 +1706,7 @@ uint8_t policy_mgr_get_alternate_channel_for_sap(
 	uint8_t pcl_channels[QDF_MAX_NUM_CHAN];
 	uint8_t pcl_weight[QDF_MAX_NUM_CHAN];
 	uint8_t channel = 0;
-	uint32_t pcl_len;
+	uint32_t pcl_len = 0;
 
 	if (QDF_STATUS_SUCCESS == policy_mgr_get_pcl(psoc, PM_SAP_MODE,
 		&pcl_channels[0], &pcl_len,